/* VARIÁVEIS GLOBAIS */
        :root {
            --bg: #0b0b0b;
            --card-bg: #141414;
            --text: #e0e0e0;
            --border: #2a2a2a;
            /* Cores Planetárias */
            --sol: #FFD700;       /* Reis */
            --venus: #2E8B57;     /* Duques */
            --jupiter: #4169E1;   /* Príncipes */
            --lua: #C0C0C0;       /* Marqueses */
            --marte: #B22222;     /* Condes */
            --mercurio: #FF8C00;  /* Presidentes */
            --saturno: #8A2BE2;   /* Cavaleiros */
        }

        /* RESET */
        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; margin: 0; line-height: 1.5; }

        /* HEADER & NAV */
        header { text-align: center; padding: 40px 20px 20px; border-bottom: 1px solid var(--border); }
        h1 { font-family: 'Cinzel', serif; font-size: 2.5rem; margin: 0 0 10px 0; color: #fff; letter-spacing: 2px; }
        .subtitle { opacity: 0.6; margin-bottom: 30px; display: block; font-size: 0.9rem; }

        /* NAV RÁPIDA (LINKS DE CATEGORIA) */
        .quick-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-bottom: 20px; }
        .nav-link {
            text-decoration: none; padding: 6px 14px; border: 1px solid; border-radius: 50px;
            font-size: 0.75rem; text-transform: uppercase; font-weight: bold; letter-spacing: 1px;
            background: rgba(255,255,255,0.05); transition: 0.3s;
        }
        .nav-link:hover { transform: translateY(-2px); filter: brightness(1.3); }

        /* SEÇÕES & GRID */
        .container { max-width: 1280px; margin: 0 auto; padding: 20px; }
        section { margin-bottom: 80px; scroll-margin-top: 20px; }
        
        .section-header { display: flex; align-items: center; margin-bottom: 25px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }
        .planet-icon { width: 12px; height: 12px; border-radius: 50%; margin-right: 15px; box-shadow: 0 0 10px currentColor; }
        .section-title { font-family: 'Cinzel', serif; font-size: 1.8rem; margin: 0; }

        .goetia-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 24px;
        }

        /* CARDS */
        .daemon-card {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0;
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s, box-shadow 0.3s;
            overflow: hidden;
            position: relative;
        }

        /* Barra colorida no topo */
        .daemon-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: currentColor;
        }

        /* Glow por categoria no hover */
        .c-rei:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(255, 215, 0, 0.25); }
        .c-duque:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(46, 139, 87, 0.25); }
        .c-principe:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(65, 105, 225, 0.25); }
        .c-marques:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(192, 192, 192, 0.25); }
        .c-conde:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(178, 34, 34, 0.25); }
        .c-presidente:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(255, 140, 0, 0.25); }
        .c-cavaleiro:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(138, 43, 226, 0.25); }

        .daemon-card:hover { background: #1a1a1a; }

        /* Tag no topo: #09 • REI */
        .card-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 16px 20px 8px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            opacity: 0.8;
            border-bottom: 1px solid var(--border);
            margin-bottom: 0;
        }

        .card-header .number { opacity: 0.6; }

        /* Área do selo - estilo carta com imagem maior */
        .seal-container {
            height: 280px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 4px 0;
            background: transparent;
            margin-bottom: 0;
        }

        .seal-container img {
            max-width: 100%;
            max-height: 100%;
            width: 100%;
            object-fit: contain;
            filter: none;
            opacity: 0.95;
            transition: 0.3s;
        }

        .daemon-card:hover .seal-container img {
            opacity: 1;
            transform: scale(1.03);
        }

        /* Nome do daemon */
        .name {
            font-family: 'Cinzel', serif;
            font-size: 1.4rem;
            text-align: center;
            margin: 4px 12px 2px;
            display: block;
            letter-spacing: 1px;
        }

        /* Descrição */
        .desc {
            font-size: 0.8rem;
            opacity: 0.7;
            line-height: 1.4;
            text-align: center;
            padding: 0 12px 12px;
            flex-grow: 1;
            margin-top: 0;
        }

        /* Cores por planeta */
        .c-rei { color: var(--sol); }
        .c-rei .name { color: var(--sol); }

        .c-duque { color: var(--venus); }
        .c-duque .name { color: var(--venus); }

        .c-principe { color: var(--jupiter); }
        .c-principe .name { color: var(--jupiter); }

        .c-marques { color: var(--lua); }
        .c-marques .name { color: var(--lua); }

        .c-conde { color: var(--marte); }
        .c-conde .name { color: var(--marte); }

        .c-presidente { color: var(--mercurio); }
        .c-presidente .name { color: var(--mercurio); }

        .c-cavaleiro { color: var(--saturno); }
        .c-cavaleiro .name { color: var(--saturno); }

/* ==========================================================================
   FOOTER PREMIUM PADRÃO
   ========================================================================== */
footer.site-footer {
    background: #08080c;
    border-top: 1px solid var(--border);
    padding: 60px 20px 30px;
    margin-top: 80px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Adicionando um leve brilho roxo/dourado no fundo do footer */
footer.site-footer::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.06) 0%, rgba(255, 215, 0, 0.02) 60%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

footer.site-footer .footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
}

footer.site-footer .footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Coluna de Sobre */
footer.site-footer .footer-about .footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

footer.site-footer .footer-about p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #a0a0a5;
    margin: 0;
}

/* Títulos das Colunas */
footer.site-footer h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--sol);
    letter-spacing: 1px;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

/* Listas de Links */
footer.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

footer.site-footer ul li {
    display: flex;
    align-items: center;
}

footer.site-footer ul li a {
    color: #a0a0a5;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

footer.site-footer ul li a:hover {
    color: var(--sol);
    padding-left: 5px;
}

/* Informações e Notas Legais */
footer.site-footer .footer-bottom {
    max-width: 1280px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    z-index: 2;
}

footer.site-footer .footer-disclaimer {
    font-size: 0.75rem;
    line-height: 1.6;
    color: #707075;
    max-width: 800px;
    margin: 0 auto 20px;
    font-style: italic;
}

footer.site-footer .footer-copyright {
    font-size: 0.8rem;
    color: #606065;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Responsividade adicional */
@media screen and (max-width: 768px) {
    footer.site-footer {
        padding: 40px 20px 20px;
    }
    footer.site-footer .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    footer.site-footer .footer-about {
        grid-column: span 2;
    }
}

@media screen and (max-width: 480px) {
    footer.site-footer .footer-container {
        grid-template-columns: 1fr;
    }
    footer.site-footer .footer-about {
        grid-column: span 1;
    }
}


/* ==========================================================================
   RESPONSIVE NAVIGATION BAR & MEGA MENU (JS-CONTROLLER VERSION)
   ========================================================================== */

/* Navbar Base Styles */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #0a0a0f;
    border-bottom: 1px solid var(--border);
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

nav .wrapper {
    position: relative;
    max-width: 1280px;
    padding: 0 20px;
    height: 70px;
    line-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styling */
nav .wrapper .logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

nav .wrapper .logo a {
    color: #fff;
    font-size: 1.3rem;
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.3s, text-shadow 0.3s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

nav .wrapper .logo a:hover {
    color: var(--sol);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Nav Links Menu */
nav .wrapper .nav-links {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Hide mobile close li on desktop */
.nav-links li.close-li {
    display: none;
}

.nav-links li a,
.nav-links li .desktop-item {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links li a:hover,
.nav-links li:hover .desktop-item {
    color: var(--sol);
    background: rgba(201, 168, 76, 0.08);
}

/* Hide mobile menu elements on desktop */
.nav-links .mobile-item {
    display: none;
}

/* Hover Menu Activations (Desktop Only) */
@media screen and (min-width: 971px) {
    .nav-links li:hover .drop-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li:hover .mega-box {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Align rightmost dropdown to the right to prevent viewport overflow */
    .nav-links li:nth-last-child(2) .drop-menu {
        left: auto;
        right: 0;
    }
}

/* Dropdown Menu Styles */
.nav-links .drop-menu {
    position: absolute;
    background: #0f0f15;
    width: 260px;
    top: 70px;
    left: 0;
    line-height: 45px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid var(--border);
    border-top: 2px solid var(--sol);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
}

.drop-menu li {
    width: 100%;
    height: auto;
    display: block;
}

.drop-menu li a {
    width: 100%;
    height: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text);
    transition: all 0.2s ease;
    background: transparent;
    text-transform: none;
    letter-spacing: normal;
}

.drop-menu li a:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    padding-left: 25px;
}

/* Planet Glow Dot */
.planet-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 8px currentColor;
    flex-shrink: 0;
}

/* Mega Menu Styles */
.nav-links .mega-box {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    background: #0f0f15;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    border-bottom: 2px solid var(--sol);
    border-top: 1px solid var(--border);
    padding: 35px 0;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
}

.mega-box .content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.mega-box .content .row {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Mega menu image column */
.mega-box .content .row.display-none-mobile {
    max-width: 260px;
}

.mega-box .content .row img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.3s, transform 0.3s;
}

.mega-box .content .row img:hover {
    border-color: var(--sol);
    transform: scale(1.02);
}

.mega-box .content .row header {
    color: var(--sol);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 25px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    text-align: left;
    text-transform: uppercase;
}

.mega-box .content .row .mega-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-links li {
    width: 100%;
    height: auto;
    display: block;
}

.mega-links li a {
    color: var(--text);
    font-size: 0.8rem;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    height: auto;
    text-transform: none;
    letter-spacing: normal;
}

.mega-links li a:hover {
    color: var(--sol);
    background: rgba(255, 255, 255, 0.02);
    padding-left: 12px;
}

/* Mobile Toggles & Buttons */
.menu-toggle-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: none;
    line-height: 70px;
    height: 70px;
    padding: 0 10px;
    transition: color 0.3s;
}

.menu-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: normal;
}

.menu-toggle-btn:hover,
.menu-close-btn:hover {
    color: var(--sol);
}

/* Offset Homepage Title Banner & Sub-pages */
nav + header,
nav + .container,
nav + main {
    margin-top: 70px;
    background: linear-gradient(180deg, #0e0e14 0%, var(--bg) 100%);
}

/* ==========================================================================
   MOBILE STYLING (Break Point 970px)
   ========================================================================== */
@media screen and (max-width: 970px) {
    nav .wrapper {
        padding: 0 20px;
    }
    
    .menu-toggle-btn {
        display: block;
    }
    
    nav .wrapper .nav-links li.close-li {
        display: block;
        border-bottom: none !important;
        text-align: right;
        padding-bottom: 10px;
    }
    
    nav .wrapper .nav-links {
        position: fixed;
        height: 100vh;
        width: 100%;
        max-width: 320px;
        top: 0;
        left: -100%;
        background: #08080c;
        display: block;
        padding: 20px 20px 70px 20px;
        overflow-y: auto;
        box-shadow: 15px 0 35px rgba(0,0,0,0.9);
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10000;
        border-right: 1px solid var(--border);
    }
    
    /* When active class is toggled via JS */
    nav .wrapper .nav-links.active {
        left: 0;
    }
    
    nav .wrapper .nav-links li {
        width: 100%;
        height: auto;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.02);
    }
    
    nav .wrapper .nav-links li a,
    nav .wrapper .nav-links li .desktop-item {
        font-size: 1rem;
        width: 100%;
        padding: 14px 10px;
        display: flex;
        align-items: center;
        height: auto;
    }
    
    nav .wrapper .nav-links .desktop-item {
        display: none; /* Hide desktop items to use custom mobile-item labels */
    }
    
    nav .wrapper .nav-links .mobile-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        font-size: 1rem;
        font-weight: 600;
        padding: 14px 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    nav .wrapper .nav-links .mobile-item:hover {
        color: var(--sol);
        background: rgba(255, 255, 255, 0.02);
    }
    
    /* Mobile Dropdown & Mega Menu Collapsed States */
    nav .wrapper .nav-links .drop-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border);
        border-radius: 0;
        padding: 0;
        background: rgba(0,0,0,0.2);
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    nav .wrapper .nav-links .drop-menu li a {
        font-size: 0.9rem;
        height: 45px;
        padding-left: 20px;
    }
    
    nav .wrapper .nav-links .mega-box {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border);
        background: rgba(0,0,0,0.2);
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    /* Expand elements when open class is toggled via JS */
    nav .wrapper .nav-links li.has-submenu.open .drop-menu,
    nav .wrapper .nav-links li.has-submenu.open .mega-box {
        max-height: 1000px; /* Large value to accommodate all links expanded */
        padding: 5px 0;
        overflow: visible;
    }
    
    nav .wrapper .nav-links .mega-box .content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    nav .wrapper .nav-links .mega-box .content .row {
        width: 100%;
    }
    
    nav .wrapper .nav-links .mega-box .content .row.display-none-mobile {
        display: none !important; /* Hide image column on mobile */
    }
    
    nav .wrapper .nav-links .mega-box .content .row header {
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        padding-bottom: 5px;
        margin-bottom: 8px;
    }
    
    nav .wrapper .nav-links .content .row .mega-links {
        padding-left: 10px;
    }
    
    nav .wrapper .nav-links .mega-links li a {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
}

/* FIX: Neutraliza o conflito do seletor genérico 'nav' com o breadcrumb '.page-nav' */
nav.page-nav {
    position: static !important;
    height: auto !important;
    line-height: normal !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}