/* ==========================================================================
   Notice board (/notices) and a notice (/notices/{slug})
   --------------------------------------------------------------------------
   Shared pieces (page hero, notice cards, badges, pagination, buttons,
   prose) come from site.css; everything here is scoped to .notices-* /
   .notice-*.
   ========================================================================== */

/* Number ranges in titles ("2027-28") stay on one line. */
.notices-nowrap {
  white-space: nowrap;
}

/* Board: the newest notice ------------------------------------------------- */
.notices-feature {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.75rem;
  min-height: 17rem;
  overflow: hidden;
  padding: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
  border-radius: var(--radius-xl);
  background: radial-gradient(130% 140% at 100% 100%, var(--navy-700) 0%, var(--navy-900) 52%, var(--navy-950) 100%);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-lift);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}
.notices-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 34px 70px -30px rgb(5 15 42 / 0.7);
}
.notices-feature__rays {
  position: absolute;
  right: -20rem;
  bottom: -20rem;
  z-index: -1;
  width: 40rem;
  height: 40rem;
  color: var(--gold-500);
  opacity: 0.15;
  -webkit-mask-image: radial-gradient(circle closest-side, black 22%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 22%, transparent 100%);
  animation: turn 150s linear infinite;
  transition: opacity 0.7s var(--ease-out);
}
.notices-feature:hover .notices-feature__rays {
  opacity: 0.26;
}
.notices-feature__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.notices-feature__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  color: var(--gold-300);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.notices-feature__arrow {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-800);
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.5);
  transition: transform 0.5s var(--ease-out);
}
.notices-feature:hover .notices-feature__arrow {
  transform: rotate(45deg);
}
.notices-feature__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-300);
}
.notices-feature__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
}
.notices-feature__title {
  margin-top: 0.8rem;
  max-width: 32ch;
  font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--white);
  overflow-wrap: anywhere;
}

/* Board and "more notices": rows of notice cards ---------------------------- */
.notices-list {
  display: grid;
  gap: 0.75rem;
}
.notices-feature + .notices-list {
  margin-top: 1.25rem;
}
.notices-list > li {
  display: flex;
  min-width: 0;
}
.notices-list .notice-card {
  flex: 1;
  min-width: 0;
}
.notices-list .notice-card__title {
  overflow-wrap: anywhere;
}
@media (min-width: 48rem) {
  .notices-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
  .notices-feature + .notices-list {
    margin-top: 1.5rem;
  }
}

.notices-board__count {
  margin-top: 2.75rem;
  font-size: 0.85rem;
  font-weight: 650;
  text-align: center;
  color: var(--ink-soft);
}
.notices-board__count + .pagination {
  margin-top: 1rem;
}

/* A notice: hero ---------------------------------------------------------- */
.notice-hero .page-hero__title {
  overflow-wrap: anywhere;
}
.notice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink-soft);
}
.notice-meta__date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.8);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}
.notice-meta__date .icon {
  width: 1rem;
  height: 1rem;
  color: var(--gold-600);
}
.notice-meta__file {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.notice-meta__file .icon {
  width: 0.95rem;
  height: 0.95rem;
}

/* A notice: text, attachment and aside --------------------------------------- */
.notice-layout {
  display: grid;
  gap: 3rem;
}
.notice-article {
  min-width: 0;
}
.notice-text {
  max-width: 42rem;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.notice-text a {
  color: var(--navy-700);
  font-weight: 650;
}

.notice-doc,
.notice-figure {
  margin-top: 2.5rem;
}
.notice-article > :first-child {
  margin-top: 0;
}

/* Attached PDF */
.notice-doc {
  overflow: hidden;
  border: 1px solid var(--sand);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.notice-doc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 1rem 1rem;
}
.notice-doc__label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}
.notice-doc__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
}
.notice-doc__icon .icon {
  width: 1.2rem;
  height: 1.2rem;
}
.notice-doc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Inline preview: only on screens 48rem and wider (notices.js fills it). */
.notice-doc__preview {
  display: none;
  border-top: 1px solid var(--sand);
  background: var(--paper-2);
}
.notice-doc__frame {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 30rem;
  max-height: 56rem;
  border: 0;
}
@media (min-width: 48rem) {
  .notice-doc__preview {
    display: block;
  }
}

/* Attached image: a matted frame of fixed shape, so nothing jumps while it
   loads; the whole image stays visible and opens full size in the viewer. */
.notice-figure {
  max-width: 42rem;
}
.notice-figure__link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 0.75rem;
  border: 1px solid var(--sand);
  border-radius: var(--radius-xl);
  background: var(--paper-2);
  box-shadow: var(--shadow-lift);
}
.notice-figure__link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.7s var(--ease-out);
}
.notice-figure__link:hover img {
  transform: scale(1.02);
}
.notice-figure__zoom {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--navy-800);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease-out);
}
.notice-figure__link:hover .notice-figure__zoom {
  transform: scale(1.08);
}
.notice-figure__hint {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
@media (min-width: 48rem) {
  .notice-figure__link {
    aspect-ratio: 1;
  }
}

/* Aside */
.notice-aside__card {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgb(232 224 207 / 0.9);
  border-radius: var(--radius-xl);
  background: var(--paper-2);
  box-shadow: var(--shadow-soft);
}
.notice-apply {
  --ring: var(--focus-ring-on-dark); /* gold focus rings on navy */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 130% at 100% 0%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: var(--white);
}
.notice-apply__rays {
  position: absolute;
  right: -9rem;
  bottom: -9rem;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  color: var(--gold-500);
  opacity: 0.18;
  -webkit-mask-image: radial-gradient(circle closest-side, black 20%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, black 20%, transparent 100%);
  animation: turn 120s linear infinite;
}
.notice-apply__title {
  font-size: 1.4rem;
  font-weight: 520;
  line-height: 1.15;
  color: var(--white);
}
.notice-apply__body {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgb(255 255 255 / 0.78);
}
.notice-apply .btn {
  margin-top: 1.1rem;
}
.notice-aside__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 0.15rem 0.25rem;
}
/* Share: a check replaces the share icon while "Link copied" shows (notices.js). */
.notice-share__done,
.notice-share.is-copied .notice-share__icon {
  display: none;
}
.notice-share.is-copied .notice-share__done {
  display: block;
  color: var(--gold-600);
}

@media (min-width: 64rem) {
  .notice-layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 4rem;
  }
  .notice-aside {
    position: sticky;
    top: 7rem;
    align-self: start;
  }
  .notice-aside__card {
    padding: 1.5rem;
  }
}

/* More notices ---------------------------------------------------------------- */
.notice-more__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: 2.25rem;
}

/* Print: the notice itself (title, date and text, an attached image).
   Left out: the PDF buttons and preview (a framed PDF prints as an empty
   box), the admission box, Share, "All notices" and "More notices". */
@media print {
  .notice-doc__actions,
  .notice-doc__preview,
  .notice-aside,
  .notice-more,
  .notice-figure__zoom,
  .notice-figure__hint {
    display: none !important;
  }
  .notice-layout {
    display: block;
  }
  .notice-doc {
    box-shadow: none;
  }
}
