/* Estilos Principais - Igreja Verbo da Vida - Pedro Leopoldo */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #383f51 0%, #2c3340 50%, #1e2329 100%);
    min-height: 100vh;
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px 0 0 0;
    margin: 0;
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Container principal para conteúdo */
.main-content {
    flex: 1;
    padding-bottom: 2rem;
}

/* Background Mosaico Dinâmico */
.background-mosaic {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.mosaic-tile {
    position: absolute;
    background-size: 140%; /* Aumentado em 40% */
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Reduzido de 2s para 1s */
    filter: blur(0.5px);
}

.mosaic-tile.active {
    opacity: 0.8; /* Aumentado para melhor visibilidade */
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        135deg, 
        rgba(56, 63, 81, 0.85) 0%, 
        rgba(44, 51, 64, 0.8) 50%, 
        rgba(30, 35, 41, 0.9) 100%
    );
    z-index: -1;
    transition: background 3s ease-in-out;
}

.background-overlay.dark-mode {
    background: linear-gradient(
        135deg, 
        rgba(56, 63, 81, 0.95) 0%, 
        rgba(44, 51, 64, 0.9) 50%, 
        rgba(30, 35, 41, 0.95) 100%
    );
}

/* Micro-interações e animações */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.skeleton-title {
    height: 2rem;
    width: 70%;
    margin: 0 auto 1.5rem auto;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
}

.skeleton-button {
    height: 3rem;
    width: 280px;
    margin: 0 auto;
    border-radius: 50px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #383f51;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 350px;
    border-radius: 15px;
    margin-top: 35px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.evento-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.evento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.evento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #bca488, #c7a687, #d4b496);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.evento-card:hover::before {
    opacity: 1;
}

.evento-content {
    padding: 2rem;
    height: 100%;
}

.evento-img {
    width: 100%;
    height: 250px; /* Altura fixa para manter proporção 16:9 */
    border-radius: 16px;
    margin-bottom: 1.5rem;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover; /* Recorta as imagens 1920x1080 mantendo proporção */
    object-position: center; /* Centraliza a imagem no recorte */
    display: block;
}

.evento-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Garantir formato 16:9 para imagens lazy load (1920x1080) */
.lazy-load {
    width: 100% !important;
    height: 250px !important; /* Altura fixa proporcional ao card */
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
}

/* Para containers menores - responsivo */
@media (max-width: 768px) {
    .lazy-load {
        height: 200px !important;
    }
}

@media (max-width: 576px) {
    .lazy-load {
        height: 180px !important;
    }
}

/* Sobrescrever comportamento do flexbox para manter aspect-ratio das imagens */
.evento-content .evento-img.flex-grow-1 {
    flex-grow: 0 !important; /* Remove flex-grow que quebra aspect-ratio */
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    width: 100% !important;
    height: auto !important; /* Crucial para aspect-ratio funcionar */
}

/* Container flexbox ajustado para suportar aspect-ratio */
.evento-content.d-flex.flex-column {
    overflow: hidden; /* Previne overflow que quebra aspect-ratio */
}

.evento-title {
    font-weight: 700;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 1.5rem;
    color: #2c3340;
    text-align: center;
    line-height: 1.3;
    letter-spacing: -0.02em;
    height: 3.5em; /* Altura fixa para 2-3 linhas de texto */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Corta texto extra se muito longo */
}

.btn-container {
    text-align: center;
}

.btn-custom {
    background: linear-gradient(135deg, #383f51 0%, #2c3340 100%);
    border: none;
    width: 100%;
    max-width: 280px;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 0.875rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: clamp(1rem, 3vw, 1.125rem);
    box-shadow: 0 4px 15px rgba(56, 63, 81, 0.3);
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-custom:hover {
    background: linear-gradient(135deg, #bca488 0%, #c7a687 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(188, 164, 136, 0.4);
    color: white;
}

.btn-custom:active {
    transform: translateY(0) scale(0.98);
    animation: pulse 0.3s ease;
}

.btn-custom:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(188, 164, 136, 0.3);
}

.btn-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0%, 66.66% {
        left: -100%;
    }
    83.33% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.titulo {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #bca488, #d4b496);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
}

.admin-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-btn .btn {
    background-color: #c7a687;
    border: none;
    color: white;
    transition: background-color 0.3s ease;
}

.admin-btn .btn:hover {
    background-color: #bca488;
}

.admin-btn .fas.fa-cog {
    color: #383f51;
}

.admin-btn .btn-text {
    margin-left: 8px;
}

.input-group .form-control {
    border-left: none;
}

.input-group .input-group-text {
    background-color: #e9ecef;
    border-right: none;
    cursor: pointer;
}

#scrollArrow {
    width: 100px;
    height: 100px;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, rgba(56, 63, 81, 0.95) 0%, rgba(44, 51, 64, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: auto;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Footer redesenhado - linha única */
.footer-content-single-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #bca488;
    font-size: 0.95rem;
    font-weight: 500;
    flex-wrap: wrap;
}

.footer-logo {
    height: 40px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer .container {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Garantir que não há espaço extra no final da página */
body::after {
    content: '';
    display: block;
    height: 0;
    clear: both;
}

/* Remover margens padrão do Bootstrap */
.container, .container-fluid {
    margin-bottom: 0;
}

/* Garantir que o footer fique realmente no bottom */
html, body {
    overflow-x: hidden;
}

.footer-title {
    font-weight: 700;
    color: #d4b496;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 400;
}

.footer-heart {
    color: #e74c3c;
    font-size: 1.2rem;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 50%, 100% {
        transform: scale(1);
    }
    25%, 75% {
        transform: scale(1.1);
    }
}

/* Media Queries */
@media (max-width: 767px) {
    body {
        padding: 10px 0 0 0;
    }
    
    .main-content {
        padding-bottom: 1rem;
    }
    
    .site-footer {
        padding: 1rem 0;
    }

    #scrollArrow {
        width: 60px;
        height: 60px;
    }

    .logo {
        max-width: 300px;
        border-radius: 15px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .evento-content {
        padding: 1.5rem;
    }

    .evento-card {
        margin-bottom: 1.5rem;
    }

    .evento-title {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        margin-bottom: 1rem;
    }

    .evento-img {
        margin-bottom: 1rem;
    }

    .btn-container {
        text-align: center;
        margin-bottom: 0;
    }

    .btn-custom {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
        max-width: 250px;
    }

    .admin-btn {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
    }

    .admin-btn .btn-text {
        display: none;
    }

    .titulo {
        font-size: clamp(1.25rem, 6vw, 1.75rem);
        margin-bottom: 1rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }

    .footer-content-single-line {
        flex-direction: column;
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .footer-logo {
        height: 35px;
    }

    .footer-text {
        text-align: center;
        flex-direction: column;
        gap: 0.25rem;
    }
}