/* ==========================================================
   Information pages: routine, teachers, staff, governing body, students
   ========================================================== */
.info-lead { max-width: 640px; margin: 10px auto 0; font-size: 18px; color: var(--muted); }
.info { padding-top: 40px; padding-bottom: 74px; }
.info-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.info-btn {
    padding: 9px 20px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    transition: background .2s;
}

.info-btn:hover { background: var(--green-btn); }

/* ---------- People cards ---------- */
.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.person {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 10px 28px rgba(13, 45, 94, .06);
    transition: transform .25s, box-shadow .25s;
}

.person:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(13, 45, 94, .12); }

.person__photo {
    display: grid;
    place-items: center;
    width: 130px;
    height: 130px;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), #1c58a8);
    box-shadow: 0 0 0 5px #fff, 0 0 0 7px #dfe6f1;
}

.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person__initial {
    font-family: var(--font-title);
    font-size: 52px;
    font-weight: 800;
    color: #fff;
}

.person__name {
    margin: 0;
    font-family: var(--font-title);
    font-size: 19px;
    line-height: 1.4;
    color: var(--navy);
}

.person__role { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: var(--green); }
.person__detail { margin: 6px 0 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

.person__phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 5px 14px;
    border-radius: 999px;
    background: #f2f5fa;
    font-size: 14px;
    color: var(--navy);
}

.person__phone svg { width: 15px; height: 15px; }
.person__phone:hover { background: #e4ebf6; }

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.tab {
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: background .2s, color .2s, border-color .2s;
}

.tab:hover { border-color: var(--navy); color: var(--navy); }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs--small .tab { padding: 5px 14px; font-size: 14px; }

/* ---------- Routine ---------- */
.routine-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 26px 0 14px;
}

.routine-head h2 { margin: 0; font-family: var(--font-title); font-size: 22px; color: var(--navy); }

.routine-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(13, 45, 94, .06);
}

.routine { width: 100%; min-width: 760px; border-collapse: collapse; }

.routine th,
.routine td {
    padding: 10px;
    border: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
}

.routine thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; }
.routine tbody th { background: #f2f5fa; color: var(--navy); font-weight: 700; white-space: nowrap; }
.routine tbody tr:nth-child(even) td { background: #fbfcfe; }

.period { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.period + .period { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.period strong { font-size: 15px; color: var(--text); }
.period span { font-size: 13px; color: var(--green); }
.period small { font-size: 12px; color: var(--muted); }

/* ---------- Student numbers ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-box {
    padding: 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy), #1c58a8);
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 24px rgba(13, 45, 94, .18);
}

.stat-box span { display: block; font-size: 16px; opacity: .9; }
.stat-box strong { display: block; margin-top: 4px; font-size: 38px; line-height: 1.2; }
.stat-box--boys { background: linear-gradient(135deg, #1c6fd1, #4b93e6); }
.stat-box--girls { background: linear-gradient(135deg, #c2367a, #e06aa3); }
.stat-box--classes { background: linear-gradient(135deg, #13843f, #2fae63); }

.count-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(13, 45, 94, .06);
}

.count-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.count-table th,
.count-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.count-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
.count-table tbody th,
.count-table tfoot th { text-align: left; font-weight: 600; }
.count-table tbody tr:hover { background: #f8fafd; }
.count-table tfoot { background: #f2f5fa; font-weight: 700; color: var(--navy); }
.count-table__bar-col { width: 34%; }

.bar {
    position: relative;
    display: block;
    width: var(--w);
    height: 12px;
    border-radius: 999px;
    background: #e06aa3;
    overflow: hidden;
}

.bar__boys { position: absolute; inset: 0 auto 0 0; width: var(--w); background: #4b93e6; }

.bar-legend { margin-top: 12px; text-align: right; font-size: 14px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 12px; border-radius: 50%; }
.dot--boys { background: #4b93e6; }
.dot--girls { background: #e06aa3; }

@media (max-width: 760px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-box { padding: 16px; }
    .stat-box strong { font-size: 30px; }
    .count-table__bar-col { display: none; }
    .count-table { font-size: 15px; }
    .count-table th,
    .count-table td { padding: 10px; }
    .routine-head h2 { font-size: 18px; }
}

@media (max-width: 520px) {
    .people { grid-template-columns: 1fr 1fr; gap: 12px; }
    .person { padding: 18px 10px 16px; }
    .person__photo { width: 90px; height: 90px; }
    .person__initial { font-size: 36px; }
    .person__name { font-size: 16px; }
    .person__role { font-size: 14px; }
}

@media print {
    .site-header, .site-footer, .no-print, .to-top { display: none !important; }
    .info { padding: 0; }
    .routine-wrap { border: 0; box-shadow: none; overflow: visible; }
    .routine { min-width: 0; }
    .routine thead th { background: #eee !important; color: #000 !important; }
}

/* ---------- Holidays ---------- */
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-box__text { font-size: 22px !important; line-height: 1.4 !important; }
.stat-box small { display: block; margin-top: 2px; font-size: 15px; opacity: .9; }

.holiday-table th[scope="row"] { font-weight: 600; }
.holiday-table td:first-child { width: 70px; color: var(--muted); }
.holiday-note { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.holiday-table tr.is-past { opacity: .55; }
.holiday-table tr.is-now { background: #eef8f1; }
.pill--now { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #13843f; color: #fff; font-size: 12px; vertical-align: middle; }

@media (max-width: 760px) {
    .stats--3 { grid-template-columns: 1fr; }
    .holiday-table td:nth-child(4),
    .holiday-table th:nth-child(4) { display: none; }
}
