/* Ifugao Provincial Health Office — Health at a Glance dashboard layout */
:root {
  --navy: #142b5c;
  --blue-dark: #123b78;
  --blue: #1266c5;
  --blue-mid: #2b75cf;
  --blue-soft: #edf4ff;
  --blue-pale: #f5f8ff;
  --white: #fff;
  --ink: #172b50;
  --muted: #5f6b7d;
  --line: #d5e2f5;
  --shadow: 0 8px 24px rgba(18, 59, 120, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 20; padding: 10px 14px; background: white; border: 2px solid var(--blue); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { background: #fff; border-bottom: 1px solid #e1e7f0; }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 76px; padding-block: 8px; }
.logo-container { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; }
.pho-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand .eyebrow { margin: 0 0 1px; color: var(--blue-dark); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand h1 { margin: 0; color: var(--navy); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.15; }
.brand-subtitle { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }

.hero { position: relative; isolation: isolate; overflow: hidden; padding: 34px 0 28px; color: white; background: linear-gradient(112deg, #102d5d 0%, #174c91 57%, #0756a9 100%); }
.hero-art { position: absolute; z-index: -1; inset: 0; opacity: .34; background:
  radial-gradient(ellipse at 86% 20%, rgba(103,174,255,.42), transparent 34%),
  linear-gradient(160deg, transparent 0 55%, rgba(4,34,83,.55) 55.2% 63%, transparent 63.2%),
  linear-gradient(168deg, transparent 0 66%, rgba(75,145,226,.35) 66.2% 76%, transparent 76.2%); }
.hero-inner { position: relative; }
.hero-copy { max-width: 720px; padding: 0 22px 18px; }
.eyebrow { margin: 0 0 5px; font-size: .78rem; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; }
.hero-eyebrow { color: #dceaff; }
.hero h2 { margin: 0 0 5px; font-size: clamp(2.15rem, 5.2vw, 3.45rem); line-height: 1.06; letter-spacing: -.035em; }
.hero-description { max-width: 520px; margin: 0; color: #e7f0ff; font-size: clamp(.98rem, 1.8vw, 1.12rem); }
.reporting-period { margin: 10px 0 0; padding-left: 11px; border-left: 3px solid white; color: #f1f6ff; font-size: .9rem; }
.reporting-period strong { font-weight: 700; }
.overview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 0 0 0; }
.overview-card { min-height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 10px; text-align: center; background: #fff; color: var(--navy); border: 1px solid #d9e6f8; border-radius: 15px; box-shadow: 0 5px 12px rgba(0,0,0,.16); }
.overview-icon { display: block; min-height: 38px; color: var(--blue); font-size: 2rem; font-weight: 800; line-height: 1.15; }
.overview-value { display: block; margin: 2px 0 3px; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.1; }
.overview-label { max-width: 180px; font-size: .86rem; line-height: 1.25; }

.section { padding-block: 34px; }
.dashboard-section { background: #fff; }
.section-heading { margin: 0 auto 23px; text-align: center; }
.section-eyebrow { color: var(--blue-dark); }
.section-heading h2 { margin: 0 0 4px; color: var(--navy); font-size: clamp(1.7rem, 3.4vw, 2.35rem); line-height: 1.15; letter-spacing: -.025em; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: .95rem; }
.program-list { display: grid; gap: 9px; }
.program { overflow: hidden; border: 1px solid #cbdcf5; border-radius: 14px; background: linear-gradient(100deg, #fff, #f0f5ff); }
.program[open] { background: #fff; border-color: #a9cafa; box-shadow: 0 4px 14px rgba(20, 74, 145, .07); }
.program summary { display: flex; align-items: center; gap: 15px; min-height: 52px; padding: 9px 18px; cursor: pointer; list-style: none; color: var(--navy); }
.program summary::-webkit-details-marker { display: none; }
.program[open] summary { background: linear-gradient(100deg, #e8f2ff, #c9e0ff); border-bottom: 1px solid #c1d9fb; }
.program-icon { display: inline-grid; place-items: center; width: 40px; flex: 0 0 40px; color: var(--blue); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.program-icon.heart { font-size: 1.85rem; }
.program-title { flex: 1; font-size: 1.08rem; font-weight: 800; }
.program-subtitle { font-weight: 500; }
.chevron { width: 12px; height: 12px; margin: 0 5px 5px 10px; border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(45deg); transition: transform .18s ease; }
.program[open] .chevron { margin-bottom: -5px; transform: rotate(225deg); }
.program-content { padding: 14px 20px 17px; }
.indicator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.indicator-card { min-height: 95px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; text-align: center; border: 1px solid #d9e6f8; border-radius: 13px; background: linear-gradient(135deg, #f5f8ff, #eaf2ff); }
.metric-value { color: var(--navy); font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.metric-label { color: var(--navy); font-size: .88rem; font-weight: 700; line-height: 1.25; }
.indicator-card small { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.program-data-layout { display: grid; grid-template-columns: minmax(270px, .85fr) minmax(0, 1.15fr); gap: 22px; }
.indicator-stack { display: grid; align-content: start; gap: 9px; }
.indicator-card.horizontal { min-height: 62px; display: grid; grid-template-columns: 42px auto 1fr; justify-items: start; gap: 10px; padding: 9px 13px; text-align: left; }
.metric-symbol { align-self: center; color: var(--blue); font-size: 1.6rem; font-weight: 800; }
.horizontal .metric-value { align-self: center; font-size: 1.55rem; white-space: nowrap; }
.horizontal .metric-label { align-self: center; }
.trend-panel { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(230px, 1.3fr); align-items: center; gap: 18px; margin-top: 14px; padding: 14px 16px; border-top: 1px solid #dce6f4; }
.trend-panel h3, .single-trend h3 { margin: 0 0 3px; color: var(--navy); font-size: 1rem; }
.trend-panel p, .chart-subtitle { margin: 0; color: var(--muted); font-size: .82rem; }
.single-trend { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-left: 20px; border-left: 2px solid #d6e1f0; }
.chart-placeholder { position: relative; min-height: 110px; display: grid; place-items: center; overflow: hidden; border-left: 1px solid #d7e1ef; border-bottom: 1px solid #d7e1ef; background: repeating-linear-gradient(to bottom, transparent 0 26px, #e8eef7 27px 28px); color: #78869b; font-size: .78rem; text-align: center; }
.chart-placeholder.large { width: 100%; min-height: 155px; margin-top: 8px; }
.chart-line { position: absolute; left: 8%; right: 8%; bottom: 25%; height: 38%; border-top: 3px dashed #8db9ef; transform: skewY(-8deg); opacity: .7; }
.data-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }

.contact-section { padding: 30px 0 34px; background: #fff; }
.contact-panel { padding: 23px 28px; border-radius: 18px; background: linear-gradient(115deg, #f1f6ff, #e8f1ff); }
.contact-heading h2 { margin: 0 0 4px; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.15; }
.contact-heading > p:last-child { margin: 0; color: var(--ink); font-size: .9rem; }
.contact-columns { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr); gap: 28px; margin-top: 16px; }
.contact-methods { display: grid; align-content: center; gap: 10px; padding-right: 28px; border-right: 2px solid #b9c9df; }
.contact-method { display: flex; align-items: center; gap: 13px; min-height: 65px; padding: 10px 14px; border: 1px solid #c6d8f2; border-radius: 12px; background: rgba(255,255,255,.8); text-decoration: none; }
.contact-method:hover { border-color: var(--blue); background: #fff; }
.contact-method-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; color: #fff; background: #1877e8; font-size: 1.65rem; font-weight: 800; }
.mail-icon { background: transparent; color: #d7473e; font-size: 1.7rem; }
.contact-method strong, .contact-method small { display: block; overflow-wrap: anywhere; }
.contact-method strong { color: var(--navy); font-size: .94rem; }
.contact-method small { margin-top: 1px; color: var(--muted); font-size: .8rem; }
.focal-list h3 { margin: 0 0 7px; color: var(--navy); font-size: .98rem; }
.focal-list h3 span { margin-right: 7px; color: var(--blue); }
.focal-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 2px; border-bottom: 1px solid #cbd8e9; color: var(--ink); font-size: .78rem; }
.focal-row strong { flex: 0 0 auto; color: var(--navy); font-variant-numeric: tabular-nums; }
.site-footer { background: #142b52; color: #e5edfc; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 17px; }
.footer-inner p { margin: 0; font-size: .82rem; }
.footer-note { color: #bdcde9; }

@media (max-width: 850px) {
  .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-card { min-height: 120px; }
  .program-data-layout { grid-template-columns: 1fr; }
  .single-trend { padding: 14px 0 0; border-left: 0; border-top: 1px solid #d6e1f0; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1160px); }
  .header-inner { min-height: 68px; gap: 10px; }
  .logo-container { width: 47px; height: 47px; flex-basis: 47px; }
  .brand .eyebrow { font-size: .58rem; }
  .brand h1 { font-size: 1rem; }
  .brand-subtitle { font-size: .7rem; }
  .hero { padding: 28px 0 22px; }
  .hero-copy { padding-inline: 3px; }
  .hero h2 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .overview-card { min-height: 112px; }
  .overview-card:last-child { grid-column: 1 / -1; }
  .section { padding-block: 28px; }
  .section-heading { margin-bottom: 17px; }
  .program summary { gap: 9px; min-height: 54px; padding: 9px 12px; }
  .program-icon { width: 30px; flex-basis: 30px; font-size: 1.5rem; }
  .program-title { font-size: .92rem; }
  .program-subtitle { font-size: .8rem; }
  .program-content { padding: 12px; }
  .indicator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .indicator-card { min-height: 88px; padding: 9px; }
  .metric-value { font-size: 1.5rem; }
  .metric-label { font-size: .8rem; }
  .indicator-card.horizontal { grid-template-columns: 30px auto 1fr; gap: 7px; padding: 8px; }
  .horizontal .metric-value { font-size: 1.25rem; }
  .horizontal .metric-label { font-size: .75rem; }
  .trend-panel { grid-template-columns: 1fr; gap: 10px; padding-inline: 2px; }
  .chart-placeholder { min-height: 105px; }
  .contact-panel { padding: 20px 16px; }
  .contact-columns { grid-template-columns: 1fr; gap: 17px; }
  .contact-methods { padding: 0 0 16px; border-right: 0; border-bottom: 2px solid #b9c9df; }
  .focal-row { font-size: .72rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}


/* Consistent custom SVG pictograms inspired by the supplied dashboard reference */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.overview-icon svg { display: block; width: 39px; height: 39px; color: var(--blue); }
.program-icon svg { display: block; width: 34px; height: 34px; color: var(--blue); }
.metric-symbol svg { display: block; width: 31px; height: 31px; color: var(--blue); }
.contact-heading-icon { display: inline-block; width: 21px; height: 21px; margin-right: 6px; vertical-align: -4px; color: var(--blue); }
.program summary:hover .program-icon svg { transform: translateY(-1px); }
.program-icon svg { transition: transform .18s ease; }
@media (max-width: 620px) {
  .overview-icon svg { width: 34px; height: 34px; }
  .program-icon svg { width: 29px; height: 29px; }
  .metric-symbol svg { width: 27px; height: 27px; }
}

/* Facility hierarchy: hospital > RHU > BHS */
.overview-card:nth-child(2) .overview-icon svg { width: 43px; height: 43px; }
.overview-card:nth-child(3) .overview-icon svg { width: 39px; height: 39px; }
.overview-card:nth-child(4) .overview-icon svg { width: 35px; height: 35px; }


/* Public-facing dashboard content and expanded program details */
.program-heading { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.program-title { flex: initial; }
.program-intro { color: var(--muted); font-size: .78rem; font-weight: 400; line-height: 1.3; }
.program summary { min-height: 64px; }
.program[open] summary .program-intro { color: #38577f; }
.section-intro { margin: 0 0 13px; color: var(--muted); font-size: .9rem; }
.indicator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-period { display: block; margin-top: 5px; color: #61728a; font-size: .68rem; font-weight: 700; letter-spacing: .02em; }
.data-callout { margin: 13px 0; padding: 11px 14px; border-left: 4px solid #2b75cf; border-radius: 7px; background: #f0f6ff; color: #284365; font-size: .84rem; }
.subsection-title { margin: 22px 0 10px; color: var(--navy); font-size: 1.08rem; }
.plain-explanation { margin: 0 0 12px; color: var(--muted); font-size: .86rem; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.chart-card { min-width: 0; padding: 12px 14px 9px; border: 1px solid #dce7f5; border-radius: 12px; background: #fbfdff; }
.chart-card h4 { margin: 0 0 5px; color: var(--navy); font-size: .88rem; }
.trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-caption { margin: 2px 0 0; color: var(--muted); font-size: .7rem; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 2px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .7rem; }
.legend-item i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.data-note { line-height: 1.45; }
.dashboard-source { margin: 16px 0 0; padding: 10px 13px; border-radius: 9px; background: #f5f8fd; color: #64748b; font-size: .75rem; }
.bar-chart { display: grid; gap: 8px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 22px; align-items: center; gap: 9px; color: #52627a; font-size: .78rem; }
.bar-row strong { color: var(--navy); text-align: right; }
.bar-track { height: 11px; overflow: hidden; border-radius: 20px; background: #e8eff8; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2a77ce, #78afea); }
.initiatives-section { background: #f7f9fd; }
.initiative-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.initiative-card { padding: 20px; border: 1px solid #dce6f3; border-radius: 14px; background: white; box-shadow: var(--shadow); }
.initiative-kicker { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.initiative-card h3 { margin: 6px 0; color: var(--navy); font-size: 1.12rem; }
.initiative-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.about-section { padding-top: 28px; }
.about-panel { max-width: 900px; padding: 26px 30px; border-radius: 16px; background: #f1f6ff; text-align: center; }
.about-panel h2 { margin: 0 0 8px; color: var(--navy); font-size: clamp(1.5rem, 3vw, 2rem); }
.about-panel > p:last-child { max-width: 760px; margin: 0 auto; color: var(--muted); }
.acronym-section { padding: 18px 0; background: #f7f9fd; }
.acronym-details { border: 1px solid #dce6f3; border-radius: 10px; background: white; }
.acronym-details summary { padding: 13px 16px; color: var(--navy); cursor: pointer; font-weight: 700; }
.acronym-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 22px; padding: 0 16px 14px; }
.acronym-grid p { margin: 4px 0; color: var(--muted); font-size: .78rem; }
.acronym-grid strong { color: var(--navy); }

@media (max-width: 850px) {
  .indicator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .program summary { min-height: 66px; }
  .program-intro { font-size: .72rem; }
  .indicator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-value { font-size: 1.4rem; }
  .chart-card { padding: 10px; }
  .bar-row { grid-template-columns: 92px minmax(0, 1fr) 18px; gap: 6px; font-size: .72rem; }
  .initiative-grid, .acronym-grid { grid-template-columns: 1fr; }
  .initiative-card { padding: 16px; }
  .about-panel { padding: 22px 17px; }
}

.overview-note { margin: 12px 2px 0; color: #dceaff; font-size: .74rem; line-height: 1.4; }


/* JSON-driven interactive SVG charts */
.chart-render { position: relative; width: 100%; min-height: 190px; }
.chart-render svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-render .chart-point { cursor: crosshair; outline: none; }
.chart-render .chart-point:focus-visible { stroke: #f59e0b; stroke-width: 3.5; }
.chart-tooltip { position: absolute; z-index: 5; display: none; min-width: 112px; max-width: 210px; padding: 8px 11px; border-radius: 8px; background: #102b53; color: #fff; font-size: .72rem; line-height: 1.3; text-align: center; box-shadow: 0 5px 18px rgba(9,31,66,.22); pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); white-space: normal; }
.chart-tooltip strong { display: block; font-size: 1rem; line-height: 1.2; font-weight: 800; }
.chart-tooltip.is-visible { display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 13px; margin: 3px 0 5px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .7rem; }
.legend-item i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
@media (max-width: 620px) { .chart-render { min-height: 170px; } .chart-tooltip { font-size: .72rem; } }

/* Consistent Lucide-style section icons */
.program-icon svg, .overview-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section-inline-icon {
  display: inline-block;
  width: 25px;
  height: 25px;
  margin-right: 7px;
  vertical-align: -4px;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section-inline-icon.small {
  width: 17px;
  height: 17px;
  margin-right: 4px;
  vertical-align: -3px;
}
