/* style.css — Estilos customizados Bresa */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #2B5BA8;
    border-radius: 4px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Transição suave ao trocar tema */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Evitar FOUC no tema */
html:not(.dark):not(.light-loaded) {
    visibility: hidden;
}

/* Hero gradiente (fallback) */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
.light .hero-gradient,
html:not(.dark) .hero-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
}

/* Hero com imagem de fundo */
.hero-section {
    min-height: 520px;
    position: relative;
    /* Remove the visual gap created by the fixed navbar spacer element */
    margin-top: -64px;
}
.hero-bg {
    z-index: 1;
}
.hero-bg img {
    object-position: center center;
}
.hero-overlay {
    z-index: 2;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.80) 0%, rgba(30, 41, 59, 0.70) 50%, rgba(15, 23, 42, 0.80) 100%);
}
html:not(.dark) .hero-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.65) 50%, rgba(15, 23, 42, 0.75) 100%);
}
@media (max-width: 768px) {
    .hero-section {
        min-height: 480px;
    }
    .hero-bg img {
        object-position: center top;
    }
}

@media (min-width: 768px) {
    .hero-section {
        margin-top: -80px;
    }
}

/* Card hover */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(43, 91, 168, 0.15);
    border-color: #2B5BA8;
}

/* Botão WhatsApp flutuante */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}
@keyframes pulse-whatsapp {
    0%, 100% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6); }
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: white;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 32px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.dark .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Trust bar contador animado */
.trust-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2B5BA8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar transparente/sólida */
.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Active nav link */
.nav-link.active {
    color: #2B5BA8;
    font-weight: 700;
    background: rgba(43, 91, 168, 0.08);
    border-radius: 8px;
}
.dark .nav-link.active {
    color: #60a5fa;
    background: rgba(43, 91, 168, 0.15);
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2B5BA8;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after {
    width: 60%;
    left: 20%;
}
.nav-link.active::after {
    width: 60%;
    left: 20%;
}

/* Seção Últimos Posts */
.latest-post-item {
    position: relative;
    padding-left: 20px;
    transition: transform 0.2s ease;
}
.latest-post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2B5BA8;
}
.latest-post-item:hover {
    transform: translateX(4px);
}

/* Form focus */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2B5BA8;
    box-shadow: 0 0 0 3px rgba(43, 91, 168, 0.2);
}

/* Swiper custom */
.swiper {
    position: relative;
}
.swiper-wrapper {
    align-items: stretch;
}
.swiper-slide {
    height: auto !important;
    display: flex !important;
}
.swiper-slide > div {
    width: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.swiper-button-next,
.swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.55);
    color: #93c5fd !important;
    backdrop-filter: blur(4px);
}
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: 700;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(15, 23, 42, 0.75);
    color: #dbeafe !important;
}
.swiper-pagination-bullet-active {
    background: #2B5BA8 !important;
}

/* Newsletter section */
.newsletter-section {
    background: linear-gradient(135deg, #2B5BA8, #1e3a6e);
}

/* Máscara CPF/CNPJ */
.input-mask::placeholder {
    color: #9ca3af;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(43, 91, 168, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive fixes */
@media (max-width: 768px) {
    .trust-number {
        font-size: 1.75rem;
    }
}
