/* 
   Serra dos Encontros - Design System
   Estilo Premium, Elegante e Minimalista
*/

:root {
    /* Paleta de Cores */
    --verde-floresta: #1F4D36;
    --verde-escuro: #143728;
    --dourado: #C5A15A;
    --bege: #F7F3EC;
    --branco: #FFFFFF;
    --cinza: #6C757D;
    --preto-transparente: rgba(0, 0, 0, 0.5);
    
    /* Tipografia */
    --fonte-titulos: 'Playfair Display', serif;
    --fonte-textos: 'Poppins', sans-serif;
}

/* Reset e Estilos Base */
body {
    font-family: var(--fonte-textos);
    background-color: var(--bege);
    color: var(--verde-escuro);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .display-font {
    font-family: var(--fonte-titulos);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Utilitários de Cores */
.text-gold { color: var(--dourado); }
.bg-forest { background-color: var(--verde-floresta); }
.bg-dark-green { background-color: var(--verde-escuro); }
.bg-beige { background-color: var(--bege); }

/* Botões Customizados */
.btn-premium {
    background-color: var(--verde-floresta);
    color: var(--branco);
    padding: 12px 30px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--verde-floresta);
    transition: all 0.4s ease;
}

.btn-premium:hover {
    background-color: transparent;
    color: var(--verde-floresta);
}

.btn-outline-premium {
    background-color: transparent;
    color: var(--verde-floresta);
    padding: 12px 30px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--verde-floresta);
}

.btn-outline-premium:hover {
    background-color: var(--verde-floresta);
    color: var(--branco);
}

.btn-gold {
    background-color: var(--dourado);
    color: var(--branco);
    border: none;
    border-radius: 0;
}

/* Cards Modernos */
.modern-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--branco);
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Imagens com Overlay */
.img-overlay-container {
    position: relative;
    overflow: hidden;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
}

/* Seções */
section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--dourado);
}

/* Navbar Estilizada */
#mainNavbar {
    padding: 15px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#mainNavbar.navbar-scrolled {
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.navbar-brand span {
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

@media (max-width: 991.98px) {
    #mainNavbar {
        padding: 12px 0;
        background: var(--branco);
    }
    
    .navbar-brand span {
        font-size: 1.1rem;
    }

    /* Menu Mobile Full Screen Fix */
    .offcanvas.offcanvas-end {
        width: 100% !important;
        height: 100vh !important;
        border: none !important;
    }

    .offcanvas-body {
        padding: 60px 20px !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
        overflow-y: auto;
    }

    .offcanvas-header {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        z-index: 1050;
        background: white;
    }

    .navbar-nav .nav-item {
        margin-bottom: 15px;
    }

    .navbar-nav .nav-link {
        font-size: 1.8rem !important;
        font-family: var(--fonte-titulos);
        padding: 15px 0 !important;
        font-weight: 700;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .nav-link::after {
        display: none;
    }

    .offcanvas-header {
        padding: 20px !important;
    }

    .offcanvas-header .btn-close {
        font-size: 1.5rem;
    }
}

.nav-link {
    color: var(--verde-escuro);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--dourado);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus {
    outline: 2px solid var(--dourado);
    outline-offset: 2px;
}

/* Microinterações */
.btn-premium, .modern-card, .category-card {
    will-change: transform, box-shadow;
}

.img-overlay-container img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modern-card:hover .img-overlay-container img {
    transform: scale(1.1);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--verde-floresta);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}


/* ========== CARROSSEL DE BANNERS ========== */
.banner-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.carousel-item {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.4), transparent);
    z-index: 1;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    color: white;
    z-index: 2;
    max-width: 600px;
}

.carousel-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-family: var(--fonte-titulos);
}

.carousel-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.carousel-dot.active {
    background: var(--dourado);
    width: 30px;
    border-radius: 6px;
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 3;
}

.carousel-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-nav-btn.prev {
    left: 20px;
}

.carousel-nav-btn.next {
    right: 20px;
}

/* ========== CATEGORIAS EM ESTILO BANNER ========== */
.category-banner-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-banner {
    position: relative;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    group: hover;
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-banner:hover img {
    transform: scale(1.1);
}

.category-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 1;
    transition: all 0.3s ease;
}

.category-banner:hover::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(31, 77, 54, 0.7));
}

.category-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    color: white;
    z-index: 2;
}

.category-banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--fonte-titulos);
    margin-bottom: 5px;
}

.category-banner-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.text-forest {
    color: var(--verde-floresta);
}

/* ========== BARRA DE ANÚNCIO RODAPÉ (STICKY FOOTER AD) ========== */
/* alterei aqui para melhorar */
.floating-ad {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 100%;
    max-width: 970px;
    display: flex;
    justify-content: center;
    padding: 0 10px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* alterei aqui para melhorar */
.floating-ad.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

@keyframes slideOutDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

/* alterei aqui para melhorar */
.floating-ad-container {
    position: relative;
    width: 100%;
    height: 250px;
    max-width: 970px;
    /* background: linear-gradient(135deg, #1a3c2e 0%, #2d5a3d 100%); */
    background-image: url('../img/banner_rodape_divulgue/divlgue_aqui_rodape.png');
    background-size: cover;
    /* preenche toda a div sem distorcer */
    background-position: center;
    /* centraliza o corte */
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    /* cor de fallback enquanto carrega */
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* alterei aqui para melhorar */
.floating-ad-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
    padding-right: 50px;
    /* espaço para o botão não sobrepor o texto */
}

.floating-ad-img {
    height: 50px;
    width: auto;
    border-radius: 4px;
}

.floating-ad-text-container {
    display: flex;
    flex-direction: column;
}

.floating-ad-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #FFD700; /* Dourado para destaque */
}

.floating-ad-text {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

.floating-ad-btn {
    background: #FFD700;
    color: #002D4B;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.floating-ad-btn:hover {
    background: white;
    color: #002D4B;
}

/* alterei aqui para melhorar */
.floating-ad-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #1a3c2e;
    border: 3px solid #1a3c2e;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.floating-ad-close:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .floating-ad-img {
        display: none;
    }
    
    .floating-ad-text-container {
        max-width: 60%;
    }
    
    .floating-ad-title {
        font-size: 0.9rem;
    }
    
    .floating-ad-text {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .carousel-content {
        left: 20px;
        max-width: 80%;
    }

    .carousel-content h2 {
        font-size: 1.8rem;
    }

    .carousel-content p {
        font-size: 0.95rem;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-nav-btn.prev {
        left: 10px;
    }

    .carousel-nav-btn.next {
        right: 10px;
    }

    .category-banner-container {
        grid-template-columns: 1fr;
    }

    .floating-ad {
        max-width: 90%;
        right: 5%;
        left: 5%;
        bottom: 10px;
    }
    .floating-ad-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-width: 2px;
    }

    .floating-ad-content {
        padding-right: 40px;
    }

    .floating-ad {
        max-width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        /* REMOVE o translateX(-50%) no mobile */
        padding: 0 8px;
    }

    .floating-ad.hide {
        transform: translateY(100%);
        /* animação de fechamento consistente */
    }
}

@media (max-width: 480px) {
    .floating-ad-close {
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }

    .floating-ad-content {
        padding-right: 32px;
    }

}