/* ==========================
   BASE GENERAL
========================== */

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fafafa;
  color: #333;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

* {
  box-sizing: border-box;
  max-width: 100%;
}

/* ==========================
   HEADER + NAV
========================== */

.topbar {
  background: #8a008a;
  padding: 12px 0;
  position: relative;
}

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

/* HERO específico para EFCO */
.page-hero-efco {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
}

.page-hero-efco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-efco-overlay {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: rgba(138, 0, 138, 0.85);
  padding: 12px 20px;
  border-radius: 6px;
}

.page-hero-efco-overlay h1 {
  margin: 0;
  color: white;
  font-size: 28px;
  font-weight: 600;
}
.logo {
  height: 60px;
}

/* Desktop menu visible */
nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  padding: 0;
  margin: 0;
  transition: all 0.25s ease;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

nav ul li a:hover {
  text-decoration: underline;
}

/* Hamburguesa oculta en desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  margin-left: auto;
}


/* ==========================
   HERO
========================== */

.hero {
  background-image: url('/assets/img/header.jpg');
  background-size: cover;
  background-position: center;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-overlay {
  background: rgba(255,255,255,0.9);
  padding: 20px 40px;
  border-radius: 6px;
  text-align: center;
}

.tagline {
  display: inline-block;
  background: #d50064;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
}


/* ==========================
   SERVICE CARDS
========================== */

.services {
  display: flex;
  gap: 30px;
  margin: 50px 0;
}

.service-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  flex: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.service-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.service-card a {
  display: inline-block;
  margin-top: 15px;
  background: #8a008a;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
}

.service-card a:hover {
  background: #6a006a;
}


/* ==========================
   RESPONSIVE - TABLET & MOBILE
========================== */

@media (max-width: 768px) {

  .topbar {
    padding: 8px 0;
  }

  .logo {
    height: 45px;
  }

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* Ocultar menú por defecto */
  nav ul {
    display: none !important;
    flex-direction: column;
    gap: 15px;
    background: #8a008a;
    padding: 15px;
    border-radius: 0 0 8px 8px;

    /* POSICIÓN DEFINITIVA */
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    width: 100%;

    text-align: left;
    opacity: 0;
    transform: translateY(-10px);
  }

  /* Menú abierto */
  nav ul.open {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
  }

  nav ul li {
    width: 100%;
  }

  /* HERO */
  .hero {
    height: 180px;
  }

  .hero-overlay h1 {
    font-size: 24px;
  }

  /* SERVICES */
  .services {
    flex-direction: column;
    gap: 20px;
  }

  .service-card {
    width: 90%;
    margin: auto;
  }

  .service-card img {
    width: 90px;
    height: 90px;
  }
}


/* ==========================
   EXTRA SMALL (iPhone SE)
========================== */

@media (max-width: 480px) {

  .logo {
    height: 40px;
  }

  nav ul {
    font-size: 14px;
  }

  .hero {
    height: 150px;
  }

  .hero-overlay {
    padding: 10px 20px;
  }

  .hero-overlay h1 {
    font-size: 20px;
  }

  .service-card {
    width: 95%;
  }
}

/* ==========================
   FOOTER CORPORATIVO
========================== */

.footer {
  background: #8a008a;
  color: white;
  margin-top: 50px;
  padding: 40px 0 20px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-column h4 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column ul li a {
  color: white;
  opacity: 0.9;
  text-decoration: none;
}

.footer-column ul li a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-description {
  max-width: 260px;
  line-height: 1.5;
  font-size: 14px;
  opacity: 0.95;
}

.footer-logo {
  height: 55px;
  margin-bottom: 12px;
}

.footer-bottom {
  text-align: center;
  margin-top: 35px;
  padding-top: 15px;
  font-size: 13px;
  opacity: 0.6;
  border-top: 1px solid rgba(255,255,255,0.25);
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto 12px auto;
  }

  .footer-description {
    margin: 0 auto;
    max-width: 85%;
  }
}

/* ==========================
   ACORDEÓN EFCO
========================== */

.accordion {
  margin-top: 40px;
}

.ac-item {
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
}

.ac-title {
  display: block;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
}

.ac-content {
  display: none;
  padding: 10px 0 20px 0;
  line-height: 1.6;
}

.ac-item input {
  display: none;
}

.ac-item input:checked ~ .ac-content {
  display: block;
}

/* Permitir saltos de línea dentro del acordeón */
.ac-content p,
.ac-content li,
.ac-content {
  white-space: pre-line;
}

/* ==========================
   SUBMENÚ CORPORATIVO — FIX
========================== */

.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #8a008a;
  padding: 10px 0;
  list-style: none;

  /* ⚠️ NUEVO: ancho más cómodo */
  min-width: 260px;

  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.submenu li a {
  display: block;
  padding: 10px 18px;
  color: white;
  text-decoration: none;
  font-size: 15px;
}

.submenu li a:hover {
  background: rgba(255,255,255,0.15);
}

@media (min-width: 769px) {
  .has-submenu:hover .submenu {
    display: block;
  }
}

/* MÓVIL */
@media (max-width: 768px) {
  .submenu {
    position: static;
    min-width: 100%;
    box-shadow: none;
  }

  .has-submenu > a::after {
    content: "";
  }
}

/* Títulos en color corporativo */
h1, h2 {
  color: #8a008a;
}

/* Preguntas del acordeón (FAQ) en rosa institucional */
.ac-title {
  color: #d50064;
  font-weight: 600;
}

/* ==========================
   Ajustes de interlineado EFCO
========================== */
.ac-content {
  white-space: pre-line;
  line-height: 1.45;       /* ACHICA el interlineado general */
}

.ac-content p {
  margin: 0 0 8px 0;       /* Reduce espacio entre párrafos */
  line-height: 1.45;
}

.ac-content ul,
.ac-content li {
  margin: 0 0 6px 0;       /* Reduce espacio de listas */
  line-height: 1.4;
}

.ac-content strong {
  line-height: 1.4;        /* Negritas más integradas */
}

.ac-title {
  margin-bottom: 6px;      /* Reduce espacio entre pregunta y contenido */
}

/* ====================================
   EFCO — Optimización de lectura
   ==================================== */

/* Compacta el interlineado general del contenido */
.ac-content {
  white-space: pre-line;
  line-height: 1.45;
  padding-bottom: 10px;
}

/* Párrafos más cercanos entre sí */
.ac-content p {
  margin: 4px 0 10px 0;
  line-height: 1.45;
}

/* Listas ordenadas y sin espacios innecesarios */
.ac-content ul {
  margin: 6px 0 10px 20px;
  padding-left: 0;
}

.ac-content li {
  margin: 2px 0;
  line-height: 1.4;
}

/* Negritas ajustadas para no abrir espacio demás */
.ac-content strong {
  line-height: 1.35;
}

/* Subtítulos dentro de contenido (los <u> + strong) */
.ac-content h3,
.ac-content h4,
.ac-content h5 {
  margin: 10px 0 6px 0;
  line-height: 1.35;
}

/* El título de cada FAQ (pregunta) */
.ac-title {
  color: #d50064; /* rosa institucional */
  font-weight: 600;
  margin: 0;
  padding: 5px 0;
}

/* =====================================
   EFCO — Estilo definitivo del acordeón
   ===================================== */

/* Contenedor */
.ac-content {
  white-space: pre-line;       /* Mantiene saltos de línea */
  line-height: 1.38;           /* Interlineado compacto */
  padding: 8px 0 12px 0;       /* Reduce aire vertical */
  font-size: 15px;             /* Tamaño más legible */
  color: #333;
}

/* Párrafos */
.ac-content p {
  margin: 2px 0 8px 0;         /* Mucho más compacto */
  line-height: 1.38;
}

/* Listas */
.ac-content ul {
  margin: 6px 0 10px 18px;     /* Ajuste de sangría y espaciado */
  padding: 0;
}

.ac-content li {
  margin: 2px 0;
  line-height: 1.34;
}

/* Negritas */
.ac-content strong {
  font-weight: 600;
  line-height: 1.34;           /* Ajusta separación */
}

/* Subtítulos (los <u> + strong formados desde DOCX) */
.ac-content h3,
.ac-content h4,
.ac-content h5 {
  margin: 8px 0 6px 0;
  padding: 0;
  line-height: 1.32;
  font-weight: 600;
}

/* Título de cada pregunta */
.ac-title {
  color: #d50064;              /* Rosa institucional */
  font-weight: 600;
  margin: 0;
  padding: 6px 0;
  line-height: 1.2;
}

/* ===========================================
   EFCO — Interlineado definitivo (override)
=========================================== */

.ac-content {
  white-space: pre-line !important;
  line-height: 1.32 !important;        /* Interlineado compacto */
  padding: 5px 0 6px 0 !important;     /* Mucho menos aire */
  font-size: 15px;
}

.ac-content p {
  margin: 2px 0 6px 0 !important;      /* Párrafos muy controlados */
  line-height: 1.32 !important;
}

.ac-content ul {
  margin: 4px 0 6px 18px !important;   /* Listas más pegadas */
  padding-left: 0 !important;
}

.ac-content li {
  margin: 1px 0 !important;
  line-height: 1.28 !important;
}

.ac-content strong {
  line-height: 1.28 !important;        /* Negritas integradas */
}

.ac-content h3,
.ac-content h4,
.ac-content h5 {
  margin: 6px 0 4px 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

/* HERO específico para EFCO */
.page-hero-efco {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #8a008a;
}

.page-hero-efco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-efco-overlay {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: rgba(138, 0, 138, 0.80);
  padding: 12px 24px;
  border-radius: 6px;
}

.page-hero-efco-overlay h1 {
  margin: 0;
  color: white;
  font-size: 28px;
  font-weight: 600;
}/* HERO específico para EFCO */
.page-hero-efco {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #8a008a;
}

.page-hero-efco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-efco-overlay {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: rgba(138, 0, 138, 0.80);
  padding: 12px 24px;
  border-radius: 6px;
}

.page-hero-efco-overlay h1 {
  margin: 0;
  color: white;
  font-size: 28px;
  font-weight: 600;
}

/* HERO específico para EFCO */
.page-hero-efco {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
}

.page-hero-efco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-efco-overlay {
  position: absolute;
  bottom: 20px;
  left: 40px;
  background: rgba(138, 0, 138, 0.85);
  padding: 12px 24px;
  border-radius: 6px;
}

.page-hero-efco-overlay h1 {
  margin: 0;
  color: white;
  font-size: 28px;
  font-weight: 600;
}

/* ============================================
   FIX CRÍTICO — Mostrar menú hamburguesa en móvil
============================================ */

@media (max-width: 768px) {

  /* Asegurar que el botón aparezca */
  .menu-toggle {
    display: block !important;
    color: white !important;
    z-index: 9999;
    margin-left: auto;
    margin-right: 0;
    position: relative;
  }

  /* Asegurar que el menú no aparezca detrás de nada */
  nav ul {
    position: absolute;
    z-index: 9998;
  }

  /* Prevenir que un nav overflow o contenedor lo oculte */
  .topbar, .nav-flex, nav {
    overflow: visible !important;
  }
}

/* FIX CRÍTICO — asegurar que el header esté por encima del hero */
.topbar,
.nav-flex,
.menu-toggle,
nav {
  position: relative;
  z-index: 9999 !important;
}

.page-hero-efco {
  position: relative;
  z-index: 1;
}

/* ============================================
   FIX TOTAL — Traer el header arriba del HERO
============================================ */
.topbar,
.nav-flex,
nav,
.menu-toggle {
  position: relative !important;
  z-index: 9999 !important;
}

/* Asegurar que el hero NO tape el header */
.page-hero-efco,
.hero {
  position: relative !important;
  z-index: 1 !important;
}

/* Página de contacto */
.contact-form-wrapper {
  margin-top: 30px;
  margin-bottom: 50px;
}

.contact-form-wrapper iframe {
  border-radius: 8px;
  border: 2px solid #8a008a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Títulos */
.page-content h1 {
  color: #8a008a;
  margin-bottom: 10px;
}

.page-content p {
  font-size: 16px;
  line-height: 1.5;
  max-width: 650px;
}

/* ===========================================
   FIX DEFINITIVO – Menú móvil desaparecido
=========================================== */

@media (max-width: 768px) {

  /* Apagar menú desktop de una vez por todas */
  nav ul {
    display: none !important;
  }

  /* Encender botón hamburguesa obligatoriamente */
  .menu-toggle {
    display: block !important;
    color: white !important;
    z-index: 9999 !important;
  }
}

/* ===========================================================
   FIX FINAL — Menú hamburguesa perfectamente alineado en móvil
   =========================================================== */

@media (max-width: 768px) {

  /* 1. Mostrar siempre la hamburguesa en móvil */
  .menu-toggle {
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    margin-left: auto;
    color: white;
  }

  /* 2. Apagar el menú desktop definitivamente en móvil */
  nav ul {
    display: none !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    gap: 15px !important;

    /* 3. CLAVE: que NO sea absolute */
    position: static !important;

    /* 4. Ocupa TODO el ancho */
    width: 100% !important;

    /* 5. Fondo púrpura coherente */
    background: #8a008a !important;

    /* 6. Caída natural debajo del header */
    border-radius: 0 !important;

    /* 7. Sin desplazamiento */
    transform: none !important;
    opacity: 1 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
  }

  /* 8. Cuando el menú está abierto */
  nav ul.open {
    display: flex !important;
  }

  /* 9. Reasegurar jerarquía visual */
  .topbar, nav, .nav-flex {
    position: relative !important;
    z-index: 9998 !important;
  }
}

/* ===========================================================
   MENÚ MÓVIL FINAL — Funciona en TODAS las páginas
=========================================================== */

@media (max-width: 768px) {

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block !important;
    position: relative !important;
    z-index: 9999 !important;
    color: white !important;
  }

  /* Ocultar menú desktop */
  nav ul {
    display: none !important;
  }

  /* Menú móvil desplegable */
  nav ul.open {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: #8a008a !important;
    padding: 15px 0 !important;
    z-index: 9998 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  nav ul.open li {
    width: 100%;
    padding: 8px 20px;
  }

  nav ul.open li a {
    color: white !important;
  }
}

.page-hero-efco-overlay h1 {
  color: white !important;
}

/* ===========================================================
   MENÚ MÓVIL FINAL — unificado para TODOS los layouts
=========================================================== */

@media (max-width: 768px) {

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block !important;
    color: white !important;
    font-size: 28px;
    background: none;
    border: none;
    margin-left: auto;
    z-index: 10000 !important;
  }

  /* Ocultar menú desktop */
  nav ul {
    display: none !important;
  }

  /* Menú móvil desplegable */
  nav ul.open {
    display: flex !important;
    flex-direction: column !important;
    background: #8a008a !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    padding: 18px 0 !important;
    z-index: 9999 !important;
  }

  nav ul.open li a {
    color: white !important;
    padding: 10px 20px;
    display: block;
  }
}

.page-hero-efco-overlay h1 {
  color: white !important;
}
