/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary-color: #004d00;
    --secondary-color: #228B22;
    --accent-color: #32CD32;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ===== ESTILOS GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* ===== NAVEGAÇÃO ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003300 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand img {
    max-height: 50px;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-select {
    background-color: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(50, 205, 50, 0.25);
    outline: none;
}

/* ===== BOTÕES ===== */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 77, 0, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: var(--white);
}

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

.card-img-top {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-without-img {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--white) 0%, #f0f8f0 100%);
}

.card-without-img .card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
}

/* ===== SEÇÕES ===== */
.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.noticias-recentes {
    background: linear-gradient(135deg, var(--white) 0%, #f8fff8 100%);
    padding: 5rem 0;
}

.calendario-destaque {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e8f5e8 100%);
    padding: 5rem 0;
}

/* ===== BADGES ===== */
.badge-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--white);
}

/* ===== ALERTAS ===== */
.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #003300 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
}

footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 600;
}

footer a {
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: var(--transition);
}

footer .social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 991px) {
    .navbar-nav {
        background: rgba(0, 77, 0, 0.95);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .card-without-img {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-custom {
    box-shadow: var(--box-shadow);
}

.shadow-custom-hover:hover {
    box-shadow: var(--box-shadow-hover);
}

/* ===== NOTÍCIA DETALHE - IMAGEM PROPORCIONAL E CONTROLADA ===== */
.imagem-noticia-wrapper {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.imagem-noticia {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: inline-block;
}

.imagem-noticia:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* Placeholder */
.imagem-noticia-wrapper .bi-image {
    font-size: 3.5rem;
    opacity: 0.4;
}

/* Responsivo */
@media (max-width: 992px) {
    .imagem-noticia {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .imagem-noticia {
        max-height: 320px;
    }
}

@media (max-width: 576px) {
    .imagem-noticia {
        max-height: 280px;
    }
}