/* ============================================================================
   public-pages.css — the public pages (notification list, CMS pages, privacy
   policy) on the design system. Loaded after tokens / portal-applicant /
   components. Only what these pages need beyond components.css lives here;
   colours come from the portal tokens, never raw hex for brand values.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Masthead with a navigation row
   ------------------------------------------------------------------------- */
.iitd-masthead-public { grid-template-columns: auto minmax(0, 1fr) auto; }
.iitd-masthead-public .iitd-logo img { height: 66px; }
.iitd-masthead-public .iitd-mast-mid { text-align: start; }
.iitd-mast-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.iitd-mast-nav a {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    transition: background .15s, color .15s;
}
.iitd-mast-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.iitd-mast-nav a.is-current { background: var(--brand-soft); color: var(--brand-dark); }
.iitd-mast-nav .iitd-mast-cta {
    background: var(--brand);
    color: var(--on-brand);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 6px;
    box-shadow: var(--shadow-cta);
}
.iitd-mast-nav .iitd-mast-cta:hover { background: var(--brand-dark); color: var(--on-brand); }
@media (max-width: 991px) {
    .iitd-masthead-public { grid-template-columns: 1fr; justify-items: center; }
    .iitd-masthead-public .iitd-mast-mid { text-align: center; }
    .iitd-mast-nav { justify-content: center; }
}

/* ---------------------------------------------------------------------------
   2. Hero for a titled page
   ------------------------------------------------------------------------- */
.iitd-hero-public { min-height: 220px; background-image: var(--brand-gradient-wide); }
.iitd-hero-public::before { background: radial-gradient(1200px 300px at 85% 0%, rgba(255, 255, 255, .10), transparent 60%); }
.iitd-hero-public .iitd-hero-inner { padding-top: 34px; padding-bottom: 38px; }
.iitd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; margin: 0 0 14px; color: var(--on-brand-soft); }
.iitd-crumbs a { color: var(--on-brand-soft); text-decoration: none; }
.iitd-crumbs a:hover { color: var(--on-brand); text-decoration: underline; }
.iitd-crumbs .is-here { color: var(--on-brand); }
.iitd-hero-public h2 { max-width: 22ch; text-wrap: balance; }
.iitd-hero-public .iitd-hero-sub { max-width: 64ch; margin-bottom: 0; }

/* ---------------------------------------------------------------------------
   3. Page body
   ------------------------------------------------------------------------- */
.iitd-main-public { margin-top: -22px; }

/* Long-form text (CMS page, privacy policy) */
.iitd-prose { max-width: 76ch; font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.iitd-prose > :first-child { margin-top: 0; }
.iitd-prose h1, .iitd-prose h2, .iitd-prose h3, .iitd-prose h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.25;
    margin: 30px 0 10px;
    text-wrap: balance;
}
.iitd-prose h2 { font-size: var(--fs-h2); }
.iitd-prose h3 { font-size: var(--fs-h3); }
.iitd-prose h4 { font-size: var(--fs-h4); text-transform: none; }
.iitd-prose p { margin: 0 0 14px; }
.iitd-prose ul, .iitd-prose ol { padding-inline-start: 22px; margin: 0 0 16px; }
.iitd-prose li { margin: 0 0 6px; }
.iitd-prose li::marker { color: var(--brand); }
.iitd-prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.iitd-prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.iitd-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: var(--fs-sm); }
.iitd-prose th, .iitd-prose td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.iitd-prose th { background: var(--paper); text-align: start; }
.iitd-prose blockquote { border-inline-start: 3px solid var(--brand-line); margin: 0 0 16px; padding: 4px 16px; color: var(--ink-soft); }
.iitd-prose address { font-style: normal; line-height: 1.7; }
.iitd-prose-meta { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 18px; }

/* Lead image on a CMS page */
.iitd-page-figure { margin: 0 0 24px; }
.iitd-page-figure img { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); display: block; }

/* Contact list inside an aside */
.iitd-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.iitd-contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.iitd-contact-list i { font-size: 18px; color: var(--brand); flex: none; margin-top: 1px; }
.iitd-contact-list a { color: var(--brand); text-decoration: none; }
.iitd-contact-list a:hover { text-decoration: underline; }

/* Two-column reading layout with a sticky side panel */
.iitd-read { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 26px; align-items: start; }
@media (max-width: 991px) { .iitd-read { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   4. Notification list
   ------------------------------------------------------------------------- */
.iitd-notice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 26px; align-items: stretch; }
.iitd-notice { display: contents; }

/* Every card in a row is the same height: the body grows, the actions sit at the foot. */
.iitd-notice-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.iitd-notice-card .iitd-notice-body { display: flex; flex-direction: column; flex: 1 1 auto; }
.iitd-notice-card .iitd-notice-summary { flex: 1 1 auto; }
.iitd-notice-card .iitd-notice-actions { margin-top: auto; }
/* The CTA is a button in a row, not the full-width form submit (a.iitd-cta outranks .iitd-cta-sm). */
.iitd-notice-actions a.iitd-cta { display: inline-flex; width: auto; padding: 11px 22px !important; font-size: var(--fs-body); border-radius: var(--radius) !important; }
.iitd-notice-card .iitd-notice-cover { position: relative; aspect-ratio: 21 / 9; background: var(--brand-soft); overflow: hidden; }
.iitd-notice-card .iitd-notice-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.iitd-notice-card:hover .iitd-notice-cover img { transform: scale(1.03); }
.iitd-notice-card .iitd-notice-cover .iitd-chip { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; }
.iitd-notice-body { padding: 24px 28px 26px; }
@media (max-width: 575px) { .iitd-notice-body { padding: 20px 18px 22px; } }
.iitd-notice-body h3 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); color: var(--brand-dark); margin: 0 0 4px; line-height: 1.2; text-wrap: balance; }
.iitd-notice-body h3 a { color: inherit; text-decoration: none; }
.iitd-notice-body h3 a:hover { color: var(--brand); }
.iitd-notice-short { font-size: var(--fs-sm); color: var(--ink-mute); font-weight: 600; letter-spacing: .04em; margin: 0 0 16px; }
.iitd-notice-summary { color: var(--ink-soft); margin: 0 0 18px; line-height: 1.65; }

.iitd-notice-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; }
.iitd-notice-date { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--paper); }
.iitd-notice-date .k { display: block; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px; }
.iitd-notice-date .v { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.iitd-notice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.iitd-notice-actions .iitd-link { color: var(--brand); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.iitd-notice-actions .iitd-link:hover { text-decoration: underline; }

/* Empty state */
.iitd-empty { text-align: center; padding: 48px 20px; color: var(--ink-mute); }
.iitd-empty i { font-size: 40px; color: var(--brand-line); display: block; margin-bottom: 10px; }

/* ---------------------------------------------------------------------------
   5. Footer
   ------------------------------------------------------------------------- */
.iitd-footer { background: var(--brand-deep); color: var(--on-brand-soft); }
.iitd-footer-grid {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 44px var(--page-gutter) 30px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
@media (max-width: 767px) { .iitd-footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.iitd-footer-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); color: var(--on-brand); margin: 0 0 12px; }
.iitd-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
.iitd-footer a { color: var(--on-brand-soft); text-decoration: none; }
.iitd-footer a:hover { color: var(--on-brand); text-decoration: underline; }
.iitd-footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.iitd-footer-contact i { font-size: 18px; color: var(--brand-bright); flex: none; margin-top: 1px; }
.iitd-footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.iitd-footer-social a {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--on-brand);
    font-size: 18px;
    transition: background .15s;
}
.iitd-footer-social a:hover { background: var(--brand); text-decoration: none; }
.iitd-footer .iitd-foot { background: rgba(0, 0, 0, .25); }

/* ---------------------------------------------------------------------------
   6. Print
   ------------------------------------------------------------------------- */
@media print {
    .iitd-mast-nav, .iitd-footer, .iitd-crumbs { display: none !important; }
    .iitd-hero-public { min-height: 0; background: none; color: #000; }
    .iitd-hero-public .iitd-hero-inner { color: #000; text-shadow: none; padding: 0 0 12px; }
    .iitd-hero-public h2, .iitd-hero-public .iitd-hero-sub { color: #000; }
}

/* Notification list: Current / Upcoming / Past groups */
.iitd-notice-group + .iitd-notice-group { margin-top: 44px; }
/* the group heading is a card of its own: the page content is pulled up over the hero band (.iitd-main-public), so a bare heading would sit on the gradient */
.iitd-notice-group-head { margin: 0 0 18px; background: var(--surface, #fff); border: 1px solid var(--line, #dfe5ec); border-radius: var(--radius-lg, 18px); box-shadow: var(--shadow-card, 0 10px 30px rgba(10, 37, 64, .08)); position: relative; overflow: hidden; }
.iitd-notice-group-row { display: flex; align-items: center; gap: 14px; padding: 18px 22px; }
.iitd-notice-group-ic { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-gradient, var(--brand, #1a5c96)); color: #fff; font-size: 22px; }
.iitd-notice-group.is-upcoming .iitd-notice-group-ic { background: linear-gradient(135deg, #b7791f, #e0a742); }
.iitd-notice-group.is-past .iitd-notice-group-ic { background: linear-gradient(135deg, #4b5563, #8a94a6); }
.iitd-notice-group-head h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-family: var(--font-display); font-size: var(--fs-h2, 24px); font-weight: 700; color: var(--brand-deep, #0a2540); }
.iitd-notice-group-n { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; background: var(--fill, #eef2f6); color: var(--ink-soft, #5b6572); font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.iitd-notice-group-head p { margin: 0; font-size: var(--fs-sm, 13px); color: var(--ink-soft, #5b6572); }
.iitd-notice-none { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px dashed var(--line, #dfe5ec); background: var(--fill, #f6f8fb); color: var(--ink-soft, #5b6572); font-size: var(--fs-body, 14px); }
.iitd-notice-none i { font-size: 26px; color: var(--brand, #1a5c96); }
.iitd-notice-none p { margin: 0; }
.iitd-chip.is-soon { background: rgba(183, 121, 31, .85); border-color: rgba(255, 255, 255, .4); }
.iitd-notice-group.is-past .iitd-notice-card { opacity: .92; }
