/* ==========================================================
   GABINETE DIGITAL — VEREADOR JOEL VARGAS
   Identidade institucional: azul profundo, azul vivo e dourado.
   ========================================================== */
:root {
    color-scheme: light;
    --primary: #0b4f91;
    --primary-strong: #083a70;
    --secondary: #081f43;
    --accent: #edb84e;
    --accent-deep: #cf9227;
    --light: #f3f6fb;
    --dark: #15243a;
    --muted: #66758a;
    --white: #fff;
    --border-color: #e2e8f0;
    --instagram: #d94682;
    --facebook: #1877f2;
    --shadow-sm: 0 6px 18px rgba(9, 34, 69, .06);
    --shadow-md: 0 16px 40px rgba(9, 34, 69, .09);
    --shadow-lg: 0 28px 70px rgba(4, 25, 54, .20);
    --radius: 18px;
    --transition: 220ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body {
    margin: 0;
    overflow-x: hidden;
    background: #fff;
    color: var(--dark);
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(237, 184, 78, .85); outline-offset: 3px; }
.container { width: min(100% - 44px, 1240px); margin-inline: auto; }
.sr-only, .sr-only-focusable:not(:focus) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sr-only-focusable:focus {
    z-index: 3000; top: 12px; left: 12px; width: auto; height: auto; margin: 0;
    padding: 12px 16px; clip: auto; background: #fff; color: var(--secondary);
    border-radius: 10px; box-shadow: var(--shadow-md);
}

/* Header and navigation */
.main-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(221,230,241,.85);
    box-shadow: 0 5px 24px rgba(7,31,65,.045);
    backdrop-filter: blur(16px);
}
.main-header nav.container {
    min-height: 82px; display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.brand { flex: 0 0 auto; }
.brand-link { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.logo-text { color: var(--secondary); font-size: 1.28rem; font-weight: 500; letter-spacing: -.07em; }
.logo-text strong { color: var(--primary); font-weight: 800; }
.sub-text { margin-top: 6px; color: #758399; font-size: .61rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 24px); margin: 0; padding: 0; list-style: none; }
.nav-links a {
    position: relative; display: inline-block; padding: 10px 0; color: #34445b;
    text-decoration: none; font-size: .79rem; font-weight: 800; white-space: nowrap;
    transition: color var(--transition);
}
.nav-links a::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: 3px; height: 2px;
    background: var(--accent); transition: right var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { right: 0; }
.social-quick { display: flex; align-items: center; gap: 9px; }
.social-icon {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff; text-decoration: none; box-shadow: var(--shadow-sm);
    transition: transform var(--transition), filter var(--transition);
}
.social-icon[hidden] { display: none; }
.social-icon.instagram { background: var(--instagram); }
.social-icon.facebook { background: var(--facebook); }
.social-icon svg { width: 16px; height: 16px; fill: currentColor; }
.social-icon:hover { transform: translateY(-3px); filter: brightness(1.08); }
.menu-toggle { display: none; width: 44px; height: 42px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; border-radius: 5px; background: var(--secondary); transition: var(--transition); }

/* Hero */
.hero-section {
    position: relative; isolation: isolate; overflow: hidden; padding: 86px 0 94px;
    color: #fff; text-align: center;
    background:
        radial-gradient(circle at 13% 18%, rgba(51,143,220,.28), transparent 28%),
        radial-gradient(circle at 88% 75%, rgba(237,184,78,.14), transparent 25%),
        linear-gradient(128deg, #071c3c 0%, #0a376b 53%, #0a579a 100%);
}
.hero-section::before, .hero-section::after {
    content: ''; position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%; pointer-events: none;
}
.hero-section::before { width: 520px; height: 520px; top: -330px; left: -120px; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); }
.hero-section::after { width: 600px; height: 600px; right: -260px; bottom: -460px; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.02); }
.hero-content { position: relative; max-width: 900px; }
.hero-image-container { margin: 0 auto 26px; width: 206px; height: 206px; position: relative; }
.hero-image-container::before {
    content: ''; position: absolute; inset: -10px; border: 1px solid rgba(237,184,78,.75);
    border-radius: 50%; box-shadow: 0 0 0 8px rgba(237,184,78,.08);
}
.hero-capa {
    width: 100%; height: 100%; object-fit: cover; object-position: center 34%;
    border: 5px solid rgba(255,255,255,.9); border-radius: 50%;
    box-shadow: 0 22px 55px rgba(0,0,0,.28);
    transition: transform 350ms cubic-bezier(.2,.8,.2,1);
}
.hero-capa:hover { transform: scale(1.035); }
.hero-content h1 { max-width: 850px; margin: 0 auto 17px; font-size: clamp(2.1rem, 4.6vw, 3.65rem); line-height: 1.13; font-weight: 800; letter-spacing: -.055em; }
.hero-content p { max-width: 690px; margin: 0 auto; color: rgba(255,255,255,.82); font-size: clamp(.98rem, 1.5vw, 1.14rem); line-height: 1.85; }
.hero-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-primary, .btn-secondary {
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
    margin: 0; padding: 12px 22px; border: 1px solid transparent; border-radius: 999px;
    text-decoration: none; font-size: .88rem; font-weight: 800; transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}
.btn-primary { background: var(--accent); color: #182a43; box-shadow: 0 10px 25px rgba(237,184,78,.24); }
.btn-primary:hover { background: #f6c967; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(237,184,78,.32); }
.btn-secondary { border-color: rgba(255,255,255,.48); color: #fff; background: rgba(255,255,255,.055); }
.btn-secondary:hover { background: #fff; color: var(--primary-strong); transform: translateY(-2px); }

/* Stats */
.stats-bar { position: relative; z-index: 2; padding: 0 0 34px; background: #f3f6fb; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; transform: translateY(-30px); }
.stat-item { min-height: 118px; display: flex; flex-direction: column; justify-content: center; padding: 20px 16px; border: 1px solid #e8edf5; border-radius: 17px; background: #fff; text-align: center; box-shadow: var(--shadow-md); }
.stat-number { color: var(--primary); font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.2; }
.stat-label { margin-top: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

/* Section headings and projects */
section#projetos { padding: 62px 0 76px; }
.section-title { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.section-title h2, .contact-info h2 { margin: 0 0 12px; color: var(--secondary); font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.2; letter-spacing: -.045em; }
.section-title h2::after { content: ''; display: block; width: 54px; height: 4px; margin: 16px auto 0; border-radius: 9px; background: var(--accent); }
.section-title p { margin: 0; color: var(--muted); font-size: .98rem; }
.projects-container { display: grid; gap: 20px; }
.project-card { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 25px; border: 1px solid var(--border-color); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease; }
.project-card:hover { transform: translateY(-5px); border-color: #c6d8ee; box-shadow: var(--shadow-md); }
.project-card h3 { margin: 0 0 10px; color: var(--secondary); font-size: 1.13rem; line-height: 1.35; }
.project-card p { margin: 0 0 18px; color: var(--muted); font-size: .88rem; line-height: 1.8; }
.main-project { overflow: hidden; padding: 38px; border-color: rgba(20,92,158,.15); background: linear-gradient(120deg, #edf5ff, #f8fbff 70%, #fffaf0); }
.main-project::before { content: ''; position: absolute; right: -60px; top: -100px; width: 260px; height: 260px; border: 1px solid rgba(11,79,145,.10); border-radius: 50%; box-shadow: 0 0 0 35px rgba(11,79,145,.025), 0 0 0 70px rgba(11,79,145,.018); }
.main-project h3 { max-width: 760px; font-size: 1.5rem; }
.main-project p { max-width: 880px; color: #51647d; }
.project-tag { position: absolute; top: 24px; right: 24px; z-index: 1; padding: 6px 12px; border-radius: 999px; background: #f8e8c7; color: #7a5418; font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.project-features { display: flex; flex-wrap: wrap; gap: 9px; margin: 4px 0 22px; padding: 0; list-style: none; }
.project-features li { padding: 7px 11px; border: 1px solid #d9e8f8; border-radius: 999px; background: rgba(255,255,255,.72); color: var(--primary); font-size: .77rem; font-weight: 700; }
.btn-text, .btn-link { align-self: flex-start; margin-top: auto; color: var(--primary); font-size: .84rem; font-weight: 800; text-decoration: none; }
.btn-text:hover, .btn-link:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 4px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.card-meta { display: inline-block; margin-bottom: 12px; color: var(--accent-deep); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* Activity map preview */
.bg-light { padding: 76px 0; background: linear-gradient(180deg, #f4f7fb, #edf3fa); }
.map-preview-container { display: grid; grid-template-columns: 370px minmax(0,1fr); overflow: hidden; border: 1px solid #e3eaf3; border-radius: 22px; background: #fff; box-shadow: var(--shadow-md); }
.map-sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; background: #fff; border-right: 1px solid var(--border-color); }
.sidebar-map-header h3 { margin: 0 0 5px; color: var(--secondary); font-size: 1.15rem; }
.map-sidebar-desc { margin: 0; color: var(--muted); font-size: .8rem; }
.visit-list { margin: 18px 0 24px; padding: 0; list-style: none; }
.visit-list li { display: flex; align-items: flex-start; gap: 11px; padding: 13px 0; border-bottom: 1px solid #edf1f6; }
.visit-list li:last-child { border-bottom: 0; }
.visit-list strong { display: block; margin-bottom: 3px; color: #283d58; font-size: .82rem; }
.visit-detail-text { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.badge-blue, .badge-green, .badge-orange { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; color: #fff; font-size: .59rem; font-weight: 800; letter-spacing: .04em; }
.badge-blue { background: #1767aa; }
.badge-green { background: #239568; }
.badge-orange { background: #cb8a24; }
.map-btn-call { width: 100%; text-align: center; }
.map-graphic-callout {
    position: relative; min-height: 475px; display: grid; place-items: center; overflow: hidden; padding: 28px;
    background-color: #e4edf5;
    background-image: linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px), radial-gradient(circle at 20% 25%, #c7dce9, transparent 35%), radial-gradient(circle at 75% 70%, #d2e5d7, transparent 36%), linear-gradient(140deg,#cbdce9,#e9eee6);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
}
.map-graphic-callout::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(5,33,68,.10), rgba(5,33,68,.25)); }
.map-mockup { position: relative; z-index: 1; max-width: 410px; padding: 34px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: rgba(255,255,255,.94); text-align: center; box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); }
.map-pin-pulse { width: 18px; height: 18px; margin: 0 auto 22px; border: 5px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 8px rgba(11,79,145,.15), 0 0 0 18px rgba(11,79,145,.07); }
.map-mockup p { margin: 0 0 12px; color: #52647b; font-size: .88rem; }
.map-mockup p strong { color: var(--secondary); font-size: 1rem; }
.map-mockup .mockup-subtext { margin-bottom: 22px; }
.map-mockup .btn-secondary { border-color: var(--primary); background: var(--primary); color: #fff; }
.map-mockup .btn-secondary:hover { background: var(--primary-strong); color: #fff; }

/* Contact and public service */
section#contato { padding: 78px 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: start; gap: 38px; }
.contact-info > p { margin: 0 0 22px; color: var(--muted); font-size: .94rem; }
.poll-shortcut-card { margin: 25px 0 30px; padding: 22px; border: 1px solid #f0dfbd; border-radius: 16px; background: #fffaf0; }
.poll-shortcut-card h4 { margin: 0 0 7px; color: #71501e; font-size: .95rem; }
.poll-card-text { margin: 0; color: #786b55; font-size: .84rem; }
.poll-shortcut-btn { width: 100%; margin-top: 16px; border-color: #d9a844; color: #76511a; }
.poll-shortcut-btn:hover { background: #f3dfb8; color: #4a3515; }
.info-item-container { display: grid; gap: 17px; }
.info-item { padding-left: 16px; border-left: 3px solid var(--accent); }
.info-item strong { display: block; margin-bottom: 4px; color: var(--primary); font-size: .8rem; }
.info-item p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.info-item a { color: var(--primary); font-weight: 800; text-decoration: none; }
.contact-form-box { padding: 30px; border: 1px solid var(--border-color); border-radius: 20px; background: #fff; box-shadow: var(--shadow-md); }
.form-legend { display: block; margin-bottom: 22px; color: var(--secondary); font-size: 1.08rem; font-weight: 800; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #34445b; font-size: .78rem; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #d6deea; border-radius: 10px; background: #fbfcfe; color: var(--dark); font: inherit; font-size: .87rem; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #4383bb; background: #fff; box-shadow: 0 0 0 4px rgba(11,79,145,.10); }
.form-group-checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.form-group-checkbox input { flex: 0 0 auto; width: 17px; min-height: 17px; margin-top: 3px; accent-color: var(--primary); }
.form-group-checkbox label { color: var(--muted); font-size: .72rem; line-height: 1.55; }
.btn-submit { width: 100%; min-height: 49px; padding: 13px 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-size: .88rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(11,79,145,.18); transition: background var(--transition), transform var(--transition); }
.btn-submit:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.form-status { margin: 13px 0 0; color: #718097; font-size: .73rem; line-height: 1.55; }
.form-status.is-warning { color: #9a5b13; }
.form-status.is-success { color: #18744d; }

/* Footer */
.main-footer { padding: 34px 0; background: linear-gradient(115deg, #071b38, #0b376b); color: rgba(255,255,255,.75); text-align: center; }
.footer-content p { margin: 4px 0; font-size: .76rem; }
.footer-content p:first-child { color: rgba(255,255,255,.92); font-size: .82rem; font-weight: 700; }
.footer-content p strong { color: var(--accent); }
.footer-location { margin-top: 9px !important; color: rgba(255,255,255,.55); font-size: .7rem !important; }

/* Motion and responsiveness */
.animate-hidden { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1); }
.animate-active { opacity: 1; transform: translateY(0); }
.grid-4 > .animate-hidden, .projects-grid > .animate-hidden, .visit-list > .animate-hidden { transition-delay: calc(var(--cascade-index, 0) * .09s); }
@media (max-width: 1120px) {
    .main-header nav.container { gap: 16px; }
    .nav-links { gap: 13px; }
    .nav-links a { font-size: .73rem; }
    .social-quick { display: none; }
}
@media (max-width: 920px) {
    .main-header nav.container { position: relative; min-height: 74px; }
    html.no-js .menu-toggle { display: none; }
    html.no-js .nav-links { position: static; display: flex; flex-wrap: wrap; width: 100%; padding: 8px 0; border: 0; box-shadow: none; }
    .menu-toggle { display: block; margin-left: auto; }
    .nav-links {
        position: absolute; top: calc(100% + 1px); left: 0; right: 0; z-index: 1001;
        display: none; align-items: stretch; gap: 0; padding: 10px 22px 16px;
        border: 1px solid var(--border-color); border-top: 0; border-radius: 0 0 16px 16px;
        background: rgba(255,255,255,.98); box-shadow: var(--shadow-md);
    }
    .main-header nav.menu-open .nav-links { display: flex; flex-direction: column; }
    .nav-links a { display: block; padding: 12px 4px; font-size: .86rem; }
    .nav-links a::after { display: none; }
    .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .map-preview-container { grid-template-columns: 1fr; }
    .map-sidebar { border-right: 0; border-bottom: 1px solid var(--border-color); }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .container { width: min(100% - 32px, 1240px); }
    .hero-section { padding: 64px 0 72px; }
    .hero-image-container { width: 164px; height: 164px; margin-bottom: 25px; }
    .hero-content h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
    .hero-content p { font-size: .91rem; }
    .hero-btns { gap: 9px; }
    .btn-primary, .btn-secondary { width: 100%; min-height: 47px; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; transform: translateY(-22px); }
    .stat-item { min-height: 104px; padding: 15px 8px; }
    .stat-number { font-size: 1.8rem; }
    .stat-label { font-size: .58rem; }
    section#projetos, section#contato { padding: 54px 0; }
    .section-title { margin-bottom: 30px; }
    .main-project { padding: 28px 22px; }
    .project-tag { position: static; display: inline-block; align-self: flex-start; margin-bottom: 17px; }
    .main-project h3 { font-size: 1.25rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card { padding: 22px; }
    .bg-light { padding: 56px 0; }
    .map-sidebar { padding: 22px; }
    .map-graphic-callout { min-height: 360px; padding: 18px; }
    .map-mockup { padding: 26px 20px; }
    .contact-form-box { padding: 22px 18px; }
    .footer-content p { line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .animate-hidden { opacity: 1; transform: none; }
}
