/* ═══════════════════════════════════════════════
   VARIABLES Y CONFIGURACIÓN BASE (Paleta estricta)
   ═══════════════════════════════════════════════ */
:root {
    --azul-principal: #1C2C4C;
    --azul-profundo: #141F3A;
    --azul-medio: #26395E;
    --dorado-cta: #C9A24D;
    --dorado-claro: #E0B96A;
    --dorado-oscuro: #8A6D2F;
    --blanco-hueso: #F5F3EF;
    --blanco-puro: #FFFFFF;
    --texto-sobre-azul: #E8EAF0;
    --texto-sobre-claro: #4A5568;
    --whatsapp: #25D366;

    --font-titulos: 'Playfair Display', serif;
    --font-cuerpo: 'Lato', sans-serif;
    --container-max: 1200px;
    --container-padding: 2rem;
    --section-padding: clamp(4rem, 8vw, 7rem) 0;

    --transicion-suave: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Resets */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-cuerpo); color: var(--texto-sobre-claro);
    background-color: var(--blanco-puro); line-height: 1.7; font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
}

/* Accesibilidad: Salto al contenido, Foco visible y texto solo para lectores de pantalla */
.skip-link {
    position: absolute; top: -100%; left: 1rem; background: var(--dorado-cta);
    color: var(--azul-profundo); padding: 0.5rem 1rem; z-index: 9999;
    font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
*:focus-visible { outline: 2px solid var(--dorado-cta); outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Campo trampa (honeypot) anti-spam: invisible para personas, visible para bots simples */
.hp-wrap { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Tipografía */
h1, h2, h3, .brand { font-family: var(--font-titulos); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 2rem; }
h3 { font-size: 1.35rem; }
p { max-width: 65ch; margin-bottom: 1rem; }

.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; display: block; margin-bottom: 1rem; }
.eyebrow-dark { color: var(--dorado-oscuro); }
.eyebrow-light { color: var(--dorado-claro); }

/* Utilidades de Diseño */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); }
.text-center { text-align: center; }
.text-center p { margin-inline: auto; }
.section-dark { background-color: var(--azul-principal); color: var(--texto-sobre-azul); }
.section-deep { background-color: var(--azul-profundo); color: var(--texto-sobre-azul); }
.section-bone { background-color: var(--blanco-hueso); }
.section-white { background-color: var(--blanco-puro); }

/* Botones con física elástica (Magnética) */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.5rem; font-weight: 700; text-decoration: none;
    border-radius: 4px; cursor: pointer; border: 2px solid transparent; min-height: 48px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}
.btn-gold { background-color: var(--dorado-cta); color: var(--azul-profundo); }
.btn-gold:hover { background-color: var(--dorado-claro); }
.btn-outline { background-color: transparent; border-color: var(--dorado-cta); color: var(--dorado-claro); }
.btn-outline:hover { background-color: rgba(201, 162, 77, 0.1); }
.btn-outline-dark { border-color: var(--dorado-oscuro); color: var(--dorado-oscuro); }

/* ═══════════════════════════════════════════════
   COMPONENTES Y SECCIONES
   ═══════════════════════════════════════════════ */

/* 1. Header Fijo */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: var(--azul-principal); padding: 1rem 0;
    z-index: 1000; transition: box-shadow 0.3s ease;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; }
.logo .brand { color: var(--blanco-puro); font-size: 1.5rem; }
.logo .sub-brand { color: var(--dorado-claro); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-cuerpo); }
.logo-img { height: 52px; width: auto; display: block; }
.logo-img-footer { height: 76px; }

.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a { color: var(--texto-sobre-azul); text-decoration: none; font-weight: 700; position: relative; padding: 0.5rem 0; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--dorado-cta); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }
.menu-toggle { display: none; background: none; border: none; color: var(--blanco-puro); cursor: pointer; padding: 0.5rem; min-height: 48px; min-width: 48px; }

/* 2. Hero */
.hero { height: 85vh; min-height: 600px; position: relative; display: flex; align-items: center; background-color: var(--azul-profundo); overflow: hidden; }
.hero-img-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #2a3441; overflow: hidden; background-size: cover; background-position: center; }
.hero-img-placeholder::after { content: "Fotografía de sala de juntas o estatua de la justicia sobria"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,0.3); font-family: var(--font-cuerpo); max-width: 80%; text-align: center; }
.hero-img-placeholder.has-image::after { content: none; }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-person {
    position: absolute; bottom: 0; right: clamp(1rem, 5vw, 80px); z-index: 1;
    height: 95%; max-height: 760px; width: auto; max-width: 46%;
    object-fit: contain; object-position: bottom; pointer-events: none; user-select: none;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(28,44,76,0.95) 0%, rgba(28,44,76,0.7) 50%, rgba(28,44,76,0.28) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 760px; padding-top: 80px; }
.hero-content h1 { color: var(--blanco-puro); margin-bottom: 1.5rem; }
.hero-content .subtitle { color: var(--texto-sobre-azul); font-size: 1.15rem; margin-bottom: 2.5rem; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }

.trust-signals { display: flex; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid rgba(224, 185, 106, 0.2); padding-top: 1.5rem; }
.trust-signal { display: flex; align-items: center; gap: 0.5rem; color: var(--texto-sobre-azul); font-size: 0.9rem; }
.trust-signal svg { fill: var(--dorado-claro); width: 20px; height: 20px; }

.credential-bar { background-color: var(--dorado-cta); padding: 1rem 0; text-align: center; }
.credential-bar p { color: var(--azul-profundo); font-weight: 700; margin: 0; max-width: 100%; font-size: 1.05rem; }
.credential-bar-inner { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.credential-icon { width: 26px; height: 26px; color: var(--azul-profundo); flex-shrink: 0; opacity: 0.75; }
.credential-icon-flip { transform: scaleX(-1); }

/* 3. Marquesina Tipográfica (Ticker Legal) */
.marquee-container { width: 100%; overflow: hidden; background: var(--blanco-hueso); padding: 2rem 0; border-top: 1px solid rgba(0,0,0,0.05); }
.marquee-content { display: flex; white-space: nowrap; animation: scroll-marquee 30s linear infinite; font-family: var(--font-titulos); font-size: clamp(3rem, 6vw, 5rem); color: rgba(201,162,77,.28); text-transform: uppercase; }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* 4. Identidad Institucional (Quiénes Somos, Misión, Visión) */
.identidad { padding: var(--section-padding); }
.identidad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.identidad-card { background: var(--blanco-hueso); padding: 2.5rem; border-radius: 8px; border-left: 4px solid var(--dorado-cta); margin-bottom: 1.5rem; }
.identidad-card h3 { color: var(--azul-profundo); margin-bottom: 1rem; font-size: 1.5rem; }
.identidad-card p { margin-bottom: 0; font-size: 0.95rem; }

/* 5. Diferenciadores (Trazado SVG interactivo) */
.differentiators { padding: var(--section-padding); }
.differentiators.has-bg {
    background-image: linear-gradient(rgba(245, 243, 239, 0.88), rgba(245, 243, 239, 0.88)), var(--diff-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.diff-card {
    background: var(--blanco-puro); padding: 2.5rem 1.5rem; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: var(--transicion-suave);
    position: relative; overflow: hidden;
}
.diff-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background-color: var(--dorado-cta); transform: scaleX(0); transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}
.diff-card.active::before { transform: scaleX(1); }
.diff-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 25px rgba(0,0,0,0.1); background-color: #FBF6EB; }
.card-icon { width: 32px; height: 32px; color: var(--dorado-cta); margin-bottom: 0.75rem; display: block; }
.diff-number { font-family: var(--font-titulos); font-size: 3rem; color: var(--dorado-claro); line-height: 1; margin-bottom: 1rem; opacity: 0.5; }
.diff-card h3 { color: var(--azul-profundo); margin-bottom: 1rem; font-size: 1.25rem; }
.diff-card p { font-size: 0.95rem; margin: 0; }

/* 6. Portafolio de Servicios */
.solutions { padding: var(--section-padding); }
.sector-title { margin-top: 3rem; margin-bottom: 1.5rem; color: var(--azul-profundo); font-size: 1.8rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 0.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.solution-card { background: var(--blanco-hueso); padding: 2.5rem 2rem; border-radius: 8px; transition: var(--transicion-suave); border: 1px solid rgba(0,0,0,0.03); display: flex; flex-direction: column; }
.solution-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 24px rgba(28,44,76,0.08); background-color: #F5EDD9; }
.pill { display: inline-block; background: var(--azul-principal); color: var(--dorado-claro); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3rem 0.8rem; border-radius: 50px; margin-bottom: 1.5rem; align-self: flex-start; }
.solution-title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.solution-card h3 { color: var(--azul-profundo); margin-bottom: 0; font-size: 1.2rem; }
.card-icon-inline { width: 22px; height: 22px; color: var(--dorado-cta); flex-shrink: 0; }
.solution-card p { font-size: 0.95rem; flex-grow: 1; margin-bottom: 1rem; }

.service-highlight {
    display: flex; align-items: center; gap: 2rem;
    max-width: 760px; margin: 3rem auto 0;
    background: var(--blanco-hueso); border-radius: 8px;
    border-left: 4px solid var(--dorado-cta);
    padding: 2rem 2.5rem;
}
.service-highlight-media img {
    width: clamp(110px, 14vw, 150px); height: clamp(110px, 14vw, 150px);
    border-radius: 50%; object-fit: cover; display: block;
    border: 3px solid var(--dorado-cta); flex-shrink: 0;
}
.service-highlight-content h3 { color: var(--azul-profundo); font-size: 1.15rem; margin-bottom: 0.4rem; }
.service-highlight-content p { font-size: 0.95rem; margin-bottom: 0; }

/* 7. Eventos y Videos (Carrusel) */
.events { padding: var(--section-padding); }
.carousel { position: relative; display: flex; align-items: center; gap: 1rem; margin-top: 2rem; overflow: hidden; padding: 0.5rem 0 2.75rem; }
.carousel-track {
    display: flex; gap: 1.5rem; flex: 1; min-width: 0;
    will-change: transform; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.event-card {
    flex: 0 0 clamp(240px, 30vw, 340px);
    background: var(--blanco-puro); border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); display: flex; flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.event-media { position: relative; aspect-ratio: 16 / 9; background-color: #000; overflow: hidden; }
.event-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.event-card:hover .event-media img { transform: scale(1.08); }
.event-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.event-play {
    position: absolute; inset: 0; width: 100%; height: 100%; border: none; cursor: pointer;
    background: rgba(20,31,58,0.25); display: flex; align-items: center; justify-content: center;
    color: var(--blanco-puro); transition: background 0.3s ease;
}
.event-play svg { background-color: rgba(201,162,77,0.9); border-radius: 50%; padding: 14px; width: 52px; height: 52px; }
.event-play:hover { background: rgba(20,31,58,0.45); }
.event-body { padding: 1.5rem; }
.event-date { font-size: 0.8rem; color: var(--dorado-oscuro); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.event-body h3 { color: var(--azul-profundo); margin: 0.4rem 0 0.6rem; font-size: 1.1rem; }
.event-body p { font-size: 0.9rem; margin-bottom: 0.8rem; }
.event-link { color: var(--dorado-oscuro); font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.event-link:hover { text-decoration: underline; }

/* Libros (Carrusel) */
.books { padding: var(--section-padding); }
.book-card {
    flex: 0 0 clamp(200px, 24vw, 240px);
    background: var(--blanco-hueso); border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); display: flex; flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.book-cover-wrap { width: 100%; aspect-ratio: 2 / 3; background: #000; }
.book-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--azul-principal); color: var(--dorado-claro);
    font-family: var(--font-titulos); font-size: 3.5rem;
}
.book-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; flex-grow: 1; }
.book-body h3 { color: var(--azul-profundo); font-size: 1.1rem; }
.book-body p { font-size: 0.9rem; margin-bottom: 0; flex-grow: 1; }
.book-body .btn { align-self: flex-start; }

.carousel-btn {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--dorado-cta);
    background: var(--blanco-puro); color: var(--azul-profundo); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transicion-suave);
    position: relative; z-index: 200;
}
.carousel-btn:hover { background: var(--dorado-cta); color: var(--blanco-puro); }

/* 8. Equipo */
.team-img {
    width: 180px; height: 180px; margin: 0 auto 1.25rem; border-radius: 50%;
    object-fit: cover; display: flex; align-items: center; justify-content: center;
    background-color: var(--azul-medio); color: rgba(255,255,255,0.5);
    border: 4px solid var(--dorado-cta);
    opacity: 0; transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active .team-img { opacity: 1; transform: scale(1); }

.team { padding: var(--section-padding); background-color: var(--azul-principal); }
.team-card { text-align: center; }
.team-card:hover .team-img { transform: scale(1.06); }
.team-card h3 { margin-bottom: 0.2rem; }
.team-role { color: var(--dorado-claro); font-size: 0.9rem; }

/* Organigrama */
.org-chart { display: flex; flex-direction: column; align-items: center; }
.org-level { display: flex; justify-content: center; width: 100%; position: relative; padding-top: 2.5rem; }
.org-level:first-child { padding-top: 0; }
.org-level:not(:first-child)::before {
    /* Tronco que baja desde el nivel anterior */
    content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 2.5rem;
    background: var(--dorado-cta); transform: translateX(-50%);
}
.org-level-inner {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
    gap: 2.5rem; position: relative;
}
.org-level-inner.has-branch {
    /* Barra horizontal que se reparte exactamente sobre las tarjetas de esta fila */
    padding-top: 1.5rem;
}
.org-level-inner.has-branch::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--dorado-cta);
}
.org-level-inner.has-branch .org-member {
    position: relative; padding-top: 1.5rem;
}
.org-level-inner.has-branch .org-member::before {
    /* Rama individual hacia cada integrante */
    content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 1.5rem;
    background: var(--dorado-cta); transform: translateX(-50%);
}
.org-member { display: flex; }
.org-member .team-card { width: 260px; flex: 0 0 auto; }
.org-member-with-bio { position: relative; }
.org-member-with-bio .team-card { cursor: pointer; }
/* El nivel más alto del organigrama (socia fundadora) tiene protagonismo */
.org-level:first-child .org-member .team-card { width: 340px; }
.org-level:first-child .team-img { width: 280px; height: 280px; }

/* El recuadro de biografía no se ve ni ocupa espacio por defecto: es un overlay
   que aparece al pasar el mouse sobre la foto (o al tocarla en móvil). */
.team-bio-card {
    display: flex; gap: 1.5rem; align-items: flex-start;
    position: absolute; top: 0; left: 50%; translate: -50% 0; width: min(680px, 92vw); z-index: 20;
    background: var(--azul-medio); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; padding: 1.75rem; color: var(--texto-sobre-azul);
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.team-bio-card.is-expanded {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
    .org-member-with-bio:hover .team-bio-card {
        opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
    }
}
/* Escritorio amplio: a la derecha de la foto y lo más ancho que permita la pantalla */
@media (min-width: 1340px) {
    .team-bio-card { left: calc(100% + 1.5rem); translate: 0 0; width: min(700px, calc(50vw - 230px)); }
}
.team-bio-card img {
    width: 120px; height: 120px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
    border: 3px solid var(--dorado-cta);
}
.team-bio-text { flex: 1 1 auto; min-width: 0; }
.team-bio-card h4 { font-family: var(--font-titulos); font-size: 1.15rem; color: var(--blanco-puro); margin-bottom: 0.2rem; }
.team-bio-card .team-role { margin-bottom: 0.9rem; }
.team-bio-card p { font-size: 1rem; line-height: 1.7; color: var(--texto-sobre-azul); margin-bottom: 1rem; }
.team-bio-btn {
    background: none; border: 1px solid var(--dorado-cta); color: var(--dorado-claro);
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 0.5rem 1.1rem; border-radius: 50px; cursor: pointer; transition: var(--transicion-suave);
}
.team-bio-btn:hover { background: var(--dorado-cta); color: var(--azul-profundo); }

/* 9. Nuestros clientes (Carrusel) */
.clients { padding: var(--section-padding); }
.client-card {
    flex: 0 0 clamp(150px, 20vw, 200px);
    background: var(--blanco-hueso); border: 1px solid rgba(0,0,0,0.05); border-radius: 12px;
    padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.client-logo-wrap { width: 100%; height: 80px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.client-logo-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(100%) opacity(70%); transition: var(--transicion-suave); }
.client-card.is-active .client-logo-wrap img,
.client-card:hover .client-logo-wrap img { filter: grayscale(0%) opacity(100%); }
.client-card:hover .client-logo-wrap img { transform: scale(1.12); }
.client-name { font-size: 0.85rem; font-weight: 700; color: var(--azul-profundo); text-align: center; }

/* 10. Contacto y Footer */
.conversion { padding: var(--section-padding); text-align: center; }
.conversion h2 { color: var(--dorado-claro); margin-bottom: 2rem; }
.contact-methods { display: flex; justify-content: center; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.contact-touch { color: var(--blanco-puro); text-decoration: none; font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; min-height: 48px; }
.contact-touch svg { fill: var(--dorado-cta); width: 24px; }
.contact-form { max-width: 500px; margin: 0 auto; text-align: left; }
.form-group { margin-bottom: 1.5rem; }
.form-control { width: 100%; padding: 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--blanco-puro); font-family: var(--font-cuerpo); border-radius: 4px; }
.form-control:focus { outline: none; border-color: var(--dorado-cta); background: rgba(255,255,255,0.1); }
.checkbox-group { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 1.5rem; }
.checkbox-group input { margin-top: 0.3rem; }
.form-btn { width: 100%; font-size: 1.1rem; }
.field-error { color: #ffb3b3; font-size: 0.85rem; margin-top: -1rem; margin-bottom: 1rem; }
.form-messages { max-width: 500px; margin: 0 auto 1.5rem; }
.form-message { padding: 0.9rem 1.2rem; border-radius: 6px; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.8rem; }
.form-message-success { background: rgba(37,211,102,0.15); color: #b7f5cd; border: 1px solid rgba(37,211,102,0.4); }
.form-message-error { background: rgba(220,53,69,0.15); color: #ffc2c8; border: 1px solid rgba(220,53,69,0.4); }

/* 11. Firmas Aliadas (Directorio) */
.allied-hero { padding: 150px 0 clamp(3rem, 6vw, 5rem); }
.allied-hero h1 { margin: 1rem 0; }
.allied-directory { padding: var(--section-padding); }

.allied-search-form { max-width: 900px; margin: 0 auto 1rem; }
.allied-search-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-control-light {
    padding: 0.9rem 1.1rem; border-radius: 4px; border: 1px solid rgba(0,0,0,0.15);
    background: var(--blanco-puro); color: var(--texto-sobre-claro); font-family: var(--font-cuerpo);
    font-size: 1rem;
}
.form-control-light:focus { outline: none; border-color: var(--dorado-cta); }
.allied-search-row input[type="search"] { flex: 2 1 260px; }
.allied-search-row select { flex: 1 1 200px; }
.allied-clear-link { display: inline-block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--dorado-oscuro); font-weight: 700; text-decoration: none; }
.allied-clear-link:hover { text-decoration: underline; }
.allied-result-count { max-width: 900px; margin: 0 auto 2rem; font-size: 0.9rem; color: var(--texto-sobre-claro); }

.allied-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.allied-card {
    background: var(--blanco-puro); border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: row; align-items: stretch;
    gap: 1.75rem; padding: 1.25rem; transition: var(--transicion-suave);
}
.allied-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.allied-photo-wrap { flex: 0 0 auto; width: 240px; height: 240px; border-radius: 12px; overflow: hidden; }
.allied-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.allied-photo-contain { object-fit: contain; background: var(--blanco-puro); padding: 14px; box-sizing: border-box; }
.allied-photo-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--azul-principal); color: var(--dorado-claro);
    font-family: var(--font-titulos); font-size: 5rem;
}
.allied-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; padding: 0.5rem 0; }
.allied-body h3 { color: var(--azul-profundo); font-size: 1.3rem; }
.allied-rating { display: inline-flex; gap: 2px; font-size: 1.2rem; line-height: 1; }
.allied-rating .star { color: #CBD0D8; }
.allied-rating .star-filled { color: var(--dorado-cta); }
.allied-body p { font-size: 0.95rem; margin-bottom: 0; }
.allied-cta { flex: 0 0 auto; align-self: center; }

.allied-empty { text-align: center; padding: 3rem 1rem; font-size: 1.05rem; }

.allied-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.4rem; margin: 2rem 0; font-size: 0.95rem; }
.allied-page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.6rem; border-radius: 6px;
    color: var(--azul-profundo); font-weight: 700; text-decoration: none;
}
.allied-page-link:not(.is-current):not(.is-disabled):hover { background: rgba(201,162,77,0.15); }
.allied-page-link.is-current { background: var(--dorado-cta); color: var(--azul-profundo); }
.allied-page-link.is-disabled { color: rgba(20,31,58,0.3); cursor: default; }
.allied-page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; color: rgba(20,31,58,0.4); }

.footer { background-color: var(--azul-profundo); padding: 4rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.05); color: rgba(232,234,240,0.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer .logo { margin-bottom: 1.5rem; }
.footer h3 { color: var(--blanco-puro); font-family: var(--font-cuerpo); font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer a { color: inherit; text-decoration: none; transition: color 0.3s; padding: 0.2rem 0; display: inline-block; }
.footer a:hover { color: var(--dorado-claro); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; font-size: 0.85rem; flex-wrap: wrap; gap: 1rem; }

/* Elementos Flotantes */
.fab-whatsapp { position: fixed; bottom: 2rem; right: 2rem; width: 60px; height: 60px; background-color: var(--whatsapp); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 999; transition: transform 0.3s ease; }
.fab-whatsapp:hover { transform: scale(1.1); }
.fab-whatsapp svg { fill: var(--blanco-puro); width: 32px; height: 32px; }
.fab-whatsapp::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--whatsapp); animation: pulse 2s infinite; z-index: -1; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

.mobile-bottom-bar { display: none; }

.reveal { opacity: 0; transform: translateY(20px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Modal de contacto rápido */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,31,58,0.72); }
.modal-panel {
    position: relative; background: var(--blanco-puro); color: var(--texto-sobre-claro);
    border-radius: 12px; max-width: 420px; width: 100%; padding: 2.5rem 2rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto;
}
.modal-panel h3 { color: var(--azul-profundo); margin-bottom: 0.4rem; }
.modal-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }
.modal-close {
    position: absolute; top: 0.75rem; right: 0.75rem; background: none; border: none; cursor: pointer;
    color: var(--texto-sobre-claro); padding: 0.5rem; min-height: 44px; min-width: 44px;
    display: flex; align-items: center; justify-content: center;
}
.modal-panel .form-control { background: var(--blanco-hueso); border: 1px solid rgba(0,0,0,0.12); color: var(--texto-sobre-claro); }
.modal-panel .form-control:focus { border-color: var(--dorado-cta); background: var(--blanco-puro); }
.modal-panel .checkbox-group { color: var(--texto-sobre-claro); font-size: 0.8rem; }
.modal-feedback { margin-top: 1rem; font-weight: 700; text-align: center; }
.modal-feedback.is-error { color: #b3261e; }
.modal-feedback:not(.is-error) { color: #1e7e4c; }

/* Pop-up de promoción de libro */
.book-promo-panel { max-width: 640px; padding: 0; overflow: hidden; }
.book-promo-content { display: flex; }
.book-promo-cover { flex: 0 0 42%; width: 42%; object-fit: cover; display: block; }
.book-promo-body { flex: 1; padding: 2.25rem 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.book-promo-body h3 { color: var(--azul-profundo); font-size: 1.3rem; }
.book-promo-body p { font-size: 0.9rem; }
.book-promo-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.book-promo .modal-close { background: rgba(255,255,255,0.85); border-radius: 50%; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
    .marquee-content { animation: none; }
    .hero-video { display: none; }
}

@media (max-width: 1024px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .identidad-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .service-highlight { flex-direction: column; text-align: center; gap: 1rem; padding: 1.75rem; }
}
@media (max-width: 768px) {
    h1 { line-height: 1.1; }
    .nav-links, .header-cta { display: none; }
    .menu-toggle { display: block; }
    .nav-active { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--azul-profundo); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 999; }
    .nav-active .nav-links { display: flex; flex-direction: column; font-size: 1.5rem; }
    .nav-active .nav-links .header-cta { display: flex; margin-top: 1rem; }
    .nav-active .menu-toggle { position: absolute; top: 1rem; right: 1rem; }
    .hero-content { padding-top: 40px; }
    .hero-buttons { flex-direction: row; width: auto; }
    .hero-buttons .btn { width: auto; }
    .hero-person { height: 30%; max-width: 42%; right: 0.75rem; }
    .logo-img { height: 60px; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .carousel-btn { width: 36px; height: 36px; }
    .allied-card { flex-direction: column; text-align: center; }
    .allied-photo-wrap { width: 100%; height: 220px; }
    .allied-cta .btn { width: 100%; }
    .allied-search-row select, .allied-search-row .btn { width: 100%; }
    .book-promo-content { flex-direction: column; }
    .book-promo-cover { flex: 0 0 auto; width: 100%; height: 200px; }
    .org-level-inner { gap: 1.75rem; }
    .org-level-inner.has-branch::before { display: none; }
    .org-member { width: 100%; justify-content: center; }
    .org-member .team-card { width: 100%; max-width: 260px; }
    .org-member-with-bio { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
    .org-level:first-child .org-member .team-card { width: 100%; max-width: 300px; }
    .org-level:first-child .team-img { width: 220px; height: 220px; }
    .team-bio-card {
        position: static; translate: none; width: 100%; max-width: 340px; margin-top: 1.25rem;
        flex-direction: column; align-items: center; text-align: center;
        transform: none; display: none; opacity: 1; visibility: visible; pointer-events: auto;
    }
    .team-bio-card.is-expanded { display: flex; }
    .team-bio-card img, .team-bio-card h4, .team-bio-card .team-role { display: none; }
    .team-bio-card p { text-align: left; }

    /* Barra Inferior Móvil persistente */
    .mobile-bottom-bar { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--azul-profundo); z-index: 998; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
    .mobile-bottom-bar a { flex: 1; text-align: center; padding: 1rem; color: var(--blanco-puro); text-decoration: none; font-weight: 700; font-size: 0.95rem; display: flex; justify-content: center; align-items: center; gap: 0.5rem; }
    .mobile-bottom-bar a:first-child { border-right: 1px solid rgba(255,255,255,0.1); }
    .fab-whatsapp { bottom: 5rem; }
    input, select, textarea { font-size: 16px !important; }
}
