:root {
    --primary: #1C2833; /* Midnight Navy / Charcoal */
    --primary-dark: #111A22;
    --secondary: #D4AF37; /* Muted Gold / Champagne */
    --secondary-dark: #B5952F;
    --tertiary: #4A5D4E; /* Slate Green */
    --bg-main: #F9F9F9; /* Off-white */
    --bg-card: rgba(255, 255, 255, 0.98);
    --text-main: #222222;
    --text-muted: #7F8C8D;
    --glass-border: rgba(0, 0, 0, 0.05); /* Softer */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.logo strong {
    color: var(--secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-highlight {
    color: var(--primary) !important;
    font-weight: 900 !important;
    font-size: 1.05rem !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.3s ease;
}

.nav-highlight:hover {
    color: var(--primary-dark) !important;
    transform: scale(1.05);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: 0px 8px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 1000;
    top: 100%;
    left: 0;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    margin-top: 0;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: rgba(0, 119, 200, 0.05);
    color: var(--primary);
    padding-left: 25px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDropdown 0.3s ease;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#heroVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -2;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(244,247,246,1) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 4px; /* Mais elegante, menos redondo */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.3);
}

/* Destaques Section */
.destaques {
    padding: 6rem 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-dark);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Glassmorphism Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 119, 200, 0.2);
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body .btn {
    margin-top: auto !important;
}

.card-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.card-body p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.link-arrow {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s;
}

.link-arrow:hover {
    transform: translateX(5px);
}

/* Enhanced Footer */
.main-footer {
    background: #FFFFFF;
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    text-align: left;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

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

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-form input {
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.footer-form input:focus {
    border-color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.legal-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

@media(max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-grid {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Portal Layout Additions */
.header-top { background: var(--primary-dark); padding: 5px 5%; font-size: 0.8rem; color: #fff; }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.auth-links a { color: #fff; text-decoration: none; margin-left: 15px; opacity: 0.8; transition: opacity 0.3s; }
.auth-links a:hover { opacity: 1; }
.search-bar input { padding: 8px 15px; border-radius: 20px; border: 1px solid #ccc; font-family: inherit; font-size: 0.9rem; outline: none; }

.portal-hero { height: 80vh; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; justify-content: center; margin-top: 100px; }
.portal-hero-overlay { position: absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3)); }
.portal-hero-content { position: relative; z-index: 1; text-align: center; color: #fff; max-width: 800px; padding: 20px; }
.tag { background: var(--secondary); color: var(--text-main); padding: 5px 15px; border-radius: 5px; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; margin-bottom: 20px; display: inline-block; }
.portal-hero-content .hero-title { color: #fff; font-size: 4rem; text-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.portal-hero-content .hero-subtitle { color: #f5f5f5; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.portal-grid-section { padding: 4rem 5%; background: var(--bg-main); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; }
.portal-card { border-radius: 15px; overflow: hidden; position: relative; height: 400px; display: block; text-decoration: none; background-size: cover; background-position: center; transition: transform 0.4s; }
.portal-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.card-gradient { position: absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%); }
.card-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; color: #fff; z-index: 1; }
.card-content h3 { font-size: 2rem; margin-bottom: 10px; color: #fff; }
.card-content p { color: #ccc; }
.badge { padding: 5px 10px; border-radius: 5px; font-weight: bold; font-size: 0.8rem; margin-bottom: 10px; display: inline-block; text-transform: uppercase; }
.badge-yellow { background: var(--secondary); color: var(--text-main); }
.badge-green { background: var(--tertiary); color: #fff; }
@media(max-width: 768px) { .portal-grid { grid-template-columns: 1fr; } .main-header { position: relative; } .portal-hero { margin-top: 0; height: 60vh; } }


/* Categorias Rapidas */
.quick-categories { padding: 2rem 5%; background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.02); z-index: 10; position: relative; }
.categories-flex { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--bg-main); border-radius: 50px; text-decoration: none; color: var(--primary-dark); font-weight: 600; border: 1px solid rgba(0,0,0,0.05); transition: all 0.3s; }
.cat-item:hover { background: var(--primary-dark); color: #fff; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.cat-item .icon { font-size: 1.2rem; }

/* ======== RESPONSIVIDADE TOTAL (TABLETS E CELULARES) ======== */
@media(max-width: 992px) {
    .portal-hero-content .hero-title { font-size: 3rem; }
    .hero-title { font-size: 3rem; }
    .nav-links { gap: 1rem; }
}

@media(max-width: 768px) {
    /* Navbar e Header */
    .navbar { flex-direction: column; gap: 1rem; padding: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; width: 100%; gap: 10px; }
    .nav-links a { font-size: 0.9rem; padding: 5px 10px; background: rgba(0,0,0,0.05); border-radius: 5px; }
    .header-top { display: none; } /* Hide small top bar on mobile */
    .main-header { position: relative; } /* Remove fixed header to prevent overlap bugs */
    
    /* Layouts e Grids */
    .portal-grid { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .categories-flex { gap: 10px; }
    
    /* Hero Sections */
    .portal-hero { margin-top: 0; height: 50vh; min-height: 400px; }
    .hero { height: auto; padding: 100px 0; }
    .portal-hero-content .hero-title { font-size: 2.2rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle, .portal-hero-content .hero-subtitle { font-size: 1.1rem; }
    
    /* Botões */
    .hero-actions { flex-direction: column; align-items: center; width: 100%; }
    .hero-actions .btn { width: 90%; max-width: 300px; text-align: center; }
    
    /* Timelines (História) */
    .timeline::before { left: 10px; }
    .timeline-item { padding-left: 40px; margin-bottom: 2rem; }
    .timeline-item::before { left: 2px; width: 15px; height: 15px; }
    
    /* Destaques */
    .destaques, .portal-grid-section, .seo-content-section { padding: 3rem 5%; }
}

@media(max-width: 480px) {
    .portal-hero-content .hero-title { font-size: 1.8rem; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .card-body h3 { font-size: 1.3rem; }
    .nav-links a { font-size: 0.8rem; }
}

/* Swiper Equal Height & Uniform Text Cards */
.swiper-wrapper {
    align-items: stretch !important;
}
.swiper-slide {
    height: auto !important;
    display: flex;
}
.swiper-slide > div {
    width: 100%;
}
.text-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ======== ADVANCED UX / UI ======== */

/* 1. Smart Sticky Header Transition */
.main-header {
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), background 0.3s ease;
}
.main-header.header-hidden {
    transform: translateY(-100%);
}
.main-header.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* 2. Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-left.active, .reveal-right.active { transform: translateX(0); }

/* 3. Skeleton Loaders */
.skeleton {
    background: #e2e5e7;
    background-image: linear-gradient(90deg, #e2e5e7 0px, #f0f2f3 40px, #e2e5e7 80px);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}
.skeleton-text.short { width: 60%; }
.skeleton-img {
    height: 200px;
    width: 100%;
}
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 4. Focus & Accessibility (a11y) */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 2px;
}

/* 5. Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* ======== LAYOUT COM SIDEBAR & MARQUEE ======== */
.content-with-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
}
.main-content-area {
    width: 100%;
}
.sidebar-area {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}
/* Desktop Layout */
@media (min-width: 1024px) {
    .content-with-sidebar {
        flex-direction: row;
    }
    .main-content-area {
        width: 70%;
    }
    .sidebar-area {
        width: 30%;
        position: sticky;
        top: 100px;
        height: calc(100vh - 120px);
    }
}

/* Sidebar Title */
.sidebar-title {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 5px;
    display: inline-block;
    flex-shrink: 0;
}

/* Marquee Wrapper & Container */
.marquee-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}
.marquee-container {
    display: flex;
    gap: 20px;
    padding: 10px;
}
/* Mobile (Horizontal Scroll) */
@media (max-width: 1023px) {
    .marquee-container {
        overflow-x: auto;
        padding-bottom: 20px;
        scroll-snap-type: x mandatory;
    }
    .marquee-card {
        flex: 0 0 280px;
        scroll-snap-align: center;
    }
}
/* Desktop (Vertical Infinite) */
@media (min-width: 1024px) {
    .marquee-container {
        flex-direction: column;
        animation: scroll-vertical 25s linear infinite;
    }
    .marquee-wrapper:hover .marquee-container {
        animation-play-state: paused;
    }
}

@keyframes scroll-vertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Marquee Card Style */
.marquee-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.marquee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.marquee-img {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.marquee-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--tertiary);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}
.marquee-content {
    padding: 15px;
}
.marquee-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}
.marquee-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}
.marquee-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.marquee-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Horizontal Infinite Marquee (Bottom of Pages) */
.marquee-horizontal-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
    background: var(--bg-main);
}
.marquee-horizontal-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-horizontal 35s linear infinite;
}
.marquee-horizontal-wrapper:hover .marquee-horizontal-track {
    animation-play-state: paused;
}
@keyframes scroll-horizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Exige 2 blocos idênticos de cards para loop infinito */
}
.seo-card {
    width: 350px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
    white-space: normal;
}
.seo-card h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.seo-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

