/* Rainbow International School — shared site styles
   Layout fixes, interaction states and motion that inline styles can't express. */

:root {
  --ris-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ris-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ris-blue: #5083BB;
  --ris-orange: #CC7028;
  --ris-page: #FDFBF8;
  /* Readable on the page background: the softest greys and the WhatsApp green
     sat under the 4.5:1 minimum for small text. */
  --text-faint: #6F6A62;
  --brand-primary: #4576A9;
  --brand-secondary: #B35E1F;
  --ris-whatsapp: #147A3C;
  --ris-whatsapp-hover: #0F6832;
  --ris-whatsapp-ink: #147A3C;
  --ris-whatsapp-tint: #E3F6EA;
  --ris-facebook: #1B60C4;
  --ris-facebook-hover: #154E9F;
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--ris-page); }
::selection { background: rgba(80, 131, 187, 0.22); }

/* ------------------------------------------------------------ keyboard focus */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input[type="file"]:focus-visible + span,
label:focus-within > .ris-file {
  outline: 2px solid var(--ris-blue) !important;
  outline-offset: 3px;
  border-radius: 10px;
}
.ris-textarea:focus {
  border-color: var(--border-focus, var(--ris-blue)) !important;
  box-shadow: var(--shadow-focus-blue, 0 0 0 3px rgba(80, 131, 187, 0.25)) !important;
}
.ris-textarea { transition: border-color 160ms ease, box-shadow 160ms ease; }

/* ------------------------------------------------------------ icons */
.ris-ico svg { display: block; }
[dir="rtl"] .ris-flip { transform: scaleX(-1); }

/* ------------------------------------------------------------ responsive grids */
.ris-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 1040px) { .ris-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px)  { .ris-g4 { grid-template-columns: minmax(0, 1fr) !important; } }

.ris-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .ris-g3 { grid-template-columns: minmax(0, 1fr) !important; } }

.ris-foot-grid { grid-template-columns: 1.35fr 1fr 1fr 1.35fr !important; }
@media (max-width: 1000px) { .ris-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px)  { .ris-foot-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 32px !important; } }

/* ------------------------------------------------------------ cards & buttons */
.ris-card {
  transition: transform 260ms var(--ris-ease-out), box-shadow 260ms var(--ris-ease-out), border-color 260ms var(--ris-ease-out) !important;
}
.ris-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px -14px rgba(43, 38, 33, 0.22);
  border-color: var(--border-strong) !important;
}
.ris-card .ris-ico { transition: transform 360ms var(--ris-ease-out); }
.ris-card:hover .ris-ico { transform: translateY(-2px) scale(1.06) rotate(-4deg); }
[dir="rtl"] .ris-card:hover .ris-ico { transform: translateY(-2px) scale(1.06) rotate(4deg); }

.ris-arrow { display: inline-flex; align-items: center; gap: 6px; }
.ris-arrow svg { transition: transform 260ms var(--ris-ease-out); }
a:hover .ris-arrow svg, .ris-arrow:hover svg { transform: translateX(4px); }
[dir="rtl"] a:hover .ris-arrow svg, [dir="rtl"] .ris-arrow:hover svg { transform: scaleX(-1) translateX(4px); }

.ris-btn { transition: background 180ms ease, box-shadow 220ms var(--ris-ease-out), transform 220ms var(--ris-ease-out) !important; }
.ris-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(43, 38, 33, 0.35); }
.ris-btn:active { transform: translateY(0) scale(0.98); box-shadow: none; }

.ris-photo { transition: transform 600ms var(--ris-ease-out), box-shadow 600ms var(--ris-ease-out); }
.ris-photo:hover { transform: translateY(-4px) rotate(-0.4deg); }
[dir="rtl"] .ris-photo:hover { transform: translateY(-4px) rotate(0.4deg); }

.ris-social { transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 260ms var(--ris-ease-out) !important; }
.ris-social:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------ hero */
.ris-hero { position: relative; overflow: hidden; isolation: isolate; }
.ris-blob {
  position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(60px); opacity: 0.5; pointer-events: none;
  animation: risDrift 18s ease-in-out infinite alternate;
}
.ris-blob.b1 { width: 420px; height: 420px; background: rgba(80, 131, 187, 0.35); top: -140px; inset-inline-end: -80px; }
.ris-blob.b2 { width: 320px; height: 320px; background: rgba(204, 112, 40, 0.22); bottom: -160px; inset-inline-start: -60px; animation-duration: 22s; animation-delay: -6s; }

@keyframes risDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(30px, 24px, 0) scale(1.08); }
  100% { transform: translate3d(-20px, 40px, 0) scale(0.96); }
}

.ris-rise { animation: risRise 820ms var(--ris-ease-out) both; }
.ris-rise.d1 { animation-delay: 80ms; }
.ris-rise.d2 { animation-delay: 170ms; }
.ris-rise.d3 { animation-delay: 260ms; }
.ris-rise.d4 { animation-delay: 350ms; }
.ris-pop { animation: risPop 1000ms var(--ris-ease-out) 200ms both; }
@keyframes risRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes risPop  { from { opacity: 0; transform: translateY(24px) scale(0.94); } to { opacity: 1; transform: none; } }

.ris-float { animation: risFloat 6s ease-in-out 1.2s infinite; }
@keyframes risFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.ris-underline { position: relative; white-space: nowrap; }
.ris-underline::after {
  content: ""; position: absolute; inset-inline: 0.02em; bottom: 0.1em; height: 0.11em; border-radius: 99px;
  background: var(--ris-orange);
  transform: scaleX(0); transform-origin: left center; opacity: 0.55;
  animation: risDraw 900ms var(--ris-ease-out) 700ms forwards;
}
[dir="rtl"] .ris-underline::after { transform-origin: right center; }
@keyframes risDraw { to { transform: scaleX(1); } }

/* hold entrance animations while the page-switch curtain is still closed */
html.ris-pt:not(.ris-pt-out) .ris-rise,
html.ris-pt:not(.ris-pt-out) .ris-pop,
html.ris-pt:not(.ris-pt-out) .ris-underline::after { animation-play-state: paused; }

/* ------------------------------------------------------------ nav */
.ris-nav { transition: box-shadow 240ms ease, background-color 240ms ease, border-color 240ms ease; }
html.ris-scrolled .ris-nav {
  background: rgba(253, 251, 248, 0.86) !important;
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 6px 24px -12px rgba(43, 38, 33, 0.18);
}
.ris-nav-link { position: relative; }
.ris-nav-link::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--ris-blue); transform: scaleX(0); transition: transform 260ms var(--ris-ease-out);
}
.ris-nav-link:hover::after { transform: scaleX(1); }
.ris-nav-link[aria-current="page"]::after { display: none; }

.ris-burger { display: none !important; }
.ris-nav-panel { display: none; }

@media (max-width: 1180px) {
  .ris-nav-links { display: none !important; }
  .ris-burger { display: inline-flex !important; }
  .ris-nav-panel { display: block; }
}
@media (max-width: 1300px) {
  html[lang="ar"] .ris-nav-links { display: none !important; }
  html[lang="ar"] .ris-burger { display: inline-flex !important; }
  html[lang="ar"] .ris-nav-panel { display: block; }
  html[lang="ar"] .ris-nav-cta { margin-inline-start: auto !important; }
}
@media (max-width: 520px) {
  .ris-nav-brand { flex-shrink: 1 !important; }
  .ris-nav-sub { display: none; }
  .ris-nav-row { padding: 8px 14px !important; gap: 10px !important; }
  .ris-nav-logo { width: 38px !important; height: 38px !important; }
  .ris-nav-apply { display: none !important; }
  .ris-lang-text { display: none; }
  .ris-lang { padding: 8px !important; }
}

.ris-nav-panel-inner {
  border-top: 1px solid var(--border-default);
  background: var(--ris-page);
  box-shadow: 0 24px 40px -24px rgba(43, 38, 33, 0.28);
  animation: risPanel 360ms var(--ris-ease-out) both;
  max-height: calc(100vh - 64px); overflow-y: auto;
}
.ris-nav-panel-inner a { animation: risRise 460ms var(--ris-ease-out) both; }
.ris-nav-panel-inner a:nth-child(2) { animation-delay: 30ms; }
.ris-nav-panel-inner a:nth-child(3) { animation-delay: 60ms; }
.ris-nav-panel-inner a:nth-child(4) { animation-delay: 90ms; }
.ris-nav-panel-inner a:nth-child(5) { animation-delay: 120ms; }
.ris-nav-panel-inner a:nth-child(6) { animation-delay: 150ms; }
.ris-nav-panel-inner a:nth-child(7) { animation-delay: 180ms; }
.ris-nav-panel-inner a:nth-child(8) { animation-delay: 210ms; }
@keyframes risPanel { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.ris-burger svg line { transition: transform 280ms var(--ris-ease-out), opacity 200ms ease; transform-origin: 12px 12px; }
.ris-burger[aria-expanded="true"] .l1 { transform: translateY(6px) rotate(45deg); }
.ris-burger[aria-expanded="true"] .l2 { opacity: 0; }
.ris-burger[aria-expanded="true"] .l3 { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------ FAQ */
.ris-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ris-faq summary::-webkit-details-marker { display: none; }
.ris-faq summary .ris-chev { flex-shrink: 0; transition: transform 300ms var(--ris-ease-out); color: var(--text-muted); }
.ris-faq[open] summary .ris-chev { transform: rotate(180deg); }
.ris-faq[open] > p { animation: risRise 420ms var(--ris-ease-out) both; }
.ris-faq { transition: border-color 200ms ease, box-shadow 200ms ease; }
.ris-faq:hover { border-color: var(--border-strong) !important; }
.ris-faq[open] { box-shadow: 0 10px 28px -18px rgba(43, 38, 33, 0.25); }

/* ------------------------------------------------------------ steps */
.ris-step-num { transition: transform 360ms var(--ris-ease-out); }
.ris-card:hover .ris-step-num { transform: scale(1.1); }

/* ------------------------------------------------------------ news loading */
.ris-skel {
  background: linear-gradient(90deg, var(--surface-muted) 0%, var(--surface-sunken) 50%, var(--surface-muted) 100%);
  background-size: 200% 100%; border-radius: 8px;
  animation: risShimmer 1.4s ease-in-out infinite;
}
@keyframes risShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------------ success state */
.ris-success { animation: risPop 700ms var(--ris-ease-out) both; }
.ris-success-tick { animation: risTick 700ms var(--ris-ease-out) 150ms both; }
@keyframes risTick { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

/* ------------------------------------------------------------ page-switch curtain
   Leaving: a blue panel, then a cream panel carrying the logo, sweep up over
   the page. Arriving: the new page starts under the same cream panel
   (html.ris-pt, set before first paint) and it lifts once the page has
   rendered. The safety animation lifts it anyway after a few seconds. */
.ris-curtain { position: fixed; inset: 0; z-index: 99990; pointer-events: all; }
.ris-curtain::before,
.ris-curtain::after { content: ""; position: absolute; inset: 0; transform: translateY(100%); }
.ris-curtain::before { background: linear-gradient(160deg, var(--ris-blue), #3F6FA6); animation: risSweepIn 380ms var(--ris-ease-in-out) forwards; }
.ris-curtain::after {
  background: var(--ris-page) url("rainbow-mark-192.png") center / 76px no-repeat;
  animation: risSweepIn 380ms var(--ris-ease-in-out) 90ms forwards;
}
@keyframes risSweepIn { to { transform: translateY(0); } }

html.ris-pt body::after {
  content: ""; position: fixed; inset: 0; z-index: 99990;
  background: var(--ris-page) url("rainbow-mark-192.png") center / 76px no-repeat;
  animation: risLift 560ms var(--ris-ease-in-out) 3500ms forwards;
}
html.ris-pt body::before {
  content: ""; position: fixed; left: 50%; top: calc(50% + 62px); z-index: 99991;
  width: 96px; height: 3px; margin-left: -48px; border-radius: 99px;
  background: var(--ris-blue);
  transform-origin: left center; opacity: 0; animation: risLoad 1400ms ease-in-out 450ms infinite;
}
html.ris-pt.ris-pt-out body::after { animation: risLift 620ms var(--ris-ease-in-out) forwards; }
html.ris-pt.ris-pt-out body::before { animation: risFadeOut 160ms ease forwards; }
@keyframes risLift { to { transform: translateY(-100%); } }
@keyframes risLoad { 0% { transform: scaleX(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes risFadeOut { to { opacity: 0; } }

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .ris-blob { display: none; }
}

/* ------------------------------------------------------------ small details */
.ris-pulse { position: relative; }
.ris-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: risPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes risPing { 75%, 100% { transform: scale(2.4); opacity: 0; } }

@media (max-width: 560px) {
  .ris-hero-chip { inset-inline-start: 10px !important; bottom: 10px !important; padding: 8px 12px !important; }
}

.ris-news-img { transition: transform 700ms var(--ris-ease-out); }
.ris-news:hover .ris-news-img { transform: scale(1.04); }

.ris-tag { transition: transform 220ms var(--ris-ease-out); display: inline-block; }
.ris-tag:hover { transform: translateY(-2px); }

.ris-band { position: relative; overflow: hidden; isolation: isolate; }
.ris-band::before {
  content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; border-radius: 50%;
  inset-inline-end: -120px; top: -160px; background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  animation: risDrift 16s ease-in-out infinite alternate;
}
.ris-band::after {
  content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; border-radius: 50%;
  inset-inline-start: -110px; bottom: -170px; background: radial-gradient(circle, rgba(204, 112, 40, 0.35), transparent 70%);
  animation: risDrift 20s ease-in-out -8s infinite alternate;
}

.ris-foot-link { position: relative; transition: color 160ms ease, transform 220ms var(--ris-ease-out) !important; }
.ris-foot-link:hover { transform: translateX(3px); }
[dir="rtl"] .ris-foot-link:hover { transform: translateX(-3px); }

.ris-sib { animation: risRise 460ms var(--ris-ease-out) both; }

@media (max-width: 440px) { .ris-maps-text { display: none; } }

/* ------------------------------------------------------------ type tuning
   Plus Jakarta Sans headings sit best slightly tightened; Arabic must never
   be letter-spaced (it breaks the joins) and needs room for its marks. */
[dir="ltr"] h1, [dir="ltr"] h2 { letter-spacing: -0.02em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] [style*="letter-spacing"] { letter-spacing: 0 !important; }
[dir="rtl"] h1 { line-height: 1.3 !important; }
[dir="rtl"] h2 { line-height: 1.4; }

/* Plus Jakarta Sans gives the full stop wide side bearings at display sizes */
.ris-dot { margin-inline-start: -0.12em; }

/* ============================================================ unified look
   Shared with the staff portal: warm off-white page, white cards, 12px
   controls, navy brand surfaces, orange eyebrow labels. */
:root {
  --surface-page: #FBFAF7;
  --surface-sunken: #F3F0EA;
  --radius-md: 12px;
  --ris-navy: linear-gradient(150deg, #1F3A54 0%, #274A6B 55%, #33587E 100%);
}
body { background: #FBFAF7; }
.ris-btn { border-radius: 12px !important; }

.ris-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--orange-50); border: 1px solid var(--orange-200); color: var(--orange-700);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.ris-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ris-orange); }

h2 { text-wrap: balance; }

/* breadcrumb above inner-page titles */
.ris-crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ris-crumbs a { color: var(--text-muted); text-decoration: none; transition: color 160ms ease; }
.ris-crumbs a:hover { color: var(--blue-700); }
.ris-crumbs span { color: var(--blue-700); }
.ris-crumbs svg { opacity: 0.5; }

/* at-a-glance facts overlapping the hero */
.ris-facts {
  position: relative; margin-top: -34px !important;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface-card); border: 1px solid var(--border-default); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(43, 38, 33, 0.04), 0 18px 40px -24px rgba(43, 38, 33, 0.3);
}
.ris-fact { display: flex; flex-direction: column; gap: 4px; padding: 22px 26px; }
.ris-fact + .ris-fact { border-inline-start: 1px solid var(--border-default); }
.ris-fact-value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.05; color: var(--blue-700); }
[dir="rtl"] .ris-fact-value { text-align: right; }
.ris-fact:nth-child(even) .ris-fact-value { color: var(--orange-700); }
.ris-fact-label { font-size: 13.5px; line-height: 1.45; color: var(--text-muted); font-weight: 500; }
@media (max-width: 860px) {
  .ris-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ris-fact:nth-child(3) { border-inline-start: 0; }
  .ris-fact:nth-child(n+3) { border-top: 1px solid var(--border-default); }
}
@media (max-width: 420px) { .ris-fact { padding: 18px; } }

/* stage cards with photos */
.ris-stage-photo { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-muted); }
.ris-stage-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 700ms var(--ris-ease-out); }
.ris-stage:hover .ris-stage-photo img { transform: scale(1.05); }
.ris-stage-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 26px; flex: 1; }

/* navy CTA band and footer */
.ris-band-navy h2 { color: #fff !important; }
.ris-band-navy p { color: rgba(255, 255, 255, 0.78) !important; }
.ris-footer a[style*="rgba(255, 255, 255, 0.78)"]:hover { color: #fff !important; }

/* ------------------------------------------------------------ announcement bar
   Published from the staff portal; shown above the navigation on every page. */
.ris-banner { color: #fff; animation: risBannerIn 420ms var(--ris-ease-out) both; }
.ris-banner-info { background: #274A6B; }
.ris-banner-important { background: #A2551C; }
.ris-banner-urgent { background: #B23E31; }
.ris-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: 9px 24px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; line-height: 1.45; font-weight: 600; text-align: center;
}
.ris-banner-text { min-width: 0; }
.ris-banner-link {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16);
  color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: background 160ms ease;
}
.ris-banner-link:hover { background: rgba(255, 255, 255, 0.28); }
.ris-banner-link:hover svg { transform: translateX(3px); }
[dir="rtl"] .ris-banner-link:hover svg { transform: scaleX(-1) translateX(3px); }
.ris-banner-link svg { transition: transform 200ms var(--ris-ease-out); }
.ris-banner-close {
  flex-shrink: 0; margin-inline-start: 4px; width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, 0.85); cursor: pointer;
  transition: background 160ms ease;
}
.ris-banner-close:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.ris-banner-close:focus-visible, .ris-banner-link:focus-visible { outline: 2px solid #fff !important; outline-offset: 2px; }
@keyframes risBannerIn { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  /* row 1: icon · message · close — row 2: the link */
  .ris-banner-inner { padding: 8px 10px 8px 12px; gap: 6px 8px; font-size: 13px; justify-content: flex-start; text-align: start; flex-wrap: wrap; }
  .ris-banner-text { flex: 1 1 calc(100% - 64px); order: 1; }
  .ris-banner-inner > svg { order: 0; }
  .ris-banner-close { order: 2; margin-inline-start: 0; }
  .ris-banner-link { order: 3; margin-inline-start: 26px; }
}

/* The page runtime wraps the Nav component in a box exactly as tall as the
   nav, which stopped position:sticky from ever sticking. Let the nav use the
   page as its sticky container instead. */
.sc-host:has(> .ris-nav) { display: contents; }

/* Footer links: comfortable touch targets on phones */
@media (max-width: 720px) {
  .ris-foot-col { gap: 2px !important; }
  .ris-foot-col > span:first-child { margin-bottom: 6px; }
  .ris-foot-link, a.ris-foot-contact { min-height: 40px; display: flex !important; align-items: center; }
  .ris-foot-col > div:has(> a.ris-foot-contact) { align-items: center !important; }
  .ris-crumbs a { padding-block: 10px; margin-block: -10px; }
}

/* ------------------------------------------------------------ home: news + social */
.ris-clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* The Facebook feed is Facebook's own box and can't be styled from here, so it
   sits inside our own card: our header on top, and the feed shown as a light
   sheet inset in the card — deliberate-looking in dark mode too. */
.ris-fb-embed {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ris-fb-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
}
.ris-fb-head img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--surface-muted); padding: 4px; flex-shrink: 0; }
.ris-fb-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ris-fb-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ris-fb-handle { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ris-fb-follow {
  display: inline-flex; align-items: center; gap: 7px; margin-inline-start: auto; flex-shrink: 0;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--ris-facebook); color: #fff;
  font-weight: 700; font-size: 13px; text-decoration: none;
  transition: background 160ms ease;
}
.ris-fb-follow:hover { background: var(--ris-facebook-hover); }
.ris-fb-sheet { padding: 10px; background: var(--surface-muted); }
/* Facebook repeats the page name inside the box; our own header above says it
   already, so that strip is cropped out of view. */
.ris-fb-window { height: 480px; overflow: hidden; border-radius: 10px; background: #fff; }
.ris-fb-window iframe { margin-top: -76px; background: #fff; }
html[data-theme="dark"] .ris-fb-window { filter: brightness(0.93) contrast(1.02); }
@media (max-width: 420px) {
  .ris-fb-handle { display: none; }
  .ris-fb-head { padding: 12px 13px; gap: 10px; }
}
@media (max-width: 900px) {
  .ris-social-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .ris-fb-embed { max-width: 500px; width: 100%; }
}

/* ------------------------------------------------------------ touch comfort */
@media (max-width: 560px) {
  .ris-faq summary { min-height: 44px; }
  .ris-faq a[href*="wa.me"], p a[href*="wa.me"] { padding-block: 8px; }
  a.ris-arrow[href="/news"] { padding-block: 10px; }
}

/* ============================================================ dark mode
   Set on <html data-theme="dark"> by site.js (device setting, or the visitor's
   choice from the moon/sun button). Only the colour tokens change: tints used
   as backgrounds turn deep, shades used as text turn light. The navy bands and
   the footer are already dark, so they keep the light-mode tokens. */
.ris-theme-sun { display: none; }
html[data-theme="dark"] .ris-theme-sun { display: block; }
html[data-theme="dark"] .ris-theme-moon { display: none; }
@media (max-width: 520px) { .ris-theme { width: 34px !important; height: 34px !important; } }

html[data-theme="dark"] {
  color-scheme: dark;
  --ris-page: #161513;
  --neutral-900: #F2EEE8;
  --neutral-800: #DEDAD3;
  --neutral-700: #C6C0B6;
  --neutral-600: #A8A297;
  --neutral-500: #8C867B;
  --neutral-400: #6C675F;
  --neutral-300: #4A4640;
  --neutral-200: #36322D;
  --neutral-100: #2A2723;
  --neutral-50:  #201E1B;

  --blue-50:  #18222D;
  --blue-100: #1D2A39;
  --blue-200: #284057;
  --blue-300: #3A5B7E;
  --blue-400: #5A80AB;
  --blue-500: #6F9BCB;
  --blue-700: #9CBCE0;
  --blue-800: #B6CFEA;
  --blue-900: #D2E1F2;

  --orange-50:  #2A1E15;
  --orange-100: #33241A;
  --orange-200: #4E3423;
  --orange-300: #7A5033;
  --orange-400: #B87A4B;
  --orange-500: #D6864B;
  --orange-700: #E7A36F;
  --orange-800: #EFBC92;
  --orange-900: #F5D2B4;

  --success-bg: #16291E;
  --warning-bg: #2E2513;
  --error-bg:   #33191A;
  --error:      #E4776A;

  --brand-primary-hover:  #3F6FA3;
  --brand-primary-active: #35618C;
  --brand-secondary-hover:  #B35E1F;
  --brand-secondary-active: #A2551C;

  --surface-page:   #161513;
  --surface-sunken: #1B1917;
  --surface-card:   #1F1D1A;
  --surface-muted:  #2A2723;
  --border-default: #34302B;
  --border-strong:  #46413A;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.45);
  --shadow-focus-blue: 0 0 0 3px rgba(80, 131, 187, 0.45);
  --shadow-focus-orange: 0 0 0 3px rgba(204, 112, 40, 0.45);
}
html[data-theme="dark"] {
  --text-faint: #9E978B;
  --brand-primary: #4576A9;
  --brand-secondary: #B35E1F;
  --ris-whatsapp: #147A3C;
  --ris-whatsapp-hover: #0F6832;
  --ris-whatsapp-ink: #4ED08A;
  --ris-whatsapp-tint: #17301F;
  --ris-facebook: #1B60C4;
  --ris-facebook-hover: #154E9F;
}
html[data-theme="dark"] body { background: var(--surface-page); }
html[data-theme="dark"] ::selection { background: rgba(108, 155, 205, 0.4); }
html[data-theme="dark"].ris-scrolled .ris-nav { background: rgba(22, 21, 19, 0.86) !important; box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .ris-facts { box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .ris-card:hover { box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .ris-blob.b1 { background: rgba(80, 131, 187, 0.18); }
html[data-theme="dark"] .ris-blob.b2 { background: rgba(204, 112, 40, 0.12); }
/* photos sit a touch softer on a dark page */
html[data-theme="dark"] .ris-photo { box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7) !important; }

/* already-dark surfaces keep their light-mode colours */
html[data-theme="dark"] .ris-band-navy,
html[data-theme="dark"] .ris-footer {
  --blue-50: #F3F7FB; --blue-100: #E4EDF6; --blue-200: #CBDCED; --blue-300: #ACC5E1;
  --blue-700: #35618C; --blue-800: #274A6B; --blue-900: #1F3A54;
  --orange-100: #FBEBE0; --orange-200: #F2D3BB; --orange-700: #A2551C;
}

html.ris-theme-anim, html.ris-theme-anim body, html.ris-theme-anim * {
  transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.ris-theme-anim, html.ris-theme-anim body, html.ris-theme-anim * { transition: none !important; }
}
