/* =====================================================================
   Municipality of Bustos — Premium public site
   Palette: cerulean → deep navy (from the campaign theme) + seal gold
   Type: Fraunces (display) + Plus Jakarta Sans (UI/body)
   ===================================================================== */

:root {
    /* Royal / cobalt blue — matched to Mayor Iskul Juan's campaign color */
    --blue-950: #0a1c42;
    --blue-900: #0c2860;
    --blue-800: #103680;
    --blue-700: #14459b;
    --blue-600: #1a5ac4;
    --blue-500: #2a6fe0;
    --blue-400: #558eea;
    --blue-300: #93b5f1;
    --blue-100: #e5edfb;
    --blue-50:  #f2f6fe;

    --gold-600: #c9971a;
    --gold-500: #f0b429;
    --gold-300: #f7d778;

    --ink: #0c1e38;
    --slate: #48586e;
    --muted: #6b7a90;
    --line: #e5ecf4;
    --paper: #f5f8fc;
    --white: #ffffff;

    --grad-hero: linear-gradient(120deg, rgba(10,28,66,.95) 0%, rgba(16,54,128,.86) 45%, rgba(42,111,224,.72) 100%);
    --grad-blue: linear-gradient(120deg, var(--blue-800), var(--blue-600));
    --grad-gold: linear-gradient(120deg, var(--gold-500), var(--gold-600));

    --shadow-sm: 0 2px 8px rgba(12,30,56,.06);
    --shadow-md: 0 14px 34px rgba(12,30,56,.10);
    --shadow-lg: 0 30px 70px rgba(9,32,66,.18);

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 22px;
    --r-xl: 30px;

    --container: 1200px;
    --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.65;
    font-size: 16.5px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-700); text-decoration: none; transition: color .2s var(--ease); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* Icon helper — FontAwesome glyphs inherit size/color from context (rules below key on .ico) */
.ico { display: inline-block; line-height: 1; flex: none; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.12; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700;
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad-gold); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: .8rem; }
.section-head p { color: var(--slate); font-size: 1.08rem; margin: 0; }
.lead { font-size: 1.14rem; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 700; font-size: .96rem; line-height: 1;
    padding: .95rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent;
    cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
    white-space: nowrap;
}
.btn .ico { font-size: 1.15em; }
.btn-primary { background: var(--grad-blue); color: #fff; box-shadow: 0 12px 26px rgba(20,69,155,.34); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(20,69,155,.46); color: #fff; }
.btn-gold { background: var(--grad-gold); color: #3d2c00; box-shadow: 0 12px 26px rgba(201,151,26,.32); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(201,151,26,.42); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-3px); color: #fff; }
.btn-outline { background: transparent; color: var(--blue-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-700); transform: translateY(-3px); }
.btn-sm { padding: .7rem 1.15rem; font-size: .88rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--blue-950); color: #cfe0f2; font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-left .ico { color: var(--gold-500); font-size: 1rem; }
.ph-flag { display: inline-flex; }
.ph-flag svg { height: 14px; width: 21px; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.topbar .dot { opacity: .5; }
.topbar-link { color: #cfe0f2; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.topbar-link:hover { color: #fff; }
.topbar-link .ico { font-size: 1rem; }
.admin-link { background: rgba(255,255,255,.1); padding: .3rem .8rem; border-radius: 999px; }
.admin-link:hover { background: var(--gold-500); color: var(--blue-950); }
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; letter-spacing: .02em; }
.lang-switch a { color: #8ea6c6; padding: .05rem .15rem; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.on { color: var(--gold-500); }
.lang-sep { opacity: .35; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #9fc0e4; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s, background .3s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); background: rgba(255,255,255,.92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-seal { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.14)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: "Fraunces", serif; font-size: 1.12rem; color: var(--ink); font-weight: 600; }
.brand-text small { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: .35rem; }
.main-nav > a { font-weight: 600; font-size: .96rem; color: var(--ink); padding: .55rem .85rem; border-radius: 999px; position: relative; }
.main-nav > a:not(.nav-cta):hover { color: var(--blue-700); background: var(--blue-50); }
.main-nav > a.active { color: var(--blue-700); }
.nav-cta { margin-left: .6rem; }
/* Keep the primary CTA text white — outrank the dark .main-nav > a color rule */
.main-nav > a.nav-cta, .main-nav > a.nav-cta:hover { color: #fff; background: var(--grad-blue); }
.nav-close, .nav-toggle { display: none; }
.nav-toggle { background: var(--blue-50); border: 1px solid var(--line); color: var(--blue-800); width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background-position: center 32%; background-size: cover; background-repeat: no-repeat; background-color: var(--blue-900); transform: scale(1.05); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad-hero); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(1200px 500px at 80% -10%, rgba(240,180,41,.18), transparent 60%); }
.hero-inner { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem); max-width: 820px; }
.hero .eyebrow { color: var(--gold-300); }
.hero .eyebrow::before { background: var(--gold-500); }
.hero h1 { color: #fff; font-size: clamp(3rem, 8vw, 6rem); font-weight: 600; margin: 1rem 0 .3rem; letter-spacing: -.02em; }
.hero h1 span { color: var(--gold-300); font-style: italic; font-weight: 500; }
.hero-tagline { font-family: "Fraunces", serif; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: #dcecfb; font-style: italic; margin-bottom: 1.3rem; }
.hero-desc { font-size: 1.12rem; color: #cfe0f2; max-width: 620px; margin-bottom: 2.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-motto { margin-top: 2.4rem; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: #a9c8e8; font-weight: 700; display: flex; align-items: center; gap: .8rem; }
.hero-motto::before { content: ""; width: 34px; height: 2px; background: var(--gold-500); }

/* Hero stats strip */
.hero-stats { position: relative; z-index: 2; margin-top: -1px; }
.hero-stats-inner {
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(12px); border-radius: var(--r-lg);
    transform: translateY(50%); box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-stat { padding: 1.4rem 1.5rem; text-align: center; border-right: 1px solid rgba(255,255,255,.14); }
.hero-stat:last-child { border-right: none; }
.hero-stat .num { font-family: "Fraunces", serif; font-size: 1.9rem; font-weight: 600; color: #fff; line-height: 1; }
.hero-stat .lbl { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #bcd6f0; margin-top: .5rem; font-weight: 600; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section-pad-top-lg { padding-top: clamp(7rem, 11vw, 10rem); }
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--blue-950); color: #dcecfb; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-copy p { color: var(--slate); margin-bottom: 1.1rem; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.feature { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.feature .f-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.feature strong { display: block; font-size: .98rem; }
.feature span { font-size: .86rem; color: var(--muted); }

.about-media { position: relative; }
.about-media-main { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; }
.about-media-main img { width: 100%; height: 100%; object-fit: cover; }
.about-media-sub { position: absolute; left: -34px; bottom: -34px; width: 45%; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-lg); border: 5px solid #fff; aspect-ratio: 4/3; }
.about-media-sub img { width: 100%; height: 100%; object-fit: cover; }
.about-badge { position: absolute; top: -26px; right: -18px; background: var(--grad-gold); color: #3d2c00; border-radius: var(--r); padding: .9rem 1.1rem; text-align: center; box-shadow: var(--shadow-md); }
.about-badge b { font-family: "Fraunces", serif; font-size: 1.7rem; display: block; line-height: 1; }
.about-badge small { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* ---------- Mayor's message ---------- */
.mayor { position: relative; overflow: hidden; }
.mayor::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 10% 10%, rgba(26,134,216,.18), transparent 55%); }
.mayor-grid { position: relative; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.mayor-photo { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.12); aspect-ratio: 1/1; max-width: 380px; }
.mayor-photo img { width: 100%; height: 100%; object-fit: cover; }
.mayor-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.3rem .9rem; background: linear-gradient(transparent, rgba(5,31,69,.92)); }
.mayor-photo figcaption strong { font-family: "Fraunces", serif; font-size: 1.2rem; color: #fff; display: block; }
.mayor-photo figcaption span { font-size: .82rem; color: var(--gold-300); letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.mayor-quote .eyebrow { color: var(--gold-300); }
.mayor-quote h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: .8rem 0 1.4rem; }
.mayor-quote p { color: #c9ddf3; font-size: 1.08rem; white-space: pre-line; margin-bottom: 1rem; }
.mayor-sign { margin-top: 1.6rem; }
.mayor-sign strong { font-family: "Fraunces", serif; font-size: 1.25rem; color: #fff; display: block; }
.mayor-sign span { color: var(--gold-300); font-size: .9rem; font-weight: 600; }

/* ---------- Government / officials ---------- */
.exec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
.exec-card { display: flex; gap: 1.3rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.exec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.exec-avatar { width: 104px; height: 104px; border-radius: 18px; object-fit: cover; flex: none; box-shadow: var(--shadow-sm); }
.avatar-mono { width: 104px; height: 104px; border-radius: 18px; flex: none; display: grid; place-items: center; font-family: "Fraunces", serif; font-size: 2rem; font-weight: 600; color: #fff; background: var(--grad-blue); box-shadow: var(--shadow-sm); }
.exec-card .pos { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); font-weight: 700; }
.exec-card h3 { font-size: 1.5rem; margin: .25rem 0 .35rem; }
.exec-card .party { display: inline-block; font-size: .76rem; font-weight: 700; color: var(--slate); background: var(--blue-50); padding: .2rem .6rem; border-radius: 999px; }

.council-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.council-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.council-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.council-card .avatar-mono { width: 72px; height: 72px; font-size: 1.5rem; border-radius: 16px; margin: 0 auto .9rem; }
.council-card strong { font-size: 1.02rem; display: block; line-height: 1.3; }
.council-card span { font-size: .8rem; color: var(--muted); }
.council-note { text-align: center; margin-top: 1.6rem; color: var(--muted); font-size: .9rem; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.service-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.7rem 1.5rem; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.service-card::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--grad-gold); transition: width .35s var(--ease); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::after { width: 100%; }
.service-ico { width: 58px; height: 58px; border-radius: 16px; background: linear-gradient(135deg, var(--blue-100), #fff); color: var(--blue-700); display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 1.1rem; box-shadow: inset 0 0 0 1px rgba(21,103,184,.12); transition: background .3s, color .3s; }
.service-card:hover .service-ico { background: var(--grad-blue); color: #fff; }
.service-card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.service-card p { color: var(--slate); font-size: .92rem; margin: 0 0 1rem; }
.service-office { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.service-card { color: inherit; text-decoration: none; display: block; }
a.service-card.has-link { cursor: pointer; }
.service-cta { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; font-weight: 700; font-size: .84rem; color: var(--blue-700); letter-spacing: .02em; }
.service-cta .ico { transition: transform .25s var(--ease); }
a.service-card.has-link:hover .service-cta .ico { transform: translateX(4px); }
.brgy-chip .n-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: #fff; flex: none; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Connected digital services (CBMS + DRRM app) ---------- */
.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.app-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.app-card::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: var(--grad-blue); transition: width .4s var(--ease); }
.app-card:nth-child(2)::after { background: linear-gradient(120deg, #e14b4b, #b3261e); }
.app-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.app-card:hover::after { width: 100%; }
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.app-ico { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; color: #fff; box-shadow: var(--shadow-sm); }
.app-ico-blue { background: var(--grad-blue); }
.app-ico-red { background: linear-gradient(135deg, #e14b4b, #b3261e); }
.app-logo { width: 76px; height: 76px; display: grid; place-items: center; flex: none; }
.app-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(12,30,56,.16)); }
.app-tag { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .32rem .75rem; border-radius: 999px; }
.tag-blue { background: var(--blue-50); color: var(--blue-700); }
.tag-red { background: #fdecec; color: #c0392b; }
.app-card h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.app-card > p { color: var(--slate); font-size: .98rem; margin: 0 0 1.3rem; }
.app-feats { display: flex; flex-wrap: wrap; gap: .55rem 1.3rem; margin-bottom: 1.6rem; }
.app-feats span { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; font-weight: 600; color: var(--slate); }
.app-feats .ico { color: var(--blue-600); font-size: 1rem; }
.app-card:nth-child(2) .app-feats .ico { color: #c0392b; }
.app-cta { margin-top: auto; display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--blue-700); font-size: .95rem; }
.app-note { display: block; font-size: .78rem; color: var(--muted); margin-top: .45rem; font-weight: 600; }
.app-plats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.plat { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 700; padding: .32rem .7rem; border-radius: 999px; letter-spacing: .02em; }
.plat .ico { font-size: 1rem; }
.plat-on { background: #eafaf1; color: #1c7a4d; }
.plat-soon { background: var(--paper); color: var(--muted); border: 1px dashed var(--line); }
.app-card:nth-child(2) .app-cta { color: #c0392b; }
.app-cta .ico { transition: transform .25s var(--ease); font-size: .85em; }
.app-card:hover .app-cta .ico { transform: translate(3px, -3px); }

/* ---------- Transparency / Full Disclosure portal ---------- */
.tp-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.tp-quick-card { display: flex; flex-direction: column; gap: .2rem; padding: 1.3rem 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); color: inherit; transition: transform .25s var(--ease), box-shadow .25s; }
.tp-quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.tp-quick-card .ico { font-size: 1.5rem; color: var(--blue-600); margin-bottom: .4rem; }
.tp-quick-card strong { font-family: "Fraunces", serif; font-size: 1.7rem; line-height: 1; }
.tp-quick-card span { font-size: .84rem; color: var(--muted); font-weight: 600; }

.tp-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; padding-top: .5rem; }
.tp-filter-label { font-weight: 700; font-size: .85rem; color: var(--slate); margin-right: .4rem; }
.tp-year { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--slate); background: #fff; }
.tp-year:hover { border-color: var(--blue-400); color: var(--blue-700); }
.tp-year.active { background: var(--grad-blue); color: #fff; border-color: transparent; }

.tp-group { margin-bottom: 2.5rem; }
.tp-group-title { font-size: 1.5rem; padding-bottom: .6rem; border-bottom: 2px solid var(--blue-100); margin-bottom: 1.3rem; }
.tp-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.tp-cat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.tp-cat-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.tp-cat-head > .ico { color: var(--blue-600); font-size: 1.2rem; }
.tp-cat-head strong { display: block; font-size: 1rem; }
.tp-cat-head span { font-size: .8rem; color: var(--muted); }
.tp-cat-head .tp-count { margin-left: auto; background: var(--blue-50); color: var(--blue-700); font-weight: 800; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; }
.tp-docs { list-style: none; margin: 0; padding: .4rem .6rem; }
.tp-docs li a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px; color: var(--ink); transition: background .2s; }
.tp-docs li a:hover { background: var(--blue-50); }
.tp-docs .ico { color: #c0392b; font-size: 1.1rem; flex: none; }
.tp-doc-title { font-weight: 600; font-size: .92rem; flex: 1; }
.tp-doc-meta { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.tp-docs li a .fa-download { color: var(--muted); font-size: .95rem; }
.tp-docs li a:hover .fa-download { color: var(--blue-700); }
.tp-empty { padding: 1.1rem 1.4rem; color: var(--muted); font-size: .88rem; }

.tp-external { margin-top: 3rem; padding: 1.8rem; background: var(--paper); border-radius: var(--r-lg); border: 1px solid var(--line); }
.tp-external h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.tp-ext-links { display: flex; flex-wrap: wrap; gap: .7rem; }
.tp-ext-links a { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--blue-700); }
.tp-ext-links a:hover { border-color: var(--blue-400); transform: translateY(-2px); }

/* Issuance & career lists */
.tp-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tp-table th { text-align: left; padding: .9rem 1.1rem; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper); border-bottom: 1px solid var(--line); }
.tp-table td { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .94rem; }
.tp-table tr:last-child td { border-bottom: none; }
.tp-table tr:hover td { background: var(--blue-50); }
.tp-pill { display: inline-block; font-size: .72rem; font-weight: 800; padding: .22rem .6rem; border-radius: 999px; letter-spacing: .03em; }
.tp-pill.ord { background: #fdf1d6; color: #a5760a; } .tp-pill.res { background: var(--blue-50); color: var(--blue-700); } .tp-pill.eo { background: #e6f7ee; color: #1c7a4d; }

.vac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.vac-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.vac-card .vac-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.vac-card h3 { font-size: 1.25rem; margin: 0; }
.vac-card .vac-office { color: var(--muted); font-weight: 600; font-size: .88rem; }
.vac-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin: 1rem 0; font-size: .86rem; color: var(--slate); font-weight: 600; }
.vac-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.vac-meta .ico { color: var(--blue-600); }
.vac-status { font-size: .72rem; font-weight: 800; padding: .25rem .7rem; border-radius: 999px; }
.vac-status.open { background: #e6f7ee; color: #1c7a4d; } .vac-status.closed { background: #f2f4f7; color: var(--muted); }

/* Citizen's Charter */
.charter-search { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .75rem 1.3rem; box-shadow: var(--shadow-sm); margin-bottom: 2rem; max-width: 640px; }
.charter-search .ico { color: var(--muted); }
.charter-search input { border: none; outline: none; flex: 1; font-family: inherit; font-size: 1rem; background: transparent; color: var(--ink); }
.charter-group { margin-bottom: 2rem; }
.charter-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: .7rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.charter-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; cursor: pointer; list-style: none; }
.charter-item > summary::-webkit-details-marker { display: none; }
.charter-item > summary:hover { background: var(--blue-50); }
.ci-main strong { display: block; font-size: 1.05rem; }
.ci-office { font-size: .82rem; color: var(--muted); font-weight: 600; }
.ci-tags { display: flex; align-items: center; gap: .8rem; flex: none; }
.ci-chev { color: var(--muted); transition: transform .2s var(--ease); }
.charter-item[open] .ci-chev { transform: rotate(180deg); }
.ci-body { padding: 0 1.4rem 1.4rem; border-top: 1px solid var(--line); }
.ci-body > p { color: var(--slate); margin: 1rem 0; }
.ci-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1rem 0; font-size: .88rem; font-weight: 600; color: var(--slate); }
.ci-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.ci-meta .ico { color: var(--blue-600); }
.ci-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-700); margin: 1.4rem 0 .6rem; }
.ci-reqs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.2rem; }
.ci-reqs li { display: flex; align-items: flex-start; gap: .5rem; font-size: .92rem; color: var(--slate); }
.ci-reqs .ico { color: #1c7a4d; margin-top: .2rem; }
@media (max-width: 640px) { .ci-reqs { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
    .tp-quick { grid-template-columns: 1fr 1fr; }
    .tp-cats, .vac-grid { grid-template-columns: 1fr; }
}

/* ---------- Tourism ---------- */
.tourism-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 240px; gap: 1.3rem; }
.tcard { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); color: #fff; grid-column: span 2; }
.tcard.feature { grid-column: span 3; grid-row: span 2; }
.tcard.wide { grid-column: span 3; }
.tcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tcard.noimg { background: var(--grad-blue); }
.tcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,20,45,0) 30%, rgba(5,20,45,.85) 100%); }
.tcard:hover img { transform: scale(1.08); }
.tcard-body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 1.5rem; }
.tcard .cat { display: inline-block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; background: rgba(240,180,41,.9); color: #3d2c00; padding: .25rem .6rem; border-radius: 999px; margin-bottom: .6rem; }
.tcard h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .3rem; }
.tcard.feature h3 { font-size: 1.9rem; }
.tcard p { margin: 0; font-size: .9rem; color: #dbe7f5; opacity: 0; max-height: 0; transition: opacity .35s, max-height .35s; }
.tcard.feature p, .tcard:hover p { opacity: 1; max-height: 120px; }
.tcard .loc { font-size: .82rem; color: var(--gold-300); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; margin-top: .5rem; }
.tcard { text-decoration: none; cursor: pointer; }
.tcard-map { display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem; font-size: .82rem; font-weight: 700; color: #fff; opacity: 0; max-height: 0; transition: opacity .35s, max-height .35s; }
.tcard-map .ico { font-size: .85em; transition: transform .25s var(--ease); }
.tcard.feature .tcard-map, .tcard:hover .tcard-map { opacity: 1; max-height: 40px; }
.tcard:hover .tcard-map .ico { transform: translate(2px, -2px); }

/* ---------- Stats band ---------- */
.stats-band { background: var(--grad-blue); color: #fff; position: relative; overflow: hidden; }
.stats-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 120%, rgba(240,180,41,.22), transparent 60%); }
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-item .ico { font-size: 1.9rem; color: var(--gold-300); margin-bottom: .6rem; }
.stat-item .num { font-family: "Fraunces", serif; font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 600; line-height: 1; }
.stat-item .lbl { margin-top: .5rem; color: #cfe0f2; font-size: .92rem; letter-spacing: .04em; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--grad-blue); position: relative; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: 2.6rem; }
.news-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; align-items: center; gap: .7rem; font-size: .76rem; margin-bottom: .7rem; }
.news-cat { background: var(--blue-50); color: var(--blue-700); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; }
.news-date { color: var(--muted); font-weight: 600; }
.news-body h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.news-body p { color: var(--slate); font-size: .92rem; margin: 0 0 1.1rem; }
.news-more { margin-top: auto; font-weight: 700; color: var(--blue-700); display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; }
.news-more .ico { transition: transform .25s var(--ease); }
.news-card:hover .news-more .ico { transform: translateX(4px); }

/* ---------- Barangays ---------- */
.brgy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.brgy-chip { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), border-color .25s; }
.brgy-chip:hover { transform: translateY(-3px); border-color: var(--blue-300); }
.brgy-chip .n { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.brgy-chip strong { font-size: .95rem; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info .info-item { display: flex; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.contact-info .info-item:last-child { border-bottom: none; }
.info-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--blue-50); color: var(--blue-700); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.info-item strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .2rem; }
.info-item span, .info-item a { font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.contact-map { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.5rem; border-radius: var(--r); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: linear-gradient(120deg, var(--blue-50), #fff); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.contact-map:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cmap-pin { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-blue); color: #fff; font-size: 1.4rem; }
.cmap-text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cmap-text strong { color: var(--ink); font-size: .98rem; line-height: 1.35; }
.cmap-text span { display: inline-flex; align-items: center; gap: .45rem; color: var(--blue-700); font-weight: 600; font-size: .9rem; }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .82rem; font-weight: 700; color: var(--slate); margin-bottom: .4rem; }
.field input, .field textarea, .field select {
    width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    font-family: inherit; font-size: .96rem; color: var(--ink); background: var(--paper); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(26,134,216,.14); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.toast-ok { display: none; margin-top: 1rem; padding: .9rem 1.1rem; background: #eafaf1; color: #1c7a4d; border: 1px solid #bfe8d2; border-radius: var(--r-sm); font-weight: 600; font-size: .92rem; }
.toast-ok.show { display: block; }

/* ---------- Hotlines strip ---------- */
.hotlines { background: var(--blue-950); }
.hotlines-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hotline { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: var(--r); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.hotline .ico { font-size: 1.5rem; color: var(--gold-500); }
.hotline small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #9fc0e4; font-weight: 700; }
.hotline strong { color: #fff; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-950); color: #bcd2ea; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2.5rem; padding: 4rem 24px 3rem; }
.footer-brand-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; }
.footer-brand-top img { width: 54px; height: 54px; }
.footer-brand-top strong { color: #fff; font-family: "Fraunces", serif; font-size: 1.2rem; display: block; }
.footer-brand-top span { font-size: .8rem; color: #9fc0e4; }
.footer-brand p { font-size: .92rem; line-height: 1.7; color: #a8c2de; max-width: 340px; }
.social { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); display: inline-grid; place-items: center; color: #fff; font-size: 1.3rem; transition: background .25s, transform .25s; }
.social:hover { background: var(--blue-500); transform: translateY(-3px); color: #fff; }
.footer-col h4 { color: #fff; font-family: "Plus Jakarta Sans", sans-serif; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col a { display: block; color: #a8c2de; font-size: .92rem; padding: .35rem 0; }
.footer-col a:hover { color: #fff; }
.footer-contact { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: #a8c2de; margin: 0 0 .7rem; }
.footer-contact .ico { color: var(--gold-500); font-size: 1.1rem; margin-top: .15rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.3rem 0; font-size: .82rem; color: #8fb0d2; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; width: 50px; height: 50px; border-radius: 14px; background: var(--grad-blue); color: #fff; border: none; font-size: 1.4rem; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease); z-index: 50; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Scroll reveal (gated behind .js so content stays visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Hero content animates immediately on load (deterministic — not observer-dependent) */
.js .hero .reveal { opacity: 1; transform: none; animation: heroIn .8s var(--ease) both; }
.js .hero .reveal.d1 { animation-delay: .12s; }
.js .hero .reveal.d2 { animation-delay: .24s; }
.js .hero .reveal.d3 { animation-delay: .36s; }
.js .hero .reveal.d4 { animation-delay: .48s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { background: var(--grad-blue); color: #fff; padding: clamp(3rem,7vw,5rem) 0 clamp(2.5rem,5vw,3.5rem); position: relative; overflow: hidden; }
.page-hero::after { content:""; position:absolute; inset:0; background: radial-gradient(800px 300px at 85% 0%, rgba(240,180,41,.18), transparent 60%); }
.page-hero .eyebrow { color: var(--gold-300); }
.page-hero h1 { color:#fff; font-size: clamp(2.2rem,5vw,3.4rem); margin-top:.6rem; }
.page-hero .crumbs { margin-top: .8rem; font-size:.9rem; color:#cfe0f2; }
.page-hero .crumbs a { color: var(--gold-300); }

/* ===================================================================
   Shared UI: badges, directory, events, projects, budget, prose
   =================================================================== */
.badge { display: inline-flex; align-items: center; gap: .35em; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .3em .7em; border-radius: 999px; background: var(--paper); color: var(--slate); border: 1px solid var(--line); }
.badge.blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge.ok { background: #e6f7ee; color: #1c7a4d; border-color: #c6ecd6; }
.badge.gold { background: #fdf3d8; color: #8a6410; border-color: #f6e2ac; }

.dir-search { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .75rem 1.3rem; box-shadow: var(--shadow-sm); margin-bottom: 2.2rem; max-width: 640px; }
.dir-search .ico { color: var(--muted); }
.dir-search input { border: none; outline: none; flex: 1; font-family: inherit; font-size: 1rem; background: transparent; color: var(--ink); }

/* ---- Departments ---- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.3rem; }
.dept-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.dept-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.dept-top { display: flex; gap: 1rem; align-items: center; }
.dept-photo { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; }
.dept-photo-ph { display: grid; place-items: center; background: var(--grad-blue); color: #fff; font-size: 1.3rem; }
.dept-top h3 { font-size: 1.12rem; margin: 0; line-height: 1.25; }
.dept-head { margin: .3rem 0 0; font-weight: 700; color: var(--blue-700); font-size: .95rem; }
.dept-head span { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; }
.dept-func { color: var(--slate); font-size: .92rem; margin: 1rem 0 0; }
.dept-meta { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; }
.dept-meta span, .dept-meta a { display: inline-flex; align-items: center; gap: .5rem; color: var(--slate); }
.dept-meta a:hover { color: var(--blue-600); }
.dept-meta .ico { color: var(--blue-500); width: 16px; }

/* ---- Barangays ---- */
.brgy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.brgy-card { display: flex; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.brgy-logo { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.brgy-logo-ph { display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600); font-size: 1.1rem; }
.brgy-info { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.brgy-info strong { font-size: 1rem; }
.brgy-cap { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.brgy-links { display: flex; gap: .5rem; margin-top: .2rem; }
.brgy-links a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-50); color: var(--blue-700); }
.brgy-links a:hover { background: var(--blue-600); color: #fff; }

/* ---- Events ---- */
.ev-list { display: grid; gap: 1rem; }
.ev-card { display: flex; gap: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.ev-date { flex: none; width: 68px; text-align: center; background: var(--grad-blue); color: #fff; border-radius: 12px; padding: .7rem 0; align-self: flex-start; }
.ev-day { display: block; font-family: "Fraunces", serif; font-size: 1.8rem; line-height: 1; font-weight: 600; }
.ev-mon { display: block; font-size: .72rem; letter-spacing: .1em; margin-top: .2rem; }
.ev-body h3 { font-size: 1.2rem; margin: .5rem 0 .3rem; }
.ev-body p { color: var(--slate); font-size: .95rem; margin: 0 0 .6rem; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .86rem; color: var(--muted); }
.ev-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.ev-meta .ico { color: var(--blue-500); }
.ev-past .ev-card { opacity: .82; }
.ev-past .ev-date { background: #8595ad; }

/* ---- Projects ---- */
.proj-stats { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.proj-stat { flex: 1 1 120px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.proj-stat strong { display: block; font-family: "Fraunces", serif; font-size: 1.8rem; color: var(--blue-700); line-height: 1; }
.proj-stat span { font-size: .82rem; color: var(--muted); }
.proj-stat.active, .proj-stat:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.3rem; }
.proj-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.proj-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.proj-img { height: 160px; background-size: cover; background-position: center; }
.proj-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.proj-head { display: flex; align-items: center; gap: .6rem; }
.proj-cat { font-size: .8rem; color: var(--muted); }
.proj-body h3 { font-size: 1.15rem; margin: 0; }
.proj-desc { color: var(--slate); font-size: .92rem; margin: 0; }
.proj-progress { display: flex; align-items: center; gap: .7rem; margin-top: .3rem; }
.pp-track { flex: 1; height: 8px; background: var(--blue-50); border-radius: 999px; overflow: hidden; }
.pp-fill { display: block; height: 100%; background: var(--grad-blue); border-radius: 999px; }
.pp-label { font-size: .82rem; font-weight: 700; color: var(--blue-700); min-width: 34px; text-align: right; }
.proj-meta { list-style: none; margin: .4rem 0 0; padding: .8rem 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .45rem; font-size: .88rem; color: var(--slate); }
.proj-meta li { display: flex; align-items: center; gap: .6rem; }
.proj-meta .ico { color: var(--blue-500); width: 16px; }
.proj-map { margin-top: auto; padding-top: .8rem; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .5rem; }

/* ---- Budget "where your taxes go" ---- */
.budget-section { background: var(--paper); }
.budget-bar { display: flex; height: 46px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); margin: 1.5rem 0 1.8rem; }
.budget-seg { height: 100%; transition: filter .2s; min-width: 3px; }
.budget-seg:hover { filter: brightness(1.08); }
.budget-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.budget-item { display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.bl-dot { width: 14px; height: 14px; border-radius: 4px; flex: none; margin-top: .25rem; }
.bl-text strong { display: block; font-size: .95rem; }
.bl-text span { font-size: .84rem; color: var(--muted); }

/* ---- Prose (privacy / accessibility) ---- */
.prose { max-width: 800px; }
.prose h2 { font-size: 1.4rem; margin: 2.2rem 0 .7rem; color: var(--blue-800); }
.prose p, .prose li { color: var(--slate); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose .lead { color: var(--ink); }
.muted-note { margin-top: 2rem; font-size: .88rem; color: var(--muted); font-style: italic; }
.contact-card { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 1rem 0; }
.contact-card p { margin: .4rem 0; display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.contact-card .ico { color: var(--blue-600); width: 18px; }
.feat-list { list-style: none; padding: 0; display: grid; gap: .9rem; }
.feat-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feat-list .ico { color: var(--blue-600); font-size: 1.15rem; margin-top: .2rem; width: 22px; }

/* ===================================================================
   Emergency alert banner + cookie consent + accessibility toolbar
   =================================================================== */
.alert-banner { background: linear-gradient(120deg, #b91c1c, #dc2626); color: #fff; font-size: .92rem; }
.alert-banner.info { background: linear-gradient(120deg, var(--blue-800), var(--blue-600)); }
.alert-inner { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; }
.alert-inner .ico:first-child { font-size: 1.1rem; }
.alert-inner p { margin: 0; flex: 1; }
.alert-inner a { color: #fff; text-decoration: underline; font-weight: 700; }
.alert-close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; flex: none; }
.alert-close:hover { background: rgba(255,255,255,.3); }

.cookie-bar { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 720px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 1.2rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; z-index: 120; }
.cookie-bar[hidden] { display: none; }

/* "Coming soon" modal */
.cs-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.5rem; }
.cs-modal[hidden] { display: none; }
.cs-backdrop { position: absolute; inset: 0; background: rgba(6,20,45,.55); backdrop-filter: blur(3px); animation: csFade .2s var(--ease); }
.cs-card { position: relative; z-index: 1; width: 100%; max-width: 460px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 2.4rem 2.2rem 2rem; text-align: center; animation: csPop .28s var(--ease); }
.cs-x { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px; border: none; background: var(--paper); color: var(--slate); border-radius: 10px; cursor: pointer; font-size: 1.1rem; }
.cs-x:hover { background: var(--blue-50); color: var(--blue-700); }
.cs-icon { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600); border-radius: 20px; font-size: 1.9rem; }
.cs-badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-600); background: #fdf3d8; padding: .3rem .8rem; border-radius: 999px; margin-bottom: .8rem; }
.cs-card h3 { font-size: 1.5rem; margin: 0 0 .6rem; }
.cs-card p { color: var(--slate); margin: 0 0 1.6rem; font-size: .98rem; }
.cs-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
@keyframes csFade { from { opacity: 0; } }
@keyframes csPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.cookie-bar p { margin: 0; flex: 1 1 300px; font-size: .9rem; color: var(--slate); }
.cookie-bar a { font-weight: 600; }
.cookie-actions { display: flex; gap: .6rem; }

.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 200; background: var(--blue-700); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 10px 10px; transition: top .2s; }
.skip-link:focus { top: 0; color: #fff; }

.a11y-fab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 115; background: var(--blue-700); color: #fff; border: none; width: 46px; height: 46px; border-radius: 12px 0 0 12px; font-size: 1.25rem; cursor: pointer; box-shadow: var(--shadow-md); }
.a11y-fab:hover { background: var(--blue-800); }
.a11y-panel { position: fixed; right: 54px; top: 50%; transform: translateY(-50%); z-index: 116; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 1.1rem; width: 250px; display: none; }
.a11y-panel.open { display: block; }
.a11y-panel h4 { margin: 0 0 .8rem; font-size: 1rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; font-size: .9rem; }
.a11y-row .btns { display: flex; gap: .3rem; }
.a11y-panel button.pill { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: .35rem .7rem; cursor: pointer; font-family: inherit; font-weight: 600; color: var(--ink); }
.a11y-panel button.pill:hover { border-color: var(--blue-400); color: var(--blue-700); }
.a11y-panel button.pill.on { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

/* High-contrast mode */
body.hc { --slate: #12233d; --muted: #26364f; --line: #7d8da4; }
body.hc { background: #fff; }
body.hc a { text-decoration: underline; }
body.hc .badge, body.hc .dept-card, body.hc .proj-card, body.hc .ev-card, body.hc .brgy-card { border-width: 2px; }
body.hc :focus-visible { outline: 3px solid #000; }

/* Visible focus for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, details:focus-visible {
    outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 4px;
}

/* ---- Site search ---- */
.nav-search { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--blue-800); }
.nav-search:hover { background: var(--blue-50); color: var(--blue-600); }
.dir-search button { flex: none; }
.search-results { display: grid; gap: .7rem; }
.search-hit { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.search-hit:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); transform: translateX(3px); }
.search-hit .badge { flex: none; }
.sh-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sh-text strong { color: var(--ink); font-size: 1.02rem; }
.sh-text span { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-arrow { color: var(--blue-400); }
.search-empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.search-empty .ico { font-size: 2.4rem; color: var(--blue-300); margin-bottom: .8rem; }

/* ---- Footer newsletter ---- */
.foot-sub { margin: 1.2rem 0; }
.foot-sub label { display: block; font-size: .82rem; color: #b7c6dd; margin-bottom: .5rem; font-weight: 600; }
.foot-sub-row { display: flex; gap: .5rem; }
.foot-sub-row input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #fff; border-radius: 10px; padding: .6rem .9rem; font-family: inherit; font-size: .92rem; }
.foot-sub-row input::placeholder { color: #9fb0c8; }
.foot-sub-row input:focus { outline: 2px solid var(--blue-400); border-color: transparent; }
.foot-sub-row button { flex: none; padding: .6rem .9rem; }
.foot-sub-msg { font-size: .84rem; margin: .6rem 0 0; }
.foot-sub-msg.ok { color: #7ee0a8; }
.foot-sub-msg.err { color: #ffb4b4; }

/* ===================================================================
   AI assistant "Bining"
   =================================================================== */
.ai-widget { position: fixed; right: 24px; bottom: 24px; z-index: 130; }
.to-top { bottom: 92px; }   /* stack above the AI launcher */
.ai-launcher { display: inline-flex; align-items: center; gap: .55rem; background: var(--grad-blue); color: #fff; border: none; border-radius: 999px; padding: .75rem 1.2rem .75rem .95rem; font-family: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .2s var(--ease); }
.ai-launcher:hover { transform: translateY(-2px); }
.ai-launcher .ico { font-size: 1.25rem; }
.ai-launcher-label { white-space: nowrap; }
.ai-panel { position: absolute; right: 0; bottom: calc(100% + 12px); width: 372px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 130px); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; animation: aiPop .25s var(--ease); }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; background: var(--grad-blue); color: #fff; flex: none; }
.ai-head-id { display: flex; align-items: center; gap: .7rem; }
.ai-avatar { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 1.2rem; }
.ai-head-txt strong { display: block; font-size: 1rem; line-height: 1.1; }
.ai-head-txt span { font-size: .76rem; color: #d7e6f6; }
.ai-close { background: rgba(255,255,255,.16); border: none; color: #fff; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 1rem; }
.ai-close:hover { background: rgba(255,255,255,.3); }
.ai-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--paper); }
.ai-msg { max-width: 86%; padding: .7rem .9rem; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.ai-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; color: var(--ink); }
.ai-msg.user { background: var(--grad-blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .1rem; }
.ai-suggest button { background: #fff; border: 1px solid var(--blue-100); color: var(--blue-700); border-radius: 999px; padding: .38rem .8rem; font-size: .8rem; font-family: inherit; cursor: pointer; font-weight: 600; }
.ai-suggest button:hover { background: var(--blue-50); border-color: var(--blue-300); }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300); animation: aiBlink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
.ai-input { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: #fff; flex: none; }
.ai-input input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1rem; font-family: inherit; font-size: .92rem; outline: none; color: var(--ink); }
.ai-input input:focus { border-color: var(--blue-400); }
.ai-input button { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--grad-blue); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; }
.ai-input button:hover { filter: brightness(1.08); }
.ai-foot { font-size: .68rem; color: var(--muted); text-align: center; padding: .5rem; background: #fff; flex: none; }
@keyframes aiPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes aiBlink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (max-width: 560px) {
    .ai-launcher-label { display: none; }
    .ai-launcher { padding: .8rem; }
    .ai-panel { width: calc(100vw - 32px); height: min(70vh, 520px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-stats-inner { grid-template-columns: repeat(5, 1fr); }
    .council-grid { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .hide-sm { display: none !important; }
    .nav-toggle { display: inline-flex; }
    .main-nav { position: fixed; inset: 0 0 0 auto; width: min(86vw, 340px); background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 5rem 1.5rem 2rem; gap: .3rem; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .35s var(--ease); z-index: 80; }
    .main-nav.open { transform: none; }
    .main-nav > a { padding: .9rem 1rem; border-radius: 12px; }
    .nav-close { display: grid; place-items: center; position: absolute; top: 1.2rem; right: 1.2rem; width: 42px; height: 42px; border-radius: 10px; background: var(--blue-50); border: none; color: var(--blue-800); font-size: 1.3rem; cursor: pointer; }
    .nav-cta { margin: .6rem 0 0; justify-content: center; }
    .nav-backdrop { position: fixed; inset: 0; background: rgba(5,20,45,.5); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 70; }
    .nav-backdrop.show { opacity: 1; visibility: visible; }

    .about-grid, .mayor-grid, .contact-grid { grid-template-columns: 1fr; }
    .mayor-photo { max-width: 320px; margin-inline: auto; }
    .about-media { max-width: 460px; margin: 1rem auto 0; }
    .about-media-sub { left: 0; }
    .exec-row { grid-template-columns: 1fr; }
    .hero-stats-inner { grid-template-columns: repeat(2, 1fr); transform: translateY(2rem); }
    .hero-stat:nth-child(5) { grid-column: span 2; border-right: none; }
    .stats-grid, .hotlines-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
    .news-grid, .apps-grid { grid-template-columns: 1fr; }
    .tourism-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
    .tcard, .tcard.feature, .tcard.wide { grid-column: span 2; grid-row: span 1; }
    .council-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
    .container { padding-inline: 18px; }
    .services-grid, .about-features, .stats-grid, .hotlines-inner, .footer-grid { grid-template-columns: 1fr; }
    .council-grid { grid-template-columns: 1fr 1fr; }
    .hero-stat .num { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
