/* GLOBAL SCROLL SNAP & HEADER TRANSITIONS */

/* 1. Scroll Snap & Scrollbar Hiding */
/* 2025-12-12 13:30:00 - Removidos scroll-snap-type e overflow-y do seletor 'html' para evitar conflito com o .snap-container de páginas específicas. */
html {
    overflow-y: scroll; /* Garante comportamento de scroll explícito */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

/* Hide scrollbar for Chrome/Safari/Opera */
html::-webkit-scrollbar { 
    display: none;
}

/* 2. Scroll-snap e centralização de seções são tratados por:
   - `static/css/snap-scroll-global.css` (quando html.snap-page-active)
   - `static/css/home-snap-scroll.css` (home)
   - `static/css/about-snap-scroll.css` (/sobre)
*/

/* 3. Header & Logo Transitions */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* UX FIX: Altura inicial reduzida e fundo opaco conforme solicitado */
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
    background: rgba(0, 0, 0, 0.9) !important; /* Fundo escuro opaco inicial */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* UX REQUEST: Borda inferior sutil (Vermelho/Dourado da marca) para separar do vídeo */
    border-bottom: 1px solid rgba(185, 32, 39, 0.4) !important;
}

.navbar.scrolled {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    /* Menu translúcido (Glassmorphism) após scroll */
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Força a cor dos links para escuro quando o fundo é claro */
.navbar.scrolled .nav-link,
.navbar.scrolled .navbar-brand {
    color: #000000 !important; /* Contraste Máximo */
}

/* Ajuste do ícone do menu mobile (Hamburger) para escuro */
.navbar.scrolled .navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}
.navbar.scrolled .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(0);
}

/* READABILITY: Texto claro no fundo escuro inicial */
.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .navbar-brand {
    color: #ffffff !important;
    text-shadow: none; /* Sombra desnecessária com fundo opaco */
}

/* LOGO FIX: O logo deve ser SEMPRE DOURADO (Original). Removidos filtros de cor. */
.navbar.scrolled .navbar-brand img {
    filter: none !important; /* Garante que o logo dourado original seja exibido */
}

/* --- DARK MODE SUPPORT (Adaptive) --- */
body.dark-mode .navbar.scrolled,
[data-theme="dark"] .navbar.scrolled {
    background: rgba(18, 18, 18, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .navbar.scrolled .nav-link,
[data-theme="dark"] .navbar.scrolled .nav-link {
    color: #ffffff !important;
}

/* LOGO FIX DARK: Mantém dourado também no dark mode */
body.dark-mode .navbar.scrolled .navbar-brand img,
[data-theme="dark"] .navbar.scrolled .navbar-brand img {
    filter: none !important;
}

/* --- DROPDOWN MENU STYLING (GOD-TIER) --- */

.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    padding: 0.5rem;
    margin-top: 10px !important; /* Espaçamento do topo */
    
    /* Animação de Entrada */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block; /* Override do Bootstrap para permitir animação */
}

.navbar .dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* UX IMPROVEMENT: Open Dropdown on Hover for Desktop (Allows click on parent link) */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: block;
    }
}

/* Estilo do Dropdown no estado inicial (transparente) */
.navbar:not(.scrolled) .dropdown-menu {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Itens do Dropdown no estado inicial (texto branco) */
.navbar:not(.scrolled) .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}
.navbar:not(.scrolled) .dropdown-item:hover,
.navbar:not(.scrolled) .dropdown-item:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estilo do Dropdown no estado SCROLLED (fundo claro) */
.navbar.scrolled .dropdown-menu {
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 55px !important; /* UX FIX: Tamanho inicial levemente reduzido */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
}

.navbar.scrolled .navbar-brand img {
    height: 50px !important; /* Reduced Size */
    /* transform: scale(0.8); - better to animate height directly for layout flow */
}

/* Ajuste de padding da navbar para mobile para respeitar --header-height menor */
@media (max-width: 991px) {
    .navbar {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* 4. Section Transition Effects */
/* When a section is snapped, maybe add a subtle effect? */
/* This requires JS intersection observer to toggle classes usually, 
   but scroll-snap itself provides the mechanical effect. */

/* 5. Hero Text Readability & Effects (Overrides for all themes) */
.hero-title-cinema, .hero-subtitle-cinema, 
.hero-title-boutique, .hero-subtitle-boutique,
.hero-title-tech, .hero-subtitle-tech,
.hero-pre-tag {
    color: #ffffff !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9); /* Strong shadow for readability over video */
    transition: all 0.4s ease;
    cursor: default;
}

/* Hover Effect: "Transparent" glow */
.hero-title-cinema:hover, .hero-subtitle-cinema:hover,
.hero-title-boutique:hover, .hero-subtitle-boutique:hover {
    transform: scale(1.02);
    text-shadow: 0 0 15px rgba(255,255,255,0.6), 0 0 30px rgba(255,255,255,0.2);
    opacity: 0.9; /* Slight transparency effect */
}

/* ==========================================================================
   INTERACTIVITY: MENU LINK UNDERLINE ANIMATION
   ========================================================================== */
.navbar .nav-link {
    position: relative;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px; /* Posicionamento sutil abaixo do texto */
    left: 0;
    background-color: var(--color-primary, #b92027); /* Cor da marca para destaque */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Animação fluida */
    box-shadow: 0 0 10px rgba(185, 32, 39, 0.4); /* Glow sutil para elegância */
}

.navbar .nav-link:hover::after,
.navbar .nav-link:focus::after,
.navbar .nav-link.active::after {
    width: 100%;
}
