/* =========================================================
   Academic Calendar page
   Change the colours here and the whole page updates.
   ========================================================= */
.cal-page {
    --orange: #CB4C06;
    --orange-dark: #9E3A04;
    --orange-light: #FDF0E8;
    --text: #2E2622;
    --muted: #6B625C;
    --border: #ECE6E1;
    --card: #FFFFFF;
    color: var(--text);
}

.cal-page h2,
.cal-page h3 {
    color: var(--text);
    font-weight: 700;
}

/* ---------- Intro ---------- */
.cal-intro h2 { font-size: 2rem; margin-bottom: 6px; }
.cal-intro p  { color: var(--muted); margin-bottom: 28px; }

/* ---------- Buttons ---------- */
.cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--orange);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.cal-btn:hover { background: var(--orange-dark); color: #fff; text-decoration: none; }

.cal-btn.outline {
    background: transparent;
    color: var(--orange);
    border: 2px solid var(--orange);
    padding: 8px 18px;
}
.cal-btn.outline:hover { background: var(--orange); color: #fff; }

/* Download arrow icon (drawn with CSS, takes the text colour) */
.dl-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M5 21h14'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Current session (calendar page) ---------- */
.cal-hero {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px rgba(123, 45, 3, 0.45);
}

.cal-hero-top {                       /* orange strip with two ring holes */
    height: 34px;
    background: var(--orange);
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.cal-hero-top span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--card);
}

.cal-hero-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 30px 34px;
}
.cal-hero-body h3 { font-size: 1.4rem; margin: 8px 0 6px; }
.cal-hero-body p  { color: var(--muted); margin-bottom: 18px; }

.cal-label { color: var(--orange); font-size: 0.85rem; font-weight: 600; }

.cal-year {
    color: var(--orange);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.cal-earlier { margin-top: 14px; color: var(--muted); }
.cal-earlier a { color: var(--orange); font-weight: 800; margin-left: 16px; }

/* ---------- Departmental calendars ---------- */
.cal-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 48px 0 20px;
}
.cal-section-head h3 { font-size: 1.35rem; margin: 0; }

/* Semester switch */
.sem-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--orange-light);
}
.sem-btn {
    border: 0;
    background: transparent;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}
.sem-btn.active { background: var(--orange); color: #fff; }

.sem-panel.hidden { display: none; }

/* Department tiles */
.cal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cal-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}
a.cal-tile:hover { border-color: var(--orange); background: var(--orange-light); color: var(--text); text-decoration: none; }

.cal-tile strong { display: block; font-weight: 600; }
.cal-tile small  { color: var(--muted); }

.cal-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--orange-light);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
}
a.cal-tile:hover .cal-icon { background: var(--orange); color: #fff; }

.cal-tile.empty { border-style: dashed; background: transparent; }
.cal-tile.empty strong { color: var(--muted); font-weight: 500; }

.cal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-left: 4px;
    border-radius: 50px;
    background: var(--orange-light);
    color: var(--orange);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}
.cal-chip:hover { background: var(--orange); color: #fff; text-decoration: none; }

/* ---------- Holidays (ticket) ---------- */
.cal-ticket {
    display: flex;
    margin-top: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
}
.cal-ticket-stub {
    background: var(--orange);
    color: #fff;
    padding: 20px 26px;
    border-right: 2px dashed rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 800;
}
.cal-ticket-body {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}
.cal-ticket-body h3 { font-size: 1.15rem; margin: 0 0 4px; }
.cal-ticket-body p  { color: var(--muted); margin: 0; }

/* Keyboard focus */
.cal-page a:focus-visible,
.cal-page button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .cal-grid { grid-template-columns: 1fr; }
    .cal-hero-body { flex-direction: column-reverse; align-items: flex-start; padding: 24px; }
    .cal-year { font-size: 3.5rem; }
    .cal-ticket { flex-direction: column; }
    .cal-ticket-stub { border-right: 0; border-bottom: 2px dashed rgba(255, 255, 255, 0.6); }
}

/* Wide tablet / small laptop: the 8-column area is narrow, so stack the hero */
@media (min-width: 992px) and (max-width: 1199px) {
    .cal-hero-body { flex-direction: column-reverse; align-items: flex-start; }
}
