:root {
  /* Theme reference: rhsstamilnadu.in — warm cream ground, orange gradient accent,
     deep-brown ink and dark sections (nav stays light; footer/table-headers go
     brown). --brm-orange/--brm-green keep their original token names (used all
     over this file and every view) so this is a palette swap, not a rename:
     orange is the primary accent, "green" is now the brown/dark-section token.
     --status-approved is a real, separate green kept only for the Approved
     semantic (status badges, approved-count tile) — untouched by this reskin. */
  --brm-orange: #ED5B1B;
  --brm-orange-dark: #C7430E;
  --brm-orange-light: #F47B39;
  --brm-gold: #C99743;
  --brm-gold-light: #EFD39B;
  --brm-green: #38251B;
  --brm-green-dark: #2B1C14;
  --brm-cream: #FFFAF1;
  --brm-cream-2: #FFF4DF;
  --brm-line: #EAD9C3;
  --brm-ink: #38251B;
  --brm-ink-soft: #6C5749;
  --brm-ink-darker: #1C1109;
  --status-approved: #0B6E2C;

  /* Playfair Display (self-hosted, see fonts.css) is the header face, applied to
     every header title site-wide — matches the big serif headline on
     themewagon.github.io/sarab. Baloo Thambi 2 stays as the fallback for any
     Tamil header text, since Playfair Display's subset here is Latin-only.
     Hind Madurai remains the body face. */
  --font-display: 'Playfair Display', 'Baloo Thambi 2', 'Noto Sans Tamil', system-ui, serif;
  --font-body: 'Hind Madurai', 'Noto Sans Tamil', system-ui, sans-serif;
}

html, body {
  height: 100%;
}

body {
  /* Theme reference: themewagon.github.io/sarab (background/header/footer only —
     button colors are a separate user-supplied palette; no copy pulled from it). */
  background-color: #FFF8F0;
  /* Pure-CSS depth (no image requests, so it costs nothing to load): a soft gold
     vignette top/bottom plus a fine diagonal hairline texture, evoking engraved
     stationery rather than a flat fill. */
  background-image:
    radial-gradient(ellipse 1400px 700px at 50% -8%, rgba(201, 151, 67, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 1400px 700px at 50% 108%, rgba(56, 37, 27, 0.08) 0%, transparent 60%),
    repeating-linear-gradient(135deg, rgba(201, 151, 67, 0.05) 0px, rgba(201, 151, 67, 0.05) 1px, transparent 1px, transparent 34px);
  background-attachment: fixed;
  color: var(--brm-ink);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============ DRIFTING CLOUD BACKGROUND ============ */
/* Pure CSS, no images — each "cloud" is a rounded bar plus two circular puffs
   drawn with pseudo-elements, drifting slowly left-to-right at staggered
   speeds/heights for a light parallax feel. Fixed behind all page content. */
.cloud-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 60px;
  opacity: 0.5;
  filter: blur(1px);
  animation: cloud-drift linear infinite;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud-1 { width: 160px; height: 46px; top: 8%;  left: -20%; animation-duration: 95s; }
.cloud-1::before { width: 60px; height: 60px; top: -32px; left: 20px; }
.cloud-1::after  { width: 84px; height: 84px; top: -46px; right: 20px; }

.cloud-2 { width: 110px; height: 34px; top: 22%; left: -25%; opacity: 0.4; animation-duration: 130s; animation-delay: -40s; }
.cloud-2::before { width: 44px; height: 44px; top: -22px; left: 14px; }
.cloud-2::after  { width: 58px; height: 58px; top: -30px; right: 14px; }

.cloud-3 { width: 200px; height: 56px; top: 42%; left: -30%; opacity: 0.32; animation-duration: 165s; animation-delay: -90s; }
.cloud-3::before { width: 76px; height: 76px; top: -40px; left: 26px; }
.cloud-3::after  { width: 100px; height: 100px; top: -56px; right: 26px; }

.cloud-4 { width: 130px; height: 38px; top: 63%; left: -22%; opacity: 0.4; animation-duration: 115s; animation-delay: -20s; }
.cloud-4::before { width: 50px; height: 50px; top: -26px; left: 16px; }
.cloud-4::after  { width: 66px; height: 66px; top: -34px; right: 16px; }

.cloud-5 { width: 150px; height: 42px; top: 82%; left: -28%; opacity: 0.35; animation-duration: 145s; animation-delay: -70s; }
.cloud-5::before { width: 56px; height: 56px; top: -30px; left: 18px; }
.cloud-5::after  { width: 76px; height: 76px; top: -40px; right: 18px; }

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(160vw); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud { animation: none; }
}

/* The cloud layer sits behind everything via a negative z-index instead of giving
   body > .container its own stacking context (position:relative + z-index) — a
   positioned/z-indexed ancestor there used to trap every Bootstrap modal opened from
   page content in that same capped stacking context, rendering it (and its backdrop
   duplicate-fighting aside) behind the modal-backdrop Bootstrap appends directly to
   <body>, since the backdrop sits in the root stacking context while the modal didn't.
   A negative z-index on the cloud layer alone keeps it behind ordinary static content
   with no extra stacking context needed anywhere else on the page. */
.navbar-brm {
  position: relative;
  z-index: 20;
}

/* Fixed backgrounds force a repaint on every scroll frame on touch devices —
   scroll instead there so the "grand" backdrop never costs a frame of jank. */
@media (max-width: 768px), (hover: none) {
  body { background-attachment: scroll; }
}

h1, h2, h3, h4, h5, h6,
.section-title, .navbar-brm .brand-title, .stat-value {
  font-family: var(--font-display);
}

h1, h2, h3, h4, h5, h6, .stat-value {
  color: var(--brm-ink-darker);
}

/* Pushes the footer to the bottom of the viewport on short pages (login, contact, etc.)
   instead of letting it float up right after the content. */
body > .container {
  flex: 1 0 auto;
}

.footer-brm {
  flex-shrink: 0;
}

.navbar-brm {
  background: #fff;
  border-bottom: 1px solid var(--brm-line);
  box-shadow: 0 2px 14px rgba(26, 26, 26, 0.06);
}

.navbar-brm .navbar-brand,
.navbar-brm .nav-link {
  color: var(--brm-ink-darker) !important;
}

.navbar-brm .brand-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--brm-ink-darker);
}

.navbar-brm .brand-title-accent {
  color: var(--brm-orange);
}

.navbar-brm .nav-link:hover,
.navbar-brm .nav-link.active {
  color: #CD0A0A !important;
}

.navbar-brm .brand-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  border: 1px solid var(--brm-line);
  margin-right: 8px;
  box-shadow: 0 1px 4px rgba(26, 26, 26, 0.1);
}

/* Button geometry/typography (bold, uppercase, tight tracking, 9px corners)
   follows igniteseo.co.uk's CTA treatment; colors come from the user-supplied
   palette (#42CFC4 / #CD0A0A / #FF5656 / #FFFBAF). */
.btn-brm-primary {
  background: linear-gradient(135deg, #FF5656 0%, #CD0A0A 100%);
  border-color: #CD0A0A;
  color: #fff;
  border-radius: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(205, 10, 10, 0.3);
}

.btn-brm-primary:hover {
  background: linear-gradient(135deg, #CD0A0A 0%, #CD0A0A 100%);
  border-color: #CD0A0A;
  color: #fff;
}

.btn-brm-secondary {
  background: #fff;
  border: 1.5px solid #42CFC4;
  color: var(--brm-ink);
  border-radius: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-brm-secondary:hover {
  background: #FFFBAF;
  border-color: #42CFC4;
  color: var(--brm-ink);
}

/* Filter/View actions recur on every list & report page — given their own
   vivid, non-red styles (orange gradient / solid teal) so they read as
   distinct, colorful controls rather than blending into the grey defaults. */
.btn-brm-filter {
  background: linear-gradient(135deg, var(--brm-orange-light) 0%, var(--brm-orange-dark) 100%);
  border-color: var(--brm-orange-dark);
  color: #fff;
  border-radius: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(199, 67, 14, 0.3);
}

.btn-brm-filter:hover {
  background: linear-gradient(135deg, var(--brm-orange-dark) 0%, var(--brm-orange-dark) 100%);
  border-color: var(--brm-orange-dark);
  color: #fff;
}

.btn-brm-view {
  background: #42CFC4;
  border: 1.5px solid #2FA89E;
  color: #fff;
  border-radius: 9px;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-brm-view:hover {
  background: #2FA89E;
  border-color: #2FA89E;
  color: #fff;
}

/* Highlights one word within an existing heading — the "Do You Need [orange]More
   Clients?[/orange]" pattern — without altering any wording. */
.text-accent {
  color: var(--brm-orange);
}

/* Small dark "eyebrow" pill, matching igniteseo.co.uk's badge treatment —
   reused here for existing short data (a leader's post name) rather than new copy. */
.eyebrow-badge {
  display: inline-block;
  background: var(--brm-ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

.badge-status-pending { background-color: #f0ad4e; }
.badge-status-approved { background-color: var(--status-approved); }
.badge-status-rejected { background-color: #b02a2a; }

.card-brm {
  position: relative;
  border: 1px solid var(--brm-line);
  border-top: none;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(76, 45, 20, 0.04), 0 20px 50px rgba(76, 45, 20, 0.09);
  background: #fff;
  overflow: hidden;
}

/* A thin gilt rule along the top edge of every card — the one recurring
   "premium stationery" cue tying cards, tables and panels together. */
.card-brm::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brm-gold) 0%, var(--brm-orange) 50%, var(--brm-gold) 100%);
}

.hero-brm {
  position: relative;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255,255,255,0.22) 0%, transparent 55%),
    linear-gradient(135deg, var(--brm-orange-light) 0%, var(--brm-orange-dark) 100%);
  box-shadow: 0 20px 50px rgba(76, 45, 20, 0.22), inset 0 1px 0 rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 18px;
  padding: 1.75rem 2rem;
  overflow: hidden;
}
.hero-brm h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-wrap: balance;
}
.hero-brm .lead {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  opacity: 0.95;
}

/* "What We Do" — icon medallion cards */
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.row > div:nth-child(odd) .feature-icon {
  background: var(--brm-gold-light);
  color: var(--brm-gold);
}
.row > div:nth-child(even) .feature-icon {
  background: rgba(237, 91, 27, 0.12);
  color: var(--brm-orange-dark);
}

/* "What We Do" as a compact sidebar list (icon-left, text-right) instead of the
   square icon-on-top grid card, so it reads well in the narrower column. */
.feature-card-stacked {
  flex-direction: row;
  align-items: flex-start;
}
.feature-card-stacked:nth-child(odd) .feature-icon {
  background: var(--brm-gold-light);
  color: var(--brm-gold);
}
.feature-card-stacked:nth-child(even) .feature-icon {
  background: rgba(237, 91, 27, 0.12);
  color: var(--brm-orange-dark);
}
.feature-card-stacked .feature-icon {
  width: 38px;
  height: 38px;
}
.feature-card-stacked .feature-icon svg {
  width: 20px;
  height: 20px;
}
.feature-card h6 {
  font-size: 1rem;
  margin: 0;
}
.feature-card:hover {
  transform: translateY(-3px);
}
.feature-card {
  transition: transform 0.2s ease;
}

/* Leadership grid (home page) */
.leader-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.leader-card:hover {
  transform: translateY(-3px);
}
.leader-photo-wrap {
  width: 96px;
  height: 96px;
}
.leader-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brm-cream-2);
  box-shadow: 0 4px 14px rgba(56, 37, 27, 0.15);
}
.leader-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brm-gold-light);
  color: var(--brm-ink);
  font-weight: 800;
  font-size: 1.6rem;
}
.leader-post {
  color: var(--brm-orange-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.leader-location {
  color: var(--brm-ink-soft);
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

/* Member Gallery photo — matches the ID card's passport-photo treatment (rounded
   rectangle, orange border, same 20mm:24mm aspect ratio) rather than the circular
   leader-photo style used elsewhere. */
.member-gallery-photo-wrap {
  width: 100px;
  height: 120px;
}
.member-gallery-photo {
  width: 100px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  border: 3px solid #FE5B00;
  box-shadow: 0 4px 14px rgba(56, 37, 27, 0.15);
}
.member-gallery-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brm-gold-light);
  color: var(--brm-ink);
  font-weight: 800;
  font-size: 1.8rem;
}
.member-gallery-occupation {
  color: var(--brm-ink-soft);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

/* News / Events sidebar */
.news-sidebar-title {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  border-bottom: 2px solid var(--brm-cream);
  padding-bottom: 0.75rem;
}
.news-chip {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}
.news-chip-event { background: #FFF3E0; color: #C97400; }
.news-chip-achievement { background: var(--brm-gold-light); color: #8A6423; }
.news-chip-news { background: #EAF0FE; color: #3A56D4; }
.news-sidebar-item {
  border-radius: 10px;
  padding: 0.6rem;
  margin: 0 -0.6rem;
  transition: background-color 0.15s ease;
}
.news-sidebar-item:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 0.4rem;
  padding-bottom: 1rem;
}
.news-sidebar-item:hover {
  background-color: var(--brm-cream);
}
.news-sidebar-item h6 {
  font-size: 0.92rem;
  line-height: 1.35;
}
.news-sidebar-item p {
  color: var(--brm-ink-soft);
  line-height: 1.5;
}
.news-readmore-btn {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brm-orange);
  cursor: pointer;
}
.news-readmore-btn:hover {
  text-decoration: underline;
}

.section-title {
  position: relative;
  display: inline-block;
  color: var(--brm-ink-darker);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding-bottom: 0.5rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brm-gold) 0%, var(--brm-orange) 100%);
}

/* Home page opening headline — sized/weighted to match the big serif hero
   headline on themewagon.github.io/sarab. */
.home-title-lead {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.footer-brm {
  background: #1A1A1A;
  border-top: 2px solid var(--brm-gold);
  color: #cfcfcf;
}

.footer-brm a {
  color: #F6A623;
}

.stat-tile {
  border-radius: 12px;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-left: 6px solid #ccc;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.stat-tile .stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #55524c;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.stat-tile .stat-value {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 0.15rem;
}

.stat-tile-blue   { background: #EAF0FE; border-left-color: #3A56D4; }
.stat-tile-blue   .stat-value { color: #3A56D4; }
.stat-tile-green  { background: #E9F6EC; border-left-color: var(--status-approved); }
.stat-tile-green  .stat-value { color: var(--status-approved); }
.stat-tile-orange { background: #FFF3E0; border-left-color: #C97400; }
.stat-tile-orange .stat-value { color: #C97400; }
.stat-tile-red    { background: #FDEAEC; border-left-color: #C6273A; }
.stat-tile-red    .stat-value { color: #C6273A; }

.photo-crop-frame {
  width: 180px;
  height: 240px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--brm-orange);
  border-radius: 6px;
  background: #eee;
  cursor: move;
  touch-action: none;
}

.photo-crop-frame img {
  position: absolute;
  left: 0;
  top: 0;
  user-select: none;
  max-width: none;
}

.table-brm thead {
  background: linear-gradient(90deg, var(--brm-green) 0%, var(--brm-green-dark) 100%);
  color: #fff;
}

.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid #dcd3bf;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--brm-cream);
}

.rte-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dcd3bf;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.rte-btn:hover {
  background: var(--brm-gold-light);
}

.rte-sep {
  width: 1px;
  background: #dcd3bf;
  margin: 2px 4px;
}

.rte-editor {
  min-height: 260px;
  padding: 12px 14px;
  border: 1px solid #dcd3bf;
  border-radius: 0 0 6px 6px;
  background: #fff;
  outline: none;
  line-height: 1.5;
}

.rte-editor:focus {
  border-color: var(--brm-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 121, 0, 0.15);
}

.thumb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.1);
}

.thumb-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9e2d6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a89f8f;
  font-size: 0.65rem;
  border: 1px solid rgba(0,0,0,0.1);
}

.lang-block + .lang-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--brm-line);
}

/* Home page body copy (About Us, Key Leadership, etc.) — bigger and looser than the
   Bootstrap default so long paragraphs stay easy to read at a glance. */
.lang-block p,
.lang-block li {
  font-size: 1.15rem;
  line-height: 1.75;
}
.lang-block ul {
  margin-bottom: 1.25rem;
}

@media (max-width: 576px) {
  .hero-brm { padding: 1.5rem 1rem; }
}

.news-sidebar {
  top: 12px;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
  body, .container {
    background: #fff !important;
  }
}

/* Plain, formal "statement" layout — deliberately square-cornered and compact,
   and immune to Bootstrap's grid-column print-collapse bug that the old
   rounded stat-tile cards were hitting. */
.stmt-header {
  border: 1px solid var(--brm-line);
  border-radius: 0;
  padding: 1rem;
  margin-bottom: 1rem;
}
.stmt-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e2d8;
}
.stmt-summary-item {
  min-width: 140px;
}
.stmt-summary-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.1rem;
}
.stmt-summary-value {
  font-size: 1.15rem;
  font-weight: 800;
}
.stmt-table {
  border: 1px solid var(--brm-line);
  border-radius: 0;
  overflow: hidden;
}
@media print {
  .stmt-header, .stmt-table {
    border-color: #999;
  }
}

.pagination .page-link {
  color: var(--brm-green);
}
.pagination .page-link:hover {
  color: var(--brm-orange-dark);
  background-color: var(--brm-cream);
}
.pagination .page-item.active .page-link {
  background-color: var(--brm-green);
  border-color: var(--brm-green);
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  color: #b8b3a6;
}
