/* 
   MYTHIC DESIGN SYSTEM 
   Advanced Visual Effects for Kevin Criado Ecosystem
   Concepts: Ethereal, Transpersonal, Kinetic, Crystalline
*/

/* 1. TYPOGRAPHY: ETHEREAL HEADERS */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* 1. TYPOGRAPHY: REVERTED TO ORIGINAL (OUTFIT) */
/* User requested to keep original font */
.font-ethereal {
    font-family: 'Outfit', sans-serif;
    /* Reverted from Playfair Display */
    letter-spacing: normal;
}

/* 2. IRIDESCENT BORDERS */
/* Adds a subtle moving gradient border - VISIBLE ONLY ON HOVER */
.iridescent-border {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
    transition: border-color 0.3s ease;
}

.iridescent-border::after {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1),
            rgba(0, 174, 239, 0.8),
            rgba(236, 0, 140, 0.8),
            rgba(255, 255, 255, 0.1));
    background-size: 300% 300%;
    animation: iridescent-flow 4s ease infinite;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease-in-out;
    /* Smooth fade in */
    pointer-events: none;
}

.iridescent-border:hover::after {
    opacity: 0.8;
    /* Visible on hover */
}

@keyframes iridescent-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 3. SPECULAR REFLECTIONS (Glass Sheen) */
/* A passing beam of light - VISIBLE ONLY ON HOVER */
.glass-sheen {
    position: relative;
    overflow: hidden;
}

.glass-sheen::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-25deg);
    animation: sheen-pass 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease-in-out;
}

.glass-sheen:hover::before {
    opacity: 1;
    /* Visible on hover */
}

@keyframes sheen-pass {

    0%,
    80% {
        left: -150%;
    }

    /* Pause for most of the time */
    100% {
        left: 150%;
    }

    /* Quick pass */
}

/* 4. BREATHING BACKGROUND */
/* Organic expansion for background blobs/containers */
.breathing-bg {
    animation: breathe 8s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* 5. REVEAL EFFECT (Blur-In) */
/* Text materializes from mist */
.reveal-on-scroll {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Static variant for reading containers (no movement) */
.liquid-glass-static {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 32px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* =========================================================================
   PHASE 5: EVOLUCIÓN VANGUARDISTA (LIQUID GLASS & DISTORTION)
   ========================================================================= */

/* 5.1 LIQUID GLASS - "IOS26" PURE TRANSPARENCY */
/* FINAL ATTEMPT: NUCLEAR OPTION FOR TRANSPARENCY */
.liquid-glass {
    /* FORCE TRANSPARENCY */
    background: transparent !important;
    background-color: rgba(255, 255, 255, 0.0) !important;

    /* BLUR ONLY - LOW VALUE TO PREVENT DARKENING */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    /* DEFINITION VIA BORDER & SHADOW ONLY */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 1.5rem;

    /* SHADOWS TO LIFT, NOT DARKEN */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        /* Subtle lift */
        inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    /* Inner glass edge */

    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* NEW: IOS26 GLASS CARD (Bypassing potential conflicts) */
.ios-glass-card {
    /* Base: Ultra Transparency (1% Tint) */
    background: rgba(255, 255, 255, 0.01) !important;

    /* Blur: Minimal deformation */
    backdrop-filter: blur(10px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(160%) !important;

    /* Border: Crisp White Edge (Initial) */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px !important;

    /* Box Shadow: Subtle lift */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;

    /* Text Clarity */
    color: white !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ios-glass-card:hover {
    /* HOVER: HYPER TRANSPARENT (0% Tint) */
    background: rgba(255, 255, 255, 0.00) !important;

    /* Blur: Almost gone */
    backdrop-filter: blur(4px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(4px) saturate(200%) !important;

    /* BRANDED BORDER GRADIENT SIMULATION - MASKED ONLY */
    border: 1px solid transparent !important;
    border-image: none !important;

    transform: translateY(-5px) scale(1.02);

    box-shadow:
        0 20px 50px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

/* REMOVE ANY PSEUDO ELEMENTS THAT MIGHT ADD BLACK */
/* REMOVE ANY PSEUDO ELEMENTS THAT MIGHT ADD BLACK - EXCLUDING IOS GLASS CARD */
.liquid-glass::before,
.liquid-glass::after {
    display: none !important;
    content: none !important;
}

.ios-glass-card:hover {
    /* HOVER: HYPER TRANSPARENT (0% Tint) */
    background: rgba(255, 255, 255, 0.00) !important;

    /* Blur: Almost gone */
    backdrop-filter: blur(4px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(4px) saturate(200%) !important;

    transform: translateY(-5px) scale(1.01);

    /* SHADOWS: Stronger lift */
    box-shadow:
        0 20px 50px 0 rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.05) !important;
}

/* GRADIENT BORDER TRICK (Rounded Corners + Transparency) */
.ios-glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    /* Border width */

    /* GRADIENT: Logo Colors */
    background: linear-gradient(45deg, #a855f7, #ec4899, #3b82f6);

    /* MASK: Show only border area */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.ios-glass-card:hover::before {
    opacity: 1;
    /* Show on hover */
}

/* READING PROGRESS BAR */
#reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}

#reading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #ec4899, #3b82f6);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
    transition: width 0.1s ease-out;
}

/* SOCIAL SHARE BUTTONS */
.social-share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.share-wa:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.share-x:hover {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.share-fb:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.4);
}

.share-in:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    box-shadow: 0 0 15px rgba(10, 102, 194, 0.4);
}

/* Ensure text is always legible on top of anything */
.interactive-blog-card h2,
.interactive-blog-card p,
.interactive-blog-card span,
.interactive-blog-card a {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    /* Hard shadow for readability */
    position: relative;
    z-index: 30;
    /* Above shine and cosmos */
}

/* 5.2 CHROMATIC ABBERATION BORDER */
/* Borde que se separa en colores RGB al interactuar */
.chromatic-border {
    position: relative;
}

/* CHROMATIC BORDER REMOVED */
.chromatic-border::after {
    display: none;
}

@keyframes chromatic-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 5.3 TEXTO CINÉTICO (Para Títulos) */
/* Pequeño tracking animation al hacer hover en contenedores padre */
.group:hover .kinetic-text {
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

/* UTILITY: Magnetic Button Hover (Visual Only) */
.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-magnetic:hover {
    transform: translateY(-2px) scale(1.02);
}

/* =========================================================================
   NEW UNIFIED BACKGROUND ELEMENTS (Centralized from index.html)
   ========================================================================= */

/* A. AURORA SYSTEM */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* BG removed for star visibility */
    z-index: -2;
    /* Deepest layer behind stars */
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: aurora-float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.aurora-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #4c1d95;
    animation-delay: -5s;
}

.aurora-2 {
    top: 40%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: #be185d;
    animation-duration: 25s;
    animation-delay: -12s;
}

.aurora-3 {
    bottom: -20%;
    left: -20%;
    width: 50vw;
    height: 50vw;
    background: #0f766e;
    animation-duration: 28s;
    animation-delay: -8s;
}

.aurora-4 {
    bottom: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: #4338ca;
    animation-duration: 22s;
}

@keyframes aurora-float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(10%, 20%) scale(1.1) rotate(10deg);
    }

    100% {
        transform: translate(-10%, -10%) scale(0.9) rotate(-10deg);
    }
}

/* B. SHOOTING STARS */
.shooting-star {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #ffffff, transparent);
    transform: rotate(-45deg);
    opacity: 0;
    animation: shoot 5s ease-in-out infinite;
    filter: drop-shadow(0 0 5px white);
    z-index: -1;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px white;
}

@keyframes shoot {
    0% {
        transform: translate(0, 0) rotate(-45deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    30% {
        transform: translate(-300px, 300px) rotate(-45deg);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* C. SACRED GEOMETRY (Spinning Symbols) */
.sacred-geo {
    position: absolute;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
    animation: spin-slow 180s linear infinite;
}

.sacred-geo-footer {
    opacity: 0.15;
    top: 50px !important;
    transform: translateX(-50%) !important;
    animation: spin-slow 300s linear infinite;
}

/* D. GENERAL ANIMATIONS */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 120s linear infinite;
}

.animate-spin-super-slow {
    animation: spin-slow 180s linear infinite;
    /* Very slow, majestic rotation */
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.animate-float-slow {
    animation: float-slow 5s ease-in-out infinite;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* E. COSMOS CANVAS (Stars Overlay) */
#cosmos-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    /* Z-50: Perfect Middle Ground. Below Header (100) but Above Video (0/10) */
    pointer-events: none;
    /* Allow clicks to pass through */
    /* Mix blend mode removed for sharper stars */
}

/* === GLASS EFFECT (Global) === */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* === QUICK AGENDA POPUP (Fixed & Independent) === */
.quick-agenda-popup {
    position: fixed;
    /* Fixed to viewport - Guaranteed isolation */
    /* Top/Left set via JS */
    width: 320px;
    background: rgba(13, 13, 25, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 174, 239, 0.3);
    border-radius: 1.25rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 174, 239, 0.15);
    padding: 1.5rem;
    z-index: 99999 !important;
    /* Highest Z-Index */
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Inter', sans-serif;
}

.quick-agenda-popup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Arrow/Triangle */
.quick-agenda-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: rgba(13, 13, 25, 0.95);
    border-left: 1px solid rgba(0, 174, 239, 0.3);
    border-top: 1px solid rgba(0, 174, 239, 0.3);
    z-index: 10000;
}

.quick-agenda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-agenda-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-agenda-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #00ea00;
    /* Green dot */
    border-radius: 50%;
    box-shadow: 0 0 10px #00ea00;
}

.quick-agenda-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.quick-agenda-close:hover {
    color: #fff;
}

.quick-agenda-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Scrollbar styling */
.quick-agenda-slots::-webkit-scrollbar {
    width: 4px;
}

/* === TOGGLE SWITCH (Segmented Control) === */
.quick-agenda-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.35rem;
    transition: all 0.2s ease;
}

.quick-toggle-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.quick-toggle-btn.active {
    background: rgba(0, 174, 239, 0.2);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 174, 239, 0.2);
    border: 1px solid rgba(0, 174, 239, 0.3);
}

/* Adjust header to accommodate toggle */
.quick-agenda-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.quick-agenda-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-agenda-slots::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.quick-agenda-slots::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.quick-slot-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-slot-btn:hover {
    background: rgba(0, 174, 239, 0.15);
    border-color: #00AEEF;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 174, 239, 0.25);
    transform: translateY(-2px);
}

.quick-agenda-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-style: italic;
}

/* REFERENCE CARDS - IOS26 STYLE */
.reference-card {
    background: rgba(255, 255, 255, 0.03);
    /* Slightly visible base */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    /* High rounding */
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    /* Ensure physical presence */
    justify-content: center;
}

.reference-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #a855f7;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}

.reference-card::before {
    /* Reference Card Gradient Border on Hover */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(45deg, #a855f7, #3b82f6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reference-card:hover::before {
    opacity: 1;
}

.reference-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 1rem;
    line-height: 1.4;
    z-index: 2;
}

.reference-link {
    font-size: 0.85rem;
    color: #a855f7;
    text-decoration: none;
    opacity: 0.9;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* SECTION SEPARATORS - FORCED SPACING */
.section-separator {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: 5rem !important;
    /* Force space */
    padding-top: 3rem !important;
    text-align: center;
    display: block !important;
    width: 100% !important;
}

/* =========================================================================
   CRISIS HUD (Emergency Lines) & PORTAL FOOTER (Design Overhaul)
   ========================================================================= */

/* 1. CRISIS HUD CONTAINER (Glassmorphism) */
.crisis-hud-container {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle red pulse background to indicate "Emergency" but kept dark */
.crisis-hud-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 2. CRISIS GRID */
.crisis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .crisis-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 3. GHOST CARDS (The Buttons) */
.crisis-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.crisis-card-icon {
    font-size: 1.75rem;
    transition: transform 0.3s ease;
    filter: grayscale(100%) opacity(0.7);
}

.crisis-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.crisis-card-subtitle {
    font-size: 0.65rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 4. HOVER STATES (Ignite Code) */
.crisis-card:hover {
    transform: translateY(-4px) scale(1.02);
    color: #fff;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.crisis-card:hover .crisis-card-icon {
    transform: scale(1.2);
    filter: grayscale(0%) opacity(1);
    text-shadow: 0 0 20px currentColor;
    /* Inner glow */
}

/* Specific Urgency Colors */
/* RED (123) */
.crisis-card.crisis-red:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), transparent);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2), inset 0 0 10px rgba(239, 68, 68, 0.1);
}

.crisis-card.crisis-red:hover .crisis-card-icon {
    color: #f87171;
}

/* TEAL (988) */
.crisis-card.crisis-teal:hover {
    border-color: rgba(20, 184, 166, 0.6);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), transparent);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.2), inset 0 0 10px rgba(20, 184, 166, 0.1);
}

.crisis-card.crisis-teal:hover .crisis-card-icon {
    color: #2dd4bf;
}

/* YELLOW (141) */
.crisis-card.crisis-yellow:hover {
    border-color: rgba(234, 179, 8, 0.6);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), transparent);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.2), inset 0 0 10px rgba(234, 179, 8, 0.1);
}

.crisis-card.crisis-yellow:hover .crisis-card-icon {
    color: #facc15;
}

/* PURPLE (Psicoactiva) */
.crisis-card.crisis-purple:hover {
    border-color: rgba(168, 85, 247, 0.6);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), transparent);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2), inset 0 0 10px rgba(168, 85, 247, 0.1);
}

.crisis-card.crisis-purple:hover .crisis-card-icon {
    color: #c084fc;
}


/* 5. PORTAL FOOTER (The Void - Infinity Blend) */
.portal-footer {
    position: relative;
    padding: 15rem 0 2rem;
    /* Huge padding to push content down */
    margin-top: -10rem;
    /* Huge negative margin to pull overlapping fade up */
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 18, 0.4) 70%);
    overflow: hidden;
    pointer-events: none;
    /* Let clicks pass through the faded top area */
}

/* Re-enable clicks for the actual footer content */
.portal-footer>.container {
    pointer-events: auto;
}

/* Removed ::before mask as the gradient above handles the blend */

.footer-logo-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.footer-link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
    width: fit-content;
}

.footer-link:hover {
    color: #fff;
    padding-left: 10px;
    /* Slide effect */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.footer-link::before {
    content: '›';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.footer-link:hover::before {
    opacity: 1;
    transform: translateX(-5px);
}

.copyright-line {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 3rem;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;

    /* Hardcoded consistency */
    font-family: 'Inter', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.025em !important;
    color: rgba(255, 255, 255, 0.3) !important;
    text-align: center;
    -webkit-font-smoothing: antialiased !important;
}

@media(min-width: 768px) {
    .copyright-line {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

/* =========================================================================
   AI CHATBOT - LIQUID GLASS & FACE (New Implementation)
   ========================================================================= */

/* 1. THE PRESENCE (Orbiting Face) */
.ai-orb-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-orb-container:hover {
    transform: scale(1.15) translateY(-5px);
}

.ai-orb-face {
    width: 64px;
    height: 64px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.8)),
        linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 0 20px rgba(0, 174, 239, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 174, 239, 0.2);
    overflow: hidden;
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Eyes */
.ai-eye {
    width: 8px;
    height: 12px;
    background: #00AEEF;
    border-radius: 50%;
    position: absolute;
    top: 40%;
    box-shadow: 0 0 10px #00AEEF;
    animation: blink 4s infinite;
}

.ai-eye.left {
    left: 30%;
}

.ai-eye.right {
    right: 30%;
}

/* Mouth (Simple Line) */
.ai-mouth {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    position: absolute;
    bottom: 30%;
    border-radius: 2px;
    transition: height 0.2s, width 0.2s;
}

/* Speaking Animation */
.ai-orb-container.speaking .ai-mouth {
    height: 6px;
    width: 16px;
    border-radius: 50%;
    animation: talk 0.3s infinite alternate;
}

@keyframes blink {

    0%,
    96%,
    100% {
        transform: scaleY(1);
    }

    98% {
        transform: scaleY(0.1);
    }
}

@keyframes talk {
    0% {
        height: 4px;
        width: 18px;
    }

    100% {
        height: 10px;
        width: 14px;
        background: #EC008C;
        box-shadow: 0 0 5px #EC008C;
    }
}

/* Orbit Ring */
.ai-orb-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid transparent;
    border-top-color: rgba(236, 0, 140, 0.6);
    border-bottom-color: rgba(0, 174, 239, 0.6);
    border-radius: 50%;
    animation: spin-slow 8s linear infinite;
    pointer-events: none;
}

/* 2. LIQUID GLASS CHAT WINDOW */
.ai-chat-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    z-index: 9999;

    /* Liquid Glass Effect */
    background: rgba(15, 12, 41, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);

    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    display: flex;
    /* Keep layout but hide */
}

/* Header */
.ai-header {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Messages Area */
.ai-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.ai-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Bubbles */
.ai-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: message-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-message.bot {
    align-self: flex-start;
}

.ai-message.user {
    align-self: flex-end;
}

.ai-bubble {
    padding: 0.8rem 1rem;
    border-radius: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    backdrop-filter: blur(10px);
}

.ai-message.bot .ai-bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0.2rem;
    color: rgba(255, 255, 255, 0.95);
}

.ai-message.user .ai-bubble {
    background: linear-gradient(135deg, rgba(0, 174, 239, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(0, 174, 239, 0.3);
    border-bottom-right-radius: 0.2rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes message-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Input Area */
.ai-input-wrapper {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-input-container {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.5rem;
    transition: border-color 0.3s;
}

.ai-input-container:focus-within {
    border-color: rgba(0, 174, 239, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.ai-input-field {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.ai-input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-send-btn {
    background: rgba(0, 174, 239, 0.2);
    border: 1px solid rgba(0, 174, 239, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-send-btn:hover {
    background: #00AEEF;
    box-shadow: 0 0 10px rgba(0, 174, 239, 0.5);
}

/* Options/Chips */
.ai-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.ai-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

/* === DASHBOARD TIMELINE (Constellation) === */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}


/* =========================================================================
   FIX: GLOBAL STYLES (Moved from index.html)
   ========================================================================= */

/* Interactive Card Hover (Scaling & Color) */
.interactive-card:hover {
    background: rgba(236, 0, 140, 0.15);
    /* Magenta/Pink from logo */
    border-color: rgba(236, 0, 140, 0.4);
    transform: scale(1.03);
}

/* Glass Dropdown (For Submenus) */
.glass-dropdown {
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* SECTION SEPARATORS - FORCED SPACING */
.section-separator {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: 5rem !important;
    /* Force space */
    padding-top: 3rem !important;
    text-align: center;
    display: block !important;
    width: 100% !important;
}
/* --- MOBILE DOCK (Phase IV) --- */
.mobile-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    
    background: rgba(15, 23, 42, 0.6); /* Dark Blue Transparent */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    
    box-shadow: 
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        
    animation: dock-slide-up 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8; /* Slate 400 */
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    width: 60px;
}

.dock-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
    transition: all 0.2s;
}

.dock-item:hover, .dock-item.active {
    color: #c084fc; /* Purple 400 */
}

.dock-item:hover svg, .dock-item.active svg {
    transform: translateY(-2px);
    stroke: #d8b4fe; /* Purple 300 */
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.5));
}

@keyframes dock-slide-up {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@media (min-width: 768px) {
    .mobile-dock {
        display: none !important;
    }
}
