
/* Centralização global e remoção de scroll horizontal em mobile */
@media (max-width: 768px) {
    html, body {
        width: 100vw !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Removido display:flex global para não afetar overlays e menus */
    }
    main, section, header, footer, #home, #about, #gallery, #services, #mentorship, #testimonials, #contact {
        /* Centralização apenas para conteúdo, não para overlays */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100vw !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .container, .flex, .grid {
        align-items: center !important;
        justify-content: center !important;
    }
    img, video {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    /* Remove scroll extra de grids */
    .grid {
        overflow-x: hidden !important;
    }
    /* Remove scroll de event-images */
    #event-images {
        justify-content: center !important;
        overflow-x: hidden !important;
    }
    /* Garante que o menu mobile fique acima de tudo e visível */
    #mobile-menu {
        z-index: 2000 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Breakpoints principais */
@media (max-width: 768px) {
    /* Preloader mobile */
    #preloader {
        padding: 0 !important;
        background: #111 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
        width: 100vw !important;
        z-index: 9999 !important;
    }
    #preloader img {
        width: 120px !important;
        max-width: 70vw !important;
        height: auto !important;
        margin: 0 !important;
        filter: drop-shadow(0 0 16px #e11d48) !important;
        animation: preloader-spin 1.2s linear infinite !important;
    }
    /* Header/Navigation */
    header {
        padding: 0.5rem 0;
    }
    
    header .container {
        padding: 0 1rem;
    }
    
    .marker-font {
        font-size: 1.5rem !important;
    }
    
    /* Menu mobile */
    #mobile-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1000;
        transition: left 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    #mobile-menu.active {
        left: 0;
    }
    
    #mobile-menu a {
        color: white;
        text-decoration: none;
        font-size: 1.5rem;
        margin: 1rem 0;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }
    
    #mobile-menu a:hover {
        background: rgba(225, 29, 72, 0.2);
        color: #e11d48;
    }
    
    /* Botão de fechar do menu mobile */
    .mobile-menu-close {

    /* Modal de piercing mobile */
    #piercing-img-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        -webkit-backdrop-filter: blur(15px) !important;
        backdrop-filter: blur(15px) !important;
    }
    #piercing-modal-img {
        max-width: 95vw !important;
        max-height: 70vh !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important;
        margin: auto !important;
        display: block !important;
        border: 3px solid #e11d48 !important;
    }
    #close-piercing-modal {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 2rem !important;
        background: rgba(0,0,0,0.7) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
        cursor: pointer !important;
        transition: background 0.2s !important;
    }
    #close-piercing-modal:active {
        background: rgba(225,29,72,0.8) !important;
        color: #fff !important;
    }
    
    .mobile-menu-close:hover {
        background: rgba(225, 29, 72, 0.2);
        color: #e11d48;
    }
    
    .mobile-menu-close:active {
        transform: scale(0.9);
    }
    
    /* Melhor visibilidade do botão de fechar */
    .mobile-menu-close svg {
        width: 2rem;
        height: 2rem;
        stroke-width: 2.5;
    }
    
    /* Efeito de destaque no botão de fechar */
    .mobile-menu-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hero Section */
    #home {
        min-height: 100vh;
        padding: 2rem 1rem;
    }
    
    #home h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    #home p {
        font-size: 1rem !important;
        margin-bottom: 2rem;
    }
    
    #home .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    #home .btn-primary,
    #home .border {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
    }
    
    /* About Section */
    #about {
        padding: 3rem 1rem;
    }
    
    #about .flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    #about video {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #about h2 {
        font-size: 2rem !important;
        text-align: center;
    }
    
    #about p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Gallery Section */
    #gallery {
        padding: 3rem 1rem;
    }
    
    #gallery h2 {
        font-size: 2rem !important;
    }
    
    #gallery .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .gallery-item {
        height: 250px !important;
    }
    
    /* Services Section */
    #services {
        padding: 3rem 1rem;
    }
    
    #services h2 {
        font-size: 2rem !important;
    }
    
    #services .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .bg-zinc-800 {
        padding: 1.5rem !important;
    }
    
    /* Mentorship Section */
    #mentorship {
        padding: 3rem 1rem;
    }
    
    #mentorship h2 {
        font-size: 2rem !important;
    }
    
    #mentorship .flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    #mentorship .lg\:w-1\/2 {
        width: 100% !important;
    }
    
    /* Testimonials Section */
    #testimonials {
        padding: 3rem 1rem;
    }
    
    #testimonials h2 {
        font-size: 2rem !important;
    }
    
    #testimonials .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem !important;
    }
    
    /* Events Section */
    #event-images {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        overflow-x: auto !important;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    #event-images > div {
        min-width: 80vw !important;
        flex: 0 0 auto !important;
        margin-bottom: 0 !important;
    }
    #event-images img {
        width: 100% !important;
        height: 200px !important;
        object-fit: contain !important;
        margin-bottom: 0 !important;
        border-radius: 12px !important;
    }
    
    /* Contact Section */
    #contact {
        padding: 3rem 1rem;
    }
    
    #contact h2 {
        font-size: 2rem !important;
    }
    
    #contact .flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    #contact .lg\:w-1\/2 {
        width: 100% !important;
    }
    
    /* Footer */
    footer {
        padding: 2rem 1rem;
    }
    
    footer .flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    footer .space-x-6 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Header */
    .marker-font {
        font-size: 2rem !important;
    }
    
    /* Hero Section */
    #home h1 {
        font-size: 3.5rem !important;
    }
    
    #home p {
        font-size: 1.25rem !important;
    }
    
    /* Gallery */
    #gallery .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Services */
    #services .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Testimonials */
    #testimonials .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Events */
    #events .flex {
        flex-direction: row;
        gap: 2rem;
    }
    
    #events .lg\:w-1\/2 {
        width: 50% !important;
    }
    
    #events img {
        height: 250px !important;
    }
    
    #events .h-96 {
        height: 300px !important;
    }
    
    #events .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    #events .h-80 {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    #events .bg-zinc-800 {
        padding: 1.5rem !important;
    }
    
    #events img {
        max-height: 100% !important;
        width: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    

    

}

/* Dispositivos muito pequenos */
@media (max-width: 480px) {
    /* Header */
    .marker-font {
        font-size: 1.25rem !important;
    }
    
    /* Hero Section */
    #home h1 {
        font-size: 2rem !important;
    }
    
    #home p {
        font-size: 0.9rem !important;
    }
    
    /* Sections */
    #about,
    #gallery,
    #services,
    #mentorship,
    #testimonials,
    #contact {
        padding: 2rem 0.5rem;
    }
    
    /* Gallery */
    .gallery-item {
        height: 200px !important;
    }
    
    /* Contact form */
    input, select, textarea {
        font-size: 16px !important; /* Evita zoom no iOS */
    }
    
    /* Modal da galeria para telas muito pequenas */
    #gallery-modal-img {
        max-width: 98vw;
        max-height: 70vh;
    }
    
    .gallery-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .gallery-modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    /* Buttons */
    .btn-primary,
    .border {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Eventos em telas muito pequenas */
    #events .cursor-pointer {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    #events .h-80 {
        height: 200px !important;
        min-height: 200px !important;
    }
    
    #events .bg-zinc-800 {
        padding: 0.75rem !important;
    }
    
    #events img {
        max-height: 100% !important;
        width: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* Orientação landscape em dispositivos móveis */
@media (max-width: 768px) and (orientation: landscape) {
    #home {
        min-height: 100vh;
        padding: 1rem;
    }
    
    #home h1 {
        font-size: 2rem !important;
    }
    
    #home p {
        font-size: 0.9rem !important;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Melhorias de acessibilidade para touch */
@media (max-width: 768px) {
    /* Botões maiores para touch */
    button, a.btn-primary, a.border {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Espaçamento melhorado para touch */
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Melhorias touch para eventos */
    #events .bg-zinc-700 {
        min-height: 140px !important;
        padding: 2rem 1.5rem !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    #events .bg-zinc-700 .text-rose-600 {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    #events .bg-zinc-700 .text-white {
        font-size: 1.35rem !important;
        margin-bottom: 0.75rem !important;
    }
    #events .bg-zinc-700 .text-gray-400 {
        font-size: 1.1rem !important;
    }
    
    #events .cursor-pointer {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(225, 29, 72, 0.2);
    }
    
    /* Melhor contraste para textos */
    .text-gray-300 {
        color: #d1d5db !important;
    }
    
    .text-gray-400 {
        color: #9ca3af !important;
    }
}

/* Animações otimizadas para mobile */
@media (max-width: 768px) {
    .gallery-img:hover {
        transform: none;
    }
    
    /* Indicador de clique para mobile */
    .gallery-img::after {
        opacity: 1;
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .testimonial-card:hover {
        transform: none;
    }
    
    .mentorship-card:hover {
        transform: none;
    }
    
    /* Reduzir animações para melhor performance */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
}

/* Modal mobile */
@media (max-width: 768px) {
    .modal .bg-zinc-800 {
        margin: 1rem;
        padding: 1.5rem !important;
    }
    
    /* Modal da galeria mobile */
    #gallery-modal {
        padding: 1rem;
    }
    
    .gallery-modal-content {
        padding: 1rem;
        flex-direction: column;
    }
    
    #gallery-modal-img {
        max-width: 95vw;
        max-height: 75vh;
        border-radius: 10px;
    }
    
    .gallery-modal-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }
    
    .gallery-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 10px;
    }
    
    /* Melhorar backdrop para mobile */
    .gallery-modal-backdrop {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    #event-img-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    #event-img-modal img {
        max-width: 95vw !important;
        max-height: 70vh !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important;
        margin: auto !important;
        display: block !important;
    }
    #close-event-img-modal {
        top: 16px !important;
        right: 16px !important;
        font-size: 1.2rem !important;
        padding: 0.75rem 1.5rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 999px !important;
        z-index: 1001 !important;
    }
}

/* Melhorias para dispositivos com notch */
@media (max-width: 768px) {
    header {
        padding-top: env(safe-area-inset-top);
    }
    
    #mobile-menu {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Otimizações para performance */
@media (max-width: 768px) {
    /* Reduzir sombras para melhor performance */
    .shadow-lg {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Simplificar gradientes */
    .bg-gradient-to-r {
        background: linear-gradient(to right, #e11d48, #b91c1c) !important;
    }
}

/* Melhorias para scroll suave em mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }
    
    /* Melhor espaçamento para seções */
    section {
        scroll-margin-top: 80px;
    }
}

/* Melhorias para formulários em mobile */
@media (max-width: 768px) {
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #e11d48;
        outline-offset: 2px;
    }
    
    /* Melhor contraste para labels */
    label {
        color: #f3f4f6 !important;
        font-weight: 500;
    }
}

/* Melhorias para botões em mobile */
@media (max-width: 768px) {
    .btn-primary:active,
    .border:active {
        transform: scale(0.95);
    }
    
    /* Feedback visual para touch */
    button:active,
    a:active {
        opacity: 0.8;
    }
    
    /* Melhorias para modal da galeria */
    .gallery-modal-close:active,
    .gallery-modal-nav:active {
        transform: scale(0.9);
    }
    
    /* Prevenir scroll quando modal está aberto */
    body.modal-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
}}