/* ===== VARIABLES ===== */
:root {
    --primary: #0d47a1;
    --primary-light: #1565c0;
    --primary-dark: #002171;
    --accent: #00acc1;
    --bg: #f0f4f8;
    --white: #ffffff;
    --text: #1a2332;
    --text-muted: #5a6a7a;
    --border: #dce3eb;
    --success: #2e7d32;
    --danger: #c62828;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(13, 71, 161, 0.08);
    --shadow-hover: 0 8px 30px rgba(13, 71, 161, 0.15);
    --header-h: 72px;
    --transition: 0.25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6; color: var(--text); background: var(--bg);
    min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

.header {
    background: var(--white); box-shadow: 0 2px 16px rgba(0,0,0,.07);
    position: sticky; top: 0; z-index: 1000; height: var(--header-h);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h); gap: 12px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--primary); flex-shrink: 0; }
.logo-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.3rem;
}
.logo-text strong { display: block; font-size: 1.15rem; line-height: 1.2; }
.logo-text span {
    font-size: .7rem; color: var(--text-muted); font-weight: 400;
    display: block; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav ul { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
    display: block; padding: 8px 14px; border-radius: 8px; color: var(--text);
    font-weight: 500; font-size: .92rem; transition: all var(--transition); white-space: nowrap;
}
.nav a:hover, .nav a.active { background: #e3f2fd; color: var(--primary); }
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative; flex-shrink: 0;
}
.menu-toggle span {
    display: block; width: 24px; height: 2.5px; background: var(--primary);
    border-radius: 2px; position: absolute; left: 8px; transition: all .3s;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.hero-slider { position: relative; overflow: hidden; background: var(--primary); min-height: 380px; }
.slide {
    display: none; position: relative; min-height: 380px;
    background: linear-gradient(135deg, #002171 0%, #0d47a1 40%, #1565c0 70%, #0288d1 100%);
    color: #fff; align-items: center;
}
.slide.active { display: flex; }
.slide-content { max-width: 580px; padding: 50px 16px; animation: fadeInUp .55s ease; }
.slide-content h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 12px; line-height: 1.25; font-weight: 700; }
.slide-content p { font-size: clamp(.95rem, 2vw, 1.15rem); opacity: .92; margin-bottom: 24px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
    border-radius: 8px; font-weight: 600; border: none; cursor: pointer;
    transition: all var(--transition); font-size: .95rem; font-family: inherit;
}
.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { background: #e3f2fd; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.slider-dots button {
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff;
    background: transparent; cursor: pointer; padding: 0; transition: background .2s;
}
.slider-dots button.active { background: #fff; }
.slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.18); border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem;
    transition: background .2s; z-index: 5; display: flex; align-items: center; justify-content: center;
}
.slider-nav:hover { background: rgba(255,255,255,.35); }
.slider-prev { left: 12px; } .slider-next { right: 12px; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.section { padding: 50px 0; }
.section-alt { background: #e8f0fe; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--primary); margin-bottom: 8px; }
.section-title p { color: var(--text-muted); max-width: 560px; margin: 0 auto; font-size: .95rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
    background: var(--white); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-bottom: 14px;
}
.card h3 { margin-bottom: 6px; color: var(--text); font-size: 1.05rem; }
.card p { color: var(--text-muted); font-size: .9rem; }
.spec-card, .conv-card { text-align: center; padding: 28px 20px; }
.spec-card .card-icon { margin: 0 auto 14px; width: 60px; height: 60px; font-size: 1.5rem; }
.conv-card .conv-logo {
    width: 64px; height: 64px; margin: 0 auto 14px; background: #e3f2fd; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--primary);
}
.conv-card a.site-link { display: inline-block; margin-top: 10px; font-size: .85rem; font-weight: 600; }

.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff; padding: 40px 0; text-align: center;
}
.page-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 6px; }
.page-header p { opacity: .9; font-size: .95rem; }
.content-box {
    background: var(--white); border-radius: var(--radius); padding: 32px 24px;
    box-shadow: var(--shadow); margin-top: -24px; position: relative; z-index: 1;
    overflow: hidden;
    max-width: 100%;
}
.content-box h3 { color: var(--primary); margin: 20px 0 10px; }
.content-box p { margin-bottom: 10px; }
.content-box ul { margin: 10px 0 10px 20px; list-style: disc; }
.content-box ul li { margin-bottom: 5px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; color: var(--text); font-size: .92rem; }
.form-control {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 1rem; transition: border-color .2s, box-shadow .2s; font-family: inherit; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
textarea.form-control { min-height: 130px; resize: vertical; }
select.form-control { appearance: auto; }
.btn-submit { background: var(--primary-light); color: #fff; padding: 13px 28px; }
.btn-submit:hover { background: var(--primary); }
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .92rem; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.contact-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-bottom: 28px;
    max-width: 100%;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.contact-item i {
    font-size: 1.25rem;
    color: var(--primary-light);
    margin-top: 2px;
    flex-shrink: 0;
}
.contact-item > div {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 0;
    line-height: 1.45;
    overflow: hidden;
}
.contact-item > div,
.contact-item a,
.contact-item .contact-email {
    color: inherit;
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: normal;
}
@media (min-width: 900px) {
    .contact-info { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .contact-info { grid-template-columns: minmax(0, 1fr); }
}

.footer { background: var(--primary-dark); color: #bbdefb; padding: 40px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding-bottom: 28px; }
.footer h4 { margin-bottom: 14px; font-size: 1.05rem; color: #fff; }
.footer a { color: #90caf9; } .footer a:hover { color: #fff; }
.footer ul li { margin-bottom: 7px; }
.footer p { font-size: .9rem; margin-bottom: 6px; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center; color: #fff; transition: background .2s;
}
.footer-social a:hover { background: rgba(255,255,255,.25); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .85rem;
}
.admin-link a { color: #64b5f6; font-size: .82rem; }

.admin-body { background: #eef2f7; }
.admin-sidebar {
    width: 250px; background: var(--primary-dark); color: #fff; min-height: 100vh;
    position: fixed; left: 0; top: 0; padding: 20px 0; z-index: 100; overflow-y: auto;
}
.admin-sidebar .logo { padding: 0 20px 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; color: #fff; }
.admin-sidebar .logo-icon { background: rgba(255,255,255,.15); }
.admin-sidebar nav a {
    display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #90caf9; font-size: .92rem; transition: all .2s;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-content { margin-left: 250px; padding: 28px 24px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.admin-header h1 { font-size: 1.4rem; color: var(--primary); }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: #f5f8fb; font-weight: 600; color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.btn-edit { background: #e3f2fd; color: #1565c0; border: none; cursor: pointer; }
.btn-delete { background: #ffebee; color: #c62828; border: none; cursor: pointer; }
.btn-add { background: var(--primary-light); color: #fff; }
.btn-add:hover { background: var(--primary); }
.login-box {
    max-width: 400px; margin: 60px auto; background: #fff; border-radius: var(--radius);
    padding: 36px 28px; box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.login-box h1 { text-align: center; color: var(--primary); margin-bottom: 6px; font-size: 1.4rem; }
.login-box .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: .9rem; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }

@media (max-width: 992px) { .admin-form-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .logo-text span { display: none; }
    .menu-toggle { display: block; }
    .nav {
        display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
        background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.1); padding: 8px 12px 16px;
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .nav.open { display: block; }
    .nav ul { flex-direction: column; gap: 2px; }
    .nav a { padding: 12px 16px; font-size: 1rem; }
    .hero-slider, .slide { min-height: 320px; }
    .slide-content { padding: 36px 16px; }
    .slider-nav { width: 34px; height: 34px; font-size: .85rem; }
    .section { padding: 36px 0; }
    .content-box { overflow-wrap: anywhere;  padding: 24px 16px; margin-top: -16px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .admin-sidebar { width: 100%; position: relative; min-height: auto; padding: 12px 0; }
    .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px; }
    .admin-sidebar nav a { padding: 8px 12px; font-size: .82rem; border-radius: 6px; }
    .admin-content { margin-left: 0; padding: 16px 12px; }
    .cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .logo-text strong { font-size: 1rem; }
    .logo-icon { width: 38px; height: 38px; font-size: 1.1rem; }
    .slide-content h1 { font-size: 1.4rem; }
    .btn { padding: 10px 20px; font-size: .88rem; }
    .contact-info { grid-template-columns: 1fr; }
    .page-header { padding: 28px 0; }
}

/* ===== EMERGENCY BAR ===== */
.emergency-bar {
    background: #b71c1c;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
}
.emergency-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.emergency-phone {
    color: #fff;
    background: rgba(255,255,255,.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    transition: background .2s;
}
.emergency-phone:hover { background: rgba(255,255,255,.3); color: #fff; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, .45);
    z-index: 999;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, .55);
    color: #fff;
}
.wa-tooltip {
    position: absolute;
    right: 70px;
    background: #1b5e20;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    font-weight: 600;
}
.whatsapp-float:hover .wa-tooltip { opacity: 1; }

/* ===== EQUIPE ===== */
.equipe-card {
    text-align: center;
    padding: 28px 20px;
}
.equipe-foto {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid #e3f2fd;
    background: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}
.equipe-foto img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.equipe-card .crm {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.equipe-card .espec-tag {
    display: inline-block;
    background: #e3f2fd;
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===== FAQ ACCORDION ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}
.faq-question:hover { color: var(--primary); }
.faq-question i { transition: transform .25s; flex-shrink: 0; color: var(--primary); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: .95rem;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px;
}

/* ===== LGPD ===== */
.lgpd-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}
.lgpd-check input { margin-top: 3px; flex-shrink: 0; }
.lgpd-check a { font-weight: 600; }

/* ===== UPLOAD PREVIEW ===== */
.upload-preview {
    max-width: 200px;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .whatsapp-float { width: 52px; height: 52px; font-size: 1.5rem; bottom: 16px; right: 16px; }
    .wa-tooltip { display: none; }
    .emergency-inner { justify-content: center; text-align: center; font-size: .82rem; }
}
/* Mapa estrutura */
.mapa-wrap {
    width: 100%;
    min-height: 320px;
    background: #e8eef5;
}
.mapa-wrap iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
}
@media (max-width: 768px) {
    .mapa-wrap iframe { height: 280px; }
}

/* Logo imagem configurável */
.logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
    background: #fff;
}
@media (max-width: 480px) {
    .logo-img { width: 38px; height: 38px; }
}

.footer-institucional {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 14px 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: .82rem;
    color: #90caf9;
}
.footer-institucional span { display: inline-block; }

/* Depoimentos */
.depoimento-card {
    text-align: left;
}
.depoimento-card .quote-icon {
    color: var(--primary-light);
    font-size: 1.4rem;
    margin-bottom: 10px;
    opacity: .7;
}
.depoimento-card .autor {
    margin-top: 14px;
    font-weight: 600;
    color: var(--text);
    font-size: .92rem;
}
.depoimento-card .autor span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: .85rem;
}

/* Quebra textos longos (e-mails, URLs) dentro dos cards */


/* Depoimentos: cards com largura fixa (não esticam se houver poucos) */
.depoimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}
.depoimentos-grid .depoimento-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    box-sizing: border-box;
}
.deps-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}
.deps-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, opacity .2s;
}
.deps-btn:hover:not(:disabled) { background: var(--primary-dark); }
.deps-btn:disabled { opacity: .35; cursor: not-allowed; }
.deps-page-info {
    font-weight: 600;
    color: var(--primary);
    min-width: 48px;
    text-align: center;
}
@media (max-width: 600px) {
    .depoimentos-grid {
        grid-template-columns: 1fr;
    }
    .depoimentos-grid .depoimento-card {
        max-width: 100%;
    }
}
