/* === CSS TOKENS E AJUSTES RESPONSIVOS MOBILE PRIMEIRO (DESABAFO) === */
:root {
    --touch-target: 48px;
    --spacing-mobile: clamp(1rem, 5vw, 2rem);
    --font-base-mobile: clamp(1rem, 4vw, 1.15rem);
    --hero-title: clamp(2rem, 8vw, 3.5rem);
    --section-title: clamp(1.8rem, 6vw, 2.5rem);
}

/* Tipografia Senior Global (Aplicado em TODAS as telas) */
h1,
h2,
.h-hero,
.h-section {
    font-weight: 900 !important;
    letter-spacing: -0.025em !important;
}

/* Classes HUD Data Terminal */
.card-tech {
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    background: rgba(15, 23, 42, 0.6) !important;
    min-height: 210px;
}

/* Identidade Visual do Glossary Trigger consistentes com a Home (Pilar 4) */
.glossary-trigger {
    color: #a855f7 !important;
    text-decoration: underline dotted #a855f7 !important;
    text-underline-offset: 4px;
    cursor: help;
    transition: all 0.3s ease;
}

.glossary-trigger:hover {
    color: #c084fc !important;
    text-decoration-color: #c084fc !important;
    background: rgba(168, 85, 247, 0.1);
}

@media (max-width: 767px) {

    /* Tipografia e Layout Geral */
    .container,
    .mx-auto {
        padding-left: var(--spacing-mobile) !important;
        padding-right: var(--spacing-mobile) !important;
    }

    p,
    li,
    .text-lg,
    .text-base,
    .text-xl,
    .t-body,
    .t-sm {
        font-size: var(--font-base-mobile) !important;
        line-height: 1.6 !important;
    }

    .h-hero {
        font-size: var(--hero-title) !important;
        line-height: 1.1 !important;
    }

    .h-section {
        font-size: var(--section-title) !important;
        line-height: 1.15 !important;
    }

    /* FORÇANDO O GRID A QUEBRAR EM COLUNA ÚNICA NO MOBILE */
    .grid-2col,
    .grid-3col,
    .grid-4col {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* ÁUDIO PLAYER - Ajuste de largura e respiro */
    .audio-player {
        max-width: 95% !important;
        width: 100% !important;
        padding: 1.5rem 1.25rem !important;
        gap: 1.2rem !important;
    }

    /* Touch Targets e Botoes */
    button,
    a.btn-cta,
    a.btn-primary {
        min-height: var(--touch-target) !important;
        padding: 12px 24px !important;
    }

    .play-btn {
        min-height: var(--touch-target) !important;
        min-width: var(--touch-target) !important;
    }

    /* Cards e secoes - respiracao boa */
    .card,
    .modo-card,
    .estado-card {
        padding: 1.5rem !important;
    }
}

/* ==================================================
   POP-UP DO GLOSSÁRIO (ESTILOS COMPLEMENTARES)
================================================== */
#glossary-overlay {
    display: flex !important;
}

#glossary-modal {
    background: var(--bg-dark);
    /* Cor de fundo adaptada do tema */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#close-glossary {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

#close-glossary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#glossary-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

#glossary-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.75rem;
}

#glossary-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Utilitários nativos copiados do Tailwind para o Pop-up */
.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-\[100\] {
    z-index: 100;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.p-4 {
    padding: 1rem;
}

.opacity-0 {
    opacity: 0;
}

.pointer-events-none {
    pointer-events: none;
}

.transition-opacity {
    transition-property: opacity;
}

.duration-300 {
    transition-duration: 300ms;
}

.scale-95 {
    transform: scale(.95);
}

.transition-transform {
    transition-property: transform;
}

.whitespace-pre-wrap {
    white-space: pre-wrap;
}