/* PRE DETSKÝ ŽIVOT – Klinika v číslach. Izolované štýly .stats-* */
.stats-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, #fff 0%, #f5f8fc 68%, #edf3fa 100%);
    padding: 92px 0 155px;
}
.stats-hero-content { max-width: 1020px; text-align: center; position: relative; z-index: 2; }
.stats-eyebrow { margin: 0 0 16px; font-size: 12px; line-height: 1.5; letter-spacing: .18em; font-weight: 750; color: #b38319; }
.stats-hero h1, .stats-section h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy-deep, #17356f);
    line-height: 1.11;
    letter-spacing: -.034em;
}
.stats-hero h1 { margin: 0 0 24px; font-size: clamp(50px, 6vw, 84px); }
.stats-hero h1 span, .stats-section h2 span { color: var(--gold, #f1b533); }
.stats-lead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.85; color: #344767; margin: 0 auto 33px; max-width: 790px; }
.stats-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); max-width: 1000px; gap: 18px; margin: 0 auto; }
.stats-summary-card { background: #fff; padding: 25px; border: 1px solid #e9edf5; border-top: 4px solid var(--stats-year-color, #1b427f); border-radius: 23px; box-shadow: 0 14px 40px rgba(18,48,98,.06); display: grid; gap: 5px; text-align: left; }
.stats-summary-card > span { color: #9f771d; font-weight: 750; letter-spacing: .14em; font-size: 11px; }
.stats-summary-card strong { color: var(--navy-deep, #17356f); font-family: Georgia, serif; font-size: 43px; line-height: 1.1; }
.stats-summary-card small { color: #5a6980; font-size: 13px; }
.stats-wave { display: block; position: absolute; bottom: -1px; left: 0; width: 100%; height: 112px; pointer-events: none; z-index: 1; }

/* Sekcie / titulky */
.stats-section { padding: 92px 0 105px; }
.stats-section-white { background: #fff; }
.stats-section-blue { background: #f4f8fc; }
.stats-section-heading { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: end; gap: 44px; margin-bottom: 36px; }
.stats-section h2 { font-size: clamp(38px, 3.8vw, 59px); margin: 0; }
.stats-section-heading > p { font-size: 16px; line-height: 1.8; margin: 0; color: #536580; }
.stats-chart-card { background: #fff; padding: clamp(23px, 3vw, 43px); border: 1px solid #e7edf5; border-radius: 28px; box-shadow: 0 17px 50px rgba(20,50,98,.055); min-width: 0; }
.stats-chart-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 31px; }
.stats-chart-card h3 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 2vw, 29px); line-height: 1.25; color: var(--navy-deep, #17356f); margin: 0; }
.stats-chart-footnote { font-size: 13px; color: #697891; line-height: 1.65; margin: 28px 0 0; }
.stats-insight { max-width: 920px; margin: 24px 0 0; padding: 17px 22px; background: #fff8ea; border-left: 3px solid #f1b533; border-radius: 0 12px 12px 0; color: #354b69; font-size: 15px; line-height: 1.75; }
.stats-insight p { margin: 0 0 7px; }
.stats-insight p:last-child { margin-bottom: 0; }

/* Legenda, farby podľa rokov */
.stats-legend { display: flex; gap: 19px; align-items: center; flex-wrap: wrap; }
.stats-legend > span { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: #344767; }
.stats-legend-dot { display: inline-block; height: 11px; width: 11px; border-radius: 50%; }
.stats-colored { background: var(--stats-year-color, #1b427f); }
.stats-bar-track { height: 15px; border-radius: 30px; background: #edf2f8; overflow: hidden; width: 100%; }
.stats-bar-fill { display: block; height: 100%; background: var(--stats-year-color, #1b427f); border-radius: inherit; transition: width .35s ease; min-width: 0; }

/* Vekové porovnanie */
.stats-age-list { display: grid; gap: 0; }
.stats-age-row { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid #eef1f6; }
.stats-age-row:last-child { border-bottom: 0; }
.stats-age-label { font-weight: 700; color: #17356f; font-size: 15px; }
.stats-age-series { display: grid; gap: 8px; }
.stats-age-line { display: grid; grid-template-columns: 44px minmax(0,1fr) 48px; align-items: center; gap: 12px; }
.stats-age-line strong { font-size: 13px; color: #243c67; font-weight: 750; font-variant-numeric: tabular-nums; }
.stats-year-small { font-size: 12px; color: #74849a; font-variant-numeric: tabular-nums; }

/* Prepínač rokov – počet tlačidiel sa prispôsobuje dátam */
.stats-switch { display: inline-flex; flex-wrap: wrap; align-items: center; background: #f1f5fa; border-radius: 18px; padding: 4px; gap: 2px; }
.stats-year-button { border: 0; border-radius: 999px; padding: 10px 17px; background: transparent; color: #435777; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.stats-year-button[aria-pressed="true"] { background: var(--stats-year-color, #17356f); color: var(--stats-year-text, #fff); box-shadow: 0 3px 11px rgba(23,53,111,.15); }
.stats-year-button:focus-visible { outline: 3px solid var(--gold, #f1b533); outline-offset: 3px; }

/* Diagnostické horizontálne grafy */
.stats-horizontal-list { display: grid; gap: 20px; }
.stats-switch-chart .stats-bar-fill { background: var(--stats-year-color, #1b427f); }
.stats-horizontal-row { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr); gap: 25px; align-items: center; }
.stats-horizontal-label { color: #304766; font-weight: 600; font-size: 14px; line-height: 1.5; }
.stats-horizontal-bottom { display: grid; grid-template-columns: minmax(0,1fr) 47px; gap: 12px; align-items: center; }
.stats-horizontal-bottom strong { font-size: 14px; color: #17356f; font-variant-numeric: tabular-nums; text-align: right; }

/* Iné ochorenia – bez zobrazenia vzácnych jednotlivých diagnóz */
.stats-other-list { max-width: 930px; display: grid; gap: 30px; margin-top: 30px; }
.stats-other-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #17356f; font-size: 18px; font-variant-numeric: tabular-nums; }
.stats-other-row .stats-bar-track { height: 21px; }
.stats-other-detail { margin-top: 25px; }

/* Metodické vysvetlenie */

@media (max-width: 900px) {
    .stats-section-heading { grid-template-columns: 1fr; gap: 15px; }
    .stats-horizontal-row { grid-template-columns: minmax(185px, .85fr) minmax(0,1.15fr); gap: 18px; }
    .stats-section { padding: 75px 0 80px; }
}
@media (max-width: 650px) {
    .stats-hero { padding: 62px 0 108px; }
    .stats-hero h1 { font-size: clamp(45px, 10vw, 58px); }
    .stats-wave { height: 70px; }
    .stats-summary-grid { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
    .stats-summary-card { padding: 20px; }
    .stats-summary-card strong { font-size: 34px; }
    .stats-section { padding: 60px 0 72px; }
    .stats-section h2 { font-size: clamp(34px, 9vw, 44px); }
    .stats-chart-card { border-radius: 20px; padding: 22px 17px; }
    .stats-age-row { grid-template-columns: 1fr; gap: 10px; padding: 17px 0; }
    .stats-age-line { grid-template-columns: 40px minmax(0,1fr) 32px; gap: 7px; }
    .stats-age-label { font-size: 14px; }
    .stats-horizontal-list { gap: 23px; }
    .stats-horizontal-row { grid-template-columns: 1fr; gap: 7px; }
    .stats-horizontal-bottom { grid-template-columns: minmax(0,1fr) 30px; gap: 7px; }
    .stats-bar-track { height: 13px; }
    .stats-legend { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .stats-bar-fill, .stats-year-button { transition: none; }
}
