:root {
  --primary-color: #63AD82; /* Verde Corporativo (Confianza) */
  --secondary-color: #044C79; /* Azul Marino (Tecnología) */
  --accent-color: #D97F17; /* Oro Cálido (Energía/Sol) */
  --dark-color: #1A202C; /* Antracita Profundo */
  --light-color: #F8F9FA;
  --white: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.05);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 1rem;
  --shadow: 0 10px 30px rgba(4, 76, 121, 0.08); /* Sombra con toque azul marino */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--dark-color);
  background-color: var(--light-color);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 8rem 0;
}

.grid {
  display: grid;
  gap: 2.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section-padding { padding: 4rem 0; }
}

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
}

.section-title {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}

.header.scrolled {
  padding: 0.8rem 0;
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 48px;
  width: auto;
  transition: var(--transition);
}

.header.scrolled .logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent-color);
}

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  user-select: none;
  -webkit-user-select: none;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--secondary-color);
  border-radius: 4px;
  transition: var(--transition);
  transform-origin: center;
}

/* Animación X al abrir */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(8.75px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8.75px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6rem 2rem 2rem;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    overflow-y: auto;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .nav-links li:last-child {
    border-bottom: none;
    margin-top: 1.5rem;
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  .nav-cta {
    display: block;
    text-align: center;
    width: 100%;
    padding: 1rem !important;
  }

}

/* Overlay oscuro detrás del menú móvil */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(217, 127, 23, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(217, 127, 23, 0.4);
  background: #BF6E12;
}

.btn-secondary {
  background: var(--dark-color);
  color: var(--white);
}

.btn-secondary:hover {
  background: #333;
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

/* Hero Sección Principal (Home) */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  padding-top: 80px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 2rem;
  line-height: 1.1;
  font-weight: 700;
}

.hero h1 span {
  color: var(--accent-color);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 700px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .hero p { font-size: 1.1rem; }
  .hero-actions { flex-direction: column; }
}

/* Glass Cards */
.glass-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 3rem;
  border-radius: 1.5rem;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

/* Inside Pages Hero (Breadcrumbs) */
.page-hero {
  padding: 12rem 0 6rem;
  background: var(--dark-color);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.breadcrumbs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  opacity: 0.7;
}

.breadcrumbs a { color: var(--white); text-decoration: none; }
.breadcrumbs span { color: var(--primary-color); }

/* FAQ Styles */
.faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.faq-question {
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
}

.faq-answer {
  margin-top: 1rem;
  display: none;
}

.faq-item.active .faq-answer { display: block; }

/* Process Steps */
.step-card {
  position: relative;
  padding-left: 4rem;
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--primary-color);
  color: var(--white);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* Footer */
.footer {
  padding: 6rem 0 3rem;
  background: var(--dark-color);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col a { color: #ccc; text-decoration: none; transition: var(--transition); }
.footer-col a:hover { color: var(--primary-color); }

.copy {
  border-top: 1px solid #333;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
}

/* Calculator Wizard Styles */
.calculator-wizard {
  overflow: hidden;
  position: relative;
}

.calc-step {
  display: none;
}

.calc-step.active {
  display: block;
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 4px rgba(147, 197, 114, 0.1);
}

input[type="range"] {
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.restart-calc:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   RESPONSIVE GLOBAL
   ============================================= */
@media (max-width: 768px) {
  /* Contenedor */
  .container {
    padding: 0 1.25rem;
  }

  /* Tipografía de secciones */
  .section-title h2 {
    font-size: 2rem;
  }
  .section-title {
    margin-bottom: 3rem;
  }

  /* Hero páginas internas */
  .page-hero {
    padding: 9rem 0 4rem;
  }
  .page-hero h1 {
    font-size: 2.2rem;
  }
  .breadcrumbs {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  /* Glass cards con menos padding */
  .glass-card {
    padding: 2rem 1.5rem;
  }

  /* Logos en el footer más pequeños */
  .footer-col .logo img {
    height: 38px;
  }

  /* FAQ pregunta menor */
  .faq-question {
    font-size: 1rem;
  }

  /* Botones a ancho completo en acciones del hero */
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-title h2 {
    font-size: 1.7rem;
  }
  .page-hero h1 {
    font-size: 1.9rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .logo img {
    height: 38px;
  }
}

/* Scroll Animations (Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Escalonado para múltiples elementos (Stagger) */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
