/* Cores personalizadas e fontes */
:root {
    --cor-fundo: #fefae0;
    --cor-primaria: #3498db;
    --cor-secundaria: #90bf3f;
    --cor-texto: #374151;
    --cor-fundo-secao: #fefae0; 
}

body {
    font-family: 'Cinzel Decorative', serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
}

/* Classe para travar a rolagem do body quando o modal está aberto */
body.overflow-hidden {
    overflow: hidden;
}

/* Melhorias na Navegação */
.nav-link {
    position: relative;
    transition: color 0.3s;
    color: #3498db;
}
.nav-link:hover {
    color: #fefae0;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Cor da barra de navegação ao rolar */
.header-scrolled {
    background-color: rgba(254, 250, 224, 0.95);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Menu mobile links */
.nav-link-mobile {
    color: var(--cor-primaria);
    transition: background-color 0.2s;
}
.nav-link-mobile:hover {
    background-color: var(--cor-fundo-secao);
}

/* Estilos para o Acordeão (FAQ) */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}
.accordion-button.active .accordion-icon {
    transform: rotate(180deg);
}

/* Estilos para o slider de Antes e Depois */
.comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.comparison-slider .img-depois {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 50%; 
    height: 100%;
    object-fit: cover; 
    object-position: left; 
    overflow: hidden;
    transition: width 0.3s ease;
}

.comparison-slider .slider-handle {
    position: absolute; 
    top: 0; 
    left: 50%; 
    width: 4px; 
    height: 100%;
    background-color: #fefae0; 
    cursor: ew-resize; 
    transform: translateX(-50%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10;
}
.comparison-slider .slider-handle .handle-icon {
    background-color: #fefae0; 
    color: #3498db; 
    border-radius: 50%;
    width: 40px; 
    height: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.2rem; 
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Efeito de inclinação nos cards */
.tilt-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tilt-card:hover {
    transform: translateY(-10px) perspective(1000px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Botão Voltar ao Topo e outros botões de ação */
.action-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 100;
}
#ai-assistant-button {
    bottom: 80px;
    display: block;
}

/* Modal do Assistente AI */
#ai-modal-overlay {
    transition: opacity 0.3s ease;
}
#ai-modal-panel {
    transition: transform 0.3s ease;
}

/* Classes de utilidade personalizadas */
.scroll-smooth {
    scroll-behavior: smooth;
}

.page-section {
    position: relative;
    z-index: 1;
}

/* Fix para overlapping de elementos na seção sobre */
#sobre .grid > div {
    position: relative;
    z-index: 2;
}

#sobre .relative.h-96 {
    z-index: 1;
}

/* Mobile-first responsive improvements */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-24 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .text-3xl, .text-4xl {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .text-2xl {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .mb-16, .mb-12 {
        margin-bottom: 2rem;
    }
    
    .gap-12 {
        gap: 1rem;
    }
    
    /* Better button styling for mobile */
    .btn, button {
        min-height: 44px;
        font-size: 1rem;
    }
    
    /* Improved form inputs for mobile */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better FAQ accordion for mobile */
    .accordion-content {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Responsividade adicional */
@media (max-width: 768px) {
    .comparison-slider .slider-handle .handle-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .tilt-card:hover {
        transform: translateY(-5px);
    }
    
    /* Fix para seção sobre em mobile */
    #sobre .relative.h-96 {
        height: 300px;
    }
    
    #sobre .relative.h-96 img {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 1rem;
        z-index: 1 !important;
    }
    
    #sobre .relative.h-96 img:last-child {
        margin-bottom: 0;
    }
    
    /* Mobile comparison slider improvements */
    .comparison-slider {
        min-height: 200px;
        background: #f8f9fa;
        border: 2px solid #e9ecef;
        position: relative;
    }
    
    .comparison-slider img {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .comparison-slider-mobile {
        position: relative;
    }
    
    .comparison-slider-mobile.toggled .img-depois {
        width: 100% !important;
        z-index: 10;
    }
    
    .comparison-slider-mobile.toggled .comparison-slider > img {
        opacity: 0;
    }
    
    .mobile-toggle-info {
        padding: 8px;
        background: rgba(59, 130, 246, 0.1);
        border-radius: 6px;
        border-left: 3px solid #3b82f6;
    }
    
    .mobile-toggle-info .toggle-indicator {
        font-weight: 600;
        color: #3b82f6;
    }
    
    .mobile-toggle-info .before-label {
        color: #6b7280;
    }
    
    /* Card spacing adjustments for mobile */
    .tilt-card {
        margin-bottom: 1rem;
    }
    
    /* Better text sizing for mobile */
    .tilt-card h4 {
        line-height: 1.3;
    }
    
    .tilt-card p {
        line-height: 1.5;
    }
}

/* Animações personalizadas */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

/* Sistema simples e eficaz de antes/depois */
.before-after-container {
    margin-bottom: 1rem;
}

.before-after-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    border: 2px solid transparent;
}

.before-after-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.before-after-btn.active {
    background: var(--cor-primaria) !important;
    color: white !important;
    border-color: var(--cor-secundaria);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.image-container {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    max-height: 300px;
    transition: all 0.3s ease;
}

.image-container:hover {
    border-color: var(--cor-primaria);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.before-after-img {
    transition: opacity 0.5s ease;
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.before-after-img.active {
    opacity: 1;
    z-index: 2;
}

.before-after-img:not(.active) {
    opacity: 0;
    z-index: 1;
}

/* Responsividade melhorada */
@media (max-width: 640px) {
    .image-container {
        min-height: 250px !important;
        max-height: 250px !important;
    }
    
    .before-after-btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
        border-radius: 15px !important;
    }
}

@media (min-width: 1024px) {
    .image-container {
        min-height: 350px !important;
        max-height: 350px !important;
    }
}
