/* =====================================================================
   West Guwahati College of Education — site stylesheet (redesign, Oct 2026)
   Layout idea: river-blue institutional frame; the red woven border of the
   Assamese gamosa as the signature band; Lora headlines over a quiet Inter grid.
   Sections: 1 tokens · 2 fonts · 3 base · 4 chrome · 5 homepage · 6 inner pages
             7 legacy Bootstrap classes used by older pages · 8 motion
   ===================================================================== */

/* 1. Tokens ----------------------------------------------------------- */
:root {
  --bg: #f6f7f7;
  --surface: #ffffff;
  --surface-2: #eef2f3;
  --ink: #142229;
  --muted: #53636b;
  --line: #d9e1e4;
  --river: #0f4c5c;
  --river-deep: #0a3440;
  --gamosa: #b3261e;
  --gamosa-soft: #f7e4e2;
  --gold: #b88a22;
  --on-dark: #f1f6f7;
  --focus: #c99a2e;

  --display: "Lora", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --deva: "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Mangal", sans-serif;

  --radius: 10px;
  --wrap: 1200px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --shadow: 0 18px 40px -22px rgb(10 52 64 / .45);
  color-scheme: light;
}

/* 2. Fonts (self-hosted, SIL Open Font License — see assets/fonts/LICENSE.txt) */
@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

/* 3. Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--river); text-underline-offset: 3px; }
a:hover { color: var(--river-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
.w-wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.w-eyebrow { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gamosa); }
.w-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--river); color: #fff; padding: 8px 14px; border-radius: 6px; }
.w-skip:focus { left: 12px; }
.w-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gamosa band: the woven red border of the Assamese gamosa, drawn in CSS */
.w-gamosa {
  height: 22px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, var(--gamosa) 14px 16px, transparent 16px 30px),
    linear-gradient(var(--gamosa) 0 0) top / 100% 3px no-repeat,
    linear-gradient(var(--gamosa) 0 0) bottom / 100% 3px no-repeat,
    conic-gradient(from 45deg at 50% 50%, var(--gamosa) 25%, transparent 0 50%, var(--gamosa) 0 75%, transparent 0) center / 15px 8px repeat-x,
    var(--surface);
}
.w-gamosa.is-thin { height: 12px; background-size: auto, 100% 2px, 100% 2px, 10px 5px, auto; }

/* 4. Chrome: utility bar, masthead, navigation, ticker, footer --------- */
.w-utility { background: var(--river-deep); color: var(--on-dark); font-size: .82rem; }
.w-utility .w-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-block: 7px; }
.w-portals { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.w-portals a { color: inherit; text-decoration: none; opacity: .85; }
.w-portals a:hover { opacity: 1; text-decoration: underline; color: inherit; }
.w-counter { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; font-variant-numeric: tabular-nums; }

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
.w-masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.w-masthead-row { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.w-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.w-brand:hover { color: var(--ink); }
.w-brand img { flex: none; width: 54px; height: 54px; object-fit: contain; }
.w-brand-name { font-family: var(--display); font-weight: 600; font-size: 1.14rem; line-height: 1.15; }
.w-brand-addr { display: block; font-family: var(--body); font-weight: 400; font-size: .78rem; color: var(--muted); }
.w-naac { flex: none; margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .74rem; line-height: 1.25; color: var(--muted); text-decoration: none; }
.w-naac img { width: 50px; height: auto; }
.w-menu-btn { display: none; flex: none; margin-left: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; font: 600 .85rem var(--body); color: var(--ink); cursor: pointer; }

.w-nav { border-top: 1px solid var(--line); }
.w-nav-list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.w-nav-item { position: relative; }
.w-nav-item > a, .w-nav-item > details > summary {
  display: flex; align-items: center; gap: 6px; padding: 12px 13px;
  font-weight: 600; font-size: .9rem; color: var(--ink); text-decoration: none; cursor: pointer; list-style: none;
}
.w-nav-item > details > summary::-webkit-details-marker { display: none; }
.w-nav-item > details > summary::after {
  content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .45; transition: transform .2s;
}
.w-nav-item > details[open] > summary::after { transform: rotate(225deg); }
.w-nav-item > a:hover, .w-nav-item summary:hover, .w-nav-item.is-current > details > summary, .w-nav-item.is-current > a { color: var(--river); }
.w-nav-item.is-current > details > summary { box-shadow: inset 0 -3px 0 var(--gamosa); }
.w-panel {
  position: absolute; left: 0; top: 100%; z-index: 30; min-width: 270px;
  display: grid; gap: 2px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gamosa);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.w-panel.is-wide { min-width: min(560px, 92vw); grid-template-columns: 1fr 1fr; }
.w-nav-item:nth-last-child(-n+3) .w-panel { left: auto; right: 0; }
.w-panel a { display: block; padding: 8px 10px; border-radius: 6px; font-size: .88rem; color: var(--ink); text-decoration: none; }
.w-panel a:hover, .w-panel a[aria-current="page"] { background: var(--gamosa-soft); color: var(--gamosa); }

@media (max-width: 900px) {
  .w-naac span { display: none; }
  .w-menu-btn { display: block; }
  .w-nav { display: none; }
  .w-masthead.is-open .w-nav { display: block; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .w-nav-list { flex-direction: column; padding-bottom: 12px; }
  .w-nav-item > a, .w-nav-item > details > summary { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .w-panel, .w-panel.is-wide { position: static; min-width: 0; grid-template-columns: 1fr; box-shadow: none; border: 0; border-left: 3px solid var(--gamosa); border-radius: 0; margin: 6px 0 10px 6px; padding: 4px 8px; }
}
@media (max-width: 480px) {
  .w-brand img { width: 44px; height: 44px; }
  .w-brand-name { font-size: 1rem; }
  .w-brand-addr { display: none; }
  .w-naac img { width: 40px; }
}

.w-ticker { background: var(--gamosa); color: #fff; font-size: .88rem; overflow: hidden; }
.w-ticker .w-wrap { display: flex; align-items: center; gap: 16px; padding-block: 9px; }
.w-ticker-label { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: rgb(0 0 0 / .2); padding: 3px 8px; border-radius: 4px; }
.w-ticker-track { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.w-ticker-run { display: flex; gap: 48px; width: max-content; animation: w-run 50s linear infinite; }
.w-ticker:hover .w-ticker-run, .w-ticker:focus-within .w-ticker-run { animation-play-state: paused; }
.w-ticker-run a { color: #fff; text-decoration: none; white-space: nowrap; }
.w-ticker-run a:hover { text-decoration: underline; color: #fff; }
@keyframes w-run { to { transform: translateX(-50%); } }

.w-footer { background: var(--river-deep); color: var(--on-dark); font-size: .9rem; }
.w-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-block: 52px 28px; }
.w-footer h2 { font-family: var(--body); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #e2b94f; margin: 0 0 14px; }
.w-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.w-footer a { color: var(--on-dark); text-decoration: none; opacity: .85; }
.w-footer a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.w-footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.w-footer-brand img { width: 64px; height: 64px; background: #fff; border-radius: 50%; padding: 3px; flex: none; }
.w-footer-name { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; margin: 0 0 8px; }
.w-motto { margin: 14px 0 18px; font-size: .88rem; opacity: .85; }
.w-motto span[lang="sa"] { font-family: var(--deva); display: block; font-size: 1.05rem; opacity: 1; }
.w-contact { display: grid; gap: 6px; }
.w-contact div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-copy { background: none; border: 1px solid rgb(255 255 255 / .28); color: inherit; border-radius: 4px; font: 600 .68rem var(--body); letter-spacing: .06em; padding: 2px 7px; cursor: pointer; }
.w-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgb(255 255 255 / .15); padding-block: 18px 26px; font-size: .8rem; opacity: .72; }
@media (max-width: 900px) { .w-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .w-footer-grid { grid-template-columns: 1fr; } }

/* Buttons and links */
.w-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 8px; border: 1.5px solid transparent; font: 600 .95rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: transform .2s, background-color .2s, border-color .2s; }
.w-btn:hover { transform: translateY(-2px); }
.w-btn-primary { background: var(--river); color: var(--on-dark); }
.w-btn-primary:hover { background: var(--river-deep); color: #fff; }
.w-btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.w-btn-ghost:hover { border-color: var(--river); color: var(--river); }
.w-more { font-weight: 600; font-size: .92rem; color: var(--river); text-decoration: none; white-space: nowrap; }
.w-more:hover { text-decoration: underline; }

/* 5. Homepage --------------------------------------------------------- */
.w-hero { padding-block: clamp(36px, 6vw, 84px) clamp(32px, 5vw, 64px); }
.w-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.w-hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 500; letter-spacing: -.015em; margin: 14px 0 0; }
.w-hero h1 em { color: var(--river); font-weight: 500; }
.w-lede { font-size: 1.1rem; color: var(--muted); max-width: 52ch; margin: 20px 0 28px; }
.w-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.w-status { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; max-width: 540px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; }
.w-status-dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); }
.w-status a { font-weight: 600; }
.w-mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: 160px 160px 120px; gap: 10px; }
.w-mosaic .w-ph:nth-child(1) { grid-column: 1 / 5; grid-row: 1 / 3; }
.w-mosaic .w-ph:nth-child(2) { grid-column: 5 / 7; grid-row: 1 / 2; }
.w-mosaic .w-ph:nth-child(3) { grid-column: 5 / 7; grid-row: 2 / 4; }
.w-mosaic .w-ph:nth-child(4) { grid-column: 1 / 5; grid-row: 3 / 4; }
.w-ph { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, var(--river), var(--river-deep)); max-width: 100%; }
.w-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.w-ph:hover img { transform: scale(1.03); }
.w-ph figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 11px; color: #fff; font-size: .82rem; font-weight: 500; line-height: 1.35; background: linear-gradient(transparent, rgb(0 0 0 / .68)); }
.w-ph-tag { position: absolute; top: 12px; left: 12px; background: var(--surface); color: var(--ink); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; }
@media (max-width: 900px) {
  .w-hero-grid { grid-template-columns: 1fr; }
  .w-mosaic { grid-template-rows: 130px 130px 100px; }
}

.w-section { padding-block: clamp(48px, 7vw, 92px); }
.w-section.is-tight { padding-top: 0; }
.w-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 30px; }
.w-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 500; margin: 8px 0 0; }
.w-head p { color: var(--muted); max-width: 50ch; margin: 0; }

.w-board { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.w-notices { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; }
.w-notice { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 15px 22px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: background-color .2s; }
.w-notice:last-child { border-bottom: 0; }
.w-notice:hover { background: var(--gamosa-soft); color: var(--ink); }
.w-notice-tag { min-width: 86px; text-align: center; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gamosa); border: 1px solid currentColor; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.w-notice-title { font-weight: 500; font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.w-notice-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-notice-meta b { font-weight: 600; letter-spacing: .06em; }
.w-side { display: grid; gap: 16px; }
.w-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.w-card h3 { font-size: 1.25rem; margin: 6px 0 8px; }
.w-card p { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.w-card ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.w-card ul a { font-size: .92rem; font-weight: 500; }
.w-card.is-river { background: var(--river); border-color: transparent; color: var(--on-dark); }
.w-card.is-river h3, .w-card.is-river a { color: var(--on-dark); }
.w-card.is-river .w-eyebrow { color: #e2b94f; }
.w-card.is-river p { color: color-mix(in srgb, var(--on-dark) 82%, transparent); }
@media (max-width: 900px) {
  .w-board { grid-template-columns: 1fr; }
  .w-notice { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .w-notice-tag { display: none; }
}

.w-progs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.w-prog { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .25s; }
.w-prog:hover { border-color: var(--river); transform: translateY(-4px); color: var(--ink); }
.w-prog-code { font-family: var(--display); font-size: 2.1rem; line-height: 1; color: var(--river); }
.w-prog h3 { font-family: var(--body); font-size: 1rem; font-weight: 700; margin: 0; }
.w-prog p { flex: 1; margin: 0; color: var(--muted); font-size: .9rem; }
.w-prog-meta { padding-top: 12px; border-top: 1px dashed var(--line); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gamosa); }

.w-recog { background: var(--river-deep); color: var(--on-dark); }
.w-recog .w-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 28px; padding-block: 44px; }
.w-recog b { display: block; font-family: var(--display); font-weight: 500; font-size: 2rem; line-height: 1.1; color: #e2b94f; }
.w-recog span { font-size: .88rem; opacity: .86; }

.w-principal { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.w-principal img { width: clamp(140px, 18vw, 200px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: 10px 10px 0 var(--gamosa-soft); max-width: 100%; }
.w-principal blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.4; font-style: italic; max-width: 40ch; }
.w-principal cite { display: block; margin-top: 14px; font-style: normal; font-size: .9rem; color: var(--muted); }
.w-principal cite b { color: var(--ink); }
@media (max-width: 640px) { .w-principal { grid-template-columns: 1fr; } }

.w-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 12px; }
.w-gallery .is-tall { grid-row: span 2; }
.w-gallery .is-wide { grid-column: span 2; }
@media (max-width: 900px) { .w-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; } }

.w-portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.w-portal { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.w-portal::after { content: "↗"; position: absolute; top: 16px; right: 18px; color: var(--muted); transition: transform .2s, color .2s; }
.w-portal:hover { border-color: var(--river); color: var(--ink); }
.w-portal:hover::after { transform: translate(3px, -3px); color: var(--gamosa); }
.w-portal strong { font-size: 1.05rem; }
.w-portal span { font-size: .85rem; color: var(--muted); }

.w-mag { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-top: 40px; padding: 30px; background: var(--gamosa-soft); border: 1px solid color-mix(in srgb, var(--gamosa) 25%, transparent); border-radius: var(--radius); }
.w-mag-cover { width: 120px; aspect-ratio: 3 / 4; max-width: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; border-radius: 4px; background: var(--gamosa); color: #fff; font-family: var(--display); box-shadow: 8px 8px 0 var(--river); }
.w-mag-cover b { font-size: 1.1rem; font-weight: 600; line-height: 1.1; }
.w-mag-cover span { font-family: var(--body); font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.w-mag h3 { font-size: 1.6rem; font-weight: 500; margin: 6px 0 0; }
.w-mag p { margin: 8px 0 16px; color: var(--muted); max-width: 56ch; }
@media (max-width: 560px) { .w-mag { grid-template-columns: 1fr; } }

/* 6. Inner pages ------------------------------------------------------ */
.w-pagehead { background: var(--surface); border-bottom: 1px solid var(--line); }
.w-pagehead .w-wrap { padding-block: clamp(28px, 4vw, 48px) clamp(22px, 3vw, 34px); }
.w-pagehead h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 500; margin: 10px 0 0; }
.w-crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--muted); }
.w-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.w-crumbs a { color: var(--muted); }

/* Older page content keeps its own markup; these rules give it the new typography. */
.w-main { display: block; min-height: 40vh; }
.w-content { padding-block: clamp(28px, 4vw, 48px) clamp(48px, 6vw, 80px); }
:where(.w-content) h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; }
:where(.w-content) h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 500; }
:where(.w-content) h3 { font-size: 1.25rem; }
:where(.w-content) h4, :where(.w-content) h5, :where(.w-content) h6 { font-family: var(--body); font-weight: 700; font-size: 1rem; }
:where(.w-content) p, :where(.w-content) li { max-width: 75ch; }
:where(.w-content) ul, :where(.w-content) ol { padding-left: 1.3em; }
:where(.w-content) li { margin-bottom: .35em; }
:where(.w-content) table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: .94rem; background: var(--surface); }
:where(.w-content) th, :where(.w-content) td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
:where(.w-content) th { background: color-mix(in srgb, currentColor 7%, transparent); font-weight: 600; }
:where(.w-content) :where(.content, .contents-wrapper > .content) { margin-bottom: 2em; }
:where(.w-content) iframe, :where(.w-content) embed, :where(.w-content) object { max-width: 100%; }
:where(.w-content) img { border-radius: 6px; }
.w-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 7. Legacy Bootstrap classes used inside older pages ----------------- */
.container, .container-fluid { width: 100%; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.container { max-width: var(--wrap); }
.row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.row > * { padding-inline: 12px; min-width: 0; width: 100%; }
@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; } .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; } .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; } .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; } .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; } .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; } .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}
.col, .col-12 { flex: 1 0 0%; }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: .5rem !important; } .mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.5rem !important; } .mt-5 { margin-top: 2.5rem !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: .5rem !important; } .mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .mb-5 { margin-bottom: 2.5rem !important; }
.my-4 { margin-block: 1.5rem !important; } .my-5 { margin-block: 2.5rem !important; } .py-4 { padding-block: 1.5rem !important; } .py-5 { padding-block: 2.5rem !important; }
.p-3 { padding: 1rem !important; } .p-4 { padding: 1.5rem !important; } .pl-3 { padding-left: 1rem !important; }
.text-center { text-align: center !important; } .text-justify { text-align: justify !important; } .text-right { text-align: right !important; }
.text-muted { color: var(--muted) !important; } .text-white { color: #fff !important; } .text-dark { color: var(--ink) !important; }
.font-weight-bold { font-weight: 700 !important; } .w-100 { width: 100% !important; } .d-flex { display: flex !important; } .d-none { display: none !important; }
.img-fluid { max-width: 100%; height: auto; } .rounded { border-radius: var(--radius) !important; } .rounded-circle { border-radius: 50% !important; }
.list-unstyled { list-style: none; padding-left: 0; }
.shadow, .shadow-sm { box-shadow: var(--shadow) !important; }
.table { width: 100%; margin-bottom: 1rem; }
.table-bordered th, .table-bordered td { border: 1px solid var(--line); }
.table-striped tbody tr:nth-of-type(odd) { background: var(--surface-2); }
.table-hover tbody tr:hover { background: var(--gamosa-soft); }
.thead-light th, .thead-dark th { background: var(--surface-2); color: var(--ink); }
.table-responsive { display: block; width: 100%; overflow-x: auto; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-header { padding: .75rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; }
.card-title { font-family: var(--display); font-size: 1.2rem; margin-bottom: .5rem; }
.card-img-top { width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 8px; border: 1.5px solid transparent; font: 600 .92rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s; }
.btn-primary, .btn-info { background: var(--river); color: var(--on-dark); }
.btn-primary:hover, .btn-info:hover { background: var(--river-deep); color: #fff; }
.btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-success { background: #2f6b3f; color: #fff; } .btn-danger { background: var(--gamosa); color: #fff; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.dropdown-divider { height: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
.close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
/* Pop-up windows (Bootstrap "modal" markup used on Best Practices) */
.modal { display: none; position: fixed; inset: 0; z-index: 90; overflow-y: auto; padding: 24px var(--gutter-r) 24px var(--gutter-l); background: rgb(10 30 36 / .6); }
.modal.is-open { display: block; }
.modal-dialog { max-width: 760px; margin: 4vh auto; }
.modal-content { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; }
.modal-title { margin: 0; font-size: 1.2rem; }
.modal-body { padding: 20px; }
.modal-body img { max-width: 100%; height: auto; margin-bottom: 10px; }
body.w-modal-open { overflow: hidden; }

/* 8. Motion ----------------------------------------------------------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .w-rise { animation: w-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes w-rise { from { transform: translateY(26px); } to { transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .w-ticker-run { animation: none; flex-wrap: wrap; width: auto; gap: 8px 32px; }
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Print: plain pages without navigation */
@media print {
  .w-utility, .w-masthead, .w-ticker, .w-footer, .w-gamosa { display: none !important; }
  body { background: #fff; }
}

/* Inner page wrapper: older pages often bring their own .container */
.w-content.w-wrap > .container, .w-content.w-wrap > div > .container { padding-inline: 0; }

/* Refinements after first preview */
.w-recog span { display: block; margin-top: 6px; line-height: 1.5; }
.w-notice-tag { min-width: 0; width: 96px; }
.w-gallery { grid-auto-flow: dense; }
.w-gallery .is-feature { grid-column: span 2; grid-row: span 2; }

/* Gallery page */
.w-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; margin-bottom: 2rem; }
.w-album { display: flex; flex-direction: column; gap: 4px; padding: 0 0 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .2s, transform .25s; }
.w-album:hover { border-color: var(--river); transform: translateY(-3px); }
.w-album .w-ph { display: block; aspect-ratio: 4 / 3; border-radius: 0; margin-bottom: 8px; }
.w-album-name { padding-inline: 16px; font-family: var(--display); font-size: 1.1rem; font-weight: 600; line-height: 1.25; }
.w-album-count { padding-inline: 16px; font-size: .8rem; color: var(--muted); }
.w-album-photos { display: grid; gap: 14px; }
.w-album-photos figure { margin: 0; }
.w-album-photos figcaption { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.w-gallery.is-page { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); grid-auto-rows: 200px; }
.w-gallery.is-page a { display: block; height: 100%; }

/* Forms inside older pages never push the page wider than the screen */
:where(.w-content) :where(input, select, textarea) { max-width: 100%; }

/* Phones: portals in the top bar become one swipeable row */
@media (max-width: 600px) {
  .w-utility .w-wrap { flex-wrap: nowrap; padding-block: 6px; }
  .w-portals { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 16px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .w-portals::-webkit-scrollbar { display: none; }
  .w-portals li { flex: none; }
  .w-counter { display: none; }
  .w-pagehead .w-wrap { padding-block: 14px 12px; }
}
.w-pagehead .w-wrap { padding-block: 16px 14px; }
