/* ==========================================================================
   ID SEC GROUP — styles.css (hoja de estilos de la Vista Cliente)

   ÍNDICE (busca el título para saltar a cada parte)
   ── Diseño base de la maqueta ──────────────────────────────────────────
     Variables de color y tipografía (:root)
     1. BARRA DE NAVEGACIÓN UNIFICADA ........ menú superior y submenú
     2. ESTILOS DE BANNER Y TÍTULOS PRINCIPALES  banner del Inicio, títulos, hexágonos
     3. BARRAS DESPLAZABLES (MARQUEE) ......... «SERVICIOS» y servicio destacado
     4. TARJETAS DE SERVICIOS (INICIO) ........ abanico de tarjetas
     5. SECCIÓN: SOMOS TU MEJOR OPCIÓN
     6. SECCIÓN DETALLE M.I.A.A. ............. servicio destacado (imagen + texto)
     7. SECCIÓN DE CONTACTO GENERAL / FORMULARIOS
     8. FOOTER UNIFICADO ...................... pie de página
     9. PÁGINA NOSOTROS ...................... quiénes somos, misión, líderes, certificaciones
    10. PÁGINA DE SERVICIOS Y DETALLE ......... tarjetas, buscador, carrusel rectangular
    11. CASOS DE ÉXITO Y DETALLE DE CASO ...... hexágonos, pestañas, antes/después
    12. PÁGINA BLOG .......................... cuadrícula de hexágonos con carrusel
        PÁGINA Y SECCIÓN DE CONTACTO (VERSIÓN FINAL)
        DISEÑO RESPONSIVO (MOBILE, TABLET Y DESKTOP)
   ── Bloques añadidos (se aplican después y por eso mandan) ──────────────
     RESPONSIVE v2 — BLOQUE FINAL ............. celular, tableta, laptop, 4K
     DJANGO — CONTENIDO DINÁMICO .............. iconos, textos variables, avisos del formulario
     TEMA DE COLORES .......................... colores del panel aplicados a menú, banner y pie
     HEXÁGONOS — CARRUSEL GIRATORIO 3D ........ centro grande, laterales pequeños, zoom
     AJUSTES DE NAVEGACIÓN E ICONOS ........... migas de pan, volver arriba, otros servicios
     FORMAS DE LAS IMÁGENES ................... hexágono / círculo / cuadrado / rectángulo
     FORMAS DE LOS CONTENEDORES ............... tarjetas, certificaciones y campos
     RECUADROS DE BLOG Y CASOS DE ÉXITO ....... tarjetas y pestañas con o sin recuadro
     ICONOS DEL PIE Y REDES SOCIALES .......... siluetas con color propio (panel)
     ALINEACIÓN DE TEXTOS ..................... ajustes para la alineación elegida en Estilos
     «CONTÁCTANOS» EN UNA SOLA LÍNEA ........... título vertical sin cortes (Inicio, Nosotros, Blog)
     SUBMENÚ DE SERVICIOS ...................... menú desplegable arriba y lista compacta en el pie
     ASISTENTE VIRTUAL (CHATBOT) ............... en static/css/chatbot.css
     CARRUSELES SIN CONTORNO ................... sin marco alrededor de las fotos
     SERVICIOS: SUBTÍTULOS Y BUSCADOR .......... subtítulo de página y tarjetas, buscador en la lista
     BUSCADOR BAJO EL MENÚ Y TEXTOS MÁS LARGOS . buscador a la derecha; tarjetas y detalles más amplios

   Regla del proyecto: los cambios nuevos se agregan AL FINAL, en un bloque con título.
   Fuentes: static/css/fonts.css (archivos locales, sin Google Fonts).
   ========================================================================== */

:root {
  --primary-color: #461840;      /* Valores por defecto: el tema del admin los reemplaza */
  --accent-purple: var(--accent-purple);      /* Acento violeta armónico */
  --text-dark: #222222;
  --bg-light: #ffffff;
  --input-bg: #f4f4f6;
  --font-main: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'League Gothic', 'Bahnschrift Condensed', 'Arial Narrow', 'DejaVu Sans Condensed', Impact, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--primary-color);
  overflow-x: hidden;
}

/* ==========================================
   1. BARRA DE NAVEGACIÓN UNIFICADA
   ========================================== */
.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 80px;
  background-color: var(--bg-light);
}

.logo img {
  height: 55px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1rem;
  transition: opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active-link {
  opacity: 0.8;
  font-weight: 800;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-light);
  box-shadow: 0 4px 12px rgb(var(--primary-rgb) / 0.12);
  border-radius: 8px;
  list-style: none;
  padding: 10px 0;
  min-width: 160px;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  padding: 10px 20px;
  display: block;
  font-weight: 600;
}

.btn-contact {
  background-color: var(--primary-color);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 25px;
}

/* ==========================================
   2. ESTILOS DE BANNER Y TÍTULOS PRINCIPALES
   ========================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 80px 60px 80px;
  min-height: 65vh;
}

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

.hero-title {
  font-family: var(--font-main);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.hero-subtitle {
  font-family: var(--font-main);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 30px;
}

/* Banners / Títulos Principales en Páginas Secundarias */
.about-title,
.services-main-title,
.service-detail-title,
.success-main-title,
.case-detail-title,
.blog-main-title,
.contact-main-title,
.why-choose-title,
.leaders-title,
.history-title {
  font-family: var(--font-display);
  font-size: 5.5rem;
  color: var(--primary-color);
  line-height: 0.9;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.btn-know-more,
.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-color);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-know-more:hover,
.btn-read-more:hover {
  transform: translateX(5px);
}

.btn-know-more .arrow-icon,
.btn-read-more .arrow-icon {
  background-color: var(--primary-color);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Hexágonos Hero */
.hex-carousel-container {
  position: relative;
  width: 500px;
  height: 420px;
}

.hexagon {
  width: 220px;
  height: 250px;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: absolute;
  overflow: hidden;
  border: 4px solid #fff;
  background-color: var(--primary-color);
}

.hexagon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hex-pos-1 { top: 0; left: 0; z-index: 2; }
.hex-pos-2 { top: 0; right: 0; z-index: 2; }
.hex-pos-3 { bottom: 0; left: 140px; z-index: 3; }

/* ==========================================================================
   3. BARRAS DESPLAZABLES (MARQUEE)
   ========================================================================== */
.services-marquee-container,
.miaa-marquee-container {
  width: 100%;
  overflow: hidden;
  background: transparent;
  padding: 20px 0;
  white-space: nowrap;
}

.miaa-marquee-link {
  text-decoration: none;
  display: block;
}

.marquee-track {
  display: flex !important;
  width: max-content !important;
  animation: marquee-scroll 35s linear infinite !important;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-block;
  font-family: var(--font-display, sans-serif);
  font-size: 7.5rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-right: 60px;
  line-height: 1;
  flex-shrink: 0;
}

.marquee-item.filled {
  color: var(--primary-color, #6b21a8);
}

.marquee-item.outlined {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--primary-color, #6b21a8);
}

/* ANIMACIÓN CORREGIDA */
@keyframes marquee-scroll {
  0% { 
    transform: translate3d(0, 0, 0); 
  }
  100% { 
    transform: translate3d(-50%, 0, 0); 
  }
}

/* AJUSTE PARA PANTALLAS PEQUEÑAS (TABLETS Y CELULARES) */
@media (max-width: 992px) {
  .services-marquee-container,
  .miaa-marquee-container {
    padding: 15px 0;
  }

  .marquee-item {
    font-size: 4.5rem;
    margin-right: 35px;
  }

  .marquee-item.outlined {
    -webkit-text-stroke: 2px var(--primary-color, #6b21a8);
  }
}

@media (max-width: 576px) {
  .services-marquee-container,
  .miaa-marquee-container {
    padding: 10px 0;
  }

  .marquee-item {
    font-size: 2.8rem;
    margin-right: 20px;
    letter-spacing: 2px;
  }

  .marquee-item.outlined {
    -webkit-text-stroke: 1.5px var(--primary-color, #6b21a8);
  }

  .marquee-track {
    animation-duration: 20s !important;
  }
}

/* ==========================================================================
   AJUSTE RESPONSIVO PARA TABLETS Y CELULARES
   ========================================================================== */
@media (max-width: 992px) {
  .services-marquee-container,
  .miaa-marquee-container {
    padding: 15px 0;
  }

  .marquee-item {
    font-size: 4.5rem; /* Escala el texto en tablets */
    margin-right: 40px;
  }

  .marquee-item.outlined {
    -webkit-text-stroke: 2px var(--primary-color);
  }
}

@media (max-width: 576px) {
  .services-marquee-container,
  .miaa-marquee-container {
    padding: 10px 0;
  }

  .marquee-item {
    font-size: 2.8rem; /* Escala el texto en celulares sin perder fluidez */
    margin-right: 25px;
    letter-spacing: 2px;
  }

  .marquee-item.outlined {
    -webkit-text-stroke: 1.5px var(--primary-color);
  }

  .marquee-track {
    animation-duration: 25s; /* Un poco más rápido en pantallas pequeñas */
  }
}
/* ==========================================
   4. TARJETAS DE SERVICIOS (INICIO)
   ========================================== */
.services-cards-section {
  padding: 80px 20px 120px 20px;
  background-color: var(--bg-light);
  display: flex;
  justify-content: center;
  align-items: center;
}

.cards-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-card {
  position: absolute;
  width: 320px;
  height: 460px;
  background: #ffffff;
  border: 3px solid var(--primary-color);
  border-radius: 16px;
  padding: 30px 28px;
  box-shadow: 0 12px 30px rgb(var(--primary-rgb) / 0.15);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  display: flex;
  flex-direction: column;
}

.card-icon-box {
  width: 80px;
  height: 80px;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 25px;
}

.card-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 12px;
  line-height: 1.2;
}

.card-number {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 18px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
}

.card-description {
  font-family: var(--font-main);
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.5;
  font-weight: 500;
}

.service-card.active {
  box-shadow: 0 25px 50px rgb(var(--primary-rgb) / 0.35);
  border-width: 4px;
}

/* ==========================================
   5. SECCIÓN: SOMOS TU MEJOR OPCIÓN
   ========================================== */
.best-option-section {
  padding: 80px;
  background-color: var(--bg-light);
}

.best-option-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.best-option-container:hover {
  transform: scale(1.02);
}

.best-option-title-box {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.purple-line,
.purple-divider-line {
  width: 6px;
  background-color: var(--primary-color);
  border-radius: 4px;
}


.best-option-link {
  text-decoration: none;
}

.best-option-title {
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.best-option-title .small-text {
  font-size: 2.8rem;
}

.best-option-title .large-text {
  font-size: 5rem;
}

.best-option-content {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.best-option-text {
  font-family: var(--font-main);
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 25px;
  font-weight: 500;
}

/* ==========================================
   6. SECCIÓN DETALLE M.I.A.A.
   ========================================== */
.miaa-detail-section {
  padding: 40px 80px 100px 80px;
  background-color: var(--bg-light);
}

.miaa-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
}

.miaa-image-box {
  flex: 1;
  max-width: 550px;
}

.hand-reaching-anim {
  width: 100%;
  height: auto;
  display: block;
  animation: reachAndTouch 3.5s ease-in-out infinite;
}

@keyframes reachAndTouch {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(20px) scale(1.03); }
}

.miaa-info-box {
  flex: 1;
  max-width: 520px;
}

.miaa-title-link {
  text-decoration: none;
}

.miaa-title {
  font-family: var(--font-display);
  font-size: 3.8rem;
  line-height: 1.05;
  color: var(--primary-color);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.miaa-description {
  font-family: var(--font-main);
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 25px;
}

.miaa-btn-wrapper {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================
   7. SECCIÓN DE CONTACTO GENERAL / FORMULARIOS
   ========================================== */
.contact-section,
.contact-page-section {
  padding: 60px 40px 100px 40px;
  background-color: var(--bg-light);
  width: 100%;
}

.contact-container,
.contact-page-container {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  gap: 50px;
  align-items: flex-start;
  box-sizing: border-box;
}

.contact-vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.vertical-title-link {
  text-decoration: none;
}

.contact-vertical-title h2 {
  font-family: var(--font-display);
  font-size: 5.5rem;
  color: var(--primary-color);
  letter-spacing: 12px;
  margin: 0;
}

.contact-form-wrapper {
  flex: 1;
}

.contact-form-title {
  font-family: var(--font-main);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.purple-divider {
  display: block;
  width: 100%;
  max-width: 450px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple) 0%, var(--primary-color) 100%);
  margin-bottom: 30px;
}

.purple-line.short {
  width: 380px;
  height: 3px;
  background-color: var(--primary-color);
  margin-top: 8px;
  margin-bottom: 45px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form .form-group,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label,
.form-group label {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
}

.contact-form .required {
  color: #e60000;
}

.contact-form input,
.contact-form textarea,
.form-input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus,
.form-input:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.form-submit-wrapper,
.form-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

.btn-submit {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-submit:hover {
  transform: translateX(5px);
  opacity: 0.9;
}

.btn-submit .arrow-icon {
  background-color: var(--primary-color);
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ==========================================
   8. FOOTER UNIFICADO (MODELO DE INICIO)
   ========================================== */
.main-footer {
  width: 100%;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 50px 60px 20px 60px;
  box-sizing: border-box;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================
   TAMAÑO FIJO E INALTERABLE PARA EL LOGO DEL FOOTER
   ========================================== */
.footer-brand .footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.footer-logo {
  height: auto !important;          /* Conserva la proporción nativa */
  max-height: 45px !important;      /* Mantiene la altura máxima de diseño */
  width: auto !important;           /* Evita que se estire a lo ancho */
  object-fit: contain !important;   /* Asegura que la imagen no se recorte */
  flex-shrink: 0 !important;        /* Impide que otros elementos aplasten el logo */
  margin-bottom: 12px;
}

.footer-tagline {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
  opacity: 0.9;
}

.footer-copyright {
  font-family: var(--font-main);
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.footer-links,
.footer-info {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links li,
.footer-info li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  line-height: 1.4;
  color: #ffffff;
}

.footer-links a,
.footer-info a {
  color: #ffffff;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}
/* Evitar que el ícono sufra cambios de color, subrayado o tamaño */
.footer-info .info-icon {
  display: inline-block;
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  color: inherit !important; /* Preserva la apariencia propia del ícono o emoji */
  text-decoration: none !important;
}

.footer-links a:hover,
.footer-info a:hover {
  opacity: 0.8;
  text-decoration: underline !important;
}

.footer-social-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  max-width: 1200px;
  margin: 30px auto 0 auto;
}

.social-text {
  font-family: var(--font-main);
  font-size: 0.8rem;
  opacity: 0.9;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  color: var(--primary-color);
  background-color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
}

/* ==========================================
   9. PÁGINA NOSOTROS
   ========================================== */
.about-hero-section {
  padding: 50px 80px 60px 80px;
  background-color: var(--bg-light);
}

.about-hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
}

.hex-static-container {
  position: relative;
  width: 480px;
  height: 400px;
  flex-shrink: 0;
}

.about-hero-content {
  flex: 1;
}

.about-description p {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 12px;
}

.mission-vision-section {
  padding: 40px 80px 100px 80px;
  background-color: var(--bg-light);
}

.mission-vision-container {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 80px;
}

.mv-block {
  flex: 1;
}

.mv-title {
  font-family: var(--font-main);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.mv-block .purple-divider {
  width: 100%;
  max-width: 100%;
  margin-bottom: 25px;
}

.mv-text p {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Líderes del Futuro e Historia */
.leaders-history-section {
  padding: 40px 80px 100px 80px;
  background-color: var(--bg-light);
}

.leaders-history-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 80px;
}

.leaders-block {
  flex: 1;
  max-width: 500px;
}

.ceo-hex-card {
  position: relative;
  width: 380px;
  height: 420px;
  cursor: pointer;
  filter: drop-shadow(0px 8px 16px rgb(var(--primary-rgb) / 0.15));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.ceo-hex-card:hover {
  transform: translateY(-8px) scale(1.02);
  filter: drop-shadow(0px 16px 28px rgb(var(--primary-rgb) / 0.35));
}

.ceo-hexagon {
  width: 100%;
  height: 100%;
  -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
  overflow: hidden;
  background-color: var(--primary-color);
}

.ceo-hexagon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ceo-hex-card:hover .ceo-hexagon img {
  transform: scale(1.08);
}

.ceo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}

.ceo-badge {
  position: absolute;
  bottom: 45px;
  left: 80px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.purple-bar {
  width: 3px;
  height: 38px;
  background-color: var(--accent-purple);
  border-radius: 2px;
}

.ceo-text-info {
  display: flex;
  flex-direction: column;
}

.ceo-role {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.ceo-name {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.history-block {
  flex: 1;
  max-width: 500px;
  margin-top: 100px;
}

.history-block .purple-divider {
  width: 100%;
  margin-bottom: 25px;
}

.history-text p {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Orgullo y Por qué elegirnos */
.why-us-section {
  padding: 60px 80px 80px 80px;
  background-color: var(--bg-light);
}

.why-us-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.pride-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.pride-content {
  flex: 1;
  max-width: 650px;
}

.pride-title {
  font-family: var(--font-main);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.pride-content .purple-divider {
  width: 100%;
  margin-bottom: 25px;
}

.pride-text p {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 10px;
}

.pride-image-wrapper {
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.zoom-illustration {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
}

.zoom-illustration:hover {
  transform: scale(1.12) translateY(-6px) rotate(-1deg);
  filter: drop-shadow(0px 12px 20px rgb(var(--primary-rgb) / 0.25));
}

.why-choose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.why-choose-row:hover {
  transform: scale(1.03) translateY(-4px);
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0px 10px 25px rgb(var(--primary-rgb) / 0.1);
}

.why-choose-header {
  display: flex;
  align-items: stretch;
  gap: 18px;
  flex: 0 0 350px;
}

.vertical-purple-bar {
  width: 6px;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  border-radius: 4px;
  flex-shrink: 0;
}

.why-choose-row:hover .vertical-purple-bar {
  transform: scaleY(1.05);
  transition: transform 0.3s ease;
}

.why-choose-text {
  flex: 1;
  max-width: 600px;
}

.why-choose-text p {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Certificaciones */
.certifications-section {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  padding: 50px 60px;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgb(var(--primary-rgb) / 0.06);
}

.certifications-container {
  width: 100%;
}

.certifications-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.certifications-title {
  font-family: var(--font-main);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1.05;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.cert-static-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 30px 0 20px 0;
  position: relative;
}

.cert-card {
  position: relative;
  margin-left: -45px;
  cursor: pointer !important;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  will-change: transform;
}

.cert-card:first-child {
  margin-left: 0;
}

.cert-card * {
  pointer-events: none;
}

.cert-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3.5px solid var(--primary-color);
  background-color: #ffffff;
  box-shadow: -8px 10px 22px rgb(var(--primary-rgb) / 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  transition: border-color 0.3s ease, box-shadow 0.35s ease, background-color 0.3s ease;
}

.cert-name {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.cert-line {
  width: 70%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-purple));
  margin-bottom: 8px;
  border-radius: 2px;
}

.cert-desc {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

.cert-card:hover:not(.active) {
  transform: translateY(-6px) scale(1.03);
}

.cert-card.active {
  z-index: 100 !important;
  transform: translateY(-16px) scale(1.18) !important;
}

.cert-card.active .cert-circle {
  border-color: var(--accent-purple);
  border-width: 4px;
  background-color: #ffffff;
  box-shadow: 0px 20px 40px rgb(var(--primary-rgb) / 0.28);
}

.cert-card.active .cert-name {
  color: var(--accent-purple);
}

.cert-detail-panel {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-soft) 100%);
  border-radius: 20px;
  padding: 0 40px;
  max-width: 720px;
  margin: 35px auto 0 auto;
  text-align: center;
  box-shadow: 0px 14px 30px rgb(var(--primary-rgb) / 0.08);
  border: 1.5px solid rgb(var(--accent-rgb) / 0.18);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.4s ease, 
              padding 0.4s ease,
              transform 0.4s ease;
}

.cert-detail-panel.open {
  max-height: 320px;
  opacity: 1;
  padding: 28px 40px;
  transform: translateY(0);
}

.detail-title {
  font-family: var(--font-main);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.detail-subtitle {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 12px;
}

.detail-divider {
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  margin: 0 auto 14px auto;
  border-radius: 2px;
}

.detail-text {
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
}

/* ==========================================
   10. PÁGINA DE SERVICIOS Y DETALLE
   ========================================== */
.services-page-section {
  position: relative;
  padding: 40px 80px 100px 80px;
  min-height: 80vh;
  overflow: hidden;
  background-color: var(--bg-light);
}

.services-page-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.title-underline-blue {
  width: 320px;
  height: 6px;
  background-color: var(--primary-color);
  margin: 12px 0 35px 0;
  border-radius: 2px;
}

.services-intro-flex {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 50px;
}

.intro-purple-box {
  width: 85px;
  height: 65px;
  background-color: var(--primary-muted);
  border-radius: 4px;
  flex-shrink: 0;
}

.services-intro-text {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  max-width: 500px;
  line-height: 1.4;
  margin: 0;
}

.services-grid-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.services-row {
  display: flex;
  gap: 50px;
  width: 100%;
}

.services-row.row-double {
  justify-content: space-between;
}

.services-row.row-single-centered {
  justify-content: center;
}

.service-box-card {
  width: 460px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  gap: 20px;
  background-color: #ffffff;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.service-box-card:hover {
  transform: translateY(-6px);
  box-shadow: 0px 12px 24px rgb(var(--primary-rgb) / 0.15);
}

.card-gray-image {
  width: 90px;
  height: 90px;
  background-color: #c4c4c4;
  border-radius: 4px;
  flex-shrink: 0;
}

.card-info-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-service-title {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0 0 2px 0;
  border-bottom: 2px solid var(--primary-muted);
  display: inline-block;
  padding-bottom: 2px;
  width: fit-content;
}

.card-service-num {
  font-family: var(--font-main);
  font-size: 0.85rem;
  color: #888888;
  margin-bottom: 10px;
  font-weight: 600;
}

.card-service-desc {
  font-family: var(--font-main);
  font-size: 0.85rem;
  color: var(--text-dark);
  line-height: 1.4;
  margin: 0 0 15px 0;
}

.card-read-more {
  align-self: flex-end;
  text-decoration: none;
  color: var(--primary-color);
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.card-read-more:hover {
  color: var(--accent-purple);
}

.card-read-more .arrow-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.8rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.card-read-more:hover .arrow-icon {
  background-color: var(--accent-purple);
  transform: translateX(3px);
}

.bg-gears-decoration {
  position: absolute;
  right: -50px;
  top: 40px;
  z-index: 1;
  opacity: 0.35;
  pointer-events: none;
}

/* Detalle de Servicio */
.service-detail-section {
  padding: 50px 80px 90px 80px;
  background-color: var(--bg-light);
}

.service-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

.service-info-col {
  flex: 1;
  max-width: 580px;
}

.service-detail-subtitle {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 30px;
}

.service-detail-text p {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-cta-wrapper {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cta-text {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
}

.service-media-col {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.search-bar-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary-soft);
  border-radius: 6px;
  padding: 8px 16px;
  width: 260px;
  margin-bottom: 25px;
}

.search-icon {
  font-size: 1rem;
  color: var(--primary-color);
}

.search-bar-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--primary-color);
  width: 100%;
}

.search-bar-box input::placeholder {
  color: var(--primary-muted);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 360px;
  border: 3px solid var(--primary-color);
  border-radius: 4px;
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel-slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  z-index: 10;
}

.dot {
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dot.active,
.dot:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* ==========================================
   11. CASOS DE ÉXITO Y DETALLE DE CASO
   ========================================== */
.success-stories-section,
.case-detail-section {
  padding: 50px 80px 100px 80px;
  background-color: var(--bg-light);
  min-height: 75vh;
}

.success-stories-container,
.case-detail-container {
  max-width: 1100px;
  margin: 0 auto;
}

.success-intro-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 60px;
}

.graduation-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-intro-text {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
}

.success-cards-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
}

.hex-image-link {
  display: block;
  width: 260px;
  height: 290px;
  margin-bottom: 25px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.hex-image-link:hover {
  transform: translateY(-8px) scale(1.03);
}

.hexagon-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  filter: drop-shadow(0px 8px 16px rgb(var(--primary-rgb) / 0.12));
}

.hexagon-inner {
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background-color: var(--primary-color);
  overflow: hidden;
  border: 2px solid var(--primary-muted);
}

.hexagon-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hex-image-link:hover .hexagon-inner img {
  transform: scale(1.08);
}

.success-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  text-align: center;
}

.success-card-desc {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 15px;
  width: 100%;
}

.success-card-info .btn-read-more {
  font-size: 1rem;
  margin-top: 5px;
}

/* Detalle de Caso */
.case-hero-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  margin-bottom: 40px;
}

.case-info-col {
  flex: 1.2;
}

.case-media-col {
  flex: 0.9;
  max-width: 480px;
}

.case-detail-subtitle {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 30px;
}

.case-paragraphs p,
.case-middle-text {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 18px;
}

.case-tabs-wrapper {
  margin-bottom: 60px;
}

.case-tabs-buttons {
  display: flex;
  gap: 40px;
  margin-bottom: 15px;
}

.tab-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.arrow-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.tab-btn.active .arrow-circle {
  transform: rotate(90deg);
}

.tab-btn.active,
.tab-btn:hover {
  color: var(--primary-color);
}

.tab-content {
  display: none;
  background-color: var(--primary-soft);
  border-left: 4px solid var(--primary-color);
  padding: 18px 24px;
  border-radius: 0 8px 8px 0;
  margin-top: 15px;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  font-family: var(--font-main);
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
}

.comparison-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
}

.comparison-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comparison-title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.comparison-box .carousel-container {
  height: 280px;
}

.case-cta-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 30px;
}

.case-cta-bottom .cta-text {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

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

/* ==========================================
   12. PÁGINA BLOG
   ========================================== */
.blog-page-section {
  position: relative;
  width: 100%;
  padding: 50px 0 100px 0;
  background-color: var(--bg-light);
  overflow: hidden;
}

.blog-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.blog-intro-flex {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  margin-bottom: 50px;
}

.blog-intro-text {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  max-width: 550px;
  line-height: 1.4;
  margin: 0;
}

.blog-hex-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-bottom: 100px;
}

.blog-hex-row {
  display: flex;
  gap: 40px;
  width: 100%;
}

.blog-hex-row.row-three {
  justify-content: space-between;
}

.blog-hex-row.row-two {
  justify-content: center;
  gap: 80px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 280px;
}

.hex-carousel-link {
  display: block;
  width: 230px;
  height: 250px;
  margin-bottom: 15px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.hex-carousel-link:hover {
  transform: translateY(-5px);
}

.hexagon-inner .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hexagon-inner .slide.active {
  opacity: 1;
}

.blog-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.blog-card-title {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  width: 100%;
  text-align: center;
}

.blog-card-desc {
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.3;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
}

.blog-contact-section {
  display: flex;
  gap: 50px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--primary-tint);
}

.contact-title-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vertical-contact-title {
  font-family: var(--font-display);
  font-size: 4.5rem;
  color: var(--primary-color);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 2px;
  margin: 0;
  line-height: 1;
}

.contact-form-col {
  flex: 1;
  max-width: 650px;
}

.contact-subheading {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.short-line {
  width: 120px;
  height: 3px;
  background-color: var(--primary-color);
  margin-bottom: 35px;
}

.inline-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inline-contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-contact-form label {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
}

.inline-contact-form input,
.inline-contact-form textarea {
  background-color: var(--input-bg);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 16px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
}

.inline-contact-form input::placeholder,
.inline-contact-form textarea::placeholder {
  color: #888888;
}

.btn-submit-inline {
  align-self: flex-end;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-submit-inline:hover {
  color: var(--accent-purple);
}

/* ==========================================
   PÁGINA Y SECCIÓN DE CONTACTO (VERSIÓN FINAL)
   ========================================== */

/* 1. Contenedor principal y espaciados */
.contact-page-section {
  padding: 20px 80px 50px 80px; /* Reducido espacio blanco superior e inferior */
  background-color: var(--bg-light);
  width: 100%;
}

.contact-page-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* 2. Encabezado y línea morada ajustada */
/* Reducción exacta del espacio entre el título y la línea morada */
.contact-main-title {
  font-family: var(--font-display);
  font-size: 5.5rem;
  color: var(--primary-color);
  line-height: 0.75;  /* Ajustado para eliminar la caja invisible debajo de las letras */
  letter-spacing: 3px;
  margin-top: 0;
  margin-bottom: 0;   /* Sin margen inferior en el texto */
  padding-bottom: 0;
}

.purple-line {
  width: 320px;
  height: 6px;
  background-color: var(--primary-color);
  margin-top: -45px;   /* Margen negativo para subir la línea y pegarla al texto */
  margin-bottom: 25px;
}
.purple-line.short {
  width: 320px;
  height: 3px;
  margin-top: 6px;
  margin-bottom: 25px;
}

/* 3. Formulario de Contacto */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  margin-bottom: 50px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.contact-form .required {
  color: #e60000;
}

.contact-form .form-input {
  width: 100%;
  padding: 15px 18px;
  background-color: var(--primary-soft); /* Fondo lila suave institucional */
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: all 0.25s ease;
}

.contact-form .form-input:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgb(var(--primary-rgb) / 0.08);
}

/* 4. Botón "Enviar" con estilo institucional */
.form-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

.btn-submit {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-submit:hover {
  transform: translateX(5px);
  opacity: 0.9;
}

.btn-submit .arrow-icon {
  background-color: var(--primary-color);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn-submit:hover .arrow-icon {
  background-color: var(--accent-purple);
}

/* 5. Eliminación de subrayados azules predeterminados */
.form-title-link,
.form-title-link:hover,
.form-title-link:visited,
.form-title-link:focus,
.contact-form-title {
  text-decoration: none !important;
  color: var(--text-dark) !important;
}

/* 6. Sección Ubicación y Mapa (Posicionada abajo) */
.location-section {
  width: 100%;
}

.location-title {
  font-family: var(--font-main);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

/* 7. Adaptación Móvil */
@media (max-width: 768px) {
  .contact-page-section {
    padding: 20px 20px 40px 20px;
  }

  .contact-main-title {
    font-size: 3.5rem;
  }

  .purple-line {
    width: 100%;
    max-width: 280px;
  }

  .location-title {
    font-size: 2rem;
  }

  .map-container iframe {
    height: 300px;
  }
}
/* ==========================================================================
   DISEÑO RESPONSIVO (MOBILE, TABLET Y DESKTOP)
   ========================================================================== */

/* --- 1. BARRA DE NAVEGACIÓN Y FOOTER RESPONSIVOS --- */
@media (max-width: 992px) {
  .header-nav {
    flex-wrap: wrap;
    padding: 15px 20px;
  }

  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
  }

  .footer-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 40px 20px;
  }

  .footer-social-wrapper {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .header-nav {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    text-align: center;
  }
}

/* --- 2. INICIO (index.html) RESPONSIVO --- */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .best-option-container {
    flex-direction: column;
    gap: 25px;
  }

  .miaa-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .contact-container {
    flex-direction: column;
  }

  .contact-vertical-title {
    writing-mode: horizontal-tb;
    transform: none;
    text-align: center;
  }
}

/* --- 3. NOSOTROS (nosotros.html) RESPONSIVO --- */
@media (max-width: 992px) {
  .about-hero-container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .mission-vision-container {
    flex-direction: column;
    gap: 30px;
  }

  .leaders-history-container {
    flex-direction: column;
    gap: 40px;
  }

  .pride-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .why-choose-row {
    flex-direction: column;
    gap: 20px;
  }

  .certifications-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cert-static-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}

/* --- 4. SERVICIOS Y BLOG (servicios.html / blog.html) RESPONSIVO --- */
@media (max-width: 992px) {
  .blog-hex-row,
  .services-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }

  .blog-card,
  .service-box-card,
  .success-card {
    max-width: 100%;
    width: 100%;
  }

  .blog-intro-flex,
  .services-intro-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- 5. DETALLES (servicio-detalle.html / caso-detalle.html / blog-detalle.html) --- */
@media (max-width: 992px) {
  .service-detail-container,
  .case-hero-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 30px;
  }

  .case-tabs-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- 6. CONTACTO (contacto.html) RESPONSIVO --- */
@media (max-width: 768px) {
  .contact-page-container {
    padding: 20px 15px;
  }

  .map-container iframe {
    height: 300px;
  }
}
/* BOTÓN HAMBURGUESA Y ANIMACIÓN A "X" */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  transform-origin: 1px;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
  display: none;
  min-width: 160px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  padding: 8px 16px;
  display: block;
}


/* ==========================================================================
   ██████  RESPONSIVE v2 — BLOQUE FINAL (pegar SIEMPRE al final del archivo)
   Mobile · Tablet · Laptop · Desktop · 4K
   ========================================================================== */

/* --- 0. BASE GLOBAL ------------------------------------------------------ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
video,
svg {
  max-width: 100%;
}

a,
button,
.dot,
.tab-btn,
.cert-card,
.service-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hexagon img {
  transition: opacity 0.4s ease; /* suaviza el cambio de imágenes del hero (JS usa opacity) */
}

/* --- 1. TIPOGRAFÍA FLUIDA (idéntica a la original en escritorio) --------- */
.about-title,
.services-main-title,
.service-detail-title,
.success-main-title,
.case-detail-title,
.blog-main-title,
.why-choose-title,
.leaders-title,
.history-title {
  font-size: clamp(3rem, 8vw + 0.5rem, 5.5rem);
  overflow-wrap: anywhere;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 2.8rem);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3.4vw, 1.7rem);
}

.best-option-title .small-text {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.best-option-title .large-text {
  font-size: clamp(3.2rem, 10vw, 5rem);
}

.miaa-title {
  font-size: clamp(2.4rem, 6.5vw, 3.8rem);
}

.pride-title,
.certifications-title,
.location-title {
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
}

.service-detail-subtitle {
  font-size: clamp(1.3rem, 3.6vw, 1.8rem);
}

.contact-vertical-title h2 {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  overflow-wrap: anywhere;
}

.contact-vertical-title {
  max-width: 100%;
}

/* Título CONTACTO: la línea morada sube en proporción al tamaño del texto */
.contact-page-container {
  --contact-title-size: clamp(3.2rem, 11vw, 5.5rem);
}

.contact-main-title {
  font-size: var(--contact-title-size);
  overflow-wrap: anywhere;
}

.contact-page-container > .purple-line:not(.short) {
  margin-top: calc(var(--contact-title-size) * -0.51); /* 45px / 88px del diseño original */
}

.purple-line.short {
  max-width: 100%;
}

/* --- 2. HERO / HEXÁGONOS FLUIDOS (mismas medidas exactas a 500px / 480px) -- */
.hero-content {
  flex: 0 1 580px;
  min-width: 0;
}

.hex-carousel-container {
  flex: 0 1 500px;
  width: min(500px, 100%);
  height: auto;
  aspect-ratio: 500 / 420;
  min-width: 0;
}

.hex-carousel-container .hexagon {
  width: 44%;
  height: auto;
  aspect-ratio: 220 / 250;
}

.hex-carousel-container .hex-pos-3 {
  left: 28%;
}

.hex-static-container {
  width: min(480px, 100%);
  height: auto;
  aspect-ratio: 480 / 400;
}

.hex-static-container .hexagon {
  width: 45.8333%;
  height: auto;
  aspect-ratio: 220 / 250;
}

.hex-static-container .hex-pos-3 {
  left: 29.1667%;
}

/* --- 3. ABANICO DE SERVICIOS (INICIO) — escalado por JS + táctil --------- */
.services-cards-section {
  padding-left: 0;
  padding-right: 0;
  overflow-x: hidden;
  overflow-x: clip; /* evita overflow horizontal sin recortar sombras verticales */
}

.cards-container {
  touch-action: pan-y; /* swipe horizontal para JS, scroll vertical para el navegador */
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.cards-container.is-resizing .service-card {
  transition: none !important;
}

.service-card {
  touch-action: pan-y;
  -webkit-user-drag: none;
  backface-visibility: hidden;
  will-change: transform;
}

.service-card img,
.service-card a {
  -webkit-user-drag: none;
}

/* Tarjetas fuera de rango: invisibles y SIN hitbox (no bloquean toques) */
.service-card.is-hidden {
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, visibility 0s linear 0.4s;
}

/* --- 4. NAVBAR / HAMBURGUESA --------------------------------------------- */
.header-nav {
  position: relative;
  z-index: 1000;
}

/* Botón hamburguesa: área táctil 44x44, animación a "X" */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-12px);
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.menu-toggle:focus-visible,
.nav-links a:focus-visible,
.dot:focus-visible,
.cert-card:focus-visible {
  outline: 3px solid var(--accent-purple);
  outline-offset: 3px;
}

/* Submenú: hover solo si hay mouse; clic/tap/teclado en cualquier dispositivo */
.dropdown:hover .dropdown-menu {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

.dropdown.active .dropdown-menu {
  display: block;
}

@media (max-width: 992px) {
  .header-nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    padding: 12px 20px;
  }

  .logo img {
    height: 46px;
    width: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .header-nav nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-light);
    box-shadow: 0 12px 24px rgb(var(--primary-rgb) / 0.15);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.35s ease, visibility 0s linear 0.35s;
  }

  .header-nav nav.active {
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: visible;
    transition: max-height 0.35s ease, visibility 0s;
  }

  .nav-links {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap;
    gap: 0 !important;
    margin: 0 !important;
    padding: 8px 20px 20px;
  }

  .nav-links > li {
    border-bottom: 1px solid rgb(var(--primary-rgb) / 0.1);
  }

  .nav-links > li:last-child {
    border-bottom: none;
    padding-top: 14px;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 6px;
    font-size: 1.05rem;
  }

  .nav-links a.btn-contact {
    justify-content: center;
    padding: 12px 24px;
  }

  .dropdown-menu {
    position: static !important;
    display: none;
    box-shadow: none !important;
    border-radius: 0;
    min-width: 0;
    padding: 0 0 6px 16px !important;
    text-align: left !important;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown.active:hover .dropdown-menu {
    display: block;
  }

  .dropdown-menu li a {
    min-height: 44px;
    padding: 10px 6px !important;
  }
}

/* --- 5. OBJETIVOS TÁCTILES (≥ 44 px) en móvil/tablet/pantallas táctiles --- */
@media (pointer: coarse), (max-width: 992px) {
  .btn-know-more,
  .btn-read-more,
  .card-read-more,
  .btn-submit,
  .btn-submit-inline,
  .tab-btn,
  .btn-contact {
    min-height: 44px;
  }

  .btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tab-btn {
    padding: 10px 4px;
  }

  .card-title {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-links a,
  .footer-info a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .social-icons {
    gap: 12px;
  }

  .social-icons a {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  /* Puntos del carrusel: se ven igual, pero el área de toque es de 44 px */
  .carousel-dots {
    gap: 24px;
  }

  .dot {
    position: relative;
  }

  .dot::after {
    content: '';
    position: absolute;
    inset: -12px;
  }

  /* 16 px evita el zoom automático de iOS al enfocar un campo */
  .contact-form input,
  .contact-form textarea,
  .contact-form .form-input,
  .search-bar-box input {
    font-size: 16px;
    min-height: 44px;
  }

  .search-bar-box {
    min-height: 48px;
  }
}

/* --- 6. CARRUSELES / BUSCADOR ------------------------------------------- */
.carousel-container {
  touch-action: pan-y;
}

.search-bar-box {
  position: relative;
}

.search-results-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: #ffffff;
  border: 1px solid var(--primary-tint);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgb(var(--primary-rgb) / 0.15);
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--primary-color);
  font-family: var(--font-main);
  border-bottom: 1px solid var(--primary-soft);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  background: var(--primary-soft);
}

.search-result-item strong {
  font-size: 0.95rem;
}

.search-result-item small {
  font-size: 0.8rem;
  color: #666666;
}

.search-no-results {
  padding: 12px 14px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #666666;
}

.comparison-grid.flex-center {
  justify-content: center;
}

/* --- 7. TABLET + MÓVIL (≤ 992 px) ---------------------------------------- */
@media (max-width: 992px) {
  /* Espaciados de sección */
  .hero {
    min-height: auto;
    padding: 40px 20px 50px;
  }

  .hero-content,
  .hex-carousel-container {
    flex: 0 0 auto;
  }

  .hex-carousel-container {
    margin: 0 auto;
  }

  .best-option-section {
    padding: 50px 20px;
  }

  .best-option-container:hover {
    transform: none;
  }

  .best-option-title-box {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .best-option-content {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .miaa-detail-section {
    padding: 30px 20px 60px;
  }

  .miaa-image-box,
  .miaa-info-box {
    width: 100%;
    max-width: 520px;
  }

  .miaa-btn-wrapper {
    justify-content: center;
  }

  .contact-section,
  .contact-page-section {
    padding: 40px 20px 60px;
  }

  .contact-container {
    gap: 20px;
  }

  .contact-vertical-title h2 {
    font-size: clamp(2.6rem, 10vw, 4.5rem);
    letter-spacing: 3px;
  }

  .contact-form-wrapper {
    width: 100%;
  }

  .purple-divider {
    max-width: 100%;
  }

  /* Footer */
  .main-footer {
    padding: 40px 20px 20px;
  }

  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 0 !important;
    gap: 30px !important;
  }

  .footer-social-wrapper {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Nosotros */
  .about-hero-section,
  .mission-vision-section,
  .leaders-history-section,
  .why-us-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .about-hero-section {
    padding-top: 30px;
    padding-bottom: 40px;
  }

  .hex-static-container {
    margin: 0 auto;
  }

  .about-hero-container,
  .leaders-history-container {
    align-items: stretch;
  }

  .leaders-block,
  .history-block {
    max-width: 100%;
    width: 100%;
  }

  .history-block {
    margin-top: 0;
  }

  .ceo-hex-card {
    width: 100%;
    max-width: 380px;
    height: auto;
    aspect-ratio: 380 / 420;
    margin: 0 auto;
  }

  .ceo-badge {
    left: 21%;
    bottom: 10%;
  }

  .pride-content,
  .why-choose-text,
  .why-choose-header {
    max-width: 100%;
    flex: 0 0 auto;
    width: 100%;
  }

  .pride-image-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
  }

  .why-choose-row {
    padding: 10px;
  }

  .why-us-container {
    gap: 45px;
  }

  /* Certificaciones: abanico de círculos reducido, sin saltos de línea */
  .certifications-section {
    padding: 30px 16px;
    border-radius: 16px;
  }

  .cert-static-row {
    flex-wrap: nowrap;
    gap: 0;
  }

  .cert-card {
    margin-left: -30px;
    flex: 0 0 auto;
  }

  .cert-card:first-child {
    margin-left: 0;
  }

  .cert-circle {
    width: 150px;
    height: 150px;
    padding: 12px;
  }

  .cert-name {
    font-size: 1.05rem;
  }

  .cert-desc {
    font-size: 0.72rem;
  }

  .cert-detail-panel {
    max-width: 100%;
  }

  /* Servicios */
  .services-page-section {
    padding: 30px 20px 60px;
  }

  .title-underline-blue {
    width: min(320px, 70%);
  }

  .services-intro-text {
    max-width: 100%;
  }

  .bg-gears-decoration svg {
    width: 140px;
    height: auto;
  }

  .services-row {
    gap: 24px;
  }

  .service-box-card {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Blog y casos de éxito */
  .blog-page-section {
    padding: 30px 0 60px;
  }

  .blog-hex-grid {
    gap: 40px;
    margin-bottom: 50px;
  }

  .blog-hex-row.row-two,
  .blog-hex-row.row-three {
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 20px;
  }

  .blog-card {
    width: min(280px, calc(50% - 20px));
    max-width: none;
    flex: 0 0 auto;
  }

  .success-stories-section,
  .case-detail-section {
    padding: 30px 20px 60px;
    min-height: auto;
  }

  .success-cards-grid {
    gap: 40px;
  }

  .success-card {
    width: min(320px, 100%);
  }

  .success-intro-wrapper {
    flex-wrap: wrap;
    margin-bottom: 40px;
  }

  /* Detalle (servicio / caso / blog) */
  .service-detail-section {
    padding: 30px 20px 60px;
  }

  .service-detail-container,
  .case-hero-grid {
    align-items: stretch;
  }

  .service-info-col,
  .service-media-col,
  .case-info-col,
  .case-media-col {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }

  .service-media-col {
    align-items: stretch;
  }

  .search-bar-box {
    width: 100%;
  }

  .service-cta-wrapper {
    margin-top: 30px;
  }

  .carousel-container:not(.hexagon-inner) {
    height: clamp(220px, 56vw, 400px);
  }

  .comparison-box {
    width: 100%;
  }

  .comparison-box .carousel-container {
    height: clamp(200px, 52vw, 320px);
  }

  .case-tabs-buttons {
    gap: 8px 24px;
  }

  .case-cta-bottom {
    align-items: flex-start;
  }

  /* Contacto */
  .contact-page-section {
    padding: 20px 20px 50px;
  }

  .map-container iframe {
    height: clamp(260px, 60vw, 380px);
  }
}

/* --- 8. TABLET VERTICAL / MÓVIL GRANDE (≤ 700 px): certificaciones ------- */
@media (max-width: 700px) {
  .cert-static-row {
    flex-wrap: wrap;
    gap: 14px 10px;
  }

  .cert-card,
  .cert-card:first-child {
    margin-left: 0;
  }

  .cert-circle {
    width: 132px;
    height: 132px;
    padding: 10px;
  }

  .cert-card.active {
    transform: translateY(-8px) scale(1.1) !important;
  }
}

/* --- 9. MÓVIL (≤ 576 px) ------------------------------------------------- */
@media (max-width: 576px) {
  .services-cards-section {
    padding-top: 30px;
    padding-bottom: 50px;
  }

  .footer-container {
    grid-template-columns: 1fr !important;
  }

  .footer-brand {
    text-align: left;
  }

  .blog-card {
    width: 100%;
    max-width: 280px;
  }

  .hex-image-link {
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 260 / 290;
  }

  .service-box-card {
    flex-direction: column;
    gap: 14px;
  }

  .card-info-content {
    width: 100%;
  }

  .about-description p,
  .mv-text p,
  .history-text p,
  .pride-text p,
  .why-choose-text p,
  .service-detail-text p,
  .success-intro-text,
  .case-paragraphs p,
  .case-middle-text,
  .tab-content p {
    font-size: 1.02rem;
  }

  .tab-btn {
    font-size: 1.1rem;
  }

  .cta-text,
  .case-cta-bottom .cta-text {
    font-size: 1.15rem;
  }

  .mv-title,
  .contact-form-title,
  .comparison-title {
    font-size: 1.7rem;
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .cert-detail-panel.open {
    max-height: 560px;
    padding: 22px 20px;
  }

  .carousel-dots {
    bottom: 12px;
  }

  .marquee-item {
    letter-spacing: 1px;
  }
}

/* --- 10. MÓVIL PEQUEÑO (≤ 360 px) ---------------------------------------- */
@media (max-width: 360px) {
  .header-nav {
    padding: 10px 14px;
  }

  .logo img {
    height: 40px;
  }

  .hero {
    padding: 30px 14px 40px;
  }

  .hex-image-link {
    width: 100%;
  }
}

/* --- 11. LAPTOP INTERMEDIA (993 – 1200 px) ------------------------------- */
@media (min-width: 993px) and (max-width: 1200px) {
  .header-nav,
  .hero,
  .best-option-section,
  .miaa-detail-section,
  .about-hero-section,
  .mission-vision-section,
  .leaders-history-section,
  .why-us-section,
  .service-detail-section,
  .success-stories-section,
  .case-detail-section,
  .services-page-section {
    padding-left: 40px;
    padding-right: 40px;
  }

  .nav-links {
    gap: 20px;
  }

  .footer-container {
    gap: 24px;
  }

  .services-row {
    gap: 30px;
  }

  .service-box-card {
    width: auto;
    flex: 0 1 460px;
  }
}

/* --- 12. PANTALLAS MUY ANCHAS / 4K -------------------------------------- */
/* Se escala todo el sitio proporcionalmente (fuentes, imágenes, márgenes) */
@media (min-width: 2200px) {
  body {
    zoom: 1.3;
  }
}

@media (min-width: 3000px) {
  body {
    zoom: 1.7;
  }
}

@media (min-width: 3600px) {
  body {
    zoom: 2;
  }
}

/* --- 13. ORIENTACIÓN HORIZONTAL EN CELULAR (poca altura) ----------------- */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: auto;
  }

  .header-nav nav.active {
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
  }
}


/* ==========================================================================
   ██████  DJANGO — CONTENIDO DINÁMICO (servicios, certificaciones, formulario)
   Reglas nuevas: no modifican el aspecto de la maqueta con su contenido original
   ========================================================================== */

/* Abanico: icono de Font Awesome (campo "icon_class") dentro de la caja de 80 px */
.card-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--primary-color);
}

.card-icon-box i {
  font-size: 2.2rem;
  line-height: 1;
}

/* Abanico: textos de longitud variable sin desbordar la tarjeta de 460 px */
.service-card .card-title,
.service-card .card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card .card-title {
  -webkit-line-clamp: 3;
  line-clamp: 3;
  flex-shrink: 0;
}

.service-card .card-number {
  flex-shrink: 0;
}

.service-card .card-description {
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

/* Página Servicios: imagen del servicio dentro del recuadro gris */
.card-gray-image {
  overflow: hidden;
}

.card-gray-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Certificaciones: insignia opcional y salto de fila cuando hay muchas */
.cert-badge {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 6px;
}

@media (min-width: 701px) {
  .cert-static-row {
    flex-wrap: wrap;
    row-gap: 22px;
  }
}

@media (max-width: 992px) {
  .cert-badge {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
  }
}

/* Listados vacíos y avisos del formulario de contacto */
.empty-state {
  width: 100%;
  padding: 30px 0;
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
}

.form-alert {
  margin-bottom: 22px;
  padding: 14px 18px;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  background-color: var(--primary-soft);
  color: var(--primary-color);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
}

.form-alert-error {
  border-left-color: #c62828;
  background-color: #fdecec;
  color: #8e1b1b;
}

.field-error {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: #c62828;
}

/* Lista desplegable del formulario de contacto (pregunta opcional «Servicio de interés») */
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
}

.contact-form select.form-input {
  padding: 15px 18px;
  background-color: var(--primary-soft);
  border: 1.5px solid transparent;
  border-radius: 8px;
}

.contact-form select:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

/* Abanico: botón «Leer Más» al pie de cada tarjeta */
.service-card .card-read-more {
  margin-top: auto;
  padding-top: 10px;
  flex-shrink: 0;
  font-size: 1rem;
}

.service-card .card-description {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* ==========================================================================
   HEXÁGONOS — CARRUSEL GIRATORIO 3D (Inicio y Nosotros)
   Uno grande al centro y dos pequeños a los lados; main.js rota data-slot.
   ========================================================================== */
.hex-3d {
  perspective: 1100px;
}

.hex-3d .hexagon[data-slot] {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 52%;
  height: auto;
  aspect-ratio: 220 / 250;
  cursor: pointer;
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), filter 0.9s ease, opacity 0.9s ease;
}

/* Centro: grande, al frente */
.hex-3d .hexagon[data-slot="center"] {
  z-index: 3;
  transform: translate(-50%, -50%) translateX(0) scale(1.3) rotateY(0deg);
  filter: none;
  opacity: 1;
  cursor: default;
}

/* Laterales: pequeños, atrás y girados hacia el centro */
.hex-3d .hexagon[data-slot="left"] {
  z-index: 1;
  transform: translate(-50%, -50%) translateX(calc(-1 * var(--shape-shift, 78%))) scale(0.5) rotateY(38deg);
  filter: brightness(0.82);
  opacity: 0.92;
}

.hex-3d .hexagon[data-slot="right"] {
  z-index: 2;
  transform: translate(-50%, -50%) translateX(var(--shape-shift, 78%)) scale(0.5) rotateY(-38deg);
  filter: brightness(0.82);
  opacity: 0.92;
}

/* Zoom in del ciclo: la imagen del hexágono que llega al centro se acerca lentamente
   mientras está al frente; al salir hacia un lado vuelve a su tamaño normal. */
.hex-3d .hexagon img {
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.9s ease, opacity 0.4s ease;
  will-change: transform;
}

.hex-3d .hexagon[data-slot="center"] img {
  transform: scale(1.2);
  transition: transform 3.4s ease-out, opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hex-3d .hexagon[data-slot] {
    transition: none;
  }

  .hex-3d .hexagon img,
  .hex-3d .hexagon[data-slot="center"] img {
    transform: none;
    transition: none;
  }
}


/* ==========================================================================
   ██████  TEMA DE COLORES (admin → Configuración general → Colores)
   Las variables llegan desde base.html; aquí se aplican a menú, banner y pie.
   ========================================================================== */
:root {
  --primary-rgb: 70 24 64;
  --accent-rgb: 142 45 129;
  --primary-soft: #f2edf3;
  --primary-tint: #e0d5e2;
  --primary-muted: #927597;
  --header-bg: #ffffff;
  --header-text: #461840;
  --header-button-bg: #461840;
  --header-button-text: #ffffff;
  --banner-bg: #ffffff;
  --banner-text: #461840;
  --footer-bg: #461840;
  --footer-text: #ffffff;
  --footer-icon-bg: #ffffff;
  --footer-icon-text: #461840;
}

body {
  background-color: var(--bg-light);
}

/* Menú de navegación */
.header-nav,
.dropdown-menu {
  background-color: var(--header-bg);
}

.nav-links a {
  color: var(--header-text);
}

.btn-contact {
  background-color: var(--header-button-bg);
  color: var(--header-button-text) !important;
}

.menu-toggle span {
  background-color: var(--header-text);
}

@media (max-width: 992px) {
  .header-nav nav {
    background: var(--header-bg);
  }

  .nav-links > li {
    border-bottom-color: rgb(var(--primary-rgb) / 0.12);
  }
}

/* Banner principal (Inicio) */
.hero {
  background-color: var(--banner-bg);
}

.hero-title,
.hero-subtitle,
.hero .btn-know-more {
  color: var(--banner-text);
}

.hero .btn-know-more .arrow-icon {
  background-color: var(--banner-text);
  color: var(--banner-bg);
}

/* Pie de página */
.main-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
}

.footer-heading,
.footer-links li,
.footer-info li,
.footer-links a,
.footer-info a {
  color: var(--footer-text);
}

.social-icons a {
  background-color: var(--footer-icon-bg);
  color: var(--footer-icon-text);
}

/* ==========================================================================
   ██████  AJUSTES DE NAVEGACIÓN E ICONOS
   ========================================================================== */

/* Iconos de sección (Servicios: mano con engranes · Blog: pluma y texto).
   Se usan como máscara: toman el color principal del tema. */
.intro-icon {
  display: block;
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  background-color: var(--primary-color);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* Barra deslizante: las letras sin relleno solo muestran su contorno exterior.
   El relleno del color del fondo tapa las líneas internas que dejan algunas fuentes. */
.marquee-item.outlined {
  color: var(--bg-light);
  -webkit-text-stroke: 5px var(--primary-color);
  paint-order: stroke fill;
}

@media (max-width: 992px) {
  .marquee-item.outlined {
    -webkit-text-stroke-width: 4px;
  }
}

@media (max-width: 576px) {
  .marquee-item.outlined {
    -webkit-text-stroke-width: 3px;
  }
}

/* «¿Por qué elegirnos?» (y «Líderes del futuro»): siempre en dos líneas */
.why-choose-header {
  flex: 0 0 auto;
  max-width: 48%;
}

.why-choose-title,
.leaders-title {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
  font-size: clamp(2.4rem, 5vw + 0.5rem, 5.5rem);
}

@media (max-width: 992px) {
  .why-choose-header {
    max-width: 100%;
  }
}

/* Migas de pan: Inicio › Sección › Página */
.breadcrumbs-nav {
  padding: 14px 80px 0;
  font-family: var(--font-main);
  font-size: 0.85rem;
}

.breadcrumbs-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  color: var(--text-dark);
}

.breadcrumbs-nav li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--primary-muted);
}

.breadcrumbs-nav a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumbs-nav a:hover {
  text-decoration: underline;
}

.breadcrumbs-nav [aria-current="page"] {
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .breadcrumbs-nav {
    padding: 10px 20px 0;
  }
}

/* Botón «volver arriba» */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--bg-light);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgb(var(--primary-rgb) / 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  background: var(--accent-purple);
}

/* Detalle de servicio: «Otros servicios» */
.more-links {
  max-width: 1200px;
  margin: 70px auto 0;
}

.more-links-title {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 18px;
}

.more-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.more-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.more-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgb(var(--primary-rgb) / 0.15);
}

.more-link-name {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-color);
}

.more-link-desc {
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.more-link-go {
  margin-top: auto;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-purple);
}

.more-links-actions,
.page-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

.page-cta {
  margin-top: 60px;
}

/* Blog y casos: anterior · volver · siguiente */
.pager-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 10px 0 30px;
  padding: 16px 0;
  border-top: 1px solid var(--primary-tint);
  border-bottom: 1px solid var(--primary-tint);
}

.pager-link {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.pager-link:last-child {
  text-align: right;
}

.pager-link:hover {
  color: var(--accent-purple);
}

.pager-back {
  padding: 8px 18px;
  border: 2px solid var(--primary-color);
  border-radius: 22px;
  text-align: center;
}

@media (max-width: 576px) {
  .pager-nav {
    grid-template-columns: 1fr 1fr;
  }

  .pager-back {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Nosotros: enlaces bajo «¿Por qué elegirnos?» */
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 18px;
}

/* Pie con columna de servicios (5 columnas en escritorio) */
@media (min-width: 993px) {
  .footer-container {
    grid-template-columns: 1.4fr 1fr 1.1fr 1fr 1.5fr;
  }
}

/* Títulos grandes con palabras largas («CIBERSEGURIDAD»): cortan con guion y solo si no caben */
.about-title,
.services-main-title,
.service-detail-title,
.success-main-title,
.case-detail-title,
.blog-main-title,
.history-title {
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ==========================================================================
   ██████  FORMAS DE LAS IMÁGENES (admin → Configuración general → Formas)
   shape-hexagon · shape-circle · shape-square · shape-rectangle
   Solo cambian el recorte y la proporción; giros, zoom y carruseles siguen igual.
   ========================================================================== */
:root {
  --shape-hexagon: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  --shape-round: inset(0 round 18px);
}

/* 1. Carrusel giratorio de Inicio y Nosotros */
.hex-3d.shape-circle .hexagon[data-slot] {
  -webkit-clip-path: circle(50% at 50% 50%);
  clip-path: circle(50% at 50% 50%);
  aspect-ratio: 1 / 1;
}

.hex-3d.shape-square .hexagon[data-slot] {
  -webkit-clip-path: var(--shape-round);
  clip-path: var(--shape-round);
  aspect-ratio: 1 / 1;
}

.hex-3d.shape-rectangle {
  --shape-shift: 62%;
}

.hex-3d.shape-rectangle .hexagon[data-slot] {
  -webkit-clip-path: var(--shape-round);
  clip-path: var(--shape-round);
  width: 58%;
  aspect-ratio: 4 / 3;
}

/* 2. Foto del líder (Nosotros) */
.ceo-hex-card.shape-circle,
.ceo-hex-card.shape-square {
  height: auto;
  aspect-ratio: 1 / 1;
}

.ceo-hex-card.shape-rectangle {
  height: auto;
  aspect-ratio: 4 / 5;
}

.ceo-hex-card.shape-circle .ceo-hexagon {
  -webkit-clip-path: circle(50% at 50% 50%);
  clip-path: circle(50% at 50% 50%);
}

.ceo-hex-card.shape-square .ceo-hexagon,
.ceo-hex-card.shape-rectangle .ceo-hexagon {
  -webkit-clip-path: var(--shape-round);
  clip-path: var(--shape-round);
}

.ceo-hex-card.shape-circle .ceo-badge {
  left: 18%;
  bottom: 16%;
}

/* 3. Imagen de cada tarjeta en la página Servicios */
.service-box-card.shape-circle .card-gray-image {
  border-radius: 50%;
}

.service-box-card.shape-rectangle .card-gray-image {
  width: 124px;
  height: 90px;
  border-radius: 8px;
}

.service-box-card.shape-hexagon .card-gray-image {
  width: 90px;
  height: 102px;
  border-radius: 0;
  -webkit-clip-path: var(--shape-hexagon);
  clip-path: var(--shape-hexagon);
}

/* 4. Tarjetas del Blog y de Casos de éxito */
.blog-card.shape-circle .hex-carousel-link,
.blog-card.shape-square .hex-carousel-link,
.success-card.shape-circle .hex-image-link,
.success-card.shape-square .hex-image-link {
  height: auto;
  aspect-ratio: 1 / 1;
}

.blog-card.shape-rectangle .hex-carousel-link,
.success-card.shape-rectangle .hex-image-link {
  width: min(300px, 100%);
  height: auto;
  aspect-ratio: 4 / 3;
}

.blog-card.shape-circle .hexagon-inner,
.success-card.shape-circle .hexagon-inner {
  -webkit-clip-path: circle(50% at 50% 50%);
  clip-path: circle(50% at 50% 50%);
}

.blog-card.shape-square .hexagon-inner,
.blog-card.shape-rectangle .hexagon-inner,
.success-card.shape-square .hexagon-inner,
.success-card.shape-rectangle .hexagon-inner {
  -webkit-clip-path: var(--shape-round);
  clip-path: var(--shape-round);
}

/* 5. Carruseles dentro de un servicio, artículo o caso */
.carousel-container.shape-square,
.carousel-container.shape-circle,
.carousel-container.shape-hexagon {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.carousel-container.shape-square {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.carousel-container.shape-circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.carousel-container.shape-hexagon {
  aspect-ratio: 220 / 250;
  border: none;
  background: var(--primary-color);
  -webkit-clip-path: var(--shape-hexagon);
  clip-path: var(--shape-hexagon);
}

.carousel-container.shape-circle .carousel-dots {
  bottom: 9%;
}

.carousel-container.shape-hexagon .carousel-dots {
  bottom: 20%;
}

.service-media-col .carousel-container.shape-square,
.service-media-col .carousel-container.shape-circle,
.service-media-col .carousel-container.shape-hexagon {
  margin-right: 0;
}

/* ==========================================================================
   ██████  FORMAS DE LOS CONTENEDORES (admin → Configuración general)
   box-rectangle · box-square · box-circle · box-hexagon
   En tarjetas con texto la figura se aplica a las esquinas para no cortar el contenido:
     rectángulo = redondeadas · cuadrado = rectas · círculo = cápsula · hexágono = en diagonal
   «corner-shape: bevel» dibuja la esquina en diagonal con su borde; en navegadores que
   aún no lo soportan se ve redondeada (no se rompe nada).
   ========================================================================== */

/* 1. Tarjetas del abanico (Inicio) */
.cards-container.box-square .service-card {
  border-radius: 0;
}

.cards-container.box-circle .service-card {
  border-radius: 56px;
  padding-left: 34px;
  padding-right: 34px;
}

.cards-container.box-hexagon .service-card {
  border-radius: 34px;
  corner-shape: bevel;
}

.cards-container.box-circle .card-icon-box {
  border-radius: 50%;
}

.cards-container.box-hexagon .card-icon-box {
  border-radius: 18px;
  corner-shape: bevel;
}

.cards-container.box-square .card-icon-box {
  border-radius: 0;
}

/* 2. Tarjetas de la página Servicios y «Otros servicios» */
.services-grid-container.box-square .service-box-card,
.more-links-grid.box-square .more-link-card {
  border-radius: 0;
}

.services-grid-container.box-circle .service-box-card,
.more-links-grid.box-circle .more-link-card {
  border-radius: 40px;
  padding-left: 28px;
  padding-right: 28px;
}

.services-grid-container.box-hexagon .service-box-card,
.more-links-grid.box-hexagon .more-link-card {
  border-radius: 22px;
  corner-shape: bevel;
}

/* 3. Certificaciones (Nosotros): aquí sí cambia la figura completa */
.cert-static-row.box-square .cert-circle {
  border-radius: 16px;
}

.cert-static-row.box-rectangle .cert-circle {
  width: 196px;
  height: 136px;
  border-radius: 16px;
}

/* Rectángulos y hexágonos se enciman menos que los círculos para que el texto se lea completo */
.cert-static-row.box-rectangle .cert-card:not(:first-child) {
  margin-left: -14px;
}

.cert-static-row.box-hexagon .cert-card:not(:first-child) {
  margin-left: -16px;
}

.cert-static-row.box-hexagon .cert-circle {
  width: 184px;
}

.cert-static-row.box-hexagon .cert-circle {
  height: auto;
  aspect-ratio: 220 / 250;
  border: none;
  border-radius: 0;
  background-color: var(--primary-soft);
  -webkit-clip-path: var(--shape-hexagon);
  clip-path: var(--shape-hexagon);
  box-shadow: none;
}

.cert-static-row.box-hexagon .cert-card {
  filter: drop-shadow(0 8px 14px rgb(var(--primary-rgb) / 0.18));
}

.cert-static-row.box-hexagon .cert-card.active .cert-circle {
  background-color: var(--primary-tint);
}

@media (max-width: 992px) {
  .cert-static-row.box-rectangle .cert-circle {
    width: 150px;
    height: 104px;
  }

  .cert-static-row.box-hexagon .cert-circle {
    width: 140px;
  }
}

@media (max-width: 700px) {
  .cert-static-row.box-rectangle .cert-card:not(:first-child),
  .cert-static-row.box-hexagon .cert-card:not(:first-child) {
    margin-left: 0;
  }

  .cert-static-row.box-hexagon .cert-circle {
    width: 128px;
  }
}

/* 4. Campos del formulario de contacto (Inicio, Nosotros, Blog y Contacto) */
.contact-form.box-square input,
.contact-form.box-square textarea,
.contact-form.box-square select {
  border-radius: 0;
}

.contact-form.box-circle input,
.contact-form.box-circle select {
  border-radius: 999px;
  padding-left: 22px;
}

.contact-form.box-circle textarea {
  border-radius: 24px;
  padding-left: 22px;
}

.contact-form.box-hexagon input,
.contact-form.box-hexagon textarea,
.contact-form.box-hexagon select {
  border-radius: 12px;
  corner-shape: bevel;
}

/* ==========================================================================
   ██████  RECUADROS DE BLOG Y CASOS DE ÉXITO (panel → Estilos)
   box-none = como estaba (sin recuadro) · rectangle · square · circle · hexagon
   Se aplica a cada tarjeta del listado y a las pestañas dentro del artículo o caso.
   ========================================================================== */
.blog-hex-grid:not(.box-none) .blog-card,
.success-cards-grid:not(.box-none) .success-card {
  padding: 22px 20px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 14px;
  background-color: #ffffff;
  box-shadow: 0 8px 22px rgb(var(--primary-rgb) / 0.08);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.blog-hex-grid:not(.box-none) .blog-card:hover,
.success-cards-grid:not(.box-none) .success-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgb(var(--primary-rgb) / 0.16);
}

.blog-hex-grid.box-square .blog-card,
.success-cards-grid.box-square .success-card {
  border-radius: 0;
}

.blog-hex-grid.box-circle .blog-card,
.success-cards-grid.box-circle .success-card {
  border-radius: 48px;
  padding-left: 26px;
  padding-right: 26px;
}

.blog-hex-grid.box-hexagon .blog-card,
.success-cards-grid.box-hexagon .success-card {
  border-radius: 30px;
  corner-shape: bevel;
}

/* Las tarjetas con recuadro centran su contenido */
.blog-hex-grid:not(.box-none) .blog-card-info,
.success-cards-grid:not(.box-none) .success-card-info {
  align-items: center;
}

/* Pestañas dentro del artículo o caso */
.case-tabs-wrapper:not(.box-none) .tab-content {
  border: 2px solid var(--primary-color);
  border-left-width: 6px;
  border-radius: 12px;
}

.case-tabs-wrapper.box-square .tab-content {
  border-radius: 0;
}

.case-tabs-wrapper.box-circle .tab-content {
  border-radius: 28px;
  border-left-width: 2px;
  padding-left: 28px;
}

.case-tabs-wrapper.box-hexagon .tab-content {
  border-radius: 18px;
  corner-shape: bevel;
}


/* ==========================================================================
   ICONOS DEL PIE Y REDES SOCIALES
   Cada icono es una silueta (PNG/SVG sin fondo) usada como molde con CSS mask
   y pintada con su color: --ico (imagen) y --ico-color (color), ambos desde el panel
   (7. Menú y pie de página). El tamaño viene de --footer-ico-size / --social-ico-size.
   ========================================================================== */
.ico-mask {
  display: inline-block;
  flex: none;
  width: var(--ico-size, 20px);
  height: var(--ico-size, 20px);
  background-color: var(--ico-color, currentColor);
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

/* Dirección, teléfono y correo: el icono se alinea con la primera línea del texto */
.footer-info .info-icon.ico-mask {
  --ico-size: var(--footer-ico-size, 20px);
  font-size: 0;
  margin-top: 0.05em;
}

/* Redes: sin círculo blanco de fondo; el icono trae su propia forma y color */
.social-icons a.social-link {
  width: auto;
  height: auto;
  min-width: var(--social-ico-size, 28px);
  min-height: var(--social-ico-size, 28px);
  background: transparent;
  border-radius: 0;
  color: var(--ico-color, #ffffff);
  font-size: var(--social-ico-size, 28px);
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons a.social-link .ico-mask {
  --ico-size: var(--social-ico-size, 28px);
}

.social-icons a.social-link i {
  font-size: calc(var(--social-ico-size, 28px) * 0.9);
}

.social-icons a.social-link:hover,
.social-icons a.social-link:focus-visible {
  transform: translateY(-2px) scale(1.08);
  opacity: 0.85;
}

/* En celular el área de toque sigue siendo de 44 px aunque el icono sea pequeño,
   y el icono de contacto se centra con su enlace (que allí mide 44 px de alto) */
@media (max-width: 768px) {
  .footer-info .info-icon.ico-mask {
    align-self: center;
    margin-top: 0;
  }

  .social-icons a.social-link {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ==========================================================================
   ALINEACIÓN DE TEXTOS
   Las reglas de cada apartado se escriben solas en <style id="site-theme"> (base.html)
   a partir de la tabla «Alineación y tamaño de los textos» de 8. Estilos.
   Aquí solo se corrigen elementos que necesitan ayuda para seguir esa alineación.
   ========================================================================== */
/* Los párrafos centrados o a la derecha no deben quedar más anchos que su columna */
[class*="ts-"] p {
  overflow-wrap: break-word;
}


/* ==========================================================================
   «CONTÁCTANOS» EN UNA SOLA LÍNEA
   El título vertical del formulario (Inicio, Nosotros, Blog) nunca se parte: en pantallas
   bajas la letra se reduce con la altura de la ventana (vh) en lugar de pasar a otra columna.
   ========================================================================== */
.contact-vertical-title h2 {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  line-height: 1;
  font-size: clamp(3rem, 10vh, 5.5rem);
}

/* Celular y tableta: el título va horizontal, también en una sola línea */
@media (max-width: 992px) {
  .contact-vertical-title h2 {
    font-size: clamp(2rem, 11vw, 4.5rem);
    letter-spacing: 2px;
  }
}

/* ==========================================================================
   SUBMENÚ DE SERVICIOS
   Arriba: «Servicios ▽» abre la lista de todos los servicios publicados (crece sola al
   agregar servicios; con muchos, la lista se desplaza en vez de ocupar toda la pantalla).
   Pie: los servicios van dentro de un desplegable compacto con altura máxima.
   ========================================================================== */
.dropdown-services .dropdown-menu {
  min-width: 260px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dropdown-services .dropdown-menu a {
  white-space: normal;
  line-height: 1.3;
}

.dropdown-menu .dropdown-all a {
  font-weight: 700;
  border-bottom: 1px solid rgb(var(--primary-rgb) / 0.15);
}

@media (max-width: 992px) {
  .dropdown-services .dropdown-menu {
    max-height: none;
    overflow: visible;
  }
}

/* Pie de página: desplegable de servicios */
.footer-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--footer-text, #ffffff);
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.9;
  min-height: 36px;
}

.footer-dropdown summary::-webkit-details-marker {
  display: none;
}

.footer-dropdown summary::after {
  content: "▾";
  transition: transform 0.2s ease;
}

.footer-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.footer-dropdown summary:hover,
.footer-dropdown summary:focus-visible {
  opacity: 1;
}

.footer-dropdown-list {
  margin-top: 12px !important;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 6px !important;
  scrollbar-width: thin;
}

.footer-dropdown-list li {
  margin-bottom: 4px !important;
}


/* ==========================================================================
   CARRUSELES SIN CONTORNO
   Las fotos de servicios, artículos y casos ya no llevan marco ni fondo blanco.
   ========================================================================== */
.carousel-container {
  border: none !important;
  outline: none;
  box-shadow: none;
  background-color: transparent;
}

/* ==========================================================================
   SERVICIOS: SUBTÍTULOS Y BUSCADOR
   ========================================================================== */
.services-page-subtitle {
  margin: 6px 0 10px;
  font-family: var(--font-main);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: var(--text-dark);
}

.card-service-subtitle {
  margin: 2px 0 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
}

.service-detail-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  margin: 8px 0 18px;
}

/* Buscador en la página Servicios */
.services-page-search {
  width: min(420px, 100%);
  margin: 22px 0 0;
  box-sizing: border-box;
}

.services-page-search input {
  flex: 1;
  min-width: 0;
}

.search-result-item small {
  overflow-wrap: anywhere;
}

/* Título del detalle de un servicio: la letra se adapta al ancho para no partir palabras largas
   («CIBERSEGURIDAD»); solo si aun así no cabe, se corta con guion. */
.service-detail-title {
  font-size: clamp(2rem, 4.2vw, 4.3rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}


/* ==========================================================================
   BUSCADOR BAJO EL MENÚ Y TEXTOS MÁS LARGOS
   ========================================================================== */
/* Fila debajo del menú: migas de pan a la izquierda, buscador a la derecha
   (alineado con «Comunidad» y «Contáctanos») */
.crumbs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 12px 80px 0;
}

.crumbs-row .breadcrumbs-nav {
  padding: 0;
}

.crumbs-row .breadcrumbs-nav ol {
  margin: 0;
  padding: 0;
}

.search-bar-box.top-search {
  width: min(300px, 100%);       /* el ancho de «Comunidad» + «Contáctanos» */
  margin: 4px 0 0 auto;
  box-sizing: border-box;
}

.search-bar-box.top-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
}

.search-bar-box.top-search .search-results-dropdown {
  left: auto;
  right: 0;
  width: min(420px, calc(100vw - 32px));
}

@media (max-width: 992px) {
  .crumbs-row {
    padding: 10px 20px 0;
  }

  .search-bar-box.top-search {
    width: 100%;
    margin: 0;
  }
}

/* Servicios: tarjetas más anchas para que la descripción se lea completa */
.service-box-card {
  width: auto;
  flex: 1 1 520px;
  max-width: 580px;
}

.services-row.row-single-centered .service-box-card {
  flex-basis: 580px;
}

.card-service-desc {
  line-height: 1.5;
}

/* Detalle de un servicio: el texto RODEA la imagen.
   - Junto a la imagen, el texto llega hasta ella.
   - Debajo de la imagen, el texto ocupa todo el ancho y se justifica hasta el margen
     derecho donde termina la imagen (mismo borde para todo el bloque).
   Funciona igual para cualquier servicio nuevo que se agregue desde el panel. */
.service-detail-container {
  display: flow-root;            /* contiene la imagen flotante sin cortarla */
  max-width: 1400px;
}

.service-media-col {
  float: right;
  width: clamp(300px, 32%, 440px);
  max-width: 440px;
  margin: 0 0 24px 48px;         /* separación con el texto (izquierda y abajo) */
  display: block;
}

.service-info-col {
  display: block;                /* bloque normal para que el texto fluya alrededor */
  max-width: none;
  min-width: 0;
}

/* Tableta y celular: texto arriba e imagen debajo, a todo el ancho (como antes) */
@media (max-width: 992px) {
  .service-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .service-media-col {
    float: none;
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

/* «Otros servicios»: descripción más larga */
.more-link-desc {
  line-height: 1.45;
}

/* Blog: tarjetas más anchas con más texto */
.blog-card {
  width: 340px;
  max-width: 100%;
}

.blog-card-desc {
  line-height: 1.5;
}

/* Casos de éxito: tarjeta con un resumen del caso */
.success-card {
  width: 360px;
  max-width: 100%;
}

.success-card-text {
  margin: 4px 0 12px;
  font-family: var(--font-main);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #555555;
  text-align: center;
}

/* Detalle de artículos y casos: texto más amplio */
.case-detail-container {
  max-width: 1240px;
}

/* Presentación de la página Servicios: más ancha */
.services-intro-flex {
  max-width: 100%;
}

.services-intro-text {
  max-width: 920px;
}

/* Un servicio solo en su fila: tarjeta más ancha para leer el resumen completo */
.services-row.row-single-centered .service-box-card {
  flex: 1 1 820px;
  max-width: 900px;
}

/* Abanico del Inicio: subtítulo opcional (se activa en cada servicio del panel) */
.service-card .card-subtitle {
  display: block;
  margin: 2px 0 4px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
}

/* Presentación de la página Blog («Conocimiento experto…»): ocupa todo el ancho
   disponible junto al icono, en lugar de quedarse en una columna angosta. */
.blog-intro-flex {
  max-width: 100%;
}

.blog-intro-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  line-height: 1.55;
}

/* Detalle de un artículo del blog: el texto RODEA la imagen (como en Servicios).
   - Junto a la imagen, el texto llega hasta ella.
   - Debajo, el texto ocupa todo el ancho y se justifica hasta el borde derecho de la imagen.
   La imagen conserva su tamaño, forma y ajuste (no se modifica). */
.case-hero-grid.wrap-media {
  display: flow-root;            /* contiene la imagen flotante */
}

.case-hero-grid.wrap-media .case-media-col {
  float: right;
  width: min(480px, 42%);
  max-width: 480px;
  margin: 0 0 24px 48px;         /* separación con el texto */
}

.case-hero-grid.wrap-media .case-info-col {
  display: block;
  min-width: 0;
}

/* Tableta y celular: texto arriba e imagen debajo, a todo el ancho */
@media (max-width: 992px) {
  .case-hero-grid.wrap-media {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .case-hero-grid.wrap-media .case-media-col {
    float: none;
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

/* ==========================================================================
   FOTOS COMPLETAS EN ARTÍCULOS DEL BLOG Y CASOS DE ÉXITO
   Las fotos rectangulares (imagen principal y Galería) se muestran con su
   proporción original, sin recortes: el alto del carrusel se adapta a la foto.
   Las formas círculo, cuadrado y hexágono siguen recortando, porque esa es su forma.
   ========================================================================== */
.case-detail-section .carousel-container.shape-rectangle {
  height: auto !important;
  aspect-ratio: auto;
  display: block;
  overflow: visible;
}

/* Todas las fotos se apilan en la misma celda: el carrusel toma el alto de la más alta */
.case-detail-section .carousel-container.shape-rectangle .carousel-slides {
  display: grid;
  height: auto;
}

.case-detail-section .carousel-container.shape-rectangle .slide {
  position: relative;
  grid-area: 1 / 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;              /* si se agranda la foto en el panel, no se sale del carrusel */
}

.case-detail-section .carousel-container.shape-rectangle .slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh;              /* una foto muy alta no ocupa más de la pantalla */
  object-fit: contain;           /* foto completa, nunca recortada */
  border-radius: 6px;
}

/* Puntos debajo de la foto (no encima) */
.case-detail-section .carousel-container.shape-rectangle .carousel-dots {
  position: static;
  transform: none;
  justify-content: center;
  margin-top: 12px;
}

/* Galería: un poco más ancha para que la foto completa se vea grande */
.case-detail-section .comparison-box .carousel-container.shape-rectangle {
  width: 100%;
  max-width: 900px;
}

/* Imagen principal (junto al texto): alto máximo moderado; una foto vertical se ve
   completa pero más angosta, sin crecer demasiado a lo alto */
.case-detail-section .case-media-col .carousel-container.shape-rectangle .slide img {
  max-height: 520px;
}

/* Fecha en las tarjetas de la página Blog (solo en el listado general) */
.blog-card-date {
  display: block;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--primary-muted, #7a5a80);
  margin: 0 0 4px;
  align-self: center;            /* centrada sobre el título, igual que la tarjeta */
  text-align: center;
}

/* Icono del birrete en Casos de éxito: tamaño fijo, no se encoge aunque el texto
   sea largo (mismo tamaño que el icono de la página Blog) */
.graduation-icon-box {
  flex: 0 0 auto;
  width: 85px;
  height: 85px;
}

.graduation-icon-box svg {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.success-intro-text {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 600px) {
  .graduation-icon-box {
    width: 64px;
    height: 64px;
  }
}

/* Casos de éxito: fotos «Antes» y «Después» más pequeñas.
   Solo cambia el tamaño en pantalla: la foto se ve completa y sin recortes,
   y el archivo que se sube en el panel no se modifica. */
.ts-story_detail .comparison-grid {
  justify-content: center;
  gap: 48px;
}

.ts-story_detail .comparison-box {
  flex: 0 1 400px;
  max-width: 400px;
}

.ts-story_detail .comparison-box .carousel-container.shape-rectangle {
  max-width: 400px;
}

.ts-story_detail .comparison-box .carousel-container.shape-rectangle .slide img {
  max-height: 400px;
}

/* Tableta y celular: una debajo de la otra, mismo tamaño máximo */
@media (max-width: 992px) {
  .ts-story_detail .comparison-box {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 auto;
  }
}

/* Descripción de una certificación (panel de detalle en Nosotros): admite párrafos con formato */
.detail-text p {
  margin: 0 0 0.8em;
}

.detail-text p:last-child {
  margin-bottom: 0;
}
