/* =========================================
   1. BASE & TYPOGRAPHY
   ========================================= */
:root {
    --color-cream: #FAF9F6;
    --color-dark: #1a1a1a;
    --color-green-dark: #004D40;
    --color-green-hover: #00382e;

    /* Variações de Opacidade */
    --color-green-dark-05: rgba(0, 77, 64, 0.05);
    /* 5% */
    --color-green-dark-10: rgba(0, 77, 64, 0.10);
    /* 10% */

}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-cream);
    color: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-heavy {
    font-family: 'Archivo Black', sans-serif;
}

/* =========================================
   2. UTILITIES (Colors & Helpers)
   ========================================= */
.text-green-dark {
    color: var(--color-green-dark);
}

.text-green-dark-05 {
    color: var(--color-green-dark-05);
}

.hover\:text-green-dark:hover {
    color: var(--color-green-dark);
}

.group:hover .group-hover\:text-green-dark {
    color: var(--color-green-dark);
}

.bg-green-dark {
    background-color: var(--color-green-dark);
}

.bg-green-dark-05 {
    background-color: var(--color-green-dark-05);
}

.bg-green-dark-10 {
    background-color: var(--color-green-dark-10);
}



.hover\:bg-green-dark:hover {
    background-color: var(--color-green-hover);
}

.group:hover .group-hover\:bg-green-dark {
    background-color: var(--color-green-dark);
}


.no-select {
    user-select: none;
    -webkit-user-select: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* =========================================
   3. COMPONENTS (Cards, Buttons, Nav)
   ========================================= */

/* Navbar Glass Effect */
.glass-nav {
    background: rgba(240, 235, 229, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(26, 60, 52, 0.05);
    transition: all 0.3s ease;
}

/* Tabs & Buttons */
.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tab-btn.active {
    background-color: var(--color-green-dark);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.tab-btn:not(.active) {
    background-color: #e5e7eb;
    color: #374151;
}

.tab-btn:not(.active):hover {
    background-color: #d1d5db;
}

/* Cards & Shadows */
.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.group:hover .card-shadow {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.team-card-hover {
    transition: all 0.4s ease;
}

.team-card-hover:hover {
    transform: translateY(-10px);
}

/* FAQ Accordion Arrow */
details[open]>summary .details-arrow {
    transform: rotate(180deg);
}

details>summary .details-arrow {
    transition: transform 0.2s;
}

/* =========================================
   4. SPECIFIC MODULES
   ========================================= */

/* --- Charts (Index) --- */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    height: 300px;
    max-height: 400px;
}

@media (min-width: 768px) {
    .chart-container {
        height: 350px;
    }
}

/* --- Swiper Pagination (Index) --- */
.custom-pagination {
    position: absolute !important;
    z-index: 50 !important;
    display: flex !important;
    gap: 0.75rem !important;
    padding: 0.625rem !important;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: auto !important;
    bottom: 1.5rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    flex-direction: row !important;
    top: auto !important;
    right: auto !important;
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    border-radius: 9999px;
    transition: all 0.5s ease-out;
    display: block !important;
    margin: 0 !important;
}

.swiper-pagination-bullet-active {
    background-color: white;
    width: 24px;
}

@media (min-width: 1024px) {
    .custom-pagination {
        top: 50% !important;
        right: 1.5rem !important;
        bottom: auto !important;
        left: auto !important;
        transform: translateY(-50%) !important;
        flex-direction: column !important;
    }

    .swiper-pagination-bullet-active {
        width: 6px;
        height: 24px;
    }
}

/* --- Countdown Layout (Index) --- */
.custom-desk-countdown {
    display: none;
}

.custom-mob-countdown {
    display: block;
}

@media (min-width: 900px) {
    .custom-desk-countdown {
        display: block;
    }

    .custom-mob-countdown {
        display: none;
    }

    .custom-layout-row {
        flex-direction: row;
        align-items: flex-end;
    }
}

/* --- Polaroids (Quem Somos) --- */
.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.polaroid-item {
    background: white;
    padding: 1rem 1rem 3rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: rotate(var(--rot));
    transition: all 0.3s ease;
}

.polaroid-item:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- TV / Retro Effects (Quem Somos) --- */
.tv-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4/3;
    margin: 0 auto;
    z-index: 20;
}

.tv-frame {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.4));
}

.tv-screen-content {
    position: absolute;
    top: 16%;
    left: 22%;
    width: 55%;
    height: 55%;
    background-color: #111;
    z-index: 10;
    border-radius: 40% / 10%;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}

.screen-slideshow {
    position: absolute;
    inset: 0;
}

.screen-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: tvSlideLoop 12s infinite;
    filter: contrast(1.3) sepia(0.4) saturate(1.2) brightness(0.9);
}

.screen-slide:nth-child(1) {
    animation-delay: 0s;
    background-image: url('../images/moments/BC/terreiro_do_paco_BC.webp');
}

.screen-slide:nth-child(2) {
    animation-delay: 3s;
    background-image: url('../images/moments/BC/jantar_bc.webp');
}

.screen-slide:nth-child(3) {
    animation-delay: 6s;
    background-image: url('../images/moments/BC/surf_bc.webp');
}

.screen-slide:nth-child(4) {
    animation-delay: 9s;
    background-image: url('../images/moments/MW/group_photo_aMW24.webp');
}

.screen-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.15;
    mix-blend-mode: hard-light;
    animation: noise-buzz 0.15s infinite steps(5);
    pointer-events: none;
}

.screen-scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 15;
}

.screen-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 20;
    pointer-events: none;
}

.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.5;
    background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png");
    mix-blend-mode: multiply;
}

.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================
   5. ANIMATIONS (Keyframes)
   ========================================= */

/* Utils classes for animations */
.is-flipped {
    transform: rotateY(180deg);
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.animate-scroll {
    animation: scroll 25s linear infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-float-1 {
    animation: float-1 25s infinite ease-in-out;
}

.animate-float-2 {
    animation: float-2 28s infinite ease-in-out;
}

.animate-float-3 {
    animation: float-3 30s infinite ease-in-out;
}

/* Keyframes Definitions */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes tvSlideLoop {

    0%,
    100% {
        opacity: 0;
    }

    10%,
    30% {
        opacity: 1;
    }

    40% {
        opacity: 0;
    }
}

@keyframes noise-buzz {

    0%,
    100% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-2%, 2%);
    }

    40% {
        transform: translate(-2%, -2%);
    }

    60% {
        transform: translate(2%, 2%);
    }

    80% {
        transform: translate(2%, -2%);
    }
}

@keyframes float-1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(150px, -100px) rotate(25deg);
    }

    66% {
        transform: translate(-80px, 120px) rotate(-15deg);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-120px, 100px) rotate(-20deg) scale(1.15);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(80px, 50px) rotate(15deg);
    }

    50% {
        transform: translate(180px, 0px) rotate(45deg);
    }

    75% {
        transform: translate(80px, -50px) rotate(15deg);
    }
}