/* ===== CORREÇÕES CRÍTICAS PARA SAFARI MOBILE - PROBLEMAS IDENTIFICADOS ===== */

/* ===== 1. CORREÇÕES CRÍTICAS DO VIEWPORT PARA SAFARI ===== */
@supports (-webkit-touch-callout: none) {
    html {
        height: -webkit-fill-available;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }
    
    body {
        min-height: -webkit-fill-available;
        height: -webkit-fill-available;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }
    
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .side-menu {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    .side-menu-overlay {
        height: 100vh;
        height: -webkit-fill-available;
    }
}

/* ===== 2. CORREÇÕES CRÍTICAS DO MENU HAMBURGUER ===== */
@media screen and (max-width: 768px) {
    /* Força exibição do botão do menu no Safari */
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1001 !important;
        width: 48px !important;
        height: 48px !important;
        background: #ffffff !important;
        border: none !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
        cursor: pointer !important;
        margin-left: 0 !important;
        margin-right: 0.5rem !important;
        order: 3 !important;
        transition: all 0.2s ease !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        align-items: center !important;
        justify-content: center !important;
        -webkit-appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background: #222222 !important;
        margin: 3px 0 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        -webkit-transform: rotate(45deg) translate(6px, 6px) !important;
        transform: rotate(45deg) translate(6px, 6px) !important;
        background: #27ae60 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
        -webkit-transform: scale(0) !important;
        transform: scale(0) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        -webkit-transform: rotate(-45deg) translate(6px, -6px) !important;
        transform: rotate(-45deg) translate(6px, -6px) !important;
        background: #27ae60 !important;
    }
    
    /* Esconder completamente os links de navegação em mobile */
    .nav-links {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        pointer-events: none !important;
        z-index: 0 !important;
    }
    
    /* Esconder seletor de idiomas desktop */
    .language-selector-desktop {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* ===== 3. CORREÇÕES CRÍTICAS DO LOGO GIGANTE ===== */
@media screen and (max-width: 768px) {
    .main-header {
        height: 56px !important;
        min-height: 0 !important;
        padding: 0 1rem !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
    }
    
    .main-nav {
        height: 56px !important;
        min-height: 0 !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .logo {
        flex-shrink: 0 !important;
        max-width: 120px !important;
    }
    
    .logo img {
        height: 36px !important;
        max-width: 120px !important;
        width: auto !important;
        margin: 0 !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
}

@media screen and (max-width: 480px) {
    .logo img {
        height: 32px !important;
        max-width: 100px !important;
    }
    
    .main-header {
        padding: 0 0.5rem !important;
    }
}

/* ===== 4. CORREÇÕES CRÍTICAS DO TÍTULO CORTADO ===== */
@media screen and (max-width: 768px) {
    .hero {
        padding-top: 80px !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero-content {
        padding: 2rem 1rem !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        text-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
    }
    
    .h1-subtitle {
        font-size: clamp(1rem, 3vw, 1.2rem) !important;
        line-height: 1.3 !important;
        margin-top: 0.5rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .hero p {
        font-size: clamp(0.9rem, 2.5vw, 1rem) !important;
        line-height: 1.4 !important;
        margin: 1rem 0 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding-top: 70px !important;
    }
    
    .hero-content {
        padding: 1.5rem 0.5rem !important;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .h1-subtitle {
        font-size: 1rem !important;
        margin-top: 0.3rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
        margin: 0.8rem 0 !important;
    }
}

/* ===== 5. CORREÇÕES CRÍTICAS DOS SLIDES/CARROSSEL ===== */
/* Força compatibilidade do Swiper com Safari */
.swiper {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-perspective: 1000px !important;
    perspective: 1000px !important;
}

.swiper-wrapper {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

.swiper-slide {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.swiper-slide img {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    pointer-events: auto !important;
}

.swiper-button-next,
.swiper-button-prev {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.swiper-pagination {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
}

.swiper-pagination-bullet {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* ===== 6. CORREÇÕES CRÍTICAS DO SIDE MENU ===== */
@media screen and (max-width: 768px) {
    .side-menu {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 300px !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        background: #ffffff !important;
        z-index: 10001 !important;
        transition: right 0.3s ease !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    .side-menu.active {
        right: 0 !important;
    }
    
    .side-menu-content {
        padding: 2rem !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        z-index: 10002 !important;
    }
    
    .side-menu-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .side-menu-close {
        width: 40px !important;
        height: 40px !important;
        background: #f5f5f5 !important;
        border: none !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .side-menu-close span {
        position: absolute !important;
        width: 20px !important;
        height: 2px !important;
        background: #666 !important;
        transition: all 0.2s ease !important;
    }
    
    .side-menu-close span:first-child {
        -webkit-transform: rotate(45deg) !important;
        transform: rotate(45deg) !important;
    }
    
    .side-menu-close span:last-child {
        -webkit-transform: rotate(-45deg) !important;
        transform: rotate(-45deg) !important;
    }
    
    .side-menu-nav {
        flex: 1 !important;
        position: relative !important;
        z-index: 10002 !important;
    }
    
    .side-menu-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .side-menu-links li {
        margin-bottom: 1rem !important;
        opacity: 0 !important;
        -webkit-transform: translateX(20px) !important;
        transform: translateX(20px) !important;
        transition: all 0.3s ease !important;
    }
    
    .side-menu.active .side-menu-links li {
        opacity: 1 !important;
        -webkit-transform: translateX(0) !important;
        transform: translateX(0) !important;
    }
    
    .side-menu-links a {
        display: block !important;
        padding: 1rem !important;
        text-decoration: none !important;
        color: #333 !important;
        font-weight: 500 !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .side-menu-links a:hover {
        background: #f5f5f5 !important;
        color: #27ae60 !important;
    }
    
    .side-menu-reserva {
        background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
        color: white !important;
        text-align: center !important;
        font-weight: 600 !important;
        margin-top: 1rem !important;
    }
    
    .side-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 10000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    .side-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ===== 7. CORREÇÕES CRÍTICAS DE TOUCH E INTERAÇÃO ===== */
@media screen and (max-width: 768px) {
    /* Melhorar responsividade ao toque */
    button, a, input, textarea, select {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* Permitir seleção de texto em inputs */
    input, textarea, select {
        -webkit-user-select: text !important;
        user-select: text !important;
    }
    
    /* Melhorar performance de imagens */
    img {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
}

/* ===== 8. CORREÇÕES CRÍTICAS DE ANIMAÇÕES ===== */
@media screen and (max-width: 768px) {
    /* Desabilitar animações problemáticas no Safari */
    .animate, .mobile-animate {
        -webkit-animation: none !important;
        animation: none !important;
        opacity: 1 !important;
        -webkit-transform: none !important;
        transform: none !important;
    }
    
    /* Força renderização de elementos críticos */
    .hero, .main-header, .side-menu, .mobile-menu-toggle {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        -webkit-perspective: 1000px !important;
        perspective: 1000px !important;
    }
}

/* ===== 9. CORREÇÕES CRÍTICAS DE CORES E CONTRASTE ===== */
/* Força cores corretas em todo o site */
body {
    color: #333333 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #333333 !important;
}

/* Correções específicas para textos */
h1, h2, h3, h4, h5, h6 {
    color: #222222 !important;
    -webkit-text-fill-color: #222222 !important;
    opacity: 1 !important;
}

p, span, div, a {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    opacity: 1 !important;
}

/* Correções para hero section - TEXTO BRANCO EM FUNDO ESCURO */
.hero, .hero *:not(a):not(button) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.hero h1, .hero .hero-content h1 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
}

.hero .hero-content p, .hero p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* ===== 10. CORREÇÕES CRÍTICAS DE ESTATÍSTICAS ===== */
@media screen and (max-width: 768px) {
    .hero-stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 1rem 0.5rem !important;
        margin: 1.5rem 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 8px !important;
    }
    
    .hero-stats .stat {
        min-width: 0 !important;
        flex: 1 1 0 !important;
        text-align: center !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero-stats .stat-number {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #00c3ff !important;
        -webkit-text-fill-color: #00c3ff !important;
        text-shadow: 0 2px 6px rgba(0,195,255,0.4) !important;
    }
    
    .hero-stats .stat-label {
        font-size: 0.75rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        opacity: 0.95 !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-stats {
        gap: 0.3rem !important;
        padding: 0.8rem 0.3rem !important;
        margin: 1rem 0 !important;
    }
    
    .hero-stats .stat-number {
        font-size: 1.5rem !important;
    }
    
    .hero-stats .stat-label {
        font-size: 0.7rem !important;
    }
}
