/* 
* AD Betel - Correções de Responsividade para a Seção de Dízimos e Ofertas
* Este arquivo foca exclusivamente em melhorar a visualização desta seção em todos os tamanhos de tela
*/

/* ===== CORREÇÕES BÁSICAS PARA A SEÇÃO DE DÍZIMOS E OFERTAS ===== */

/* Estrutura básica mais robusta */
.giving-section {
    position: relative;
    overflow: hidden; /* Impede que elementos saiam do contêiner */
    padding: 100px 0 100px;
    margin: 50px 0;
    background-color: #f0f0f0;
    z-index: 1;
}

/* Melhorar alinhamento do conteúdo à esquerda */
.giving-left {
    position: relative;
    z-index: 3; /* Garantir que fique sempre visível */
    max-width: 500px;
}

/* Deixar os textos mais legíveis */
.giving-left h2 {
    font-size: 44px;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 800;
    color: #333;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.giving-left p {
    font-size: 18px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 30px;
    max-width: 450px;
}

/* Melhorar a barra laranja */
.orange-bar {
    position: absolute;
    height: 60px;
    background-color: #f15a29;
    bottom: 80px;
    right: 0;
    width: 70%;
    z-index: 1;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Melhorar a estrutura dos cards */
.giving-cards-row {
    display: flex;
    gap: 15px;
    z-index: 2;
    position: relative;
}

.giving-card {
    flex: 1;
    min-width: 250px;
    height: 380px;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Melhoria da imagem dentro do card */
.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Melhoria nos overlays */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: white;
    transition: all 0.4s ease;
}

.card-overlay h2 {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.overlay-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.giving-card:hover .overlay-content {
    max-height: 250px;
    opacity: 1;
    margin-top: 15px;
}

.giving-card:hover .card-overlay {
    background: rgba(0,0,0,0.85);
    height: auto;
    padding-bottom: 30px;
}

/* Efeito de hover melhorado */
.giving-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.giving-card:hover .card-image {
    transform: scale(1.05);
}

/* ===== CORREÇÕES PARA TELAS GRANDES (TVs, Monitores ultrawide) ===== */
@media screen and (min-width: 1921px) {
    .giving-section {
        padding: 150px 0;
    }
    
    .giving-left {
        max-width: 650px;
    }
    
    .giving-left h2 {
        font-size: 60px;
    }
    
    .giving-left p {
        font-size: 22px;
        max-width: 600px;
    }
    
    .giving-cards-row {
        width: 60%;
        right: 5%;
        gap: 30px;
    }
    
    .giving-card {
        min-width: 350px;
        height: 450px;
    }
    
    .orange-bar {
        height: 80px;
        width: 65%;
    }
    
    /* Melhorar o posicionamento para telas muito grandes */
    .giving-section .container {
        max-width: 1800px;
        display: flex;
        align-items: center;
    }
}

/* ===== CORREÇÕES PARA DESKTOP NORMAL ===== */
@media screen and (min-width: 1200px) and (max-width: 1920px) {
    .giving-section {
        position: relative;
        padding: 120px 0;
    }
    
    .giving-section .container {
        display: flex;
        position: relative;
    }
    
    .giving-left {
        width: 35%;
        padding-right: 20px;
    }
    
    .giving-cards-row {
        position: absolute;
        right: 0;
        width: 65%;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .giving-card {
        flex: 1;
        min-width: 0; /* Permite que os cards se comprima um pouco */
        max-width: 33.333%;
    }
    
    .giving-card:nth-child(1) {
        margin-top: -20px;
    }
    
    .giving-card:nth-child(2) {
        margin-top: 30px;
    }
    
    .giving-card:nth-child(3) {
        margin-top: 0px;
    }
    
    .orange-bar {
        bottom: 80px;
        height: 60px;
    }
}

/* ===== CORREÇÕES PARA TABLETS ===== */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .giving-section {
        padding: 80px 0;
    }
    
    .giving-section .container {
        position: relative;
    }
    
    .giving-left {
        width: 100%;
        max-width: 100%;
        text-align: center;
        margin-bottom: 50px;
    }
    
    .giving-left h2, 
    .giving-left p {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    .giving-cards-row {
        width: 100%;
        position: relative;
        justify-content: center;
        gap: 20px;
    }
    
    .giving-card {
        flex: 0 0 calc(33.333% - 20px);
        margin-top: 0 !important;
        height: 350px;
    }
    
    .orange-bar {
        display: none; /* Remover em tablets para layout mais limpo */
    }
}

/* ===== CORREÇÕES PARA SMARTPHONES GRANDES ===== */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .giving-section {
        padding: 60px 0;
    }
    
    .giving-left {
        width: 100%;
        text-align: center;
        margin-bottom: 40px;
    }
    
    .giving-left h2 {
        font-size: 36px;
    }
    
    .giving-left p {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    .giving-cards-row {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .giving-card {
        flex: 0 0 100%;
        max-width: 400px;
        width: 90%;
        height: 300px;
        margin: 0 !important;
    }
    
    .orange-bar {
        display: none;
    }
    
    .card-overlay {
        padding: 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
    }
    
    .card-overlay h2 {
        font-size: 22px;
    }
}

/* ===== CORREÇÕES PARA SMARTPHONES PEQUENOS ===== */
@media screen and (max-width: 480px) {
    .giving-section {
        padding: 50px 0;
    }
    
    .giving-left {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .giving-left h2 {
        font-size: 30px;
    }
    
    .giving-left p {
        font-size: 16px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    .giving-cards-row {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .giving-card {
        flex: 0 0 100%;
        width: 90%;
        max-width: 320px;
        height: 280px;
        margin: 0 !important;
    }
    
    .card-overlay {
        padding: 12px;
    }
    
    .card-overlay h2 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .overlay-content p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .orange-bar {
        display: none;
    }
}

/* ===== CORREÇÕES PARA DISPOSITIVOS EM MODO PAISAGEM ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .giving-section {
        padding: 40px 0;
    }
    
    .giving-left {
        width: 40%;
        padding-right: 20px;
    }
    
    .giving-left h2 {
        font-size: 28px;
    }
    
    .giving-left p {
        font-size: 14px;
    }
    
    .giving-cards-row {
        width: 60%;
        position: relative;
        right: 0;
    }
    
    .giving-card {
        height: 250px;
    }
    
    .card-overlay h2 {
        font-size: 18px;
    }
    
    .overlay-content p {
        font-size: 13px;
        line-height: 1.3;
    }
}

/* ===== AJUSTES DE ANIMAÇÃO MAIS SUAVES ===== */
/* Estes ajustes melhoram a performance em dispositivos menos potentes */

/* Versão otimizada da animação de deslizamento para texto */
@keyframes slideInText {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-text {
    transform: translateX(0);
    opacity: 0;
    animation: slideInText 0.5s ease-out forwards;
}

.giving-left h2 {
    animation-delay: 0.1s;
}

.giving-left p {
    animation-delay: 0.2s;
}

/* Versão otimizada da animação da barra laranja */
@keyframes slideInBar {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.orange-bar {
    transform: translateX(100%);
    animation: slideInBar 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

/* Versão otimizada do fade-in para cards */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.giving-card {
    opacity: 0;
    animation: cardFadeIn 0.5s ease-out forwards;
}

.giving-card:nth-child(1) {
    animation-delay: 0.4s;
}

.giving-card:nth-child(2) {
    animation-delay: 0.6s;
}

.giving-card:nth-child(3) {
    animation-delay: 0.8s;
}

/* ===== OTIMIZAÇÕES PARA MELHOR PERFORMANCE VISUAL ===== */

/* Melhorar aparência em telas de alta resolução */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .giving-left h2,
    .card-overlay h2 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .card-image {
        transform: translateZ(0); /* Ativa aceleração por hardware */
    }
}

/* Adicionar smooth scroll para toda a seção */
html {
    scroll-behavior: smooth;
}

/* Melhorar a aparência do texto nos overlays */
.overlay-content p {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Melhorar visualização de linha divisória */
.overlay-content p[style*="line-height: 1;"] {
    opacity: 0.6;
    letter-spacing: 2px;
}

/* Destacar elementos importantes */
.overlay-content p span[style*="font-family: 'HelveticaNowDisplayBold'"] {
    font-weight: 700;
    color: #f15a29;
}

/* Corrigir cor dos links no overlay para melhor legibilidade */
.overlay-content a {
    color: #f15a29;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.overlay-content a:hover {
    color: #fff;
    text-decoration: none;
}