:root {
    --primary-blue: #003366;
    --secondary-blue: #6699cc;
    --light-blue: #e6f2ff;
    --dark-gray: #4a5568;
    --light-gray: #f7fafc;
    --hover-blue: #164E97;
    --white: #ffffff;
}

/* Bootstrap Overrides */

/* Navbar */
.nav-link {
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 16px;
}

.nav-link.active {
    color: var(--hover-blue) !important;
}

.nav-link:hover, .nav-link.active:hover {
    background-color: var(--primary-blue);
    color: var(--white) !important;
    transition: color 0.3s ease;
    border-radius: 50px;
}

.dropdown-item:focus, .dropdown-item:hover {
    color: var(--primary-blue);
}

.dropdown-item.active, .dropdown-item:active, .dropdown-item:hover.active, .dropdown-item:active:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Buttons */
.btn {
    transition: color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--hover-blue);
    border-color: var(--hover-blue);
}

.btn-white {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primary-blue);
}

.btn-white:hover {
    background-color: var(--hover-blue);
    border-color: var(--white);
}

/* General Styles */
a {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-blue);
    text-decoration: none;
}

.list-group-item.active {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

body {
    font-family: "Poppins", sans-serif;
    color: #333;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-blue {
    background: var(--primary-blue) !important;
    color: white !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.top-bar {
    background: var(--primary-blue);
    color: white;
    font-size: 0.9rem;
    padding: 5px 0;
}

.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue) !important;
}

/* .nav-link { font-weight: 500; color: var(--dark-gray) !important; padding: 0.5rem 1rem !important; } 

.nav-link:hover { color: var(--primary-blue) !important; } */

/* Hero Section */
.hero-section {
    color: white;
    padding: 100px 0;
    background-image: url('../images/bg-hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease;
}

.video-placeholder {
    background: white;
    border-radius: 15px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInRight 1s ease;
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.play-button i {
    font-size: 2rem;
    color: white;
    margin-left: 5px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-image: url('../images/bg-sobre.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.tree-illustration {
    max-width: 100%;
    height: auto;
    opacity: 0.8;
}

/* History Section */
.history-section {
    padding: 80px 0;
    color: white;
    background-image: url('../images/bg-historia.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Noticias Section */
.news-section {
    padding: 80px 0;
    background-image: url('../images/bg-news.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Congressos Section */
.congressos-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.congress-card {
    background: var(--primary-blue);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.congress-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.congress-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.congress-info {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Estatuto Section */
.estatuto-section {
    padding: 80px 0;
    background-image: url('../images/bg-estatuto.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.btn-estatuto {
    background: white;
    color: var(--primary-blue);
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-estatuto:hover {
    background: var(--light-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Diretoria Section */
.diretoria-section {
    padding: 80px 0;
    background: white;
    background-image: url('../images/bg-diretoria.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.director-card {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.director-card:hover {
    transform: translateY(-5px);
}

.director-avatar {
    width: 100px;
    height: 100px;
    background: var(--secondary-blue);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.director-avatar i {
    font-size: 3rem;
    color: white;
}

.director-name {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.director-role {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Membros Section */
.membros-section {
    padding: 80px 0;
    color: white;
    background-image: url('../images/bg-membros.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.member-button {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 500;
}

.member-button:hover {
    background: var(--hover-blue);
    border: 2px solid var(--hover-blue);
    color: var(--white);
}

/* Jovens Destaques Section */
.jovens-section {
    padding: 80px 0;
    background-image: url('../images/bg-jovens.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Revista Section */
.revista-section {
    padding: 80px 0;
    color: white;
    background-image: url('../images/bg-revista.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.revista-card {
    background: white;
    color: var(--primary-blue);
    border-radius: 15px;
    padding: 30px;
    margin: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

/* .revista-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3); } */

.revista-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.revista-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.btn-revista {
    background: var(--primary-blue);
    color: white;
    padding: 8px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s ease;
}

.btn-revista:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

/* Template */
.title-section {
    color: white;
    background-image: url('../images/bg-hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.title-page {
    font-weight: 700;
    animation: fadeInUp 1s ease;
}

/* --- página de congressos --- */
.congresso {
    border-bottom: 2px solid #E8E8E8;
    padding: 20px 0px 25px;
    min-height: 230px;
}

/* --- página de membros --- */
.membros-links {
    list-style: none;
    margin: 20px 0px 30px;
    padding: 0px;
}

.membros-links li {
    display: inline-block;
}

.membros-redes {
    list-style: none;
    padding: 0px;
    margin: 20px 0px 10px -3px;
}

.membros-redes li {
    display: inline-block;
    margin-right: 10px;
}

/* --- página de jovens destaques --- */
.jdestaques {
    padding: 20px 20px 25px;
    min-height: 250px;
}

.jdestaques-right {
    border-left: 2px solid #E8E8E8;
    padding: 20px 20px 25px;
    min-height: 250px;
}

/* --- página de editais --- */
.edital-links {
    border-bottom: 2px solid #E8E8E8;
    padding: 10px 0px 5px;
}

/* --- página de revistas --- */
.revista {
    padding: 20px 20px 25px;
    min-height: 300px;
}

.revista-right {
    border-left: 2px solid #E8E8E8;
    padding: 20px 20px 25px;
    min-height: 300px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .congress-card {
        margin: 10px 0;
    }

    .member-button {
        width: 100%;
    }

    .about-section {
        background-position: center right;
    }

    .revista-card {
        margin: 10px 0;
    }
}

/* Dropdown hover behavior - Desktop only */
@media (min-width: 992px) {

    /* Show dropdown on hover for desktop */
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: all 0.3s ease;
    }

    /* Initial state for dropdown menu */
    .navbar .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        margin-top: 0;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
    }

    /* Prevent Bootstrap's default click behavior on desktop */
    .navbar .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }

    .navbar .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Smooth hover transition for dropdown items */
    .navbar .dropdown-item {
        transition: all 0.2s ease;
    }

    .navbar .dropdown-item:hover {
        background-color: var(--primary-blue);
        color: var(--white);
    }
}

/* Mobile behavior - keep default Bootstrap click behavior */
@media (max-width: 991.98px) {
    .navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.95);
        margin-top: 5px;
        text-align: center;
    }

    .nav-link {
        padding: 8px 20px !important;
    }

    .navbar .dropdown-item {
        padding: 10px 20px;
        border-bottom: 1px solid rgba(0, 51, 102, 0.1);
        white-space: normal;
    }

    .navbar .dropdown-item:last-child {
        border-bottom: none;
    }
}