/* Navbar & Footer Styles */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: 72px;
    background: linear-gradient(135deg, rgba(15, 30, 99, 0.82) 0%, rgba(24, 49, 148, 0.92) 50%, rgba(30, 63, 168, 0.85) 100%);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: none;
    display: flex;
    align-items: center;
    transition: height 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    animation: navSlideDown 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
body.admin-bar .header-nav { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .header-nav { top: 46px; }
}

/* Espaciado superior del cuerpo para evitar solapamiento con el menú fijo */
body {
    padding-top: 80px;
}
body.admin-bar {
    padding-top: 112px;
}
@media (max-width: 782px) {
    body.admin-bar {
        padding-top: 126px;
    }
}

@keyframes navSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Navbar compactado al hacer scroll (JS agrega .scrolled) */
.header-nav.scrolled {
    height: 60px;
    background: rgba(15, 30, 99, 0.94);
    box-shadow: none;
}

/* Aura de luz roja flotante en la barra */
.header-nav::after {
    content: '';
    position: absolute;
    top: -70px;
    right: 8%;
    width: 300px;
    height: 170px;
    background: radial-gradient(circle, rgba(189, 14, 13, 0.32) 0%, transparent 70%);
    filter: blur(28px);
    pointer-events: none;
    animation: auraFloat 6s ease-in-out infinite;
}

@keyframes auraFloat {
    0%, 100% { transform: translateY(0); opacity: 0.9; }
    50% { transform: translateY(12px); opacity: 1; }
}

/* Barra de progreso de scroll roja */
.scroll-progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #bd0e0d, #F04444);
    box-shadow: 0 0 14px rgba(189, 14, 13, 0.9), 0 0 28px rgba(189, 14, 13, 0.5);
    z-index: 101;
}

.header-nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0 24px 0 0;
    position: relative;
}

@media (min-width: 769px) {
    .header-nav .logo {
        height: 100%;
        animation: navItemIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}

@keyframes navItemIn {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tarjetas del equipo: foto elevada flotando sobre el borde superior del marco */
.team-card {
    position: relative;
    margin-top: 70px;
    padding: 20px 20px 12px;
    height: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.team-photo {
    position: relative;
    z-index: 2;
    margin: -70px auto 12px;
    width: 220px;
    height: 250px;
    border-radius: 18px;
    border: 4px solid #FFFFFF;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(24, 49, 148, 0.25);
    overflow: hidden;
    background: #1E293B;
    flex-shrink: 0;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.team-card .team-bio {
    text-align: justify !important;
    hyphens: auto;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .team-card {
        margin-top: 60px;
        padding-top: 20px;
    }
    .team-photo {
        width: 180px;
        height: 205px;
        margin-top: -55px;
    }
}

/* Separador premium entre foto grupal y equipo (colores corporativos) */
.team-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 10px auto 34px;
    max-width: 760px;
}
.team-divider-line {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent 0%, #183194 35%, #bd0e0d 65%, #d4af37 100%);
    box-shadow: 0 0 14px rgba(24, 49, 148, 0.45), 0 0 22px rgba(189, 14, 13, 0.25);
}
.team-divider-line.flip {
    background: linear-gradient(90deg, #d4af37 0%, #bd0e0d 35%, #183194 65%, transparent 100%);
}
.team-divider-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2b4bd3 0%, #183194 55%, #0b1533 100%);
    border: 2px solid #d4af37;
    box-shadow: 0 10px 28px rgba(24, 49, 148, 0.5), 0 0 26px rgba(212, 175, 55, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

/* Pieza izquierda blanca pegada al borde izquierdo de la pantalla, sin azul a su lado */
.logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(320px, calc(21vw + 100px), 560px);
    height: 100%;
    padding: 0 40px 0 24px;
    isolation: isolate;
    transition: var(--transition);
}

/* Curva S simetrica estetica: borde derecho con vientre central y remates suaves
   arriba/abajo identicos, sin punta marcada — union colineal, curva continua. */
.logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 72' preserveAspectRatio='none'>\
<path fill='%23FFFFFF' d='M0,0 L315,0 C330,0 348,10 362,22 C378,34 395,36 415,36 C395,36 378,38 362,50 C348,62 330,72 315,72 L0,72 Z'/>\
</svg>");
    z-index: -1;
}

.logo span {
    color: #183194;
}

.logo img, .custom-logo-img {
    max-height: 52px;
    max-width: 190px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover img, .logo:hover .custom-logo-img {
    transform: translateY(-2px) scale(1.04);
}

/* Logo del pie de página: placa blanca con borde y silueta azul (sin la pieza curva) */
.footer .logo {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    clip-path: none;
}

.footer .logo::before {
    display: none;
}

.footer .logo img {
    max-height: 52px;
    max-width: 230px;
    background: #FFFFFF;
    border: 3px solid #FFFFFF;
    border-radius: 14px;
    padding: 10px 20px;
    box-shadow: 0 0 0 3px rgba(24, 49, 148, 0.35), 0 10px 26px rgba(9, 21, 70, 0.55);
}

.footer .logo:hover img {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 0 4px rgba(24, 49, 148, 0.55), 0 14px 34px rgba(9, 21, 70, 0.65);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    list-style: none;
    gap: 4px;
}

@media (min-width: 769px) {
    .nav-links li {
        animation: navItemIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .nav-links li:nth-child(1) { animation-delay: 0.08s; }
    .nav-links li:nth-child(2) { animation-delay: 0.16s; }
    .nav-links li:nth-child(3) { animation-delay: 0.24s; }
    .nav-links li:nth-child(4) { animation-delay: 0.32s; }
    .nav-links li:nth-child(5) { animation-delay: 0.4s; }
    .nav-links li:nth-child(6) { animation-delay: 0.48s; }
}

.nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
}
.nav-links a {
    position: relative;
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 10px;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    height: auto;
}

/* Barrido de luz permanente sobre los enlaces del menú */
.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    transform: skewX(-20deg);
    animation: menuShine 5s ease-in-out infinite;
}

@keyframes menuShine {
    0% { left: -120%; }
    50% { left: 130%; }
    100% { left: -120%; }
}

/* Mantener el subrayado rojo */
.nav-links a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #bd0e0d, #F04444);
    box-shadow: 0 0 10px rgba(189, 14, 13, 0.9), 0 0 22px rgba(189, 14, 13, 0.5);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after, .nav-links a.active::after {
    transform: scaleX(1);
}

/* Subrayado rojo con glow */
.nav-links a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #bd0e0d, #F04444);
    box-shadow: 0 0 10px rgba(189, 14, 13, 0.9), 0 0 22px rgba(189, 14, 13, 0.5);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
    transform: translateY(-1px);
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a:hover::after, .nav-links a.active::after {
    transform: scaleX(1);
}

/* Solutions Submenu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    width: 280px;
    padding: 12px;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 110;
}

/* Pseudo-element bridge to prevent hover loss between solutions menu link and dropdown menu list */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu.open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.dropdown-menu a:hover {
    background-color: rgba(24, 49, 148, 0.08) !important;
    color: var(--primary) !important;
}
.dropdown-menu a.active,
.dropdown-menu a:active,
.dropdown-menu a:focus {
    background-color: rgba(24, 49, 148, 0.08) !important;
    color: var(--primary) !important;
}

/* Horizontal Methodology Timeline */
@media (min-width: 769px) {
    .timeline-container::before {
        content: '';
        position: absolute;
        top: 23px;
        left: 8%;
        right: 8%;
        height: 2px;
        background-color: var(--border-dark);
        z-index: 0;
    }
    .timeline-step {
        z-index: 1;
    }
}

/* Botón Contacto oculto */
.nav-cta {
    display: none;
}

@keyframes ctaGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(189, 14, 13, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
    50% { box-shadow: 0 8px 34px rgba(189, 14, 13, 0.85), 0 0 26px rgba(189, 14, 13, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
}

/* Barrido de luz periódico sobre el botón */
.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    animation: ctaShine 3.2s ease-in-out infinite;
}

@keyframes ctaShine {
    0% { left: -130%; }
    55% { left: -130%; }
    85% { left: 140%; }
    100% { left: 140%; }
}

.nav-cta:hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.1);
}

/* Responsive Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(24, 49, 148, 0.35);
    padding: 10px;
    border-radius: 8px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background: linear-gradient(180deg, rgba(15, 30, 99, 0.97) 0%, rgba(24, 49, 148, 0.98) 100%);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding: 20px 24px 28px;
        gap: 6px;
        z-index: 99;
        box-shadow: 0 20px 40px rgba(9, 21, 70, 0.5);
        animation: navMenuIn 0.35s ease;
    }
    .nav-links a {
        padding: 12px 14px;
        font-size: 1rem;
    }
    .nav-cta {
        display: none;
    }
    .logo {
        width: 250px;
        padding: 0 24px 0 10px;
    }
    .logo img {
        max-height: 34px;
        max-width: 125px;
    }
    .nav-links.open {
        display: flex;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
    }
    .dropdown:hover .dropdown-menu,
    .dropdown.open .dropdown-menu {
        display: block;
    }
}

/* Movil y tablet: dropdown con contraste alto sobre fondo azul */
@media (max-width: 1180px) {
    .dropdown-menu {
        background: #FFFFFF !important;
        border: 1px solid var(--border-dark);
        box-shadow: 0 10px 30px rgba(9, 21, 70, 0.35);
    }
    .dropdown-menu a {
        color: var(--primary) !important;
        font-weight: 600;
    }
    .dropdown-menu a:hover {
        background-color: rgba(24, 49, 148, 0.1) !important;
        color: var(--primary-hover) !important;
    }
    .dropdown > a::after {
        content: '';
        display: inline-block;
        width: 0; height: 0;
        margin-left: 6px;
        vertical-align: middle;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
    }
}

@keyframes navMenuIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pantallas medianas: compacta el navbar para que nada se desborde ni se corte */
@media (min-width: 769px) and (max-width: 1180px) {
    .header-nav .logo img {
        max-height: 40px;
        max-width: 150px;
    }
    .nav-links {
        gap: 2px;
    }
    .nav-links a {
        font-size: 0.76rem;
        padding: 8px 10px;
        letter-spacing: 0.3px;
    }
    .nav-cta {
        font-size: 0.72rem;
        padding: 9px 16px;
        margin-left: 8px;
    }
}

/* Footer Section (mismo gradiente azul que el navbar) */
.footer {
    background: linear-gradient(135deg, #0F1E63 0%, #183194 50%, #1E3FA8 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0 14px 0;
    color: #E2E8F0;
    font-size: 0.9rem;
}

.footer p {
    color: #E2E8F0 !important;
}

.footer h4 {
    color: #FFFFFF;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    color: #CBD5E1;
    transition: var(--transition);
    align-self: flex-start;
}

.footer-col a:hover {
    color: #FFFFFF;
    transform: translateX(3px);
}

.footer-socials {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    background-color: #bd0e0d;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(189, 14, 13, 0.5);
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    font-size: 0.8rem;
}

.footer-bottom-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.footer-bottom-row p {
    margin: 0;
    text-align: center;
}

.footer-credit {
    justify-self: end;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-credit:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-legal-links a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

/* Floating AI Agent Widget */
.ai-agent-widget {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ai-avatar-trigger {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #bd0e0d);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 4px 20px rgba(24, 49, 148, 0.4), 0 0 10px var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.ai-avatar-trigger::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #bd0e0d);
    z-index: -1;
    animation: pulseGlow 2s infinite;
}

.ai-avatar-trigger:hover {
    transform: scale(1.1);
}

.ai-avatar-trigger.pulse-alert {
    animation: pulseGlow 2s infinite, heartbeat 1.2s infinite ease-in-out !important;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.08); }
    28% { transform: scale(1); }
    42% { transform: scale(1.08); }
    70% { transform: scale(1); }
}

.ai-avatar-trigger img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ai-avatar-trigger .status-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #4ADE80;
    border: 2px solid var(--bg-dark);
}

.ai-chat-window {
    position: fixed;
    right: 75px;
    bottom: 5px;
    width: 380px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border: 1px solid #E2E8F0;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.ai-chat-window.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-chat-window.bounce-in {
    animation: chatBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes chatBounceIn {
    0% {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateY(-5px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.ai-chat-header {
    background-color: rgba(24, 49, 148, 0.1);
    border-bottom: 1px solid var(--border-dark);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
}

.ai-header-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-header-subtitle {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.ai-close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.3rem;
    cursor: pointer;
}

.ai-close-btn:hover { color: var(--text-white); }

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bubble-ai {
    background-color: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #1E293B;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bubble-user {
    background-color: var(--primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble .lead-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.chat-bubble .lead-form input {
    font-size: 0.8rem;
    padding: 8px;
}

.ai-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    gap: 10px;
}

.ai-chat-input-area input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-white);
    outline: none;
    font-size: 0.85rem;
}

.ai-chat-input-area input:focus {
    border-color: var(--primary);
}

.ai-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ai-send-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Floating Agenda/Meet Book Widget Modal - Trigger merged into the unified 3D sidebar */

/* General Modals (e.g., Booking Agenda) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-dark);
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

/* Scheduler / Booking System Specifics */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.calendar-header-day {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-day-btn {
    aspect-ratio: 1;
    background: none;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

.calendar-day-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background-color: rgba(24, 49, 148, 0.05);
}

.calendar-day-btn.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.calendar-day-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.time-slot-btn {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.85rem;
}

.time-slot-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.time-slot-btn.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.time-slot-btn:disabled {
    opacity: 0.3;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* BackOffice Portal Grid */
.admin-layout {
    display: flex;
    height: calc(100vh - 72px);
    overflow: hidden;
}

.admin-sidebar {
    width: 200px;
    min-width: 50px;
    background-color: #0F172A;
    border-right: 1px solid var(--border-dark);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: width 0.25s ease, padding 0.25s ease;
    overflow-y: auto;
    position: sticky;
    top: 0;
    align-self: stretch;
    max-height: 100%;
}

.admin-sidebar.collapsed {
    width: 50px;
    padding: 24px 4px;
    align-items: center;
}

.admin-sidebar.collapsed .admin-menu-item {
    padding: 8px;
    justify-content: center;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    gap: 0;
    white-space: nowrap;
}

.admin-content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
    background-color: var(--bg-dark);
    overflow-y: auto;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: #94A3B8; /* Slate-400 for high contrast on dark sidebar */
    cursor: pointer;
    transition: var(--transition);
}

.admin-menu-item:hover, .admin-menu-item.active {
    background-color: rgba(24, 49, 148, 0.12);
    color: var(--primary);
}

.admin-menu-item svg {
    width: 20px;
    height: 20px;
}


.sidebar-toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-toggle-btn:hover {
    background: rgba(189, 14, 13, 0.25);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 16px rgba(24, 49, 148, 0.3);
}
.sidebar-toggle-btn:active {
    transform: scale(0.92);
}

#toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: #1E293B;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.toast-success { border-left-color: #4ADE80; }
.toast.toast-error { border-left-color: #EF4444; }
.toast.toast-info { border-left-color: var(--primary); }
.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}
.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
}
.toast-close:hover { color: #fff; }
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-dark);
    }
    .admin-menu-item {
        white-space: nowrap;
    }
}

/* Dashboard Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    padding: 20px;
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-title {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 500;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.metric-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: #4ADE80; }
.trend-down { color: #F87171; }

/* Interactive Tables */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-dark);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-gray);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-white);
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Table statuses badges */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pill.nuevo { background-color: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.status-pill.contactado { background-color: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.status-pill.cotizado { background-color: rgba(139, 92, 246, 0.15); color: #A78BFA; }
.status-pill.activo { background-color: rgba(74, 222, 128, 0.15); color: #4ADE80; }
.status-pill.vencido { background-color: rgba(248, 113, 113, 0.15); color: #F87171; }

/* Custom Lead Details Drawer / View Pane */
.detail-pane {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 12px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; width: 2px; height: 100%;
    background-color: var(--border-dark);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 4px; left: -24px; width: 10px; height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg-card-dark);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; box-shadow: 0 0 20px var(--primary); }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* HTML Embed styling override to remove PDF24 exports styling tags visually */
.demo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #E2E8F0;
    color: #4A5568;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

/* Floating Demo Helper Panel */
.demo-helper-panel {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(24, 49, 148, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 260px;
}

.demo-helper-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-helper-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-dark);
    background: #FFFFFF;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.demo-helper-btn.admin {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.demo-helper-btn.admin:hover {
    background-color: var(--primary-hover);
}

.demo-helper-btn.client:hover {
    background-color: #E2E8F0;
}

.demo-helper-btn.reset {
    color: #EF4444;
    border-color: #FCA5A5;
}

.demo-helper-btn.reset:hover {
    background-color: #FEF2F2;
}

/* Floating Social Sidebar 3D */
.floating-social-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) perspective(600px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.social-3d-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -6px 6px 10px rgba(0, 0, 0, 0.2);
    transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-3d-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.social-3d-btn svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

/* Specific Brand Colors with Premium Gradients */
.social-3d-btn.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0F52B8 100%);
}
.social-3d-btn.instagram {
    background: linear-gradient(135deg, #F9CE34 0%, #EE2A7B 50%, #6228D7 100%);
}
.social-3d-btn.youtube {
    background: linear-gradient(135deg, #FF0000 0%, #B80000 100%);
}
.social-3d-btn.linkedin {
    background: linear-gradient(135deg, #0077B5 0%, #004D77 100%);
}
.social-3d-btn.calendar {
    background: linear-gradient(135deg, var(--primary) 0%, #bd0e0d 100%);
    box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -6px 6px 10px rgba(24, 49, 148, 0.2);
}
.social-3d-btn.whatsapp {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.3);
    animation: whatsapp-pulse 2s infinite ease-in-out;
}
.social-3d-btn.whatsapp svg {
    width: 24px;
    height: 24px;
}

/* Vibrate / Pulsing Animation for WhatsApp */
@keyframes whatsapp-pulse {
    0% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1);
        box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.2), 0 0 0 rgba(37, 211, 102, 0);
    }
    50% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1.12);
        box-shadow: -6px 6px 0px rgba(0, 0, 0, 0.3), -12px 12px 20px rgba(37, 211, 102, 0.4), 0 0 15px rgba(37, 211, 102, 0.6);
    }
    100% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1);
        box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.2), 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Hover States with 3D Pop Out Effect */
.social-3d-btn:hover {
    transform: rotateX(5deg) rotateY(-5deg) rotateZ(0deg) translate(-10px, -5px) scale(1.1);
    box-shadow: -15px 15px 25px rgba(0, 0, 0, 0.4), -5px 5px 0px rgba(0, 0, 0, 0.2);
    border-color: rgba(255,255,255,0.3);
}

.social-3d-btn:hover svg {
    transform: scale(1.15) rotate(-5deg);
}

/* Responsive adjustments for mobile so they don't block content */
@media (max-width: 768px) {
    .floating-social-sidebar {
        right: 10px;
        gap: 10px;
    }
    .social-3d-btn {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -5px 5px 10px rgba(0, 0, 0, 0.2);
    }
    .social-3d-btn svg {
        width: 18px;
        height: 18px;
    }
}/* Premium program icons — elegante, estilizado, con gradiente y sombra premium */
.premium-program-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #183194 0%, #1E3FA8 55%, #2a4bca 100%);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 26px rgba(24,49,148,0.28), 0 2px 8px rgba(24,49,148,0.18), inset 0 1px 0 rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
}
.premium-program-icon::after {
    content: '';
    position: absolute;
    top: -40%; left: -40%;
    width: 70%; height: 140%;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: rotate(18deg);
    pointer-events: none;
}
.premium-program-icon svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25)); }
.premium-program-icon--large { width: 72px; height: 72px; border-radius: 20px; }
.premium-program-icon--large svg { width: 34px; height: 34px; }
.premium-program-icon.premium-icon--accent { background: linear-gradient(135deg, #bd0e0d 0%, #d41a19 55%, #E84545 100%); box-shadow: 0 10px 26px rgba(189,14,13,0.32), 0 2px 8px rgba(189,14,13,0.2), inset 0 1px 0 rgba(255,255,255,0.22); }
.premium-program-icon--sede { background: linear-gradient(135deg, #0f6848 0%, #158a5e 55%, #1fb07a 100%); box-shadow: 0 10px 26px rgba(15,104,72,0.28), 0 2px 8px rgba(15,104,72,0.18), inset 0 1px 0 rgba(255,255,255,0.22); }
.premium-program-icon--kids { background: linear-gradient(135deg, #f59e0b 0%, #fb923c 50%, #f97316 100%); box-shadow: 0 10px 26px rgba(245,158,11,0.32), 0 2px 8px rgba(251,146,60,0.22), inset 0 1px 0 rgba(255,255,255,0.28); }
.premium-program-icon--kids-alt { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%); box-shadow: 0 10px 26px rgba(124,58,237,0.28), 0 2px 8px rgba(139,92,246,0.18), inset 0 1px 0 rgba(255,255,255,0.22); }

/* Premium image panels and hover effects */
.premium-img-panel {
    padding: 10px;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    overflow: hidden;
}
.premium-img-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(24, 49, 148, 0.08), 0 0 20px var(--primary-glow);
    border-color: rgba(24, 49, 148, 0.2);
}
.premium-img {
    width: 100%;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    transition: var(--transition);
}
.premium-img-panel:hover .premium-img {
    transform: scale(1.02);
}

/* Panel de texto del hero: marco similar al de los programas */
.hero-text-panel {
    position: relative;
}
.hero-text-panel .gradient-text {
    margin-bottom: 20px;
}
/* Hero en dos columnas siempre en escritorio/tablet */
.hero-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important;
}
.hero-split > * {
    min-width: 0;
}
/* El titulo largo debe envolverse: si no, empuja la columna y aplasta la imagen */
.hero-split #cms-display-heroTitle .hero-line-main {
    white-space: normal;
}
.hero-fachada-wrap {
    min-width: 0;
    max-width: 100%;
}
/* Imagen GlobalCom: centrada con realce 3D premium */
.hero-gc-imgwrap {
    display: block;
    text-align: center;
    margin-top: 10px;
}
.hero-gc-img {
    display: inline-block;
    max-width: 320px;
    width: 72%;
    height: auto;
    transform: rotateX(6deg);
    transform-style: preserve-3d;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 8px 0 rgba(24, 49, 148, 0.16)) drop-shadow(0 20px 26px rgba(24, 49, 148, 0.4)) drop-shadow(0 0 28px rgba(212, 175, 55, 0.35));
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}
.hero-gc-imgwrap:hover .hero-gc-img {
    transform: rotateX(0deg) translateY(-5px) scale(1.02);
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 10px 0 rgba(24, 49, 148, 0.16)) drop-shadow(0 28px 34px rgba(24, 49, 148, 0.5)) drop-shadow(0 0 38px rgba(212, 175, 55, 0.45));
}
@media (max-width: 992px) {
    .hero-split {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }
    .hero-text-panel {
        padding: 28px !important;
        text-align: center !important;
    }
    .hero-text-panel > div:last-child {
        justify-content: center;
    }
}

/* Marco premium espectacular para la foto de fachada del hero */
.hero-fachada-wrap {
    position: relative;
}
.hero-fachada-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at 50% 35%, rgba(24, 49, 148, 0.35) 0%, rgba(189, 14, 13, 0.22) 50%, transparent 72%);
    filter: blur(42px);
    z-index: 0;
    pointer-events: none;
}
.hero-fachada-frame {
    position: relative;
    z-index: 1;
    padding: 12px;
    border-radius: 26px;
    background: linear-gradient(135deg, #183194 0%, #bd0e0d 48%, #d4af37 100%);
    box-shadow: 0 34px 80px rgba(24, 49, 148, 0.4), 0 0 55px rgba(189, 14, 13, 0.18), 0 0 90px rgba(212, 175, 55, 0.14);
    transform: rotate(1.2deg);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
.hero-fachada-frame::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 21px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 3;
}
.hero-fachada-inner {
    position: relative;
    border-radius: 17px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: #0b1533;
}
.hero-fachada-img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 360px;
    max-height: 520px;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-fachada-shine {
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    transform: skewX(-18deg);
    animation: fachadaShine 5.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes fachadaShine {
    0%, 55% { left: -80%; }
    85%, 100% { left: 130%; }
}
.hero-fachada-frame:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.01);
    box-shadow: 0 44px 100px rgba(24, 49, 148, 0.5), 0 0 70px rgba(189, 14, 13, 0.25), 0 0 110px rgba(212, 175, 55, 0.2);
}
.hero-fachada-frame:hover .hero-fachada-img {
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .hero-fachada-img {
        min-height: 280px;
    }
}

/* Enlace premium: certificado Ministerio -> pagina documentos */
.hero-cert-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4af37 0%, #f7e08b 28%, #b8860b 55%, #ffd76a 80%, #d4af37 100%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #3a2a00;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(212, 175, 55, 0.5), 0 5px 16px rgba(189, 14, 13, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.hero-cert-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.65) 50%, transparent 100%);
    transform: skewX(-18deg);
    animation: certShine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes certShine {
    0%, 55% { left: -80%; }
    90%, 100% { left: 135%; }
}
.hero-cert-link:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 18px 44px rgba(212, 175, 55, 0.6), 0 8px 22px rgba(189, 14, 13, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.hero-cert-link svg {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .hero-cert-link {
        font-size: 0.78rem;
        padding: 11px 20px;
    }
}

/* Secciones del inicio más compactas */
.section.home-sec {
    padding: 48px 0;
}
@media (max-width: 600px) {
    .section.home-sec {
        padding: 32px 0;
    }
}

/* Seguridad anti-desborde en pantallas pequeñas */
p, a, span, li, h1, h2, h3, h4, td, th, label {
    overflow-wrap: break-word;
}
img, video, iframe {
    max-width: 100%;
}

/* AI Notification Bubble */
.ai-notification-bubble {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 240px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: var(--text-gray);
    z-index: 10000;
    transform: translateY(15px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-notification-bubble.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-notification-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 28px;
    width: 10px;
    height: 10px;
    background: var(--bg-card-dark);
    border-right: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    transform: rotate(45deg);
}

.ai-bubble-close {
    position: absolute;
    top: 4px;
    right: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1;
}

.ai-bubble-close:hover {
    color: var(--primary);
}

#ai-bubble-text {
    line-height: 1.4;
    padding-right: 8px;
}

/* ==========================================================================
   Mejoras de Glassmorphism Premium y Elementos de IA Avanzada
   ========================================================================== */

/* Efecto Glassmorphism Premium para la ventana del Chat */
.ai-chat-window.glass-panel {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.ai-chat-window.glass-panel .ai-chat-header {
    background-color: rgba(24, 49, 148, 0.08) !important;
    border-bottom: 1px solid rgba(24, 49, 148, 0.15) !important;
}

.ai-chat-window.glass-panel .ai-header-name {
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-header-subtitle {
    color: #64748B !important;
}

.ai-chat-window.glass-panel .ai-close-btn {
    color: #64748B !important;
}

.ai-chat-window.glass-panel .ai-close-btn:hover {
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area {
    border-top: 1px solid #E2E8F0 !important;
    background-color: #F8FAFC !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area input {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area input::placeholder {
    color: #94A3B8 !important;
}

.chat-bubble.bubble-ai {
    background-color: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #1E293B !important;
    box-shadow: none;
}

.chat-bubble.bubble-user {
    background: linear-gradient(135deg, var(--primary) 0%, #bd0e0d 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(189, 14, 13, 0.25);
    border: none !important;
}

/* Formularios Embebidos en Chat */
.chat-form-container {
    margin-top: 12px;
    padding: 14px;
    border-radius: 10px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3);
}

.chat-form-container .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #F8FAFC !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.chat-form-container .form-control:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
    box-shadow: 0 0 6px rgba(24, 49, 148, 0.3) !important;
}

.chat-form-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.chat-form-container select.form-control option {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
}

.chat-form-container .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #bd0e0d 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(24, 49, 148, 0.2);
}

.chat-form-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(24, 49, 148, 0.35);
}

/* Drag and Drop Zone del BackOffice */
.drag-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 32px 24px !important;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.01) !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
}

.drag-drop-zone:hover {
    border-color: var(--primary) !important;
    background-color: rgba(24, 49, 148, 0.04) !important;
    box-shadow: 0 0 15px rgba(24, 49, 148, 0.05);
}

.drag-drop-zone span {
    transition: transform 0.2s ease;
}

.drag-drop-zone:hover span {
    transform: translateY(-2px) scale(1.05);
}

/* Media Recubrimientos en Chat */
.chat-shared-media audio {
    outline: none;
    border-radius: 30px;
    height: 36px;
    background-color: #0F172A;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.chat-shared-media video {
    outline: none;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* CMS Protection: text overflow & image containment */
.cms-content,
.glass-panel p,
.glass-panel h1, .glass-panel h2, .glass-panel h3, .glass-panel h4,
.solution-card,
.plan-card,
.faq-item {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.solution-card p,
.plan-card p {
    max-width: 100%;
    overflow-wrap: break-word;
}

.solution-card,
.plan-card {
    min-height: 0;
}

.premium-img-panel img,
.glass-panel .cms-content img,
.glass-panel .solution-card img,
.glass-panel .plan-card img {
    object-fit: cover;
    width: 100%;
    height: auto;
    max-height: 500px;
}

.glass-panel .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .solution-card,
    .plan-card {
        padding: 20px !important;
    }
    .solution-card h3,
    .plan-card h3 {
        font-size: 1.1rem;
    }
    .solution-card p,
    .plan-card p {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   RESPONSIVO MOVIL Y TABLET: ajustes globales de confort visual
   ========================================================================== */
@media (max-width: 768px) {
    .header-nav .container {
        padding: 0 76px 0 0; /* espacio para el boton hamburguesa blanco */
    }
    .menu-toggle {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    .team-card {
        margin-top: 60px;
        padding: 20px 20px 12px;
    }
    .team-photo {
        width: 180px;
        height: 205px;
        margin-top: -55px;
    }
    .footer-bottom-row {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 6px;
    }
    .footer-credit {
        justify-self: center;
    }
}

/* Tablet (769-1024px): equipo en 2 columnas y tarjetas comodos */
@media (min-width: 769px) and (max-width: 1024px) {
    .team-card {
        margin-top: 70px;
        padding: 22px 22px 16px;
    }
    .team-photo {
        width: 200px;
        height: 228px;
        margin-top: -64px;
    }
}

/* CMS Image Uploader */
.cms-img-upload {
    margin-bottom: 20px;
}
.cms-img-upload > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}
.cms-img-preview {
    width: 100%;
    max-width: 400px;
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.2s;
    overflow: hidden;
}
.cms-img-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cms-img-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==========================================================================
   CARRUSEL DE MEDIA (video + imagenes) para páginas de programa
   ========================================================================== */
.premium-carousel {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.premium-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.premium-carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    height: 100%;
}
.premium-carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.premium-carousel-slide video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}
.premium-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 1.4rem;
    line-height: 1;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.premium-carousel-btn:hover {
    background: rgba(24, 49, 148, 0.85);
    transform: translateY(-50%) scale(1.06);
}
.premium-carousel-btn.prev { left: 12px; }
.premium-carousel-btn.next { right: 12px; }
.premium-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
    background: rgba(15, 23, 42, 0.45);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.premium-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}
.premium-carousel-dot.active {
    background: #fff;
    transform: scale(1.25);
}
@media (max-width: 768px) {
    .premium-carousel {
        height: 280px;
    }
    .premium-carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
}

/* Carrusel de fichas de video del inicio: 3 visibles, mismo diseño de tarjetas */
.home-video-carousel {
    position: relative;
    padding: 0 56px;
}
.home-video-viewport {
    overflow: hidden;
    border-radius: 12px;
}
.home-video-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.home-video-slide {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 12px;
    box-sizing: border-box;
}
.home-video-carousel .premium-carousel-btn.prev { left: 0; }
.home-video-carousel .premium-carousel-btn.next { right: 0; }
.home-video-carousel .premium-carousel-dots {
    position: static;
    transform: none;
    width: fit-content;
    margin: 18px auto 0;
}
@media (max-width: 768px) {
    .home-video-carousel {
        padding: 0 44px;
    }
    .home-video-slide {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* Barra lateral flotante de redes sociales (lateral derecho, siempre visible) */
.floating-social-sidebar {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 900;
}
.social-3d-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.social-3d-btn:hover {
    transform: translateX(-4px) scale(1.06);
}
.social-3d-btn.whatsapp { background: linear-gradient(135deg, #2fe673 0%, #25d366 55%, #128c4b 100%); }
.social-3d-btn.facebook { background: linear-gradient(135deg, #3b8bff 0%, #1877f2 55%, #0d47a1 100%); }
.social-3d-btn.instagram { background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%); }
.social-3d-btn.youtube { background: linear-gradient(135deg, #ff4d4d 0%, #f00 55%, #a40000 100%); }
.social-3d-btn.whatsapp { animation: waPulse 2.4s ease-in-out infinite; }
@keyframes waPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
    50% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 12px rgba(37, 211, 102, 0), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
}
@media (max-width: 768px) {
    .floating-social-sidebar {
        right: 10px;
        gap: 10px;
        top: auto;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        transform: none;
    }
    .social-3d-btn {
        width: 44px;
        height: 44px;
    }
}

