/* Fonts */
@font-face {
    font-family: 'Intro';
    src: url('../fonts/Intro-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Intro';
    src: url('../fonts/Intro-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Intro';
    src: url('../fonts/Intro-Book.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Knockout-JuniorSumo';
    src: url('../fonts/Knockout HTF34-JuniorSumo Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Knockout-Cruiserweight';
    src: url('../fonts/Knockout-HTF52-Cruiserweight.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Smooth scroll - desabilitado para usar JavaScript customizado */
html {
    /* scroll-behavior: smooth; */
}

/* Page transition animations - transição suave sem flash branco */
body {
    padding-top: 88px; /* Altura do header fixo */
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    overflow-x: hidden; /* Previne scroll horizontal */
    min-height: 100vh; /* Garante altura mínima da página */
    font-family: 'Roboto', 'Inter', sans-serif !important;
}

/* Override font-intro class to use Roboto */
.font-intro {
    font-family: 'Roboto', 'Inter', sans-serif !important;
}

/* Keep Knockout only for specific titles */
.font-knockout {
    font-family: 'Knockout-JuniorSumo', 'Roboto', 'Inter', 'Arial Black', sans-serif;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Header menor no mobile */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling no iOS */
    }
    
    .header {
        padding: 12px 16px !important; /* Header mais compacto */
        min-height: 70px; /* Altura mínima fixa */
    }
    
    /* Fix para textos longos */
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Previne overflow horizontal */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Otimizações touch */
    button, .nav-link, .menu-toggle, a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Melhora performance em animações */
    .nav, .menu-toggle, .nav-link {
        will-change: transform;
        transform: translateZ(0); /* Force hardware acceleration */
    }
}

/* Fade out animation for page changes */
body.page-changing {
    opacity: 0.8;
    transform: translateY(-10px);
}

/* Header fixed at top */
.header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Navigation Links */
.nav-link {
    cursor: pointer !important;
    transition: color 0.3s ease;
    text-decoration: none;
    outline: 2px solid transparent; /* Adiciona uma borda transparente para verificar clicabilidade */
    padding: 5px 6px; /* Aumenta a área clicável */
    font-family: 'Roboto', 'Inter', sans-serif !important;
    font-size: 0.8rem; /* Reduz um pouco a fonte em telas menores */
}

@media (min-width: 1280px) {
    .nav-link {
        padding: 5px 10px;
        font-size: 0.875rem; /* Volta ao tamanho normal em telas grandes */
    }
}

.nav-link:hover {
    color: #C5A572 !important;
    cursor: pointer !important;
    outline: 2px solid #C5A572; /* Mostra a área clicável ao passar o mouse */
}

.nav-link:active {
    transform: scale(0.95); /* Feedback visual de clique */
    transition: transform 0.1s ease;
}

/* Mobile menu toggle animation */
.menu-toggle {
    cursor: pointer !important;
}

.menu-toggle span {
    transition: all 0.3s ease;
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Menu */
@media (max-width: 767px) {
    .nav {
        display: none; /* Esconde por padrão */
        position: fixed; /* Posicionamento fixo */
        top: 70px; /* Altura do header mobile */
        left: 0;
        width: 100vw; /* Largura da viewport */
        height: calc(100vh - 70px); /* Altura menos o header */
        height: calc(100dvh - 70px); /* Suporte para dynamic viewport height */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 999; /* Abaixo do header */
        overflow-y: auto; /* Rolagem se necessário */
        overflow-x: hidden; /* Previne scroll horizontal */
        padding: 20px 0; /* Espaço interno */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transição mais suave */
    }
    
    .nav.active {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
    
    .nav.active .nav-link {
        width: 100%;
        max-width: 320px;
        text-align: center;
        padding: 12px 16px;
        margin: 3px 0;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.5px;
        white-space: nowrap;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent; /* Remove highlight azul no iOS */
        touch-action: manipulation; /* Otimiza para touch */
    }
    
    .nav.active .nav-link:hover,
    .nav.active .nav-link:active {
        background-color: #f3f4f6;
        transform: scale(0.98);
    }
    
    /* Botão de inscrição no menu mobile */
    .nav.active .nav-link:last-child {
        background-color: #C5A572;
        color: white !important;
        margin-top: 16px;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 13px;
        padding: 12px 16px;
    }
    
    .nav.active .nav-link:last-child:hover {
        background-color: #B8975A;
    }
    
    /* Estilo para o botão de menu mobile */
    .menu-toggle {
        z-index: 1100; /* Acima do menu */
        position: relative;
        padding: 8px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        cursor: pointer;
    }
    
    /* Overlay para fechar menu ao tocar fora */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.1);
        z-index: -1;
    }
}
