/* ==========================================================================
   VARIABLES Y RESET
   ========================================================================== */
:root {
  /* Colores principales */
  --c-primary: #2d6a2f;
  --c-primary-dark: #1e4d20;
  --c-sand: #f5f3eb;
  --c-sand-dark: #e8e3d3;
  --c-whatsapp: #25D366;
  --c-whatsapp-dark: #128C7E;
  
  /* Textos y fondos */
  --c-text-main: #333333;
  --c-text-muted: #666666;
  --c-bg-body: #ffffff;
  --c-border: #e0e0e0;
  
  /* Tipografía */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Espaciados y utilidades */
  --container-width: 1200px;
  --transition: all 0.3s ease;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--c-text-main);
  background-color: var(--c-bg-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--c-primary-dark);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mt-xl { margin-top: 3rem; }

/* Accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--c-primary);
  color: white;
  padding: 8px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.125rem; }

.btn--primary {
  background-color: var(--c-primary);
  color: white;
}
.btn--primary:hover {
  background-color: var(--c-primary-dark);
  color: white;
}

.btn--whatsapp {
  background-color: var(--c-whatsapp);
  color: white;
}
.btn--whatsapp:hover {
  background-color: var(--c-whatsapp-dark);
  color: white;
}

.btn--outline {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background-color: transparent;
}
.btn--outline:hover {
  background-color: var(--c-primary);
  color: white;
}

.btn--outline-white {
  border-color: white;
  color: white;
  background-color: transparent;
}
.btn--outline-white:hover {
  background-color: white;
  color: var(--c-text-main);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 100;
  padding: 1rem 0;
  backdrop-filter: blur(5px);
}

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

.logo {
  display: flex;
  flex-direction: column;
}
.logo-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1.1;
}
.logo-sub {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--c-text-main);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--c-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-official-link {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  text-decoration: underline;
}

/* Toggle Menu Móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Navegación Móvil */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background-color: white;
  z-index: 99;
  padding: 6rem 2rem 2rem;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-nav.is-active {
  right: 0;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-text-main);
}
.mobile-cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-cta .official-link {
  font-size: 0.875rem;
  text-align: center;
  color: var(--c-text-muted);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  padding: 8rem 0 6rem;
  color: white;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #000;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5; /* Oscurece la imagen para que el texto sea legible */
}

.hero-content {
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero-tag .dot {
  width: 8px;
  height: 8px;
  background-color: var(--c-whatsapp);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-whatsapp);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}
.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
  padding: 5rem 0;
}
.section--sand {
  background-color: var(--c-sand);
}

.section-header {
  margin-bottom: 3rem;
  max-width: 700px;
}
.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-label {
  display: block;
  color: var(--c-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: var(--c-text-main);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--c-text-muted);
}

/* Quick Answer */
.quick-answer {
  background-color: #f0fdf4;
  border-left: 4px solid var(--c-primary);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: -2rem; /* Sube un poco hacia el hero */
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow);
}
.quick-answer-label {
  font-weight: 700;
  color: var(--c-primary-dark);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
}

/* ==========================================================================
   GRILLES Y TARJETAS
   ========================================================================== */
/* Grid de Ventajas */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.benefit-card {
  display: flex;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.benefit-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background-color: var(--c-sand);
  color: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}
.benefit-card p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

/* Grid de Servicios (4 columnas) */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.icon-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid transparent;
}
.icon-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--c-primary);
}
.icon-wrap {
  width: 60px;
  height: 60px;
  background-color: var(--c-sand);
  color: var(--c-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.icon-card h3 {
  margin-bottom: 0.75rem;
}
.icon-card p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.card-link {
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Grid de Proceso (Steps) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  counter-reset: step-counter;
}
.step-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow);
}
.step-card::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  top: -15px;
  left: 2rem;
  width: 30px;
  height: 30px;
  background: var(--c-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}
.step-card h3 {
  margin-bottom: 0.75rem;
}
.step-card p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

/* Grid de Proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
}
.project-img {
  width: 100%;
  height: 220px;
  background-color: var(--c-border); /* Placeholder background */
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-info {
  padding: 1.5rem;
}
.project-tag {
  display: inline-block;
  background: var(--c-sand);
  color: var(--c-primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.project-info h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.project-info p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   BLOQUES DE CONTENIDO (SPLITS)
   ========================================================================== */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.content-split.reverse div:first-child {
  order: 2;
}
.content-split.reverse div:last-child {
  order: 1;
}

/* Listas personalizadas */
.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--c-text-muted);
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-primary);
  font-weight: bold;
}

.trust-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.trust-item {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.trust-item::before {
  content: '★';
  position: absolute;
  left: 0;
  top: -2px;
  color: #f59e0b;
}

/* Zonas Tag */
.zones-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.zone-tag {
  background: var(--c-sand-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--c-text-main);
}

/* Imagen Placeholder (Para cuando no hay fotos) */
.img-placeholder {
  background-color: var(--c-sand-dark);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  text-align: center;
  padding: 2rem;
}
.img-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--c-primary);
}

.about-block {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-block h3 { margin-bottom: 1rem; }
.about-block p { margin-bottom: 1rem; color: var(--c-text-muted); font-size: 0.95rem; }

/* ==========================================================================
   RESEÑAS (Placeholders)
   ========================================================================== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.review-placeholder {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px dashed var(--c-border);
}

/* ==========================================================================
   BLOQUE OFICIAL CONFIANZA
   ========================================================================== */
.official-trust-block {
  background: white;
  border: 2px solid var(--c-primary);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.official-trust-block h3 {
  color: var(--c-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.official-trust-block p {
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: transparent;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-icon {
  font-size: 1.5rem;
  color: var(--c-primary);
  transition: transform 0.3s ease;
}
.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--c-text-muted);
  display: none; /* Fallback si no hay JS: se oculta por defecto */
}

/* Si tuvieras JS que cambia el aria-expanded: */
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}
.faq-question[aria-expanded="true"] + .faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-section {
  background-color: var(--c-primary-dark);
  color: white;
  padding: 6rem 0;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}
.cta-section p {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #1a1a1a;
  color: #cccccc;
  padding: 5rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-brand .footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  display: block;
  margin-bottom: 0.25rem;
}
.footer-tagline {
  color: var(--c-primary);
  margin-bottom: 1.5rem;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.footer-contact a {
  color: #cccccc;
}
.footer-contact a:hover {
  color: white;
}
.footer-official {
  padding-top: 1rem;
  border-top: 1px solid #333;
}
.footer-official a {
  color: var(--c-primary);
  font-weight: bold;
}

.footer-col h4 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-col a {
  color: #cccccc;
}
.footer-col a:hover {
  color: var(--c-whatsapp);
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  margin-bottom: 2rem;
}
.footer-legal a {
  color: #cccccc;
  margin-left: 1.5rem;
}
.footer-legal a:hover {
  color: white;
}

.footer-seo-text {
  font-size: 0.75rem;
  color: #666;
  text-align: justify;
}
.footer-seo-text a {
  color: #888;
  text-decoration: underline;
}

/* ==========================================================================
   WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--c-whatsapp);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform 0.3s ease;
}
.whatsapp-float svg {
  width: 35px;
  height: 35px;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}
.whatsapp-float .tooltip {
  position: absolute;
  right: 75px;
  background: white;
  color: var(--c-text-main);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.whatsapp-float:hover .tooltip {
  opacity: 1;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
@media (max-width: 1024px) {
  .content-split {
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions .header-official-link {
    display: none; /* Ocultar enlace en móvil para hacer espacio */
  }
  .header-cta-btn-mobile span {
    display: none; /* Si quisieras dejar solo el icono de whatsapp */
  }
  .menu-toggle {
    display: flex;
  }
  .main-nav {
    display: none; /* Se usa mobile-nav en su lugar */
  }
  
  .hero {
    padding: 6rem 0 4rem;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero-badges {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .content-split,
  .content-split.reverse div:first-child,
  .content-split.reverse div:last-child {
    grid-template-columns: 1fr;
    order: 0;
  }
  
  .trust-list {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer-legal a {
    margin: 0 0.75rem;
  }
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
  .quick-answer {
    padding: 1.25rem;
  }
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
  .whatsapp-float .tooltip {
    display: none;
  }
}