/* ==========================================================================
   Nagarik Social Foundation — global theme
   All colors/fonts come from CSS custom properties (no hardcoded values in
   page markup) so the light/dark switcher only ever needs to redefine
   these tokens.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Noto+Serif+Devanagari:wght@400;600;700&display=swap');

:root {
  /* Brand palette (extracted from the original site) */
  --nsf-orange: #f18330;
  --nsf-orange-dark: #d9691a;
  --nsf-gradient-start: #f94a5b;
  --nsf-gradient-end: #f18330;
  --nsf-navy: #0b012a;

  /* Semantic tokens — light theme (default) */
  --nsf-bg: #ffffff;
  --nsf-bg-alt: #f8f9fa;
  --nsf-bg-card: #ffffff;
  --nsf-text: #212529;
  --nsf-text-muted: #5a5a68;
  --nsf-heading: var(--nsf-navy);
  --nsf-border: #e9ecef;
  --nsf-navbar-bg: #ffffff;
  /* Footer tokens match the original site exactly: a light footer, not dark navy. */
  --nsf-footer-bg: #f9f9f9;
  --nsf-footer-text: #333333;
  --nsf-footer-text-muted: #555555;
  --nsf-footer-title: #222222;
  --nsf-footer-border: #e1e1e1;
  --nsf-footer-bottom-text: #777777;
  --nsf-shadow: 0 .5rem 1.5rem rgba(11, 1, 42, .08);

  --bs-primary: var(--nsf-orange);
  --bs-primary-rgb: 241, 131, 48;
  --bs-link-color: var(--nsf-orange);
  --bs-link-hover-color: var(--nsf-orange-dark);
  --bs-body-font-family: 'Poppins', 'Noto Serif Devanagari', system-ui, sans-serif;
  --bs-body-bg: var(--nsf-bg);
  --bs-body-color: var(--nsf-text);

  --nsf-font-base: 'Poppins', 'Noto Serif Devanagari', system-ui, -apple-system, sans-serif;
}

/* Dark theme — flips the same tokens, nothing else needs to change */
[data-bs-theme="dark"] {
  --nsf-bg: #0f1115;
  --nsf-bg-alt: #171a21;
  --nsf-bg-card: #1b1e26;
  --nsf-text: #e7e7ee;
  --nsf-text-muted: #a8a8b8;
  --nsf-heading: #ffffff;
  --nsf-border: #2a2d38;
  --nsf-navbar-bg: #14161d;
  --nsf-footer-bg: #0a0b10;
  --nsf-footer-text: #cfcfe0;
  --nsf-footer-text-muted: #a19fc0;
  --nsf-footer-title: #ffffff;
  --nsf-footer-border: #23242e;
  --nsf-footer-bottom-text: #8a889f;
  --nsf-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .45);

  --bs-body-bg: var(--nsf-bg);
  --bs-body-color: var(--nsf-text);
}

* { scroll-behavior: smooth; }

html, body {
  background-color: var(--nsf-bg);
  color: var(--nsf-text);
  font-family: var(--nsf-font-base);
  transition: background-color .25s ease, color .25s ease;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--nsf-heading);
  font-weight: 700;
}

a { color: var(--bs-link-color); }
a:hover { color: var(--bs-link-hover-color); }

/* Devanagari script gets its own font when Hindi/Marathi is active */
html[lang="hi"] body,
html[lang="mr"] body {
  font-family: 'Noto Serif Devanagari', 'Poppins', sans-serif;
}

/* ---------- Section rhythm ---------- */
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section-alt { background-color: var(--nsf-bg-alt); }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: .5rem;
}
.section-underline {
  width: 56px;
  height: 4px;
  background: var(--nsf-orange);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}
.section-lead {
  color: var(--nsf-text-muted);
  max-width: 720px;
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn-nsf {
  background: linear-gradient(to right, var(--nsf-gradient-start), var(--nsf-gradient-end));
  color: #fff;
  border: 0;
  font-weight: 600;
  padding: .65rem 1.75rem;
  border-radius: .5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-nsf:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(241, 131, 48, .35);
}
.btn-nsf-outline {
  border: 2px solid var(--nsf-orange);
  color: var(--nsf-orange);
  font-weight: 600;
  border-radius: .5rem;
  padding: .6rem 1.7rem;
  background: transparent;
  transition: all .2s ease;
}
.btn-nsf-outline:hover {
  background: var(--nsf-orange);
  color: #fff;
}

/* ---------- Top bar (contact strip above the main nav) ---------- */
.top-bar {
  background: var(--nsf-navy);
  color: #e7e3f5;
  font-size: .85rem;
}
.top-bar a { color: #e7e3f5; }
.top-bar a:hover { color: var(--nsf-orange); }
.top-bar-item i { color: var(--nsf-orange); }
.top-bar-social {
  color: #e7e3f5;
  font-size: .95rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
}
.top-bar-social:hover { background: var(--nsf-orange); color: #fff; }

/* ---------- Navbar ---------- */
/* Pinning is done via a JS scroll-listener toggling .is-pinned (position:
   fixed) rather than relying on CSS position:sticky — sticky silently
   fails to engage if any ancestor's layout/containing-block doesn't
   cooperate, and fixed+spacer sidesteps that entirely. */
.navbar-nsf {
  position: relative;
  z-index: 1030;
  width: 100%;
  background-color: var(--nsf-navbar-bg);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: padding .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.navbar-nsf.is-pinned {
  position: fixed;
  top: 0;
  left: 0;
}
.navbar-nsf.is-scrolled {
  padding-top: .35rem !important;
  padding-bottom: .35rem !important;
  box-shadow: var(--nsf-shadow);
}
.navbar-nsf.is-scrolled .navbar-brand img { height: 48px; }
.navbar-nsf .navbar-brand img { transition: height .3s ease; }
.navbar-nsf .navbar-brand { display: flex; align-items: center; gap: .6rem; }
.navbar-nsf .navbar-brand img { height: 60px; width: auto; object-fit: contain; }
.navbar-nsf .logo-text {
  color: var(--nsf-orange);
  font-weight: 700;
  line-height: 1.1;
}
.navbar-nsf .nav-link {
  color: var(--nsf-text);
  font-weight: 500;
  margin-inline: .15rem;
}
.navbar-nsf .nav-link.active,
.navbar-nsf .nav-link:hover { color: var(--nsf-orange) !important; }

.icon-toggle-btn {
  border: 1px solid var(--nsf-border);
  background: transparent;
  color: var(--nsf-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.icon-toggle-btn:hover { border-color: var(--nsf-orange); color: var(--nsf-orange); }

/* Mobile: nav becomes a right-hand offcanvas sidebar (Bootstrap offcanvas) */
.offcanvas-nsf {
  --bs-offcanvas-width: min(320px, 85vw);
  background-color: var(--nsf-bg-card);
  color: var(--nsf-text);
}

.offcanvas-header-nsf {
  background: linear-gradient(135deg, var(--nsf-navy) 0%, #1a0f4a 100%);
  padding: 1.1rem 1.25rem;
}
.offcanvas-brand-text { color: #fff; font-weight: 700; font-size: .92rem; line-height: 1.2; }

.offcanvas-nav { padding-top: .5rem; }
.offcanvas-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .8rem 1rem;
  border-radius: .6rem;
  color: var(--nsf-text);
  font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.offcanvas-nav .nav-link i { width: 20px; text-align: center; font-size: 1.05rem; color: var(--nsf-orange); }
.offcanvas-nav .nav-link:hover,
.offcanvas-nav .nav-link.active {
  background-color: rgba(241, 131, 48, .12);
  color: var(--nsf-orange);
}

.offcanvas-footer { border-top: 1px solid var(--nsf-border); }
.offcanvas-footer .social-btn { width: 34px; height: 34px; font-size: .9rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--nsf-navy) 0%, #1a0f4a 60%, var(--nsf-gradient-end) 140%);
  color: #fff;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.hero .eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--nsf-orange);
  font-weight: 600;
  font-size: .85rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero p.lead { color: #e7e3f5; }
.hero-stats { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.5rem; padding-top: 2rem; }
.hero-stats .stat-num { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; color: var(--nsf-orange); }
.hero-stats .stat-label { color: #d8d4ea; font-size: .9rem; }

/* ---------- Inner-page photo banner (About, and other inner pages) ---------- */
/* Matches the original: a light gradient wash (#ccc9d4 -> #f1f1f1, ~70%
   opacity) over a full-width background photo, with a bold white title
   and a drop-shadow for legibility over whatever the photo looks like. */
.hero-banner-photo {
  background-image: linear-gradient(rgba(204, 201, 212, .7), rgba(241, 241, 241, .7)), var(--hero-photo, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 20px;
  text-align: center;
}
.hero-banner-title {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, .6);
}
.hero-banner-subtitle {
  font-size: 18px;
  opacity: .9;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, .6);
  margin-top: .5rem;
}
/* Some photo banners (e.g. Gallery) are light enough to need dark text instead */
.hero-banner-photo.text-dark .hero-banner-title,
.hero-banner-photo.text-dark .hero-banner-subtitle { color: #000; }

@media (max-width: 575.98px) {
  .hero-banner-photo { padding: 60px 20px; }
  .hero-banner-title { font-size: 28px; }
}

/* ---------- Initiatives page (zigzag alternating blocks) ---------- */
.intro-section { padding: 40px 20px; text-align: center; }
.intro-text {
  font-size: 18px;
  color: var(--nsf-text-muted);
  max-width: 800px;
  margin-inline: auto;
  line-height: 1.6;
}
.initiatives-list { padding: 40px 20px 20px; }
.initiative-block {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 50px 0;
}
.initiative-block.reverse { flex-direction: row-reverse; }
.initiative-content { flex: 1; text-align: left; }
.initiative-image { flex: 1; }
.initiative-image img { width: 100%; height: auto; border-radius: .75rem; box-shadow: var(--nsf-shadow); }
.initiative-title { font-size: 26px; font-weight: 700; color: var(--nsf-orange); margin-bottom: 10px; }
.initiative-subtitle { font-size: 18px; font-style: italic; color: var(--nsf-text-muted); margin-bottom: 20px; }
.initiative-points { list-style: disc outside; padding-left: 20px; margin: 0; }
.initiative-points li { margin-bottom: 12px; color: var(--nsf-text-muted); line-height: 1.6; }
.closing-note {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  color: var(--nsf-heading);
  margin: 60px 0 40px;
  padding-inline: 1rem;
}
@media (max-width: 992px) {
  .initiative-block, .initiative-block.reverse { flex-direction: column; }
}

/* ---------- Contact page ---------- */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  padding: 60px 20px;
}
@media (max-width: 767.98px) {
  .contact-wrapper { flex-direction: column; padding: 40px 15px; }
}
.contact-info-box, .contact-form-box {
  flex: 1 1 350px;
  background-color: var(--nsf-bg-card);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--nsf-shadow);
}
.contact-form-box { flex-basis: 400px; }
.contact-info-box h2, .contact-form-box h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: var(--nsf-heading);
  border-bottom: 2px solid var(--nsf-orange);
  padding-bottom: 10px;
}
.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; color: var(--nsf-text-muted); }
.contact-item i { font-size: 18px; color: var(--nsf-orange); margin-top: 3px; min-width: 24px; }
.contact-item a { color: inherit; }
.contact-item a:hover { color: var(--nsf-orange); }

/* Floating-label form fields (pure CSS, no JS needed) */
.form-group.floating { position: relative; margin-bottom: 24px; }
.form-group.floating input,
.form-group.floating textarea {
  width: 100%;
  padding: 14px 12px 6px;
  border: 1px solid var(--nsf-border);
  border-radius: 6px;
  background-color: var(--nsf-bg);
  color: var(--nsf-text);
  font-size: 15px;
}
.form-group.floating textarea { resize: vertical; min-height: 90px; }
.form-group.floating input:focus,
.form-group.floating textarea:focus {
  outline: none;
  border-color: var(--nsf-orange);
}
.form-group.floating label {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 15px;
  color: var(--nsf-text-muted);
  pointer-events: none;
  transition: all .15s ease;
  background: transparent;
}
.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label,
.form-group.floating textarea:focus + label,
.form-group.floating textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 12px;
  color: var(--nsf-orange);
  background-color: var(--nsf-bg-card);
  padding-inline: 4px;
}
.contact-form-box button[type="submit"] {
  align-self: flex-start;
  background: var(--nsf-orange);
  color: #fff;
  padding: 12px 25px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .3s ease;
}
.contact-form-box button[type="submit"]:hover { background: var(--nsf-orange-dark); }
.contact-form-box form { display: flex; flex-direction: column; }

/* ---------- Hero carousel ---------- */
.hero-carousel .carousel-item {
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.hero-carousel .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,1,42,.82), rgba(241,131,48,.35));
}
.hero-carousel .carousel-caption-nsf {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  padding-inline: 1rem;
}
.hero-carousel .carousel-caption-nsf .eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--nsf-orange);
  font-weight: 600;
  font-size: .85rem;
}

/* "WELCOME TO NAGARIK SOCIAL FOUNDATION" */
.hero-welcome {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  margin-bottom: .5rem;
}

/* "The Power of One Community" */
.hero-prefix {
  color: #fff;
  font-weight: 500;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  margin-bottom: .5rem;
}

.hero-carousel .carousel-caption-nsf p { color: #e7e3f5; }

/* ---------- Hero typewriter (multi-phrase type/backspace loop) ---------- */
.hero-typewriter-heading {
  line-height: 1.25;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  /* Long typed phrases must never clip or push past the viewport edge:
     wrap and break long words instead of forcing one unbroken line. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-height: 1.4em; /* reserves a line's worth of space so the layout doesn't jump as text types in/out */
}
.hero-typewriter-text.tw-orange { color: var(--nsf-orange); }
.hero-typewriter-text.tw-white { color: #fff; }
.hero-typewriter-cursor {
  color: var(--nsf-orange);
  font-weight: 400;
  margin-left: 2px;
  animation: nsf-cursor-blink 1s step-end infinite;
}
@keyframes nsf-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-typewriter-cursor { animation: none; }
}
.hero-carousel .carousel-indicators [data-bs-target] { background-color: var(--nsf-orange); }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { width: 8%; opacity: .6; }
.hero-carousel .carousel-control-prev:hover, .hero-carousel .carousel-control-next:hover { opacity: 1; }

/* ---------- Initiative highlight cards (Home page) ---------- */
.initiative-highlight {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 220px;
  border-radius: .75rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--nsf-shadow);
  text-decoration: none;
  transition: transform .25s ease;
}
.initiative-highlight:hover { transform: translateY(-4px); }
.initiative-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,1,42,.88), rgba(11,1,42,.1) 65%);
}
.initiative-highlight h5 {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 1rem;
  margin: 0;
  font-size: 1rem;
}

/* ---------- Vision & Mission with image ---------- */
.vision-mission-block { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.vision-mission-block .vm-cards { flex: 1 1 380px; display: grid; gap: 1rem; }
.vision-mission-block .vm-image { flex: 1 1 280px; text-align: center; }
.vision-mission-block .vm-image img { max-width: 100%; border-radius: 1rem; }

/* ---------- Flip cards ---------- */
.flip-card { height: 230px; perspective: 1200px; }
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}
.flip-card-front {
  background-color: var(--nsf-bg-card);
  border: 1px solid var(--nsf-border);
  box-shadow: var(--nsf-shadow);
}
.flip-card-front i { font-size: 2rem; color: var(--nsf-orange); margin-bottom: .85rem; }
.flip-card-front h4 { font-size: 1rem; margin: 0; }
.flip-card-back {
  background: linear-gradient(135deg, var(--nsf-navy), #1a0f4a);
  color: #fff;
  transform: rotateY(180deg);
  overflow-y: auto;
}
.flip-card-back h4 { color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.flip-card-back p { color: #e3e0f2; font-size: .85rem; margin: 0; }

/* ---------- Stand-with-us icon grid ---------- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.icon-box { text-align: center; padding: 1.5rem 1rem; }
.icon-box i { font-size: 2.2rem; color: var(--nsf-orange); display: block; margin-bottom: .85rem; }
.icon-box p { color: var(--nsf-text-muted); margin: 0; }

/* ---------- Join the Movement CTA ---------- */
.join-movement {
  background: linear-gradient(135deg, var(--nsf-navy), var(--nsf-gradient-end));
  color: #fff;
  border-radius: 1rem;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
}
.join-movement p { color: #f1ecff; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.nsf-card {
  background-color: var(--nsf-bg-card);
  border: 1px solid var(--nsf-border);
  border-radius: .75rem;
  box-shadow: var(--nsf-shadow);
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nsf-card:hover { transform: translateY(-4px); }
.nsf-card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 131, 48, .12);
  color: var(--nsf-orange);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.nsf-card h3, .nsf-card h4 { font-size: 1.1rem; }
.nsf-card p { color: var(--nsf-text-muted); margin-bottom: 0; }

.value-pill {
  border: 1px solid var(--nsf-border);
  border-radius: .75rem;
  padding: 1.25rem;
  background-color: var(--nsf-bg-card);
  height: 100%;
}

/* ---------- Why NSF ---------- */
.why-nsf { background: var(--nsf-navy); color: #fff; border-radius: 1rem; }
.why-nsf ul { padding-left: 1.1rem; }
.why-nsf li { margin-bottom: .6rem; color: #e3e0f2; }

/* ---------- Gallery: "Who We Are" intro ---------- */
.who-we-are { text-align: center; }
.who-we-are .section-title { color: var(--nsf-orange); }
.who-we-are .description {
  max-width: 760px;
  margin-inline: auto;
  color: var(--nsf-text-muted);
}

/* ---------- Gallery grid ---------- */
/* Matches the original exactly: a plain CSS grid (auto-fill columns,
   180px minimum), not a masonry/column layout — each tile crops its
   photo to fill via object-fit:cover. */
.gallery-grid {
  display: grid;
  /* Exactly 4 columns on desktop, matching the original — auto-fill only
     kicks in on small screens (see media query below). */
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 20px;
}
.gallery-item {
  display: block;
  width: 100%;
  /* No fixed height set here — CSS Grid's default align-items:stretch
     automatically stretches every item in a row to match that row's
     tallest photo, so different rows end up different heights depending
     on their content. The image below then fills that stretched height
     completely (rather than leaving gaps under shorter photos). */
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  cursor: zoom-in;
  background: none;
  position: relative;
  transition: transform .3s ease;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.1); }

@media (max-width: 767.98px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(to top, rgba(11,1,42,.5), rgba(11,1,42,0) 55%);
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay { opacity: 1; }

/* ---------- Lightbox ---------- */
.nsf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 3, 20, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.nsf-lightbox.is-open { opacity: 1; visibility: visible; }
body.lightbox-open { overflow: hidden; }

.lightbox-stage { max-width: 94vw; text-align: center; }
.lightbox-stage img {
  display: block;
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: .5rem;
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.5);
}
.lightbox-counter { color: #e7e3f5; margin-top: .85rem; font-size: .9rem; letter-spacing: .04em; }

.lightbox-btn {
  position: absolute;
  z-index: 2001;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.lightbox-btn:hover { background: var(--nsf-orange); border-color: var(--nsf-orange); transform: scale(1.06); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 575.98px) {
  .lightbox-btn { width: 38px; height: 38px; font-size: .95rem; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 10px; right: 10px; }
}

/* ---------- Footer ---------- */
/* Colors/spacing match the original site exactly: a light footer
   (#f9f9f9) with dark text, not a dark navy block. */
.footer-nsf {
  background-color: var(--nsf-footer-bg);
  color: var(--nsf-footer-text);
  border-top: 1px solid var(--nsf-footer-border);
}
.footer-nsf a { color: var(--nsf-footer-text-muted); text-decoration: none; transition: color .3s ease; }
.footer-nsf a:hover { color: var(--nsf-orange); }
/* Matches the original's inert "Resources" links (placeholder pages that
   were never actually built) — visible, but not clickable. */
.footer-nsf a.disabled-link { opacity: .65; pointer-events: none; cursor: default; }
.footer-nsf a.disabled-link:hover { color: var(--nsf-footer-text-muted); }
.footer-nsf h5 {
  color: var(--nsf-footer-title);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  position: relative;
}
/* The small orange underline accent every footer heading has in the original */
.footer-nsf h5::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--nsf-orange);
  margin-top: 6px;
}
.footer-nsf .footer-logo { width: 110px; height: auto; margin-bottom: .75rem; }
.footer-nsf .footer-quote { font-size: .9rem; color: var(--nsf-footer-text-muted); margin-bottom: 6px; }
.footer-nsf .footer-subscribe-text { font-size: .88rem; color: var(--nsf-footer-text-muted); }

/* Generic social icon button — used in the footer and the mobile offcanvas sidebar */
.social-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  margin-right: .5rem;
  transition: transform .3s ease;
}
.social-btn:hover { transform: scale(1.1); color: #fff; }
/* Real brand colors, as in the original — not a generic orange hover */
.social-btn.facebook { background-color: #3b5998; }
.social-btn.instagram { background-color: #e1306c; }
.social-btn.whatsapp { background-color: #25d366; }
.footer-bottom {
  border-top: 1px solid var(--nsf-footer-border);
  font-size: .85rem;
  color: var(--nsf-footer-bottom-text);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 1030;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  text-decoration: none;
  transition: transform .2s ease;
  animation: nsf-whatsapp-float 2.4s ease-in-out infinite;
}
.whatsapp-float:hover {
  color: #fff;
  text-decoration: none;
  transform: scale(1.1);
  animation-play-state: paused; /* freeze the float so the hover scale is clean, not fighting the animation */
}
@keyframes nsf-whatsapp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

/* ---------- Language dropdown ---------- */
.lang-switch .btn { border-color: var(--nsf-border); color: var(--nsf-text); }

/* ---------- Utility ---------- */
[data-i18n] { unicode-bidi: isolate; }
.text-orange { color: var(--nsf-orange) !important; }
.bg-nsf-alt { background-color: var(--nsf-bg-alt); }
/* Same light tone as the footer (#f9f9f9 in light mode), for section
   banners that should read as neutral/plain rather than the dark navy
   .hero treatment. */
.bg-nsf-footer { background-color: var(--nsf-footer-bg); }
