/* department.php: one page per department. Loaded after info.css (reading column, sections, links, questions).
   Shared look and colours: Styles/site.css */

/* the two actions under the page title: apply (the gold one) and call the section */
.dept-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.dept-cta a {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: 999px;
    font-weight: 700; font-size: 16px; text-decoration: none;
}
.dept-cta-main { background: var(--gold); color: var(--primary); }                     /* 8.4:1 */
.dept-cta-line { border: 1.5px solid rgba(232, 204, 122, .6); color: var(--gold-light); } /* 12.1:1 on navy */
.dept-cta-main:hover { background: var(--gold-light); }
.dept-cta-line:hover { background: rgba(232, 204, 122, .12); }
.dept-cta a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* this session: each class with its number of students, read from the records */
.dept-classes {
    list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.dept-classes li { padding: 18px 16px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.dept-classes li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.dept-n { font-size: 34px; line-height: 1.15; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.dept-c { font-size: 15px; color: var(--text-mid); }
.info .dept-sum { margin-top: 14px; color: var(--text-mid); font-size: 17px; }

/* what is taught: the subjects in this session's routine */
.dept-subjects { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.dept-subjects li {
    padding: 7px 16px; border: 1px solid var(--border-solid); border-radius: 999px; background: var(--white);
    color: var(--primary); font-size: 16px; line-height: 1.5;
}
.info .dept-note { margin: 14px 0 0; font-size: 15px; color: var(--text-light); }

/* the teachers who teach here: photo and name, each linking to their card on the teachers page */
.dept-teachers {
    list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 20px 12px;
}
.dept-teachers a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; color: var(--primary); }
.dept-teachers img, .dept-initial {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-pale); background: var(--cream-deep);
}
.dept-initial { display: grid; place-items: center; background: var(--primary); color: var(--gold-light); font-size: 24px; font-weight: 700; }
.dept-teachers span:not(.dept-initial) { font-size: 15px; line-height: 1.4; }
.dept-teachers a:hover span:not(.dept-initial) { text-decoration: underline; text-underline-offset: 3px; }
.dept-teachers a:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 4px; border-radius: 6px; }

/* fees: the rows of the admission page's table that belong to this department */
.dept-sample {
    display: inline-block; vertical-align: middle; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px;
    background: #fff7d6; color: var(--text-dark); font-size: 14px; font-weight: 600; line-height: 1.6;
}
.dept-table { overflow-x: auto; }
.dept-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.dept-table th, .dept-table td { padding-block: 12px; padding-inline: 0 14px; text-align: start; border-bottom: 1px solid var(--line); }
.dept-table thead th { font-size: 14px; font-weight: 600; color: var(--text-mid); }
.dept-table tbody th { color: var(--primary); font-weight: 600; }
.dept-table td { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-dark); }

/* the other five departments */
.dept-others { margin-top: 28px; }
.info .dept-others h3 { font-size: 17px; color: var(--text-mid); margin-bottom: 8px; }
.dept-others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.dept-others a { color: var(--primary); font-size: 17px; text-underline-offset: 3px; }
.dept-others a:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }

@media (max-width: 600px) {
    .dept-classes { grid-template-columns: repeat(2, 1fr); }
    .dept-classes li { padding-inline: 0 12px; border-inline-start: 0; border-top: 1px solid var(--line); }
    .dept-classes li:nth-child(-n+2) { border-top: 0; }
    .dept-n { font-size: 30px; }
}
