/* ===========================================================
   main.css — Template Mestre v4
   Salud Corretora — Landings de alta performance
   =========================================================== */

:root {
    --cor-primaria: #003da5;
    --cor-secundaria: #002580;
    --cor-texto: #2c2c2c;
    --cor-muted: #6c757d;
    --cor-bg: #f5f7fa;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--cor-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }

img { max-width: 100%; height: auto; }

/* Performance: força aceleração GPU em elementos animados */
.hero-section, .accordion-button, .btn { will-change: transform; }

/* Header */
.site-header { transition: box-shadow .2s ease; }

/* Hero */
.hero-section {
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    pointer-events: none;
}

/* Cards */
.card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
}

/* Botões */
.btn {
    border-radius: 8px;
    transition: all .2s ease;
    font-weight: 600;
}
.btn-lg { padding: .9rem 2rem; }

/* Acessibilidade — foco visível */
:focus-visible {
    outline: 3px solid var(--cor-primaria);
    outline-offset: 2px;
}

/* Form */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 0.25rem rgba(0,61,165,.15);
}

/* Accordion */
.accordion-button {
    padding: 1.2rem 1.5rem;
    background: #fff;
}
.accordion-button:not(.collapsed) {
    background: rgba(0, 61, 165, .04);
    color: var(--cor-primaria);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0,61,165,.15);
}

/* WhatsApp floating */
.whatsapp-floating { animation: pulse 2s infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,.4); }
    50%      { box-shadow: 0 4px 24px rgba(37,211,102,.7), 0 0 0 8px rgba(37,211,102,.15); }
}

/* Footer */
.site-footer a:hover { opacity: 1 !important; text-decoration: underline; }

/* Responsivo extra */
@media (max-width: 767.98px) {
    .display-4 { font-size: 2.2rem; }
    .display-5 { font-size: 1.9rem; }
    .display-6 { font-size: 1.6rem; }
    .py-lg-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* Print */
@media print {
    .whatsapp-floating, #cookie-banner, .navbar { display: none !important; }
}

/* HEADER MOBILE PADDING — corrige logo colada à esquerda e hamburger à direita */
.site-header .navbar.container { padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 992px) {
    .site-header .navbar.container { padding-left: var(--bs-gutter-x, .75rem); padding-right: var(--bs-gutter-x, .75rem); }
}

/* Anti-overflow universal */
html, body { overflow-x: clip; max-width: 100%; }
img, video, iframe, embed { max-width: 100%; height: auto; }

/* Cards e tabelas não estouram */
.card, .table-responsive { max-width: 100%; }
table { max-width: 100%; }

/* Hero menor em mobile */
@media (max-width: 575.98px) {
    .hero-section .display-4 { font-size: 1.8rem; }
    .hero-section .display-5 { font-size: 1.55rem; }
    .hero-section { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .btn-lg { padding: .75rem 1.25rem; font-size: 1rem; }
    .container { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* WhatsApp Gate modal cabe em telas pequenas */
.sw-gate-card { max-width: min(440px, calc(100vw - 24px)) !important; }
@media (max-width: 480px) {
    .sw-gate-card { max-width: calc(100vw - 16px) !important; }
    .sw-gate-overlay { padding: 12px !important; }
}
