/*
Theme Name: Randhawa Meritorious School
Theme URI: https://www.randhawasmeritoriousschool.com/
Author: Randhawa Meritorious School
Description: Warm, confident theme for Randhawa Meritorious School, Pathankot. Ink-blue, sprout-green and marigold on chalk paper.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: randhawa-school
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,800;1,9..144,400;1,9..144,600&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&display=swap');

:root {
  --ink: #16335f;
  --ink-deep: #0e2343;
  --sprout: #7cb82f;
  --sprout-soft: #e4f1cf;
  --marigold: #f2a516;
  --marigold-soft: #fde9bf;
  --rose: #e2574c;
  --paper: #fbf6ec;
  --paper-2: #f3ecdc;
  --text: #1f2a3a;
  --muted: #5b6577;
  --line: #e2d8c3;
  --card: #fffdf8;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(22, 51, 95, .06), 0 18px 40px -22px rgba(22, 51, 95, .35);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --page-gutter: clamp(1rem, 3vw, 3rem);
  --page-max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.rms, .rms-root {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  --wp--style--global--content-size: 100%;
  --wp--style--global--wide-size: 100%;
}
.rms-root::before, body.rms::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .35 0 0 0 0 .25 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Converted containers use the existing school grid, not Elementor's default flex
   and padding. Same specificity as school classes below, so those classes win.
   Elementor's generated per-element rules still override these defaults. */
.rms-layout-node:where(.e-con) {
  display: block; width: auto; max-width: none; min-height: 0; height: auto;
  margin: 0; padding: 0; gap: 0; border-radius: 0; flex: initial;
  --container-default-padding-top: 0px; --container-default-padding-right: 0px;
  --container-default-padding-bottom: 0px; --container-default-padding-left: 0px;
}
/* Elementor uses --display internally; school font choice must not inherit it. */
.rms-layout-node, .elementor-widget-rms-live { --rms-heading-font: 'Fraunces', Georgia, serif; }
.elementor :is(h1,h2,h3,h4,h5,h6,.sticker,.ribbon-track,.diff b,.num,.quick strong,.who,.sign,.faq summary,.empty-note strong) {
  font-family: var(--rms-heading-font, 'Fraunces', Georgia, serif);
}
.elementor .elementor-widget[data-widget_type^="rms-"] { display: block; width: auto; position: static; }
.elementor-widget:where([data-widget_type^="rms-"]) > .elementor-widget-container { display: contents; }
body.elementor-editor-active .rms-school-fragment { min-height: 1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--sprout); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); color: var(--ink-deep); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -60px; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-max-width); margin-inline: auto; position: relative; z-index: 2; }
.wrap .wrap { width: 100%; }
.section[id] { scroll-margin-top: 8rem; }
/* Also suppress a previously saved copy without deleting Elementor content. */
body.home #home-news { display: none; }
@media (min-width: 1280px) {
  .primary-nav > ul { flex-wrap: wrap; justify-content: flex-end; }
}
#main { width: 100%; min-width: 0; overflow-x: clip; }
.hero-grid > *, .split > *, .cards > *, .letter > *, .contact-grid > *,
.footer-grid > *, .post-list > *, .strip > * { min-width: 0; }
.photo-card { margin: 0; }
.entry-content, .card, .empty-note, .footer-grid { overflow-wrap: anywhere; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sprout); margin-bottom: 1rem; }
.eyebrow::before { content: ''; width: 26px; height: 3px; border-radius: 3px; background: currentColor; }
.display { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 800; line-height: .98; }
.display em, .h2 em { font-style: italic; font-weight: 400; color: var(--sprout); }
.h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; font: 600 1rem var(--body); transition: transform .25s cubic-bezier(.2,.9,.3,1.3), background .2s, color .2s; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); background: var(--ink-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sun { background: var(--marigold); border-color: var(--marigold); color: var(--ink-deep); }
.btn-sun:hover { background: #e39507; color: var(--ink-deep); }

/* Header */
.topbar { background: var(--ink-deep); color: #dfe6f2; font-size: .85rem; position: relative; z-index: 3; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; justify-content: space-between; padding: .5rem 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--marigold); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 246, 236, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink-deep); }
.brand img { width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--sprout-soft); }
.brand strong { font-family: var(--display); font-size: 1.25rem; line-height: 1; display: block; }
.brand small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sprout); font-weight: 700; margin-top: 3px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink); transition: background .2s; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav a[aria-current="page"] { background: var(--sprout-soft); color: var(--ink-deep); }
.primary-nav .sub-menu, .primary-nav .children { position: absolute; top: 100%; left: 0; min-width: 210px; display: none; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .4rem; box-shadow: var(--shadow); }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu, .primary-nav li:hover > .children, .primary-nav li:focus-within > .children { display: flex; }
.menu-toggle { display: none; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: .6rem 1rem; font: 600 .95rem var(--body); cursor: pointer; }
.menu-toggle .bars { display: inline-block; width: 18px; height: 2px; background: currentColor; position: relative; vertical-align: middle; margin-right: .45rem; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }
@media (max-width: 1279px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .6rem 1.25rem 1.2rem; display: none; }
  .primary-nav.is-open { display: block; animation: rms-drop .3s ease; }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .primary-nav a { padding: .8rem 1rem; font-size: 1.1rem; }
  .primary-nav .sub-menu, .primary-nav .children { position: static; display: flex; box-shadow: none; border: 0; background: transparent; padding-left: 1rem; }
  .brand small { display: none; }
}
@keyframes rms-drop { from { opacity: 0; transform: translateY(-8px); } }

/* Hero */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 4rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero .lead { margin: 1.4rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-photo { position: relative; }
.hero-photo .frame { border-radius: 200px 200px 28px 28px; overflow: hidden; border: 10px solid #fff; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero-photo .frame img { aspect-ratio: 4/4.3; object-fit: cover; width: 100%; }
.hero-photo .sticker { position: absolute; left: -1.5rem; bottom: 2rem; background: var(--marigold); color: var(--ink-deep); padding: 1rem 1.2rem; border-radius: 18px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; max-width: 230px; transform: rotate(-4deg); box-shadow: var(--shadow); line-height: 1.25; }
.hero-photo .badge-logo { position: absolute; right: -1rem; top: -1rem; width: 110px; height: 110px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: var(--shadow); animation: rms-spin 26s linear infinite; }
@keyframes rms-spin { to { transform: rotate(360deg); } }
.squiggle { position: absolute; z-index: 0; pointer-events: none; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo .sticker { left: .5rem; } .hero-photo .badge-logo { right: .5rem; width: 84px; height: 84px; } }

/* Ribbon */
.ribbon { background: var(--ink); color: #fff; overflow: hidden; padding: 1rem 0; transform: rotate(-1.2deg); margin: 1rem -2rem; position: relative; z-index: 2; }
.ribbon-track { display: flex; gap: 2.5rem; width: max-content; animation: rms-marquee 38s linear infinite; font-family: var(--display); font-size: 1.4rem; font-style: italic; }
.ribbon-track span::after { content: '\2726'; color: var(--marigold); margin-left: 2.5rem; font-style: normal; }
@keyframes rms-marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section-tint { background: var(--paper-2); }
.section-ink { background: var(--ink-deep); color: #d8e0ee; }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-wide { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 860px) { .split, .split-wide { grid-template-columns: 1fr; } }
.photo-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.photo-card img { width: 100%; object-fit: cover; }

/* Different list */
.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.diff { padding: 1.5rem; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: transform .3s, background .3s; }
.diff:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.diff b { display: block; font-family: var(--display); color: var(--marigold); font-size: 2rem; line-height: 1; margin-bottom: .6rem; font-weight: 400; font-style: italic; }
.diff span { color: #fff; font-size: 1.15rem; font-weight: 600; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.45rem; }
.card p:last-child { margin-bottom: 0; }
.card .num { font-family: var(--display); font-style: italic; color: var(--sprout); font-size: 1rem; display: block; margin-bottom: .8rem; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 860px) { .cards > * { grid-column: span 12 !important; } }
.card-sun { background: var(--marigold-soft); border-color: #f4d68f; }
.card-sprout { background: var(--sprout-soft); border-color: #c9e2a4; }
.card-ink { background: var(--ink); border-color: var(--ink); color: #dfe6f2; }
.card-ink h3 { color: #fff; }
.home-feature-image { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; margin: 0 0 1.2rem; }
.home-activity-tag { margin: 0 .35rem .45rem 0; }
.notice-boards { margin-bottom: 2rem; }
.notice-boards .card h3 a { color: var(--ink-deep); text-decoration: none; }
.notice-boards .card h3 a:hover { color: var(--sprout); }
.notice-boards .card p:last-child { margin-bottom: 0; }
.source-numbered-list { list-style: none; margin: 0; padding: 0; }

/* Quick links */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.quick a { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; padding: 1.4rem; border-radius: var(--radius); text-decoration: none; color: var(--ink-deep); background: var(--card); border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.9,.3,1.3), background .3s; }
.quick a:hover { transform: translateY(-5px) rotate(-.8deg); background: var(--marigold-soft); color: var(--ink-deep); }
.quick strong { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.quick span { color: var(--muted); font-size: .95rem; }
.quick .arrow { font-size: 1.4rem; color: var(--sprout); }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: .5rem 1rem; border-radius: 999px; font: 600 .92rem var(--body); cursor: pointer; text-decoration: none; transition: background .2s, color .2s; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-active, .filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery-item { break-inside: avoid; margin: 0 0 1rem; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 18px; overflow: hidden; position: relative; animation: rms-fade .5s ease both; }
.gallery-item img { width: 100%; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption, .gallery-item .cap { position: absolute; left: .7rem; bottom: .7rem; background: rgba(14,35,67,.82); color: #fff; font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; }
@keyframes rms-fade { from { opacity: 0; transform: translateY(14px); } }

.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.strip > * { border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; }
.strip > *:nth-child(even) { transform: translateY(2rem); }
.strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip > *:nth-child(5) { display: none; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(9, 22, 44, .94); display: flex; align-items: center; justify-content: center; padding: 3.5rem 4rem; animation: rms-fadein .25s ease; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 82vh; max-width: 100%; width: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: rms-zoom .35s cubic-bezier(.2,.9,.3,1.2); }
.lightbox .lb-cap { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #dfe6f2; font-size: .95rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: var(--marigold); color: var(--ink-deep); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@keyframes rms-fadein { from { opacity: 0; } }
@keyframes rms-zoom { from { opacity: 0; transform: scale(.94); } }
@media (max-width: 640px) { .lightbox { padding: 4rem .8rem; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 3rem; transform: none; } }

/* Page hero */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 800; max-width: 16ch; }
.page-hero .lead { margin-top: 1rem; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, var(--sprout-soft), transparent 70%); z-index: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* Message letter */
.letter { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.letter-portrait { position: sticky; top: 110px; }
.letter-portrait img { border-radius: 160px 160px 22px 22px; border: 8px solid #fff; box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.letter-portrait .who { margin-top: 1rem; font-family: var(--display); font-size: 1.4rem; color: var(--ink-deep); font-weight: 600; }
.letter-portrait .role { color: var(--sprout); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.letter-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 3rem); font-size: 1.1rem; position: relative; }
.letter-body::before { content: '\201C'; position: absolute; top: -2.2rem; left: 1.5rem; font-family: var(--display); font-size: 7rem; color: var(--marigold); line-height: 1; }
.letter-body .sign { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--ink); }
@media (max-width: 860px) { .letter { grid-template-columns: 1fr; } .letter-portrait { position: static; max-width: 280px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 1.25rem; color: var(--ink-deep); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--sprout); font-size: 1.6rem; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .8rem 0 0; color: var(--muted); }

/* Posts */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--sprout-soft); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.35rem; } .post-card h3 a { text-decoration: none; color: var(--ink-deep); }
.post-card .meta { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.tag { display: inline-block; background: var(--sprout-soft); color: var(--ink-deep); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; text-decoration: none; }
.empty-note { border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); background: var(--card); }
.empty-note strong { display: block; font-family: var(--display); color: var(--ink-deep); font-size: 1.4rem; margin-bottom: .4rem; }
.pagination, .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: 2.5rem; }
.page-numbers { padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; background: var(--card); }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Entry content (WP) */
.entry-content { min-width: 0; max-width: none; font-size: 1.08rem; }
.entry-content > table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content > * + h2, .entry-content > * + h3 { margin-top: 2rem; }
.entry-content h2 { font-size: 2rem; } .entry-content h3 { font-size: 1.6rem; }
.entry-content img { border-radius: 16px; }
.entry-content ul li::marker { color: var(--sprout); }
.entry-content .wp-block-gallery img { cursor: zoom-in; }
.entry-content blockquote { border-left: 4px solid var(--marigold); margin: 1.5rem 0; padding: .4rem 1.4rem; font-family: var(--display); font-style: italic; font-size: 1.25rem; }
.alignwide { max-width: none; } .aligncenter { margin-inline: auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.info-list li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.2rem; }
.info-list small { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sprout); font-weight: 700; }
.info-list a, .info-list span { font-size: 1.1rem; font-weight: 600; color: var(--ink-deep); text-decoration: none; word-break: break-word; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 1rem; }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }

.rms-enquiry-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 2.4rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; box-shadow: var(--shadow); }
.rms-enquiry-form .full, .rms-enquiry-form p { grid-column: 1 / -1; }
.rms-enquiry-form p:has(input:not([type=hidden])) { grid-column: auto; }
.rms-enquiry-form label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink-deep); margin-bottom: .35rem; }
.rms-enquiry-form input, .rms-enquiry-form select, .rms-enquiry-form textarea { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); font: 1rem var(--body); color: var(--text); transition: border-color .2s, background .2s; }
.rms-enquiry-form input:focus, .rms-enquiry-form select:focus, .rms-enquiry-form textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.rms-enquiry-form textarea { min-height: 130px; resize: vertical; }
.rms-enquiry-form input[type="hidden"] { display: none; }
.rms-enquiry-form .rms-consent { grid-column: 1 / -1; }
.rms-enquiry-form input[type="checkbox"] { width: auto; margin-right: .5rem; }
.rms-enquiry-form button { grid-column: 1 / -1; justify-self: start; display: inline-flex; padding: .9rem 1.6rem; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 1rem var(--body); cursor: pointer; transition: transform .25s, background .2s; }
.rms-enquiry-form button:hover { background: var(--sprout); transform: translateY(-2px); }
.rms-enquiry-form .error { color: var(--rose); font-size: .85rem; margin-top: .3rem; }
.rms-table-scroll { max-width: 100%; overflow-x: auto; margin: 1.5rem 0 3rem; border: 1px solid var(--line); border-radius: 14px; }
.rms-table-scroll table { width: 100%; border-collapse: collapse; font-size: .95rem; text-align: left; }
.rms-table-scroll th, .rms-table-scroll td { padding: 1rem 1.2rem; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 200px; }
.rms-table-scroll th { background: var(--sprout-soft); color: var(--ink); }
.rms-table-scroll tr:last-child td { border-bottom: none; }
.rms-table-scroll a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page-section .wrap.split { gap: clamp(2rem, 5vw, 4rem); }
.page-content-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 3rem); box-shadow: var(--shadow); }
.generic-feature-image { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }
.faculty-photo { transform: rotate(-2deg); margin: 0; }
.faculty-photo img { aspect-ratio: 4 / 5; max-height: 600px; }
.faculty-content > h2:first-of-type { margin-bottom: 1rem; }
.contact-extra { margin-top: 3rem; padding: clamp(1.2rem, 3vw, 2rem); border-radius: var(--radius); background: var(--paper-2); }
.disclosure-wrap { max-width: var(--page-max-width); }
.disclosure-notice { padding: 1.2rem 1.4rem; margin-bottom: 2rem; border-left: 4px solid var(--marigold); background: var(--marigold-soft); border-radius: 0 14px 14px 0; }
.disclosure-content { max-width: none; }
.disclosure-content > h2 { margin: 2.5rem 0 .7rem; padding: 1.1rem 1.3rem; border-radius: 16px; background: var(--sprout-soft); font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
.disclosure-content > h2:first-child { margin-top: 0; }
.disclosure-content .rms-table-scroll { background: var(--card); }
.disclosure-download-note { padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }
.editorial-note { padding: 1rem 1.2rem; border-left: 4px solid var(--marigold); background: var(--marigold-soft); border-radius: 0 12px 12px 0; color: var(--ink-deep); }
.school-source-page .source-page-intro { max-width: 70ch; }
.school-source-page .source-page-photo { margin: 0; transform: rotate(-1.5deg); }
.school-source-page .source-page-photo img { max-height: 620px; object-fit: cover; width: 100%; }
.source-page-sections > * { align-self: start; }
.source-page-sections > :nth-child(odd) { grid-column: span 7; }
.source-page-sections > :nth-child(even) { grid-column: span 5; }
.source-page-sections > .span-12 { grid-column: span 12; }
.source-page-sections .card h2 { font-size: 1.55rem; }
.source-page-sections .diff-grid { margin-top: 1rem; }
.rms-source-gallery .gallery-item { margin: 0 0 1rem; }
.rms-source-gallery figcaption { padding: .6rem .8rem; }
.rms-gallery-photo-image { display: block; width: 100%; }
.gallery-item figcaption a { color: #fff; text-decoration: none; }
.gallery-item figcaption a:hover { text-decoration: underline; }
.rms-album-gallery .gallery-item img,
.rms-achievement-gallery .gallery-item img { display: block; width: 100%; height: auto; object-fit: contain; }
.rms-achievement-copy { max-width: none; margin: 0 auto 2.5rem; }
.rms-album-gallery .gallery-item { animation: rms-fade .5s ease both; }
.rms-photo-count { margin: -.5rem 0 1.5rem; color: var(--muted); font-size: .9rem; }
.rms-gallery-link { margin-top: 2rem; }
.rms-albums-wrap,
.rms-single-album-wrap { width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-max-width); }
.rms-single-album-wrap .entry-content > p { max-width: 72ch; margin-inline: auto; }
.rms-single-album-gallery { columns: 4 280px; column-gap: 1rem; width: 100%; }
.rms-single-album-gallery .gallery-item { margin-bottom: 1rem; }
.rms-single-album-gallery img { display: block; width: 100%; height: auto; object-fit: contain; }
.contact-extra .entry-content { max-width: 100%; }
.single .entry-content figure { margin: 1.5rem 0; }
html.no-js .reveal { opacity: 1; transform: none; }
.rms-form-message { grid-column: 1 / -1; padding: 1rem 1.2rem; border-radius: 14px; background: var(--sprout-soft); color: var(--ink-deep); border: 1px solid #c9e2a4; margin-bottom: 1rem; }
.rms-form-message.is-error, .rms-form-message.error { background: #fde3e0; border-color: #f3b2ab; }
@media (max-width: 640px) { .rms-enquiry-form { grid-template-columns: 1fr; } .rms-enquiry-form p:has(input) { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .source-page-sections > *, .source-page-sections > :nth-child(odd), .source-page-sections > :nth-child(even) { grid-column: span 12; }
}

/* Footer */
.site-footer { background: var(--ink-deep); color: #c3cee0; padding: 4rem 0 1.5rem; position: relative; z-index: 2; margin-top: 0; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--marigold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-grid .footer-extra-links { margin-top: 1.15rem; }
.footer-big { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.8rem); color: #fff; line-height: 1.05; margin-bottom: 1.2rem; }
.footer-big em { color: var(--marigold); }
.footer-bottom { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .85rem; }
.preview-note { opacity: .7; font-size: .8rem; }
.preview-note a { text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* News & Events parity with preview */
.notice-boards .empty-note { display: flex; flex-direction: column; justify-content: center; gap: .35rem; }
.notice-boards .empty-note span { display: block; }
.notice-boards .empty-note.has-notice { border-style: solid; }
.rms-notice-latest a { color: var(--ink-deep); font-weight: 700; }
.rms-notice-latest em { display: block; font-style: normal; font-size: .85rem; }
.rms-latest-news { margin-top: 3rem; }
.filter .filter-count { opacity: .6; }
.rms-album-gallery { columns: 4 260px; }
.rms-album-gallery .gallery-item[hidden] { display: none; }
.rms-album-gallery .gallery-item a { display: block; cursor: zoom-in; }
.rms-albums-wrap .filters, .rms-albums-wrap .section-head, .rms-albums-wrap .rms-gallery-link { max-width: none; }
.rms-home-activities .entry-content .tag { margin: 0 .35rem .45rem 0; }
.rms-home-news .empty-note a { white-space: normal; }

/* Unify outer page widths without resizing nested Elementor columns/widgets. */
body.rms { width: 100%; max-width: none; }
.brand, .brand > span { min-width: 0; }
.brand img { flex-shrink: 0; }
.brand strong, .topbar a { overflow-wrap: anywhere; }
.rms-elementor-page, .rms-elementor-content { width: 100%; max-width: none; min-width: 0; }
.rms-elementor-content > .elementor {
  width: 100%; max-width: none;
  --container-max-width: var(--page-max-width);
  --content-width: min(var(--page-max-width), calc(100% - var(--page-gutter) * 2));
}
.rms-elementor-content > .elementor > .elementor-section {
  width: 100% !important; max-width: none; left: auto !important;
}
.rms-elementor-content > .elementor > .elementor-section > .elementor-container {
  width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-max-width) !important; margin-inline: auto;
}
.rms-elementor-content > .elementor > .e-con.e-parent {
  --container-max-width: var(--page-max-width);
  --content-width: min(var(--page-max-width), calc(100% - var(--page-gutter) * 2));
  width: 100%; max-width: none !important; margin-inline: 0;
}
.rms-elementor-content > .elementor > .e-con.e-parent.e-con-boxed > .e-con-inner {
  width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-max-width) !important; margin-inline: auto;
}
.rms-elementor-content > .elementor > .e-con.e-parent.e-con-full:not(.rms-layout-node) {
  padding-inline: max(var(--page-gutter), calc((100% - var(--page-max-width)) / 2));
}
@media (max-width: 380px) {
  .brand strong { font-size: 1rem; }
  .brand { gap: .5rem; }
  .menu-toggle { padding-inline: .7rem; }
  .post-list, .diff-grid { grid-template-columns: minmax(0, 1fr); }
}
