/* Estilos específicos para dispositivos móveis */
@media only screen and (max-width: 767px) {
    /* Ajustes gerais */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Cabeçalhos de seção */
    .section-header {
        margin-bottom: 30px;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .section-header h2 {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 10px;
        letter-spacing: -0.5px;
        width: 100%;
        text-align: center;
        padding: 0 5px;
    }
    
    .section-header .primary-title {
        font-size: 1.5rem !important;
        margin-bottom: 5px;
        font-weight: 700;
        color: #000;
    }
    
    .section-header .secondary-title {
        font-size: 1.7rem !important;
        line-height: 1.3;
        color: #8797b2;
        margin-top: 5px;
        padding: 0 15px;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* Estilos para a seção de localização */
    .location-content {
        flex-direction: column;
    }
    
    .location-info {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .location-map {
        width: 100%;
        height: 300px;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .location-map iframe {
        width: 100%;
        height: 300px;
        border-radius: 8px;
    }
    
    /* Botões */
    .btn, .btn-program {
        width: 100%;
        max-width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        margin: 10px 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 30px;
        -webkit-appearance: none;
        appearance: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        text-decoration: none;
        font-weight: 600;
        letter-spacing: 0.5px;
        border: none;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Estilo específico para o botão "AGENDAR CONSULTA ESPECIALIZADA" */
    .btn.btn-primary {
        background-color: #5A7D9A;
        color: white;
        font-weight: 700;
        box-shadow: 0 5px 15px rgba(90, 125, 154, 0.3);
    }
    
    /* Estilo específico para o botão "Saiba mais sobre o programa" */
    .btn-program {
        background-color: #5A7D9A;
        color: white;
        font-weight: 600;
        border-radius: 50px;
        padding: 14px 25px;
        box-shadow: 0 5px 15px rgba(90, 125, 154, 0.25);
    }
    
    .btn:active, .btn-program:active {
        transform: translateY(2px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .btn i, .btn-program i {
        margin-right: 8px;
        font-size: 1.2rem;
    }
    
    /* Banner de abordagem */
    .approach-banner {
        height: auto;
        padding: 0;
        border-radius: 12px;
        overflow: hidden;
        margin: 25px 10px;
        width: calc(100% - 20px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
    
    .approach-content {
        padding: 30px 20px;
        background: linear-gradient(135deg, rgba(135, 151, 178, 0.95) 0%, rgba(106, 122, 148, 0.95) 100%);
        position: relative;
        z-index: 1;
    }
    
    .approach-content::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        z-index: -1;
    }
    
    .approach-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
        background-color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        margin-left: auto;
        margin-right: auto;
    }
    
    .approach-icon img {
        max-width: 35px;
    }
    
    .approach-content h4 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .approach-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Título "Como funciona sua consulta" */
    h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 15px;
        text-align: center;
        margin: 25px auto;
        max-width: 90%;
        color: #5A7D9A;
        font-weight: 600;
        letter-spacing: -0.5px;
    }
    
    /* Específico para o título "Como funciona sua consulta" */
    section:not(.treatments):not(.testimonials-section):not(.how-can-help-section) h2 {
        font-size: 2rem;
        color: #5A7D9A;
        margin: 30px auto 20px;
        padding: 0 20px;
        line-height: 1.2;
        max-width: 90%;
        text-align: center;
        font-weight: 600;
        letter-spacing: -0.5px;
        word-spacing: -1px;
    }
    
    /* Ajuste adicional para o título "Como funciona sua consulta" */
    h2.consulta-titulo {
        font-size: 1.9rem !important;
        line-height: 1.3 !important;
        padding: 0 15px !important;
    }
    
    /* Garantindo que o título da Dra. Maria Angélica permaneça branco */
    .doctor-profile .doctor-info h2 {
        color: white !important;
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    /* Ajustes específicos para Safari no iPhone */
    @supports (-webkit-touch-callout: none) {
        .btn, .btn-program {
            -webkit-appearance: none;
            appearance: none;
            padding-top: 16px;
            padding-bottom: 16px;
            border: none;
        }
        
        .approach-banner {
            border-radius: 12px;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        .section-header h2 {
            -webkit-font-smoothing: antialiased;
        }
        
        /* Corrigindo o problema de texto cortado no Safari */
        .section-header .primary-title,
        .section-header .secondary-title {
            display: inline-block;
            width: 100%;
            padding: 0 10px;
            box-sizing: border-box;
        }
        
        /* Melhorando a renderização de texto */
        h2, h3, h4, p {
            -webkit-font-smoothing: antialiased;
        }
    }
    
    /* Estilos responsivos para a seção de contato e consultório */
    .contact-office-section {
        padding: 50px 0;
    }
    
    .contact-header {
        margin-bottom: 30px;
    }
    
    .contact-header h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        margin-bottom: 40px;
    }
    
    .contact-item {
        width: 100%;
        max-width: 320px;
        padding: 25px 20px;
    }
    
    .contact-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .btn-contact {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        text-align: center;
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }
    
    .gallery-item {
        height: 220px;
        aspect-ratio: 1/1;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .gallery-item img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        transition: transform 0.3s ease;
    }
    
    .gallery-item:hover img {
        transform: scale(1.05);
    }
    
    /* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 5px;
    }
    
    .gallery-item {
        height: 220px;
        aspect-ratio: 16/9;
        margin-bottom: 5px;
    }
    
    .gallery-item img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    
    .office-gallery {
        padding: 10px;
    }
    
    /* Estilos responsivos para a seção de Contato e Localização */
    .location-section {
        padding: 60px 0;
    }
    
    .location-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .location-card {
        padding: 20px;
    }
    
    .location-map {
        width: 100%;
        border-radius: 8px;
    }
    
    .location-map iframe {
        height: 350px;
        border-radius: 8px;
    }
    
    .btn-schedule {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}

    /* Ajustes para telas muito pequenas (iPhone SE, etc) */
@media only screen and (max-width: 375px) {
        .contact-item {
            padding: 20px 15px;
        }
        
        .contact-icon {
            width: 60px;
            height: 60px;
            font-size: 1.8rem;
        }
        
        .gallery-item {
            height: 180px;
        }
    }
}

/* Ajustes para telas muito pequenas (iPhone SE, etc) */
@media only screen and (max-width: 375px) {
    .section-header h2 {
        font-size: 1.6rem !important;
    }
    
    .section-header .primary-title {
        font-size: 1.3rem !important;
    }
    
    .section-header .secondary-title {
        font-size: 1.5rem !important;
    }
    
    .btn, .btn-program {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .approach-content h4 {
        font-size: 1.3rem;
    }
}
