/* DESIGN TOKENS */
:root {
    /* Colors */
    --primary: #0c8ad3;
    --primary-dark: #097bc0;
    --secondary: #ffb800;
    /* Yellow highlight */
    --accent: #ff7c43;
    /* Orange line */
    --text-main: #1a202c;
    --text-light: #ffffff;
    --text-muted: #e2e8f0;
    --bg-main: #ffffff;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    /* Shadows & Effects */
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-video: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.section-padding {
    padding: 60px 0;
}

.text-center {
    text-align: center;
}

/* TOP SECTION WRAPPER (Header + Hero) */
.top-section-wrapper {
    background: var(--primary);
    position: relative;
    color: var(--text-light);
    overflow: hidden;
    padding-bottom: 40px;
}

/* HEADER */
.main-header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    background-color: var(--primary);
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); /* Sombra mais destacada ao scrollar */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    max-width: 120px;
}

/* NAVIGATION */
.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-item>a {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    opacity: 0.9;
}

.nav-item>a:hover {
    opacity: 1;
    color: var(--secondary);
}

.nav-item {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-main);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-fast);
    padding: 10px 0;
    z-index: 100;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 600;
}

.dropdown li a:hover {
    background-color: var(--bg-main);
    color: var(--primary);
}

/* HEADER RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background-color: var(--text-light);
    border: none;
    padding: 8px 15px 8px 15px;
    border-radius: 20px;
    width: 180px;
    font-size: 0.8rem;
    color: #333;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    font-size: 0.9rem;
}

.social-icons a:hover {
    background-color: var(--text-light);
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

/* HERO SLIDER */
.hero-slider {
    position: relative;
    padding: 40px 0 60px;
}

.decor {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.floating-shape {
    animation: floating 8s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Espalhando aleatoriamente as peças geométricas para rechear o background */
.shape-1 { top: 18%; left: 8%; animation-delay: 0s; max-width: 45px; }
.shape-2 { bottom: 25%; left: 3%; animation-delay: 2s; max-width: 150px; opacity: 1; }
.shape-3 { top: 15%; right: 10%; animation-delay: 1s; max-width: 60px; }
.shape-4 { bottom: 8%; right: -2%; animation-delay: 4s; max-width: 180px; opacity: 1;}
.shape-5 { top: 45%; right: 3%; animation-delay: 3s; max-width: 30px; }
.shape-6 { top: 10%; left: 30%; animation-delay: 1.5s; max-width: 80px; }
.shape-7 { bottom: 15%; left: 25%; animation-delay: 2.5s; max-width: 40px; }

.slider-container {
    width: 100%;
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 400px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.slide.slide-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.slide-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.slide-text {
    flex: 1;
    max-width: 500px;
}

.slide-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

.slide-text h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 0;
}

.highlight-text {
    color: var(--secondary);
    margin-bottom: 15px;
}

.slide-text p {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 25px;
    line-height: 1.6;
    max-width: 450px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid var(--text-light);
    border-radius: 4px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--text-light);
}

.slide-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.slide-image img {
    max-height: 690px;
    object-fit: contain;
}

/* DOTS */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    z-index: 10;
    position: relative;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--secondary);
}

/* SECTON 2: TÓPICOS */
.top-topics {
    background-color: var(--bg-main);
    padding-top: 80px;
    padding-bottom: 180px;
    margin-bottom: 200px;
}

.top-topics .section-header h2 {
    color: #1a1a3a;
    font-size: 2rem;
    margin-bottom: 50px;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.topic-card {
    text-align: center;
    border: 1px solid #ebf0f6;
    border-radius: 12px;
    padding-bottom: 20px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: var(--transition-normal);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.topic-img-wrapper {
    position: relative;
    margin-bottom: 40px;
}

.topic-img-wrapper img {
    width: 100%;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff5eb;
    color: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.topic-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 10px;
}

/* BOTTOM OVERLAPPING AREA */
.bottom-sections-wrapper {
    background-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='topo' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0%2050%20Q%2025%2020%2050%2050%20T%20100%2050' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23topo)'/%3E%3C/svg%3E");
    position: relative;
    padding-top: 380px;
}

/* VIDEO SECTION (Overlaps the sections wrapper) */
.video-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10;
    margin-bottom: 0;
}

.video-section .section-header {
    margin-bottom: 40px;
}

.badge-title {
    display: inline-block;
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    margin-bottom: 10px;
}

.badge-title::before,
.badge-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background-color: rgba(255, 184, 0, 0.4);
}

.badge-title::before {
    right: 110%;
}

.badge-title::after {
    left: 110%;
}

.video-section h2 {
    font-size: 2.2rem;
    color: #1a1a3a;
    margin-top: 5px;
    margin-bottom: 35px;
}

.video-container {
    background: transparent;
    padding: 0;
    border-radius: 20px;
    box-shadow: var(--shadow-video);
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 8px solid #ffffff;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* FUNFACTS */
.funfacts-section {
    color: var(--text-light);
}

.funfacts-container {
    display: flex;
    align-items: stretch;
    gap: 40px;
}

.funfacts-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.funfacts-text h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
}

.funfacts-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 450px;
}

.funfacts-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.fact-card {
    background: rgba(4, 116, 181, 0.5);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.fact-icon {
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    height: 40px;
}

.fact-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.fact-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: inline-block;
    line-height: 1;
}

.plus-sign,
.star-icon {
    font-size: 1.5rem;
    font-weight: 800;
}

.fact-label {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 5px;
    text-transform: uppercase;
}

/* FOOTER */
.main-footer {
    padding: 60px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 600;
}
.instagram-link i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.contact-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.8);
}
.contact-links a:hover {
    color: var(--secondary);
}
.contact-links i {
    color: #25D366;
    font-size: 1.2rem;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links ul {
    display: flex;
    gap: 20px;
}

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

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: var(--secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .slide-content-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .slide-text h1 {
        font-size: 2.2rem;
    }

    .slide-text {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .slide-text p {
        margin: 0 auto 20px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .funfacts-container {
        flex-direction: column;
        text-align: center;
    }

    .funfacts-text p {
        margin: 0 auto;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {

    .topics-grid,
    .funfacts-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-links { align-items: center; }

    .video-section {
        margin-top: -80px;
    }
}

/* LIBRARY BUTTONS */
.btn-download {
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: transparent;
    transition: var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.btn-download:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
    border-color: var(--primary-dark);
}

/* NEWS SECTION */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--bg-main);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-img-placeholder {
    width: 100%;
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #cbd5e1;
}

.news-content {
    padding: 25px;
}

.news-content h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.news-content p {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.news-read-more:hover {
    color: var(--secondary);
}

.news-detail-back {
    display: inline-block;
    margin-bottom: 20px;
}

.news-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
}

.news-back-link:hover {
    color: var(--secondary);
}

.news-detail-placeholder {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 40px;
    background-color: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #cbd5e1;
    box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
    .news-detail-placeholder {
        height: 250px;
        font-size: 3rem;
    }
}

/* LIBRARY TABS */
.library-tabs-container {
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.library-tabs-header {
    display: flex;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.lib-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: #e2e8f0;
    border: none;
    border-right: 1px solid #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-right: 2px;
    margin-top: 5px;
}

.lib-tab-btn:last-child {
    border-right: none;
    margin-right: 0;
}

.lib-tab-btn:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.lib-tab-btn.active {
    background-color: #fff;
    color: var(--primary);
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    z-index: 2;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
}

.lib-tab-content {
    display: none;
    padding: 20px;
    background: #fff;
}

.lib-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.library-book-list {
    list-style: none;
    padding: 0;
}

.library-book-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.library-book-list li:last-child {
    border-bottom: none;
}

.book-title {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-title i {
    color: var(--secondary);
}

/* WHATSAPP CONTACT SECTION */
.whatsapp-contact-section {
    position: relative;
    z-index: 10;
}

.contact-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-main);
}

.contact-header {
    margin-bottom: 30px;
}

.contact-header h2 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.contact-header p {
    color: #475569;
    font-size: 0.95rem;
}

.whatsapp-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #475569;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
    background-color: #f8fafc;
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(12, 138, 211, 0.1);
    background-color: #fff;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-whatsapp:hover {
    background-color: #1ebc5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .whatsapp-form {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 30px 20px;
    }

    .contact-header h2 {
        font-size: 1.8rem;
    }
}