/* Webber Offices — department pages. Theme green #0D7535, same card language as the Documents pages. */
.wd { --wd-green: #0D7535; --wd-green-dark: #0a5d2a; --wd-tint: #f0faf4; --wd-line: #e5e7eb; --wd-text: #111827; --wd-muted: #6b7280; }

/* Twd-column layout: sidebar + office */
.wd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }   /* content left, departments list right */

/* ── Sidebar ─────────────────────────────────────────────────────── */
.wd-sidebar { position: sticky; top: 16px; background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; overflow: hidden; box-shadow: 0 0 4px rgba(0, 0, 0, .12); }
.wd-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--wd-green); color: #fff; }
.wd-sidebar-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .2px; color: #fff; }
.wd-sidebar-count { font-size: 12px; background: rgba(255, 255, 255, .2); padding: 2px 8px; border-radius: 999px; }
.wd-toggle { display: none; }
.wd-sidebar-body { padding: 12px 12px 8px; }
.wd-search { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-bottom: 8px; }
.wd-search:focus { outline: none; border-color: var(--wd-green); box-shadow: 0 0 0 3px rgba(13, 117, 53, .15); }
.wd-list-wrap { max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 2px; }
.wd-group-title { margin: 12px 8px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--wd-muted); }
.wd-list { list-style: none; margin: 0; padding: 0; }
.wd-list a { display: block; padding: 8px 12px; margin: 1px 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.35; color: var(--wd-text); text-decoration: none; transition: background .15s, border-color .15s; }
.wd-list a:hover, .wd-list a:focus-visible { background: var(--wd-tint); border-left-color: #86c9a0; }
.wd-list a[aria-current="page"] { background: var(--wd-tint); border-left-color: var(--wd-green); color: var(--wd-green-dark); font-weight: 700; }
.wd-list .wd-code { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--wd-muted); }
.wd-none { padding: 10px 8px; font-size: 13px; color: var(--wd-muted); }

/* ── Office header ───────────────────────────────────────────────── */
.wd-main > * + * { margin-top: 24px; }
.wd-hero { padding: 28px 28px 26px; border-radius: 12px; border: 1px solid #cfe9d9; background: linear-gradient(135deg, var(--wd-tint) 0%, #fff 75%); }
.wd-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.wd-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--wd-green); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.wd-group-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: #fff; border: 1px solid #cfe9d9; color: var(--wd-green-dark); font-size: 12px; font-weight: 600; }
.wd-title { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 800; color: var(--wd-text); }
.wd-tagline { margin: 8px 0 0; font-size: 16px; color: var(--wd-muted); max-width: 70ch; }

/* ── Cards (head + contact) ──────────────────────────────────────── */
.wd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wd-card { background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; padding: 20px; box-shadow: 0 0 4px rgba(0, 0, 0, .1); }
.wd-card-title { margin: 0 0 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--wd-muted); }
.wd-head { display: flex; align-items: center; gap: 16px; }
.wd-head-photo { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #e8f5ed; border: 3px solid #fff; box-shadow: 0 0 0 2px #cfe9d9; }
.wd-head-photo-ph { display: flex; align-items: center; justify-content: center; color: var(--wd-green); }
.wd-head-name { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--wd-text); }
.wd-head-pos { margin: 2px 0 0; font-size: 14px; color: var(--wd-muted); }
.wd-head a { font-size: 13px; color: var(--wd-green); word-break: break-all; }

.wd-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wd-info li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--wd-text); }
.wd-info svg { flex: 0 0 18px; margin-top: 2px; color: var(--wd-green); }
.wd-info small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--wd-muted); }
.wd-info a { color: var(--wd-text); text-decoration: none; word-break: break-all; }
.wd-info a:hover { color: var(--wd-green); text-decoration: underline; }

/* ── Content sections ────────────────────────────────────────────── */
.wd-section { background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; padding: 22px 24px; box-shadow: 0 0 4px rgba(0, 0, 0, .1); }
.wd-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 18px; font-weight: 800; color: var(--wd-text); }
.wd-section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--wd-green); }
.wd-section p { margin: 0 0 12px; line-height: 1.7; color: #374151; }
.wd-section p:last-child { margin-bottom: 0; }
.wd-section ul { padding-left: 1.2rem; margin: 0; }
.wd-section li { margin-bottom: 8px; line-height: 1.6; color: #374151; }
.wd-section li::marker { color: var(--wd-green); }
.wd-prose > * + * { margin-top: 12px; }
.wd-prose h2, .wd-prose h3 { font-size: 17px; font-weight: 700; margin-top: 20px; }
.wd-vm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wd-vm .wd-section { height: 100%; }

/* ── Citizen's Charter call-out ──────────────────────────────────── */
.wd-charter { border: 1px solid #cfe9d9; background: linear-gradient(135deg, var(--wd-tint), #fff 80%); }
.wd-charter-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wd-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; background: var(--wd-green); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none; }
.wd-btn:hover { background: var(--wd-green-dark); }
.wd-btn-ghost { background: #fff; color: var(--wd-green) !important; border: 1px solid var(--wd-green); }
.wd-btn-ghost:hover { background: var(--wd-tint); }

/* ── Footer row ──────────────────────────────────────────────────── */
.wd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.wd-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--wd-muted); }
.wd-share a, .wd-share button { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--wd-line); border-radius: 999px; background: #fff; color: var(--wd-text); font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.wd-share a:hover, .wd-share button:hover { border-color: var(--wd-green); color: var(--wd-green); }

/* ── Archive grid ────────────────────────────────────────────────── */
.wd-archive-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.wd-archive-bar .wd-search { max-width: 360px; margin: 0; }
.wd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wd-office-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: #fff; border-radius: 12px; box-shadow: 0 0 4px rgba(0, 0, 0, .25); text-decoration: none; color: var(--wd-text); transition: transform .2s, box-shadow .2s; }
.wd-office-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.wd-office-card .wd-badge { align-self: flex-start; }
.wd-office-card h3 { margin: 4px 0 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.wd-office-card p { margin: 0; font-size: 13px; color: var(--wd-muted); line-height: 1.5; }
.wd-office-card .wd-more { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; color: var(--wd-green); }
.wd-group-heading { margin: 28px 0 12px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--wd-green-dark); }
.wd-group-heading:first-child { margin-top: 0; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .wd-layout { grid-template-columns: 1fr; }
  .wd-sidebar { position: static; }
  .wd-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
  .wd-sidebar-body { display: none; }
  .wd-sidebar-body.is-open { display: block; }
  .wd-list-wrap { max-height: 50vh; }
  .wd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wd-cards, .wd-vm, .wd-grid { grid-template-columns: 1fr; }
  .wd-title { font-size: 24px; }
  .wd-hero { padding: 22px 18px; }
  .wd-section { padding: 18px; }
}

/* ── Charter PDFs on an office page ── */
.wd-charter-doc + .wd-charter-doc { margin-top: 18px; }
.wd-charter-kind { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--wd-green-dark); }
.wd-charter .wdoc-viewer { margin-bottom: 0; }
.wd-charter-soon { margin: 0; }
.wd-cards--one { grid-template-columns: 1fr; }

/* ── Cover photo inside the header card ───────────────────────────── */
.wd-hero.has-cover { padding: 0; overflow: hidden; }
.wd-cover { position: relative; aspect-ratio: 21 / 8; background: #e8f5ed; }
.wd-cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wd-hero.has-cover .wd-hero-text { padding: 22px 28px 24px; }
@media (max-width: 640px) { .wd-cover { aspect-ratio: 16 / 9; } .wd-hero.has-cover .wd-hero-text { padding: 18px; } }

/* ── Stats strip (barangays: population, land area, hotline) ──────── */
.wd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.wd-stat { padding: 16px 18px; background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; box-shadow: 0 0 4px rgba(0, 0, 0, .1); }
.wd-stat small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--wd-muted); }
.wd-stat strong { display: block; margin-top: 4px; font-size: 20px; line-height: 1.2; color: var(--wd-green-dark); }

/* ── Officials list & services checklist ──────────────────────────── */
.wd-officials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; list-style: none; margin: 0; padding: 0; }
.wd-officials li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; line-height: 1.4; }
.wd-officials strong { display: block; font-size: 14.5px; color: var(--wd-text); }
.wd-officials span { font-size: 13px; color: var(--wd-muted); }
.wd-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.wd-checklist li { position: relative; padding-left: 26px; line-height: 1.5; color: #374151; }
.wd-checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--wd-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat; }
@media (max-width: 640px) { .wd-officials, .wd-checklist { grid-template-columns: 1fr; } }

/* ── Group photo ──────────────────────────────────────────────────── */
.wd-team { margin: 0; }
.wd-team a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--wd-line); background: #f9fafb; cursor: zoom-in; }
.wd-team-img { display: block; width: 100%; height: auto; }
.wd-team figcaption { margin-top: 10px; font-size: 13.5px; color: var(--wd-muted); text-align: center; }

/* ── Gallery ──────────────────────────────────────────────────────── */
.wd-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wd-gallery-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e5e7eb; cursor: zoom-in; }
.wd-gallery-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wd-gallery-item:hover .wd-gallery-img, .wd-gallery-item:focus-visible .wd-gallery-img { transform: scale(1.05); }
.wd-gallery-item:focus-visible { outline: 3px solid var(--wd-green); outline-offset: 2px; }
@media (max-width: 991px) { .wd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Map ──────────────────────────────────────────────────────────── */
.wd-map { border: 1px solid var(--wd-line); border-radius: 12px; overflow: hidden; background: #f9fafb; }
.wd-map iframe { display: block; width: 100%; height: 320px; border: 0; }

/* ── Lightbox ─────────────────────────────────────────────────────── */
.wd-lightbox { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 15, 12, .92); }
.wd-lightbox[hidden] { display: none; }
.wd-lb-fig { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.wd-lb-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.wd-lb-cap { margin-top: 12px; font-size: 14px; color: #e5e7eb; }
.wd-lb-btn { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .15s; }
.wd-lb-btn:hover, .wd-lb-btn:focus-visible { background: rgba(255, 255, 255, .3); }
.wd-lb-close { top: 16px; right: 16px; font-size: 28px; }
.wd-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.wd-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
html.wd-lb-open { overflow: hidden; }
@media (max-width: 640px) { .wd-lb-prev { left: 6px; } .wd-lb-next { right: 6px; } .wd-lightbox { padding: 12px; } }

/* ── Archive cards with a cover photo ── */
.wd-office-card.has-photo { padding-top: 0; overflow: hidden; }
.wd-card-photo { display: block; margin: 0 -20px 8px; aspect-ratio: 16 / 9; background: #e8f5ed; overflow: hidden; }
.wd-card-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Alignment: the content column and the sidebar start on the same line ───────
   (the theme adds margin-top to any <header> for logged-in users, so the hero card is a <div> now) */
.wd-main > :first-child { margin-top: 0; }
.wd-layout > .wd-sidebar { margin-top: 0; }
.admin-bar .wd-sidebar { top: 48px; } /* keep the sticky sidebar clear of the WordPress admin bar */
