/* Estilos customizados para otimização e melhorias */

/* Hero section otimizado */
.hero-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fallback para classes que podem ter problemas de cache */
.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.bg-black {
    background-color: #000 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

.opacity-0 {
    opacity: 0 !important;
}

/* Hero specific styles */
.hero-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Lazy loading para imagens */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Otimização de imagens responsivas */
@media (max-width: 640px) {
    .hero-slide-1,
    .hero-slide-2,
    .hero-slide-3 {
        background-attachment: scroll;
    }
}

/* Animações suaves para galeria */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Melhorias para depoimentos */
.testimonial-image {
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease;
}

.testimonial-image:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Botão WhatsApp personalizado */
.whatsapp-float {
    animation: pulse-whatsapp 2s infinite;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    }
}

/* Melhorias para mobile */
@media (max-width: 768px) {
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .testimonial-image {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Preload crítico de imagens */
.preload-hero {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Efeitos de transição suaves */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Melhorias para acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Gallery Modal Styles */
#imageModal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#imageModal.hidden {
    animation: fadeOut 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

#modalImage {
    transition: opacity 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Navigation buttons */
#prevImage, #nextImage {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#prevImage:hover, #nextImage:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#closeModal {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#closeModal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#imageCounter {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

/* Mobile responsive adjustments for modal */
@media (max-width: 768px) {
    #prevImage, #nextImage {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    #prevImage {
        left: 10px;
    }
    
    #nextImage {
        right: 10px;
    }
    
    #closeModal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    #modalImage {
        max-height: 70vh;
    }
}

/* Enhanced gallery item hover effects */
.gallery-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Swiper pagination fix - posicionar fixo no bottom da section */
.testimonials-swiper {
    padding-bottom: 4rem; /* Espaço para a paginação */
}

#depoimentos .swiper-pagination {
    position: absolute;
    bottom: 1rem !important;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 10;
    margin-top: 0; /* Remove margin-top anterior */
}

#depoimentos .container-custom {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Otimizações para SEO - structured data visual hints */
.structured-data {
    position: relative;
}

.structured-data::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}