/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
  /* Colores de identidad GCH (tomados del logotipo y la hoja membretada) */
  --gch-crema: #f5ebd3;
  --gch-crema-claro: #faf6ec;
  --gch-oscuro: #5f5f5f; /* gris del logotipo: bandas de un solo color */
  --gch-dorado: #b8913f;
  --gch-dorado-claro: #e2cb8f;
  --gch-texto: #8a6a27;
  --gris-dark: #5f5f5f;
  --blanco: #ffffff;
  --whatsapp: #25d366;
  --transition: all 0.3s ease;

  /* Tipografías: con serifa para títulos (como el logotipo) */
  --fuente-titulos: "Playfair Display", Georgia, "Times New Roman", serif;
  --fuente-texto: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-texto);
  line-height: 1.4;
  color: #333;
  overflow-x: hidden;
  background-color: var(--blanco);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Bloquea el scroll de fondo cuando la ventana de servicios está abierta */
body.modal-abierto {
  overflow: hidden;
}

/* Los campos y botones usan la misma letra que el resto de la página */
button,
input,
textarea {
  font: inherit;
}

/* Evita que el menú fijo tape el título al navegar */
section {
  scroll-margin-top: 80px;
}

/* =========================================
   2. NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar-top {
  height: 70px;
  background: var(--gch-oscuro);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

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

.brand-text {
  border-left: 2px solid var(--gch-dorado);
  padding-left: 15px;
  display: flex;
  flex-direction: column;
}

.brand-main {
  font-family: var(--fuente-titulos);
  color: var(--gch-dorado-claro);
  font-weight: 900;
  font-size: 1.2rem;
  text-transform: uppercase;
  line-height: 1;
}

.brand-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--blanco);
  font-weight: 600;
  margin-left: 25px;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--gch-dorado-claro);
}

/* Botón hamburguesa (solo celular) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  gap: 5px;
  padding: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--blanco);
  transition: var(--transition);
}

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

/* =========================================
   3. SECCIÓN INICIO (HERO)
   ========================================= */
.main-content {
  margin-top: 70px;
  flex: 1;
}

.hero-section {
  display: flex;
  background-color: var(--gch-crema);
}

.hero-left {
  flex: 1.2;
  background: var(--gch-crema);
  display: flex;
  align-items: center;
  padding: 70px 60px;
  color: var(--gch-oscuro);
}

.hero-content h1 {
  font-family: var(--fuente-titulos);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.hero-line {
  width: 80px;
  height: 4px;
  background-color: var(--gch-dorado);
  margin: 20px 0;
}

.hero-sub {
  font-size: 1.25rem;
  max-width: 520px;
  margin-bottom: 25px;
  text-align: justify;
}

/* Botón dorado de las tarjetas de plataformas */
.btn-gch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid var(--gch-texto);
  border-radius: 5px;
  background: var(--gch-texto);
  color: var(--blanco);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-gch:hover {
  background: var(--gch-oscuro);
  border-color: var(--gch-oscuro);
}

.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.hero-logo {
  max-width: 90%;
  max-height: 340px;
  object-fit: contain;
}

/* =========================================
   4. SECCIONES Y TÍTULOS
   ========================================= */
.about-section,
.services-section,
.contact-section,
.plataformas-section,
.beneficios-section,
.proceso-section {
  padding: 20px 5%;
}

/* Fondos: crema y crema oscuro alternados (las demás secciones van en blanco) */
.about-section,
.plataformas-section,
.proceso-section {
  background-color: var(--gch-crema-claro);
}

.services-section {
  background: var(--gch-crema);
}

/* Texto breve debajo de un título de sección */
.section-intro {
  text-align: center;
  color: #555;
  font-size: 1.05rem;
  max-width: 800px;
  margin: 0 auto 20px;
}

.contact-section {
  min-height: 500px;
}

/* Título de sección con líneas a los lados */
.section-header-gch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  text-align: center;
}

.section-header-gch hr {
  flex-grow: 1;
  max-width: 80px;
  border: none;
  border-top: 3px solid var(--gch-texto);
  opacity: 0.3;
}

.section-header-gch h2 {
  font-family: var(--fuente-titulos);
  font-size: 2.3rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gch-texto);
  letter-spacing: 2px;
}

.section-header-gch span {
  color: var(--gch-oscuro);
}

/* =========================================
   5. NOSOTROS (MISIÓN Y VISIÓN)
   ========================================= */
.about-intro {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #444;
  text-align: justify;
  max-width: 95%;
  margin: 0 auto 15px;
}

.about-intro p + p {
  margin-top: 12px;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.differentiation-box {
  background: var(--blanco);
  padding: 10px 30px;
  border-radius: 12px;
  border-right: 5px solid var(--gch-texto);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin: 10px auto;
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  text-align: justify;
}

.differentiation-box h3 {
  color: var(--gch-oscuro);
}

.differentiation-box p {
  margin-top: 5px;
}

/* =========================================
   6. PLATAFORMAS (TARJETAS 3 POR RENGLÓN)
   ========================================= */
.grid-plataformas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 10px;
}

/* La última tarjeta (si queda sola) se centra */
.plataforma-card:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

.plataforma-card {
  background: var(--blanco);
  border-radius: 12px;
  border-top: 4px solid var(--gch-texto);
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.plataforma-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.plataforma-icono {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--gch-crema);
  color: var(--gch-texto);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plataforma-card h3 {
  color: var(--gch-oscuro);
  font-size: 1.1rem;
  line-height: 1.25;
}

.plataforma-dominio {
  color: var(--gris-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.plataforma-card p {
  color: #444;
  font-size: 0.95rem;
  flex-grow: 1;
  text-align: justify;
}

.plataforma-card .btn-gch {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 0.75rem;
}

/* =========================================
   7. BENEFICIOS, METODOLOGÍA Y FRANJA
   ========================================= */
.grid-beneficios,
.grid-proceso {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 10px;
}

.beneficio,
.paso {
  text-align: center;
  padding: 10px;
  position: relative;
}

.beneficio i {
  font-size: 2rem;
  color: var(--gch-texto);
  margin-bottom: 10px;
}

.beneficio h3,
.paso h3 {
  color: var(--gch-oscuro);
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.beneficio p,
.paso p {
  color: #555;
  font-size: 0.9rem;
}

.paso-numero {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid var(--gch-crema);
  background: var(--gch-texto);
  color: var(--blanco);
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Línea que une un círculo con el siguiente */
.paso:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  left: calc(50% + 28px);
  width: calc(100% - 36px);
  height: 3px;
  background: var(--gch-dorado-claro);
}

/* Franja del diferenciador */
.franja-gch {
  background: var(--gch-oscuro);
  border-top: 4px solid var(--gch-dorado);
  border-bottom: 4px solid var(--gch-dorado);
  color: var(--blanco);
  text-align: center;
  padding: 40px 5%;
}

.franja-gch h2 {
  font-family: var(--fuente-titulos);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto 12px;
}

.franja-gch p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  max-width: 800px;
  margin: 0 auto;
}

/* =========================================
   8. SERVICIOS (TARJETAS 3 POR RENGLÓN)
   ========================================= */
.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Las tarjetas son botones: se pueden usar también con el teclado */
.service-card {
  position: relative;
  height: 180px;
  width: 100%;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

.service-card {
  border-bottom: 4px solid var(--gch-dorado);
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-overlay {
  position: absolute;
  inset: 0;
  flex-direction: column;
  gap: 12px;
  background: var(--gch-oscuro);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--blanco);
  text-align: center;
  font-size: 1.2rem;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.2;
}

/* =========================================
   9. CONTACTO (FORMULARIO Y MAPA)
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}

.form-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.form-side h2 {
  font-family: var(--fuente-titulos);
  color: var(--gch-texto);
  margin-bottom: 20px;
  font-size: 2rem;
  text-align: center;
}

.contact-info {
  margin-bottom: 25px;
  line-height: 1.6;
}

.contact-info i {
  color: var(--gch-texto);
  margin-right: 10px;
  font-size: 1.2rem;
}

.contact-info .fa-whatsapp {
  color: var(--whatsapp);
}

.contact-info a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

#contactForm input,
#contactForm textarea {
  flex: 1;
  min-width: 250px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#contactForm textarea {
  width: 100%;
  resize: none;
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: 2px solid var(--gch-dorado-claro);
  border-color: var(--gch-texto);
}

#btnEnviar {
  background: var(--gch-texto);
  color: var(--blanco);
  border: none;
  padding: 15px;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  width: 100%;
  transition: var(--transition);
}

#btnEnviar:hover {
  background: var(--gch-oscuro);
}

#btnEnviar i {
  margin-right: 8px;
}

.map-side {
  width: 100%;
  display: flex;
}

.map-box {
  width: 100%;
  min-height: 450px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.map-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================
   10. VENTANA EMERGENTE DE SERVICIOS
   ========================================= */
.details-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.details-overlay.abierto {
  display: flex;
}

.details-content {
  background: var(--blanco);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  padding: 30px;
  border-radius: 10px;
  position: relative;
  overflow-y: auto;
}

.details-content h2 {
  color: var(--gch-oscuro);
  padding-right: 30px;
}

.close-details {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

#modalList {
  list-style: none;
  margin-top: 20px;
  line-height: 1.6;
}

#modalList li {
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
  text-align: justify;
  font-size: 0.95rem;
  color: #444;
}

#modalList li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--gch-texto);
  font-weight: bold;
}

/* =========================================
   11. PIE DE PÁGINA
   ========================================= */
.site-footer {
  background: var(--gch-oscuro);
  color: var(--blanco);
  padding: 10px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* =========================================
   12. BOTONES FLOTANTES (WHATSAPP Y FACEBOOK)
   ========================================= */
.floating-container {
  position: fixed;
  bottom: 50px;
  right: 5px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.floating-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-size: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  text-decoration: none;
  opacity: 0.6;
}

.whatsapp-float {
  background-color: var(--whatsapp);
}

.floating-btn:hover {
  opacity: 1;
  transform: scale(1.1) translateX(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* =========================================
   13. TABLETA (hasta 1024px)
   ========================================= */
@media (max-width: 1024px) {
  .grid-plataformas {
    grid-template-columns: 1fr 1fr;
  }

  .plataforma-card:last-child:nth-child(3n + 1) {
    grid-column: auto;
  }

  .plataforma-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 10px);
  }
}

/* =========================================
   14. CELULAR (hasta 768px)
   ========================================= */
@media (max-width: 768px) {
  /* Menú desplegable */
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 20px;
    width: 180px;
    background: var(--gch-oscuro);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    overflow: hidden;
  }

  .nav-links.active {
    display: flex;
    animation: fadeInDown 0.3s ease-out;
  }

  .nav-links a {
    color: rgba(255, 255, 255, 0.9);
    padding: 14px 20px;
    margin: 0;
    width: 100%;
    display: block;
    text-align: right;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-right: 25px;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Inicio: texto arriba y logo abajo */
  .hero-section {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  .hero-left {
    padding: 50px 25px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-logo {
    max-width: 60%;
    max-height: none;
  }

  /* Títulos de sección más compactos */
  .section-header-gch {
    gap: 12px;
  }

  .section-header-gch hr {
    max-width: 30px;
  }

  .section-header-gch h2,
  .form-side h2 {
    font-size: 1.6rem;
  }

  .about-intro {
    font-size: 1.05rem;
    max-width: 100%;
    text-align: left;
  }

  .mission-vision-grid {
    grid-template-columns: 1fr;
  }

  .differentiation-box {
    padding: 10px 20px;
    text-align: left;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  /* Plataformas: una por renglón */
  .grid-plataformas {
    grid-template-columns: 1fr;
  }

  .plataforma-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: auto;
  }

  /* Beneficios en 2 columnas y pasos uno debajo de otro */
  .grid-beneficios {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .grid-proceso {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .paso:not(:last-child)::after {
    display: none;
  }

  /* Servicios: una tarjeta por renglón */
  .grid-services {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .service-card {
    height: 120px;
  }

  .card-overlay {
    font-size: 1rem;
  }

  /* Contacto */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  #contactForm input {
    min-width: 100%;
  }

  .map-box {
    min-height: 300px;
  }

  /* Botones flotantes más pequeños */
  .floating-container {
    right: 2px;
    bottom: 20px;
  }

  .floating-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* =========================================
   15. COMPLEMENTOS PROPIOS DE GCH
   ========================================= */
/* Valores (debajo de misión y visión) */
.valores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  max-width: 1100px;
  margin: 15px auto 10px;
}

.valores li {
  padding: 8px 18px;
  border: 1px solid var(--gch-dorado);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--gch-texto);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Dos botones juntos en las tarjetas de plataformas */
.plataforma-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plataforma-card .plataforma-acciones .btn-gch {
  padding: 8px 14px;
  font-size: 0.72rem;
}

/* Botón con fondo blanco y borde dorado */
.btn-gch-outline {
  background: var(--blanco);
  color: var(--gch-texto);
}

.btn-gch-outline:hover {
  color: var(--blanco);
}

/* Recuadro de la alianza (en lugar del mapa) */
.alianza-box {
  width: 100%;
  border-radius: 10px;
  padding: 35px 30px;
  background: var(--gch-oscuro);
  color: var(--blanco);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  text-align: justify;
}

.alianza-box h3 {
  font-family: var(--fuente-titulos);
  color: var(--gch-dorado-claro);
  font-size: 1.6rem;
  text-align: center;
}

.alianza-box p {
  color: rgba(255, 255, 255, 0.88);
}

.alianza-box .btn-gch {
  align-self: center;
  background: var(--gch-dorado);
  border-color: var(--gch-dorado);
}

/* Enlace del pie de página */
.site-footer a {
  color: var(--gch-dorado-claro);
  text-decoration: none;
}

/* Ícono dorado de cada tarjeta de servicio */
.card-overlay i {
  color: var(--gch-dorado-claro);
  font-size: 2rem;
}

/* Logotipo pequeño de la barra superior (fondo crema para que se distinga del gris) */
.brand-logo {
  height: 46px;
  margin-right: 12px;
  padding: 3px 6px;
  border-radius: 8px;
  background: var(--gch-crema-claro);
}
