/* ===== CORREÇÕES DE RESPONSIVIDADE PARA SAFARI MOBILE - VERSÃO FINAL ===== */

/* Correções de viewport para iOS */
@supports (-webkit-touch-callout: none) {
    html {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: -webkit-fill-available;
        height: -webkit-fill-available;
    }
    
    .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;
    }
}

/* ===== CORREÇÕES CRÍTICAS PARA MOBILE ===== */

@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;
    }
    
    .logo img {
        height: 36px !important;
        max-width: 120px !important;
        width: auto !important;
        margin: 0 !important;
    }
    
    .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;
    }
    
    .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;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px) !important;
        background: #27ae60 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px) !important;
        background: #27ae60 !important;
    }
    
    .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;
    }
    
    .language-selector-mobile {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10010 !important;
    }
    
    .language-toggle-mobile {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10011 !important;
    }
    
    .language-dropdown-mobile {
        position: fixed !important;
        left: 0 !important;
        right: auto !important;
        width: 300px !important;
        min-width: 170px !important;
        max-width: 95vw !important;
        box-sizing: border-box !important;
        top: 80px !important; /* valor inicial, será ajustado por JS */
        z-index: 20000 !important;
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
        border-radius: 10px !important;
        max-height: 220px !important;
        overflow-y: auto !important;
        margin-bottom: 0 !important;
        display: none !important;
    }
    
    .side-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: -webkit-fill-available !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .side-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Hero section */
    .hero {
        padding: 2rem 1rem !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .hero-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem !important;
    }
    
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !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: 1rem !important;
        opacity: 0.9 !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;
    }
    
    .hero p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 2rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
    }
    
    /* ===== CORREÇÕES CRÍTICAS DAS ESTATÍSTICAS ===== */
    
    .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;
        margin: 2rem 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 1rem 0.5rem !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 8px !important;
    }
    
    .hero-stats .stat {
        text-align: center !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        transition: transform 0.3s ease !important;
    }
    
    .hero-stats .stat-number {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #00c3ff !important;
        -webkit-text-fill-color: #00c3ff !important;
        display: block !important;
        margin-bottom: 0.5rem !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;
    }
    
    /* Botões */
    .hero-cta {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }
    
    .cta-button, .secondary-button {
        padding: 1rem 2rem !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        text-align: center !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        -webkit-appearance: none !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .cta-button {
        background: #27ae60 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .secondary-button {
        background: transparent !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        border: 2px solid #ffffff !important;
    }
    
    /* Features */
    .features {
        padding: 3rem 1rem !important;
    }
    
    .features h2 {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .features-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        text-align: center !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .feature-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 2.2rem !important;
        height: 48px !important;
        width: 48px !important;
        margin: 0 auto 0.5rem auto !important;
        line-height: 1 !important;
    }
    
    .feature-icon svg {
        width: 40px !important;
        height: 40px !important;
    }
    
    .feature-card h3 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .feature-card p {
        color: #444444 !important;
        -webkit-text-fill-color: #444444 !important;
        line-height: 1.6 !important;
    }
    
    /* Testimonials */
    .testimonials {
        padding: 3rem 1rem !important;
    }
    
    .testimonials h2 {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .testimonials-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .testimonial-card {
        padding: 1.5rem !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .testimonial-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 1rem !important;
    }
    
    .testimonial-author h3 {
        font-size: 1.1rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .testimonial-author p {
        font-size: 0.9rem !important;
        color: #666666 !important;
        -webkit-text-fill-color: #666666 !important;
    }
    
    .testimonial-rating {
        text-align: right !important;
    }
    
    .testimonial-rating span {
        font-size: 0.9rem !important;
        color: #666666 !important;
        -webkit-text-fill-color: #666666 !important;
    }
    
    .testimonial-rating .stars {
        color: #ffd700 !important;
        -webkit-text-fill-color: #ffd700 !important;
    }
    
    .testimonial-card blockquote {
        font-style: italic !important;
        margin: 0 !important;
        color: #444444 !important;
        -webkit-text-fill-color: #444444 !important;
    }
    
    .testimonial-card cite {
        display: block !important;
        margin-top: 1rem !important;
        font-size: 0.8rem !important;
        color: #666666 !important;
        -webkit-text-fill-color: #666666 !important;
    }
    
    /* FAQ */
    .faq-section {
        padding: 3rem 1rem !important;
    }
    
    .faq-section h2 {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .faq-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .faq-item {
        padding: 1.5rem !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .faq-item h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        color: #222222 !important;
        -webkit-text-fill-color: #222222 !important;
    }
    
    .faq-item p {
        color: #444444 !important;
        -webkit-text-fill-color: #444444 !important;
        line-height: 1.5 !important;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 1rem !important;
        background: #2c3e50 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .cta-content h2 {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .cta-content p {
        text-align: center !important;
        margin-bottom: 2rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .cta-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    
    .cta-primary, .cta-secondary {
        padding: 1rem 2rem !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        text-align: center !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        -webkit-appearance: none !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .cta-primary {
        background: #27ae60 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .cta-secondary {
        background: transparent !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        border: 2px solid #ffffff !important;
    }
    
    /* Footer */
    .main-footer {
        padding: 2rem 1rem !important;
        background: #2c3e50 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .footer-section h4 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .footer-section p, .footer-section a {
        color: #cccccc !important;
        -webkit-text-fill-color: #cccccc !important;
        line-height: 1.5 !important;
    }
    
    .footer-section a {
        text-decoration: none !important;
    }
    
    .footer-section a:hover {
        color: #27ae60 !important;
        -webkit-text-fill-color: #27ae60 !important;
    }
    
    /* WhatsApp Button */
    .whatsapp-button {
        position: fixed !important;
        bottom: 2rem !important;
        right: 2rem !important;
        width: 60px !important;
        height: 60px !important;
        background: #25d366 !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3) !important;
        z-index: 1000 !important;
        transition: all 0.2s ease !important;
    }
    
    .whatsapp-button:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4) !important;
    }
}

/* ===== CORREÇÕES PARA DISPOSITIVOS MUITO PEQUENOS ===== */

@media screen and (max-width: 480px) {
    .main-header {
        height: 48px !important;
        padding: 0 0.5rem !important;
    }
    
    .logo img {
        height: 32px !important;
        max-width: 100px !important;
    }
    
    .mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
    }
    
    .mobile-menu-toggle span {
        width: 20px !important;
        height: 2px !important;
    }
    
    .side-menu {
        width: 280px !important;
    }
    
    .side-menu-content {
        padding: 1.5rem !important;
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
    }
    
    .h1-subtitle {
        font-size: 0.9rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
    }
    
    .hero-stats .stat-number {
        font-size: 1.5rem !important;
    }
    
    .hero-stats .stat-label {
        font-size: 0.7rem !important;
    }
    
    .cta-button, .secondary-button {
        padding: 0.8rem 1.5rem !important;
        font-size: 14px !important;
    }
    
    .feature-card, .testimonial-card, .faq-item {
        padding: 1rem !important;
    }
    
    .feature-card h3, .testimonial-card h3, .faq-item h3 {
        font-size: 1.1rem !important;
    }
    
    .feature-card p, .testimonial-card p, .faq-item p {
        font-size: 0.9rem !important;
    }
    
    .main-header {
        padding: 0 0.5rem !important;
    }
    
    .side-menu {
        right: -280px !important;
    }
    
    .whatsapp-button {
        width: 50px !important;
        height: 50px !important;
        bottom: 1.5rem !important;
        right: 1.5rem !important;
    }
    
    .hero {
        padding: 1.5rem 0.5rem !important;
    }
}

/* ===== CORREÇÕES PARA LANDSCAPE ===== */

@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh !important;
        padding: 1rem !important;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
    }
    
    .hero p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-stats {
        flex-direction: row !important;
        gap: 1rem !important;
        padding: 0.8rem !important;
        margin: 1rem 0 !important;
    }
    
    .hero-stats .stat {
        flex: 1 !important;
    }
    
    .hero-cta {
        flex-direction: row !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
    }
    
    .cta-button, .secondary-button {
        flex: 1 !important;
        padding: 0.8rem 1rem !important;
        font-size: 14px !important;
    }
}

/* ===== CORREÇÕES DE PERFORMANCE ===== */

@media screen and (max-width: 768px) {
    * {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    .animate, .mobile-animate {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== CORREÇÕES FINAIS ===== */

@media screen and (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100% !important;
    }
    
    body {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
    
    .side-menu {
        -webkit-overflow-scrolling: touch !important;
    }
}

@media screen and (max-width: 768px) {
    button, a, input, textarea, select {
        -webkit-appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .mobile-menu-toggle, .side-menu-close, .language-toggle {
        -webkit-appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
}

@media screen and (max-width: 768px) {
    img {
        max-width: 100% !important;
        height: auto !important;
        -webkit-user-drag: none !important;
        user-drag: none !important;
    }
}

@media screen and (max-width: 768px) {
    @supports (-webkit-touch-callout: none) {
        body {
            min-height: -webkit-fill-available !important;
        }
    }
}

@media (max-width: 600px) {
    .hero {
        padding-top: 90px !important;
    }
    .hero-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 80px !important;
    }
}

/* Forçar contraste máximo para cartões e labels em Safari */
.feature-card, .feature-card h3, .feature-card p,
.amenity-item, .amenity-item h3, .amenity-item p {
  color: #222222 !important;
  -webkit-text-fill-color: #222222 !important;
  background: #fff !important;
}
.feature-card p, .amenity-item p {
  color: #444444 !important;
  -webkit-text-fill-color: #444444 !important;
}
@media (prefers-color-scheme: dark) {
  .feature-card, .feature-card h3, .feature-card p,
  .amenity-item, .amenity-item h3, .amenity-item p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #2a2a2a !important;
  }
  .feature-card p, .amenity-item p {
    color: #cccccc !important;
    -webkit-text-fill-color: #cccccc !important;
  }
}

/* Garantir que o seletor de idiomas mobile funcione no menu lateral */
.side-menu .language-selector-mobile {
    position: relative !important;
    z-index: 10010 !important;
    margin-bottom: 3.5rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.side-menu .language-toggle-mobile {
    z-index: 10011 !important;
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    pointer-events: auto !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.side-menu .language-dropdown-mobile.show {
    display: block !important;
}

.side-menu .language-option-mobile {
    padding: 0.7rem 1.2rem !important;
    font-size: 1rem !important;
    color: #222 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    text-align: left !important;
    transition: background 0.2s, color 0.2s !important;
    cursor: pointer !important;
    margin: 0 !important;
    outline: none !important;
}

.side-menu .language-option-mobile:hover {
    background: #f2f2f2 !important;
    color: #27ae60 !important;
}

.side-menu .language-option-mobile[aria-selected="true"] {
    background: none !important;
    color: #27ae60 !important;
    font-weight: 600 !important;
    border-left: 4px solid #27ae60 !important;
    border-radius: 0 8px 8px 0 !important;
}

.side-menu .language-option-mobile:last-child {
    border-bottom: none !important;
} 