/* =========================================================================
   PROGRAMAS.CSS - Instituto Longevinté
   Design System: Antigravity (Luxury UX)
   ========================================================================= */

:root {
    /* Colors */
    --c-primary: #D4AF37;
    --c-primary-light: #E8D5B7;
    --c-bg: #041611;
    --c-text: #f8f8f7;
    --c-text-muted: rgba(248, 248, 247, 0.6);
    --c-glass: rgba(255, 255, 255, 0.03);
    --c-glass-border: rgba(212, 175, 55, 0.15);

    /* Typography */
    --font-heading: 'ABC Arizona Flare', serif;
    --font-body: 'Aeonik', sans-serif;
    --font-mono: 'NB Architekt', monospace;

    /* Transitions */
    --trans-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --trans-fast: 0.3s ease;
}

/* =========================================================================
   BASE STYLES
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.5;
}

.ds-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* =========================================================================
   ANTIGRAVITY ANIMATIONS
   ========================================================================= */
@keyframes fadeInUpScale {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in-up {
    animation: fadeInUpScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(0.5deg); }
}

@keyframes softEntrance {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.antigravity-float {
    animation: float 6s infinite ease-in-out;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.programs-hero {
    min-height: 40vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(180px, 25vh, 260px) 5% clamp(100px, 12vh, 140px);
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

.hero-tag {
    font-family: var(--font-mono);
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: clamp(10px, 0.8vw, 12px);
    margin-bottom: 24px;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 84px);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 24px;
    max-width: 12ch;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--c-text-muted);
    max-width: 500px;
    line-height: 1.6;
}

/* =========================================================================
   NAVBAR & LOGO
   ========================================================================= */
.ds-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    background: transparent;
    backdrop-filter: blur(0px);
    border-bottom: 1px solid rgba(212, 175, 55, 0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ds-navbar.scrolled {
    height: 80px;
    background: rgba(4, 22, 17, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.05);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-logo img {
    height: 140px;
    width: auto;
    max-width: clamp(160px, 15vw, 220px);
    object-fit: contain;
    transition: var(--trans-smooth);
}

.nav-logo:hover img {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.nav-menu {
    display: flex;
    gap: clamp(15px, 2.5vw, 40px);
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--trans-fast);
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
    color: var(--c-primary);
}


/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-text);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--c-text);
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hamburger Active State — Nova Lógica Robustecida */
.menu-open .hamburger {
    background: transparent;
}
.menu-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.menu-open .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* =========================================================================
   RESPONSIVENESS MENU
   ========================================================================= */
@media (max-width: 1024px) {
    .ds-navbar {
        display: flex;
        justify-content: space-between;
    }
    
    .nav-toggle {
        display: block;
    }
    
    /* Responsive Menu Overlay */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(4, 22, 17, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }
    
    .nav-menu.open {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-link {
        font-size: 24px;
        font-family: var(--font-heading);
    }
}
@media (max-width: 768px) {
    .btn-nav {
        display: none;
    }
}

/* =========================================================================
   FILTER BAR
   ========================================================================= */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 80px;
    padding: 0 5%;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--c-glass);
    border: 1px solid var(--c-glass-border);
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 28px);
    border-radius: 100px;
    color: var(--c-text);
    font-family: var(--font-mono);
    font-size: clamp(10px, 0.8vw, 11px);
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--trans-fast);
    backdrop-filter: blur(10px);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--c-primary);
    color: var(--c-bg);
    border-color: var(--c-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-5px);
}

/* =========================================================================
   PROGRAMS GRID
   ========================================================================= */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(24px, 4vw, 48px);
    padding: 0 5% clamp(60px, 8vw, 120px);
    max-width: 1400px;
    margin: 0 auto;
}

.program-card {
    background: rgba(15, 20, 15, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 24px;
    padding: 3rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Empilhamento vertical correto */
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.program-card:hover {
    border-color: rgba(197, 160, 89, 0.4);
    transform: translateY(-8px) scale(1.02);
    background: rgba(15, 20, 15, 0.95);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(197, 160, 89, 0.15);
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
    flex: 1; /* Ocupa todo espaço disponível empurrando footer para baixo */
    width: 100%;
}

.program-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-8px) scale(1.02);
    background: rgba(4, 22, 17, 0.8);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.15), inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.program-img-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--c-glass-border);
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    aspect-ratio: 1 / 1;
}

.program-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    transition: var(--trans-smooth);
}

.program-card:hover .program-img-wrapper {
    border-color: var(--c-primary);
}

.program-card:hover .program-img-wrapper img {
    transform: scale(1.05);
}

.program-title {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: clamp(20px, 2.2vw, 26px);
    margin-bottom: 0;
    color: #FFF;
    line-height: 1.2;
}

.program-mechanism {
    font-family: var(--font-body);
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    line-height: 1.5;
    max-width: 90%;
    font-style: italic;
    font-weight: 300;
}

.program-indications {
    text-align: left;
    width: 100%;
    list-style: none;
    padding: 0;
    margin-top: auto; /* Empurra pro fundo do card-body */
    margin-bottom: 0;
    opacity: 0.8;
    transition: var(--trans-smooth);
    min-height: 110px; /* Garante que todos os botões fiquem alinhados */
}

.program-indications li {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    color: var(--c-text);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.program-indications li::before {
    content: '-';
    color: #C5A059;
    font-weight: 600;
    font-size: 14px;
    background: none;
    width: auto;
    height: auto;
    margin-top: -2px;
}

/* Ghost Button Footer */
.program-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.program-cta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C5A059;
    padding: 14px 34px;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 100px;
    background: transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    display: inline-block;
}

.program-card:hover .program-cta {
    background: linear-gradient(135deg, #C5A059, #E8D5B7);
    color: rgba(15, 20, 15, 1);
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.3);
}

.program-cta::before {
    display: none;
}

/* Border Glow Traveling Animation (on focus/hover) */
@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* =========================================================================
   RESPONSIVENESS
   ========================================================================= */
@media (max-width: 768px) {
    .programs-grid {
        grid-template-columns: 100%;
        padding: 0 5% 80px;
    }

    .program-card {
        padding: 3rem; /* Mantém preenchimento generoso no mobile */
    }

    .hero-title {
        font-size: 48px;
    }
}

/* =========================================================================
   PREMIUM FOOTER (Synchronized from index.html)
   ========================================================================= */
.ds-footer {
    padding: 120px 0 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 10;
    background: #041611;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
    align-items: start;
}

.footer-col-brand img {
    width: 180px;
    margin-bottom: 24px;
}

.footer-brand-text {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text-muted);
    max-width: 280px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--c-primary);
    margin-bottom: 32px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.footer-links a {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--c-text-muted);
    transition: all var(--trans-fast);
    display: block;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--c-primary);
    transform: translateX(5px);
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.footer-contact-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-primary-light);
    opacity: 0.6;
}

.footer-contact-value {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--c-text-muted);
}

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

.footer-social-link {
    color: var(--c-text-muted);
    transition: color 0.4s ease, transform 0.4s ease;
}

.footer-social-link:hover {
    color: var(--c-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(133, 132, 129, 0.5);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(133, 132, 129, 0.5);
    transition: color var(--trans-fast);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--c-primary);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 5%;
    }
    .footer-col-brand, .footer-brand-text {
        margin: 0 auto;
    }
    .footer-social-icons {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        padding: 32px 5%;
    }
}

/* =========================================================================
           MOBILE RESPONSIVENESS - NAVBAR & HAMBURGER
           ========================================================================= */
        @media (max-width: 991px) {
            .nav-toggle {
                display: flex !important;
                background: transparent;
                border: none;
                cursor: pointer;
                z-index: 1001;
                padding: 10px;
                position: relative;
            }
            .hamburger {
                width: 24px;
                height: 2px;
                background: #d4a843;
                display: block;
                position: relative;
                transition: 0.3s;
            }
            .hamburger::before, .hamburger::after {
                content: '';
                position: absolute;
                width: 24px;
                height: 2px;
                background: #d4a843;
                left: 0;
                transition: 0.3s;
            }
            .hamburger::before { top: -8px; }
            .hamburger::after { bottom: -8px; }
            .menu-open .hamburger { background: transparent; }
            .menu-open .hamburger::before { top: 0; transform: rotate(45deg); }
            .menu-open .hamburger::after { bottom: 0; transform: rotate(-45deg); }
            .nav-menu {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                width: 100% !important;
                height: 100vh !important;
                background: rgba(4, 22, 17, 0.98) !important;
                backdrop-filter: blur(20px) !important;
                flex-direction: column !important;
                justify-content: center !important;
                align-items: center !important;
                gap: 40px !important;
                opacity: 0 !important;
                visibility: hidden !important;
                transition: all 0.3s ease !important;
                z-index: 1000 !important;
            }
            .nav-menu.open {
                display: flex !important;
                opacity: 1 !important;
                visibility: visible !important;
            }
            .nav-link { font-size: 24px !important; }
            .btn-nav-wrapper { display: none !important; }
            body, html { overflow-x: hidden; width: 100%; }
            .ds-container { padding: 0 20px !important; }
        }

        @media (max-width: 991px) {
            /* Hero */
            .programs-hero {
                padding: 120px 20px 60px !important;
                text-align: center;
                min-height: auto !important;
            }
            .programs-hero h1 { font-size: clamp(32px, 9vw, 52px) !important; }

            /* Filtros */
            .filter-container {
                flex-wrap: wrap !important;
                gap: 10px !important;
                justify-content: center !important;
                padding: 0 20px !important;
            }
            .filter-btn { font-size: 12px !important; padding: 8px 16px !important; }

            /* Programs Grid */
            .programs-grid {
                grid-template-columns: 1fr !important;
                gap: 24px;
                padding: 0 20px !important;
            }
            .program-card { width: 100% !important; }

            /* Footer */
            .footer-grid {
                grid-template-columns: 1fr !important;
                gap: 32px;
            }
        }
        @media (max-width: 480px) {
            .filter-btn { font-size: 11px !important; padding: 7px 12px !important; }
        }
