/* ----------------- RESPONSIVE STYLES ----------------- */

/* Tablets e dispositivos médios */
@media (max-width: 1100px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .floating-buttons {
        right: 20px;
        bottom: 20px;
    }
}

/* Tablets pequenos e celulares grandes */
@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }
    
    .hero {
        padding-top: 150px;
        padding-bottom: 100px;
        background-attachment: scroll;
        background-position: center center;
        -webkit-background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    /* Menu Mobile */
    nav {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 30px;
        gap: 25px;
        border-top: 3px solid var(--secondary);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
        box-shadow: var(--shadow-heavy);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .header-cta {
        display: none;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .booking-features {
        grid-template-columns: 1fr;
    }
    
    .floating-buttons {
        right: 15px;
        bottom: 15px;
        gap: 15px;
    }
    
    .floating-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .services-grid, .barbers-grid, .gallery-grid {
        gap: 30px;
    }
    
    .service-card, .barber-card {
        padding: 30px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .map-container {
        height: 300px;
    }
    
    /* Melhorias para touch */
    .nav-link, .btn, .social-link, .floating-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Evitar zoom em inputs no iOS */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Celulares pequenos */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .services-grid, .barbers-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .hero-btns {
        gap: 15px;
    }
    
    .booking h2 {
        font-size: 2.2rem;
    }
    
    .booking p {
        font-size: 1.1rem;
    }
    
    .barber-image {
        height: 300px;
    }
    
    /* Melhorias para iOS */
    .hero, .booking {
        background-attachment: scroll !important;
        -webkit-background-attachment: scroll !important;
    }
}

/* Dispositivos muito pequenos */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .service-price {
        font-size: 1.8rem;
    }
    
    .floating-buttons {
        right: 10px;
        bottom: 10px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Orientação paisagem em celulares */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding-top: 120px;
        padding-bottom: 80px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    nav {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .mobile-menu-btn {
        position: fixed;
        top: 20px;
        right: 20px;
    }
}

/* Alto contraste para acessibilidade */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --secondary: #8B4513;
        --accent: #DAA520;
        --metal: #FFFFFF;
    }
    
    .btn-primary, .btn-secondary {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Modo escuro padrão (já é escuro) */
@media (prefers-color-scheme: dark) {
    /* Nosso site já está otimizado para modo escuro */
}

/* Suporte para telas de alta densidade */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero, .booking {
        background-image: url('https://images.unsplash.com/photo-1585747860715-2ba37e788b70?ixlib=rb-4.0.3&auto=format&fit=crop&w=3840&q=80');
    }
    
    .booking {
        background-image: url('https://images.unsplash.com/photo-1599351431202-1e0f0137899a?ixlib=rb-4.0.3&auto=format&fit=crop&w=3840&q=80');
    }
}

/* Impressão */
@media print {
    header, .floating-buttons, .hero-btns, .booking a, .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    section {
        padding: 30px 0 !important;
        page-break-inside: avoid;
    }
    
    .hero, .booking {
        background: white !important;
        color: black !important;
    }
    
    h1, h2, h3, h4 {
        color: black !important;
    }
    
    .service-card, .barber-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}