/* Smooth scroll nativo */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f3f5; 
}
::-webkit-scrollbar-thumb {
    background: #adb5bd; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #000000; 
}

/* Selection */
::selection {
    background-color: #000000;
    color: #ffffff;
}

/* Hero Title - Estado inicial (antes da animação GSAP) */
.hero-title-line > span {
    display: inline-block;
    will-change: transform;
}

/* Hero Line decorativa */
.hero-line {
    will-change: transform, opacity;
}

/* Hero Badge pulse delicado */
.hero-badge .animate-pulse {
    animation: hero-dot-pulse 2s ease-in-out infinite;
}

@keyframes hero-dot-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Scroll Indicator animation refinada */
.hero-scroll-indicator {
    will-change: opacity, transform;
}

/* Custom Cursor */
@media (hover: hover) {
    body {
        cursor: none;
    }
    a, button, select, input, textarea, [role="button"], .gsap-card, .gsap-gallery > div {
        cursor: none;
    }

    .custom-cursor-dot {
        width: 8px;
        height: 8px;
        background-color: #000000;
        position: fixed;
        top: 0;
        left: 0;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        will-change: transform;
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    .custom-cursor-ring {
        width: 40px;
        height: 40px;
        border: 2px solid rgba(0, 0, 0, 0.3);
        position: fixed;
        top: 0;
        left: 0;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        will-change: transform;
        transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
    }

    /* Hover State */
    .custom-cursor-hover .custom-cursor-dot {
        width: 6px;
        height: 6px;
        background-color: #000000;
    }

    .custom-cursor-hover .custom-cursor-ring {
        width: 56px;
        height: 56px;
        border-color: rgba(0, 0, 0, 0.8);
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* Loader Styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-logo {
    width: 130px;
    height: auto;
    animation: loader-pulse 2s ease-in-out infinite;
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background-color: #e9ecef;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: #000000;
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.loader-text {
    font-family: 'Anton', sans-serif;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 12px;
    letter-spacing: 0.1em;
}

@keyframes loader-pulse {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Hide Google Translate Banner and Widget */
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
.goog-te-banner,
#goog-gt-tt,
.goog-te-balloon-frame,
.skiptranslate > iframe,
[class*="goog-te-banner-frame"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
}
body {
    top: 0px !important;
    position: static !important;
}
#google_translate_element {
    display: none !important;
}
.goog-tooltip {
    display: none !important;
}
.goog-tooltip:hover {
    display: none !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important; 
    box-shadow: none !important;
}

/* ========================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ======================================== */

/* Previne overflow horizontal no body */
html, body {
    overflow-x: hidden;
}

/* Touch targets mínimos de 44px para acessibilidade mobile */
@media (max-width: 767px) {
    a, button, select, input, textarea {
        min-height: 44px;
    }

    /* Hero: reduz padding e título para caber em telas pequenas */
    #hero {
        min-height: auto;
        padding-bottom: 7rem; /* Espaço para stats bar */
    }

    /* Stats bar no hero */
    #hero .grid.grid-cols-2 {
        gap: 1rem;
    }

    /* Seção de contato: endereco não ultrapassa */
    #contact .flex.items-center.gap-4 span,
    #contact .flex.items-center.gap-4 a {
        word-break: break-word;
        font-size: 0.8rem;
    }

    /* Galeria Dojo: altura menor em mobile */
    .gsap-gallery {
        height: 280px !important;
    }

    /* Botões CTA em coluna completa no mobile */
    .flex.flex-wrap.gap-4 a {
        text-align: center;
        width: 100%;
    }

    /* Footer grid: texto centralizado no mobile */
    footer .grid {
        text-align: center;
    }
    footer .grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    footer .grid .flex.items-center.gap-3 {
        justify-content: center;
    }

    /* Formulário padding mais compacto */
    form .grid.grid-cols-1 {
        gap: 0.75rem;
    }

    /* Headmaster hero: imagens mais compactas */
    .sm\:col-span-2 {
        min-height: 260px !important;
    }

    /* Cards de instrutor: hover acelerado por GPU */
    .gsap-card {
        padding: 1.25rem;
    }

    /* Mobile menu: melhor espaçamento entre links */
    #mobile-menu .flex.flex-col {
        gap: 1.5rem;
    }
    #mobile-menu a {
        font-size: 1.5rem;
    }

    /* Unidades header: info empilhada e com quebra */
    .flex.flex-wrap.gap-6.gap-y-4 {
        gap: 0.75rem;
    }
}

/* Telas muito pequenas (< 375px) */
@media (max-width: 374px) {
    /* Título hero ainda menor */
    h1.font-anton {
        font-size: 2.5rem !important;
    }
    
    /* Badges e labels menores */
    .hero-badge {
        font-size: 8px;
        padding: 0.375rem 0.75rem;
    }

    /* Stats no hero: uma coluna */
    #hero .grid.grid-cols-2 {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
}

/* Melhoria de safe areas para dispositivos com notch */
@supports (padding: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: calc(3rem + env(safe-area-inset-bottom));
    }
    nav.sticky {
        padding-top: env(safe-area-inset-top);
    }
}

/* Desabilita cursor customizado em touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor-dot,
    .custom-cursor-ring {
        display: none !important;
    }
    body {
        cursor: auto !important;
    }
    a, button, select, input, textarea, [role="button"] {
        cursor: auto !important;
    }
}

/* Animações reduzidas para quem prefere — preserva hover transitions */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    html {
        scroll-behavior: auto;
    }
}
