/* 
* AD Betel - Correções de Responsividade
* Este arquivo ajusta o layout para ser exibido corretamente em diferentes tamanhos de tela
*/

/* ===== CORREÇÕES PARA TELAS MUITO GRANDES (TVs, Monitores grandes) ===== */
@media screen and (min-width: 1921px) {
    /* Limitar largura máxima do conteúdo para evitar distorções */
    .container {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    /* Ajustar tamanhos de fonte para telas grandes */
    body {
        font-size: 18px;
    }
    
    .section-title h2 {
        font-size: 48px;
    }
    
    .section-title .subtitle {
        font-size: 22px;
    }
    
    /* Ajustes na seção Hero para telas grandes */
    .hero {
        height: 100vh;
        background-size: cover;
        background-position: center;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .hero-slogan-img {
        max-width: 800px;
        height: auto;
    }
    
    .slogan-secundario {
        font-size: 24px;
    }
    
    /* Ajustes nos cards e grids para uma melhor distribuição */
    .service-grid,
    .event-slider,
    .sermon-grid,
    .gallery-grid,
    .testimonial-grid {
        max-width: 1800px;
        margin: 0 auto;
        gap: 40px;
    }
    
    /* Ajustes na seção de dízimos e ofertas */
    .giving-section {
        padding: 150px 0;
    }
    
    .giving-left h2 {
        font-size: 64px;
    }
    
    .giving-left p {
        font-size: 22px;
    }
    
    .giving-cards-row {
        width: 70%;
    }
    
    .giving-card {
        flex: 0 0 380px;
        height: 480px;
    }
    
    /* Carrossel de equipe pastoral */
    .carousel-slide {
        flex: 0 0 300px;
        max-width: 300px;
    }
    
    .pastor-image {
        width: 220px;
        height: 220px;
    }
}

/* ===== CORREÇÕES PARA DISPOSITIVOS TABLET (LANDSCAPE) ===== */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    /* Ajustes no header */
    nav ul li {
        margin-left: 20px;
    }
    
    nav ul li a {
        font-size: 14px;
    }
    
    /* Ajustes na seção sobre */
    .about-content {
        padding-left: 30px;
    }
    
    /* Ajustes na seção de dízimos e ofertas */
    .giving-left {
        width: 35%;
    }
    
    .giving-cards-row {
        width: 65%;
    }
    
    .giving-card {
        flex: 0 0 200px;
        height: 350px;
    }
    
    /* Ajustes nas seções de app e rádio */
    .app-content-side {
        flex: 0 0 60%;
    }
    
    .web-radio-side {
        flex: 0 0 35%;
    }
    
    .app-content-flex {
        flex-direction: column;
    }
    
    .app-mockup, 
    .app-description {
        flex: 0 0 100%;
    }
    
    .app-mockup {
        margin-bottom: 30px;
        text-align: center;
    }
}

/* ===== CORREÇÕES PARA TABLETS (PORTRAIT) E SMARTPHONES GRANDES ===== */
@media screen and (min-width: 768px) and (max-width: 991px) {
    /* Ajustes no header */
    .main-header {
        padding: 15px 0;
    }
    
    .logo img {
        height: 50px;
    }
    
    /* Ajustes na seção hero */
    .hero-content {
        padding-top: 100px;
    }
    
    .hero-slogan-img {
        max-width: 90%;
    }
    
    /* Ajustes na seção de dízimos e ofertas */
    .giving-section {
        padding: 80px 0 500px;
    }
    
    .giving-left {
        width: 100%;
        text-align: center;
        margin-bottom: 380px;
    }
    
    .giving-cards-row {
        flex-direction: column;
        align-items: center;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 50px;
        width: 100%;
        top: auto;
    }
    
    .giving-card {
        flex: 0 0 100%;
        max-width: 450px;
        height: 350px;
        margin: 0 auto 20px !important;
    }
    
    .giving-card:last-child {
        margin-bottom: 0 !important;
    }
    
    .card-image {
        width: 100%;
    }
    
    /* Ajustes no carrossel */
    .carousel-container {
        padding: 0 40px;
    }
    
    .carousel-slide {
        flex: 0 0 220px;
        max-width: 220px;
    }
    
    /* Ajustes na seção app/rádio */
    .app-section {
        background: var(--gray-color);
    }
    
    .app-wrapper {
        flex-direction: column;
    }
    
    .app-content-side, 
    .web-radio-side {
        flex: 0 0 100%;
        padding: 20px;
    }
    
    .web-radio-side {
        margin-top: 50px;
    }
    
    .radio-player-box {
        max-width: 450px;
        margin: 0 auto;
    }
}

/* ===== CORREÇÕES PARA SMARTPHONES ===== */
@media screen and (max-width: 767px) {
    /* Ajustes gerais */
    .section-title h2 {
        font-size: 28px;
    }
    
    .section-title .subtitle {
        font-size: 16px;
    }
    
    /* Ajustes no header */
    .top-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo img {
        height: 40px;
    }
    
    /* Ajustes na seção hero */
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 50px;
    }
    
    .hero-slogan-img {
        max-width: 95%;
    }
    
    .slogan-secundario {
        font-size: 14px;
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Ajustes na seção about */
    .about-image {
        margin-bottom: 30px;
    }
    
    .about-experience {
        right: 50%;
        transform: translateX(50%);
        bottom: -20px;
    }
    
    /* Ajustes na seção de contadores */
    .counter-wrapper {
        flex-direction: column;
    }
    
    .counter-item {
        margin-bottom: 30px;
    }
    
    /* Ajustes na seção de dízimos e ofertas */
    .giving-section {
        padding: 60px 0 380px;
    }
    
    .giving-left {
        width: 100%;
        text-align: center;
        margin-bottom: 0;
    }
    
    .giving-left h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .giving-left p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .orange-bar {
        display: none;
    }
    
    .giving-cards-row {
        position: relative;
        width: 100%;
        margin-top: 30px;
        flex-direction: column;
        align-items: center;
    }
    
    .giving-card {
        flex: 0 0 100%;
        height: 300px;
        margin: 0 auto 20px !important;
        max-width: 320px;
    }
    
    .card-image {
        width: 100%;
    }
    
    /* Ajustes no carrossel */
    .carousel-container {
        padding: 0 30px;
    }
    
    .carousel-slide {
        flex: 0 0 200px;
        max-width: 200px;
    }
    
    /* Ajustes no player de áudio */
    .floating-audio-player .player-content {
        flex-direction: column;
        padding: 15px 10px;
    }
    
    .now-playing {
        flex: 0 0 100%;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .player-controls {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }
    
    .progress-container {
        flex: 0 0 100%;
        margin: 0 0 10px 0;
    }
    
    .close-player {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    /* Ajustes no mapa */
    .google-map-container {
        height: 300px;
    }
    
    .church-info-card {
        width: 90%;
        left: 5%;
        bottom: 10px;
        padding: 15px;
    }
    
    /* Ajustes no footer */
    .footer-widgets {
        gap: 20px;
    }
}

/* ===== CORREÇÕES PARA SMARTPHONES PEQUENOS ===== */
@media screen and (max-width: 480px) {
    /* Ajustes no header */
    .main-header {
        padding: 10px 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    /* Ajustes na seção hero */
    .hero {
        padding: 100px 0 40px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Ajustes na seção sobre */
    .about {
        padding: 50px 0;
    }
    
    .feature {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto 15px;
    }
    
    /* Ajustes nas grids */
    .service-grid,
    .event-slider,
    .sermon-grid,
    .gallery-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ajustes nos cards de eventos */
    .event-card .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    /* Correções para a seção de dízimos e ofertas */
    .giving-section {
        padding: 50px 0 360px;
    }
    
    .giving-card {
        height: 280px;
    }
    
    /* Ajustes no player de áudio */
    .audio-control {
        width: 35px;
        height: 35px;
    }
    
    .play-pause {
        width: 40px;
        height: 40px;
    }
    
    /* Ajustes no formulário de contato */
    .contact-wrapper {
        flex-direction: column;
    }
    
    .contact-info,
    .contact-form {
        flex: 0 0 100%;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
    
    /* Ajustes nos modais */
    .modal-content,
    .video-modal-content,
    .lightbox-content {
        width: 95%;
        padding: 15px;
    }
}

/* ===== CORREÇÕES PARA ORIENTAÇÃO LANDSCAPE EM DISPOSITIVOS MÓVEIS ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    /* Ajuste na seção hero para evitar scroll excessivo */
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-content {
        padding-top: 50px;
    }
    
    .hero-slogan-img {
        max-width: 400px;
    }
    
    /* Ajuste na navegação mobile */
    nav.active {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Ajustes para o carrossel em landscape */
    .carousel-container {
        padding: 0 40px;
    }
    
    .carousel-slide {
        flex: 0 0 200px;
        max-width: 200px;
    }
    
    /* Ajustes para modais */
    .video-modal-content,
    .lightbox-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* ===== CORREÇÕES ESPECÍFICAS PARA ELEMENTOS PROBLEMÁTICOS ===== */

/* Corrigir o menu mobile para telas pequenas */
@media screen and (max-width: 768px) {
    nav.active {
        position: fixed;
        top: 70px;
        height: auto;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        padding-bottom: 30px;
        z-index: 1000;
    }
    
    nav ul {
        padding: 20px 0;
    }
    
    nav ul li a {
        display: block;
        padding: 10px 0;
        color: var(--light-color) !important;
    }
}

/* Correção específica para o slider de eventos */
@media screen and (max-width: 991px) {
    .event-slider {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .event-card {
        width: 100%;
        max-width: 450px;
    }
}

/* Correção para o modal de vídeo em todas as telas */
.video-modal {
    z-index: 9999;
}

.video-modal .modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
}

.video-modal video {
    width: 100%;
    max-height: 70vh;
}

/* Correções para o player de áudio flutuante */
.floating-audio-player {
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

/* Correções para telas com alto DPI para evitar textos muito pequenos */
@media screen and (min-resolution: 192dpi) {
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    input, 
    button, 
    select, 
    textarea {
        font-size: 16px; /* Evita zoom automático em inputs no iOS */
    }
}

/* Correções para telas ultrawide (proporção 21:9) */
@media screen and (min-width: 2000px) and (max-width: 3440px) {
    .container {
        max-width: 1800px;
    }
    
    /* Ajuste para o hero em telas ultrawide */
    .hero {
        background-position: center;
    }
    
    /* Grids com mais colunas em telas ultrawide */
    .service-grid,
    .gallery-grid,
    .testimonial-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Ajustes para fontes responsivas */
html {
    font-size: 16px; /* Base font size */
}

@media screen and (min-width: 1921px) {
    html {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* Correções para retina displays (melhor legibilidade) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}