/* ==========================================================================
   Shivganga — Awards and Achievements page
   Page-specific components only; tokens, resets, utilities, the page hero
   and the closing CTA band come from page.css, which must load first.
   Scoped under .sg-aw.

   Note on naming: home.css declares .sg-awards / .sg-award UNSCOPED, for the
   award teaser on the home page. Everything here is prefixed .sg-aw- so the
   two cannot collide.
   ========================================================================== */

/* ==========================================================================
   THE HONOURS — alternating photograph and citation
   Five entries, each with a real heading and real text: the carousel this
   replaces hid four of the five behind JavaScript.
   ========================================================================== */
.sg-aw-honours { display: grid; gap: clamp(44px, 7vw, 92px); }

.sg-aw-honour {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(26px, 4.5vw, 60px);
  align-items: center;
}
/* Alternate the side the photograph sits on, so the column of five reads as
   a sequence rather than a list. */
.sg-aw-honour:nth-child(even) .sg-aw-honour__figure { order: 2; }

.sg-aw-honour__figure {
  border-radius: var(--sg-radius-lg);
  overflow: hidden;
  box-shadow: var(--sg-shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--sg-green-tint);
  position: relative;
}
.sg-aw-honour__figure img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  /* These are ceremony photographs: the people and the citation are near the
     top of the frame, so the crop is anchored there rather than centred. */
  object-position: center top;
}

.sg-aw-honour__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sg-font-head); font-weight: 700;
  font-size: .74rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--sg-orange-dark); background: var(--sg-orange-pale);
  border-radius: 999px; padding: .42rem .85rem;
  margin-bottom: 1rem;
}
.sg-aw .sg-aw-honour h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  margin-bottom: .35em;
}
.sg-aw .sg-aw-honour__by {
  font-family: var(--sg-font-head); font-weight: 600;
  color: var(--sg-green); font-size: .98rem;
  margin-bottom: 1rem;
}

/* Who gave it, when, and what for — looked up rather than read, so a
   definition list rather than another paragraph. */
.sg-aw-honour__meta { margin: clamp(18px, 2.4vw, 26px) 0 0; display: grid; }
.sg-aw-honour__meta > div {
  display: grid; grid-template-columns: minmax(104px, 26%) minmax(0, 1fr);
  gap: 1rem; padding: .72rem 0;
  border-top: 1px solid var(--sg-cream-2);
}
.sg-aw-honour__meta > div:last-child { border-bottom: 1px solid var(--sg-cream-2); }
.sg-aw-honour__meta dt {
  font-family: var(--sg-font-head); font-weight: 600; font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sg-green);
  margin: 0; align-self: center;
}
.sg-aw-honour__meta dd {
  margin: 0; color: var(--sg-ink-2); font-size: .95rem; align-self: center;
}

/* ==========================================================================
   PRESS COVERAGE
   The page this replaces showed seven scans in a carousel with no captions,
   so a reader who could not read Hindi learned nothing from them. Each card
   now names the paper and the date and states what the piece said; the scan
   itself opens full size in the lightbox.
   ========================================================================== */
.sg-aw-press {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}
.sg-aw-clip {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--sg-white);
  border: 1px solid var(--sg-cream-2);
  border-radius: var(--sg-radius);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.sg-aw-clip:hover { transform: translateY(-4px); box-shadow: var(--sg-shadow-lg); border-color: var(--sg-green-soft); }
.sg-aw-clip__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sg-cream); }
.sg-aw-clip__media img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  /* Newsprint: the masthead and headline are the top band of the scan. */
  object-position: center top;
  transition: transform .5s ease;
}
.sg-aw-clip:hover .sg-aw-clip__media img { transform: scale(1.04); }
.sg-aw-clip__body { padding: 1.15rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.sg-aw-clip__paper {
  font-family: var(--sg-font-head); font-weight: 700;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sg-orange-dark); margin-bottom: .5rem;
  display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline;
}
.sg-aw-clip__paper span { color: var(--sg-muted-2); font-weight: 600; letter-spacing: .08em; }
.sg-aw .sg-aw-clip h3 { font-size: 1.02rem; line-height: 1.35; margin-bottom: .45em; }
.sg-aw .sg-aw-clip p { font-size: .9rem; margin-bottom: 0; }
/* The trigger is a real button carrying the accessible name, stretched over
   the whole card so the card is clickable without nesting block content
   inside a <button>. */
.sg-aw-clip__open {
  margin-top: auto; padding: 1rem 0 0;
  background: none; border: 0; font: inherit; text-align: left;
  font-family: var(--sg-font-head); font-weight: 600; font-size: .84rem;
  color: var(--sg-green); display: inline-flex; align-items: center; gap: .4rem;
  align-self: flex-start; cursor: pointer;
}
.sg-aw-clip__open::after { content: ""; position: absolute; inset: 0; }
.sg-aw-clip__open:focus-visible { outline: 3px solid var(--sg-orange); outline-offset: 3px; }

/* ==========================================================================
   GALLERY
   Fixed row height with a few wider tiles, so the mosaic has some rhythm
   without the images being stretched out of their proportions.
   ========================================================================== */
.sg-aw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-rows: 152px;
  grid-auto-flow: dense;
  gap: 10px;
}
.sg-aw-tile {
  position: relative; overflow: hidden; padding: 0; border: 0;
  border-radius: 10px; background: var(--sg-green-tint);
  cursor: pointer;
}
.sg-aw-tile--wide { grid-column: span 2; }
.sg-aw-tile--big  { grid-column: span 2; grid-row: span 2; }
.sg-aw-tile img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
  transition: transform .5s ease;
}
.sg-aw-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,17,14,0) 55%, rgba(9,17,14,.45) 100%);
  opacity: 0; transition: opacity .25s ease;
}
.sg-aw-tile:hover img { transform: scale(1.07); }
.sg-aw-tile:hover::after { opacity: 1; }
.sg-aw-tile:focus-visible { outline: 3px solid var(--sg-orange); outline-offset: 2px; }

/* ==========================================================================
   LIGHTBOX
   Replaces a hand-rolled viewer that threw on load (its script ran before the
   markup it queried) and could only be dismissed with the mouse.
   ========================================================================== */
.sg-lb[hidden] { display: none; }
.sg-lb {
  position: fixed; inset: 0; z-index: 4000;
  /* Opaque. The page beneath is cream with near-black headings, and even at
     .975 those headings ghosted through and competed with the photograph. */
  background: #0A120F;
  display: grid; grid-template-rows: 1fr auto;
  padding: clamp(12px, 2.4vw, 28px);
}
.sg-lb__stage {
  position: relative; min-height: 0;
  display: grid; place-items: center;
}
.sg-lb__stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0,0,0,.6);
}
.sg-lb__cap {
  color: rgba(255,255,255,.8);
  font-size: .9rem; text-align: center;
  padding: .9rem 3rem .2rem;
  min-height: 2.4em;
}
.sg-lb__cap b {
  display: block; color: #fff;
  font-family: var(--sg-font-head); font-weight: 600; font-size: 1rem;
  margin-bottom: .15rem;
}
.sg-lb__count {
  display: block; margin-top: .45rem;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

.sg-lb__btn {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.sg-lb__btn:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.sg-lb__btn:focus-visible { outline: 3px solid var(--sg-orange); outline-offset: 2px; }
.sg-lb__btn[disabled] { opacity: .3; cursor: default; }
.sg-lb__prev { left: 0; top: 50%; transform: translateY(-50%); }
.sg-lb__next { right: 0; top: 50%; transform: translateY(-50%); }
.sg-lb__close { top: 0; right: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1040px) {
  .sg-aw-press { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sg-aw-honour { grid-template-columns: 1fr; }
  /* Stacked, the photograph always leads. */
  .sg-aw-honour:nth-child(even) .sg-aw-honour__figure { order: 0; }
}
@media (max-width: 700px) {
  .sg-aw-grid { grid-auto-rows: 124px; gap: 8px; }
  .sg-lb__cap { padding-inline: 1rem; }
  .sg-lb__btn { width: 42px; height: 42px; }
}
@media (max-width: 620px) {
  .sg-aw-press { grid-template-columns: 1fr; }
  .sg-aw-honour__meta > div { grid-template-columns: 1fr; gap: .2rem; }
}
/* Below two columns a spanning tile would push the grid past the viewport,
   so the spans are dropped rather than allowed to overflow. */
@media (max-width: 560px) {
  .sg-aw-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 104px; }
  .sg-aw-tile--wide, .sg-aw-tile--big { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-aw-clip, .sg-aw-clip__media img, .sg-aw-tile img { transition: none; }
  .sg-aw-clip:hover { transform: none; }
  .sg-aw-clip:hover .sg-aw-clip__media img,
  .sg-aw-tile:hover img { transform: none; }
}
