/* ============================================================
   monsoon.css  — Sahityika Monsoon Theme
   Calm and serene: rain-washed slate, wet moss, a warm note of
   petrichor. Uses the same generic class names as the other
   themes so base.html never needs to know which one is active.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --color-rain-mist:      #e3eef1;
  --color-storm-slate:    #08131a;
  --color-deep-teal:      #0f2830;
  --color-white:          #ffffff;
  --color-rain-blue:      #8ecfd6;
  --color-wet-moss:       #5c9b7f;
  --color-petrichor:      #c98a4b;
  --color-cloud-grey:     #9fb6bd;

  --color-rain-mist-rgb:      227, 238, 241;
  --color-storm-slate-rgb:    8, 19, 26;
  --color-deep-teal-rgb:      15, 40, 48;
  --color-white-rgb:          255, 255, 255;
  --color-rain-blue-rgb:      142, 207, 214;
  --color-wet-moss-rgb:       92, 155, 127;
  --color-petrichor-rgb:      201, 138, 75;
  --color-cloud-grey-rgb:     159, 182, 189;

  --bs-primary:        var(--color-rain-blue);
  --bs-primary-rgb:    var(--color-rain-blue-rgb);
  --bs-secondary:      var(--color-wet-moss);
  --bs-secondary-rgb:  var(--color-wet-moss-rgb);
  --bs-dark:           var(--color-deep-teal);
  --bs-dark-rgb:       var(--color-deep-teal-rgb);
  --bs-light:          var(--color-rain-mist);
  --bs-light-rgb:      var(--color-rain-mist-rgb);
  --bs-white:          var(--color-white);
  --bs-white-rgb:      var(--color-white-rgb);

  --bs-body-bg:          #08131a;
  --bs-body-color:       #e3eef1;
  --bs-link-color:       var(--color-rain-blue);
  --bs-link-hover-color: var(--color-wet-moss);

  --bs-navbar-bg:              rgba(6, 15, 20, 0.94);
  --bs-card-bg:                rgba(227, 238, 241, 0.97);
  --bs-modal-bg:               rgba(227, 238, 241, 0.98);
  --bs-dropdown-bg:            rgba(227, 238, 241, 0.98);
  --bs-dropdown-link-hover-bg:    rgba(142, 207, 214, 0.14);
  --bs-dropdown-link-hover-color: var(--color-storm-slate);

  --bs-border-color:    rgba(142, 207, 214, 0.4);
  --bs-text-muted:      #9fb6bd;
  --bs-headings-color:  var(--color-rain-blue);

  /* Bootstrap 5.3 semantic colours. Left unset, these keep Bootstrap's
     light-mode defaults (near-black), so .text-body-secondary and friends
     turn invisible on this dark page. Note there is deliberately no
     --bs-heading-color: defining it forces a colour on every heading,
     including ones meant to inherit white inside dark sections. */
  --bs-body-color-rgb:  227, 238, 241;
  --bs-body-bg-rgb:     8, 19, 26;
  --bs-secondary-color: #9fb6bd;
  --bs-secondary-bg:    #10242c;
  --bs-tertiary-color:  rgba(227, 238, 241, 0.55);
  --bs-tertiary-bg:     #0b1b22;
  --bs-emphasis-color:  #f4fafb;
  --bs-border-color-translucent: rgba(142, 207, 214, 0.2);
  --bs-link-color-rgb:  142, 207, 214;

  --bs-body-font-family:    'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bs-heading-font-family: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
}


/* ── Animations ───────────────────────────────────────────────────────────── */

/* Drizzle: calm, complete falls. JS changes only the invisible boundary
   between iterations; speed remains stable throughout each streak's life. */
@keyframes monsoonFall {
  0%   { transform: translate3d(0, -14vh, 0) rotate(10deg); opacity: 0; }
  12%  { opacity: var(--drizzle-opacity, 0.34); }
  88%  { opacity: var(--drizzle-opacity, 0.34); }
  100% { transform: translate3d(var(--drizzle-drift, 3vw), 114vh, 0) rotate(10deg); opacity: 0; }
}

/* Window drops: slow, with two stalls. Real drops gather, slip, hang, then
   slip again — the held frames are what make it read as water rather than a
   falling dot. Scale is part of the animated transform so it is not discarded
   by the keyframes. */
@keyframes monsoonSlide {
  0%   { transform: translate3d(0, -8vh, 0) scale(var(--drop-scale, 1)); opacity: 0; }
  5%   { opacity: 0.9; }
  18%  { transform: translate3d(1px, 14vh, 0) scale(var(--drop-scale, 1)); opacity: 0.9; }
  30%  { transform: translate3d(1px, 17vh, 0) scale(var(--drop-scale, 1)); }
  46%  { transform: translate3d(-2px, 46vh, 0) scale(var(--drop-scale, 1)); }
  58%  { transform: translate3d(-2px, 49vh, 0) scale(var(--drop-scale, 1)); }
  80%  { transform: translate3d(2px, 86vh, 0) scale(var(--drop-scale, 1)); opacity: 0.85; }
  100% { transform: translate3d(0, 112vh, 0) scale(var(--drop-scale, 1)); opacity: 0; }
}

/* The wrapper crosses once from beyond one edge to beyond the other. A nested
   drift layer floats independently, keeping the path fluid without ever
   resetting or teleporting a visible leaf. */
@keyframes monsoonLeafCross {
  0%   { transform: translate3d(-12vw, 0, 0); opacity: 0; }
  7%   { opacity: 0.86; }
  90%  { opacity: 0.86; }
  100% { transform: translate3d(112vw, 0, 0); opacity: 0; }
}

@keyframes monsoonLeafCrossReverse {
  0%   { transform: translate3d(112vw, 0, 0); opacity: 0; }
  7%   { opacity: 0.86; }
  90%  { opacity: 0.86; }
  100% { transform: translate3d(-12vw, 0, 0); opacity: 0; }
}

@keyframes monsoonLeafFloat {
  0%   { transform: translate3d(0, -2vh, 0) rotate(-7deg); }
  50%  { transform: translate3d(0, 3.5vh, 0) rotate(8deg); }
  100% { transform: translate3d(0, -1vh, 0) rotate(-4deg); }
}

@keyframes monsoonLeafTumble {
  0%   { transform: rotate(-18deg) scaleX(1); }
  25%  { transform: rotate(38deg)  scaleX(0.45); }
  50%  { transform: rotate(148deg) scaleX(0.9); }
  75%  { transform: rotate(232deg) scaleX(0.35); }
  100% { transform: rotate(342deg) scaleX(1); }
}

/* Lightning: a bright stab, a near-blackout, a weaker second stab, then a long
   decay — the double flicker is what makes it read as lightning. Triggered by
   JS at rare, irregular intervals rather than on a loop. */
@keyframes monsoonLightning {
  0%   { opacity: 0; }
  3%   { opacity: 0.55; }
  8%   { opacity: 0.05; }
  13%  { opacity: 0.40; }
  19%  { opacity: 0.02; }
  27%  { opacity: 0.22; }
  45%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes monsoonHush {
  0%, 100% { text-shadow: 0 0 6px rgba(142, 207, 214, 0.28); }
  50%      { text-shadow: 0 0 16px rgba(142, 207, 214, 0.55); }
}

@keyframes monsoonSheen {
  0%, 100% { opacity: 0.25; transform: translateX(-18%); }
  50%      { opacity: 0.70; transform: translateX(18%); }
}

@keyframes monsoonMist {
  0%   { transform: translateY(-4%); opacity: 0.35; }
  50%  { transform: translateY(2%);  opacity: 0.55; }
  100% { transform: translateY(-4%); opacity: 0.35; }
}

@keyframes sproutSway {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(7deg) translateY(-2px); }
}

@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}


/* ── Global ───────────────────────────────────────────────────────────────── */

body, html {
  height: 100%;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 55% at 18% 0%,   rgba(18, 48, 57, 0.85) 0%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 88% 12%,  rgba(20, 44, 40, 0.70) 0%, transparent 60%),
    radial-gradient(circle   at 60% 15%, #10232c 0%, #0a1720 55%, #061016 100%);
  background-attachment: fixed;
  color: var(--bs-body-color);
  font-family: var(--bs-body-font-family);
  position: relative;
  overflow-x: hidden;
}

::selection {
  background-color: rgba(var(--color-rain-blue-rgb), 0.70);
  color: #06222a;
}

/* Low cloud drifting across the top of the viewport */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 180px;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 100% at 20% 0%, rgba(142, 207, 214, 0.10) 0, transparent 70%),
    radial-gradient(ellipse 50% 100% at 70% 0%, rgba(92, 155, 127, 0.08) 0, transparent 70%);
  filter: blur(6px);
  animation: monsoonMist 26s ease-in-out infinite;
}

/* Rain haze pooling at the foot of the page */
body::after {
  content: "";
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 120%, rgba(142, 207, 214, 0.12) 0, transparent 68%);
  filter: blur(4px);
  opacity: 0.7;
}

.wrapper {
  margin-top: 3rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
}

.content { flex: 1; position: relative; z-index: 3; }


/* ── Theme Banner ─────────────────────────────────────────────────────────── */

.theme-banner {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(8, 19, 26, 0.96),
    rgba(92, 155, 127, 0.42),
    rgba(142, 207, 214, 0.30),
    rgba(8, 19, 26, 0.96)
  );
  color: var(--color-rain-mist);
  font-family: var(--bs-heading-font-family);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(142, 207, 214, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.theme-banner span { color: var(--color-rain-blue); }
.theme-banner p { margin: 0; animation: monsoonHush 7s ease-in-out infinite; }


/* ── Drizzle ──────────────────────────────────────────────────────────────── */

.theme-particle,
.monsoon-drizzle {
  position: fixed;
  top: -14vh;
  width: 1px;
  border-radius: 1px;
  background: linear-gradient(to bottom,
      rgba(205, 235, 240, 0), rgba(205, 235, 240, 0.72), rgba(205, 235, 240, 0));
  pointer-events: none;
  z-index: 4;
  will-change: transform, opacity;
  animation: monsoonFall linear infinite;
}


/* ── Window drops ─────────────────────────────────────────────────────────── */

.monsoon-drop {
  position: fixed;
  width: 9px;
  height: 13px;
  /* Squashed teardrop: wider below, tapering above */
  border-radius: 58% 58% 52% 52% / 74% 74% 38% 38%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.85) 0%,
                                       rgba(213, 240, 245, 0.42) 38%,
                                       rgba(142, 207, 214, 0.20) 68%,
                                       rgba(142, 207, 214, 0.10) 100%);
  box-shadow:
    0 0 7px rgba(190, 225, 232, 0.40),
    inset 0 -2px 3px rgba(255, 255, 255, 0.35),
    inset 0 2px 2px rgba(8, 19, 26, 0.25);
  pointer-events: none;
  z-index: 4;
  animation: monsoonSlide linear infinite;
}

/* The wet trail left on the glass above it */
.monsoon-drop::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 3px;
  height: 92px;
  border-radius: 3px;
  background: linear-gradient(to top,
      rgba(190, 225, 232, 0.30), rgba(190, 225, 232, 0.08) 55%, rgba(190, 225, 232, 0));
}

/* A couple of smaller beads that trail behind the head */
.monsoon-drop::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: rgba(213, 240, 245, 0.45);
  box-shadow: 0 -22px 0 -0.5px rgba(213, 240, 245, 0.32);
}


/* ── Leaves on the breeze ─────────────────────────────────────────────────── */

.monsoon-leaf {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 4;
  will-change: transform, opacity;
  animation: monsoonLeafCross linear 1 both;
}

.monsoon-leaf--reverse {
  animation-name: monsoonLeafCrossReverse;
}

.monsoon-leaf__drift {
  animation: monsoonLeafFloat var(--leaf-float-duration, 9s) ease-in-out infinite;
  will-change: transform;
}

.monsoon-leaf__blade {
  position: relative;
  width: 14px;
  height: 9px;
  /* Leaf silhouette: a lens shape, pointed at both ends */
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg,
      rgba(126, 190, 152, 0.95) 0%, rgba(92, 155, 127, 0.9) 45%, rgba(58, 110, 88, 0.9) 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  animation: monsoonLeafTumble ease-in-out infinite;
  will-change: transform;
}

/* Midrib, so it reads as a leaf and not a smear */
.monsoon-leaf__blade::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 46%, rgba(226, 245, 233, 0.5) 50%, transparent 54%);
}


/* ── Lightning ────────────────────────────────────────────────────────────── */

.monsoon-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%,
      rgba(219, 243, 249, 0.55) 0%, rgba(190, 225, 232, 0.20) 42%, transparent 76%);
}

.monsoon-flash.is-striking { animation: monsoonLightning 1.7s ease-out; }


/* ── Puddle sheen along the foot of the page ──────────────────────────────── */

.monsoon-puddle,
.theme-decoration-layer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 110px;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(to top,
      rgba(142, 207, 214, 0.10) 0%, rgba(92, 155, 127, 0.05) 45%, transparent 100%);
}

.monsoon-puddle::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(190, 225, 232, 0.35), transparent);
  animation: monsoonSheen 9s ease-in-out infinite;
}


/* ── Easter egg (the sprout) ──────────────────────────────────────────────── */

.theme-easter-egg span {
  display: inline-block;
  transform-origin: 50% 100%;
  animation: sproutSway 5s ease-in-out infinite;
}


/* ── Audio toggle ─────────────────────────────────────────────────────────── */

.theme-audio-btn {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(142, 207, 214, 0.7);
  background: rgba(8, 19, 26, 0.92);
  color: var(--color-rain-blue);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: all 0.25s ease;
}

.theme-audio-btn--on {
  background: rgba(142, 207, 214, 0.92);
  color: #06222a;
  box-shadow: 0 0 18px rgba(142, 207, 214, 0.5);
}

.theme-audio-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}


/* ── Utilities & typography ───────────────────────────────────────────────── */

.text-primary { color: var(--bs-primary) !important; }
.bg-dark      { background-color: var(--bs-dark)  !important; }
.bg-light     { background-color: var(--bs-light) !important; }
.bg-theme     { background-color: var(--bs-dark)  !important; }

/* Body colour is inherited. Avoid assigning it to every descendant: doing so
   paints over the deliberate dark ink inside light cards, menus and modals. */
.text-muted { color: var(--bs-text-muted) !important; }

h1, h2, h3, h4, h5, h6 {
  color: var(--bs-headings-color);
  font-family: var(--bs-heading-font-family);
  font-weight: 600;
  letter-spacing: 0.015em;
}

a {
  color: var(--bs-link-color);
  transition: all 0.2s ease;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

hr {
  border: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--bs-primary), transparent);
  opacity: 0.9;
}


/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn-primary {
  background-image: linear-gradient(135deg, #8ecfd6, #6fb3bd);
  border: 1px solid rgba(142, 207, 214, 0.85);
  color: #06222a;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(142, 207, 214, 0.25);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
  background-image: linear-gradient(135deg, #a5dce2, #7cc2cb);
  color: #04191f;
  box-shadow: 0 6px 20px rgba(142, 207, 214, 0.4);
}

.btn-outline-primary {
  color: var(--color-rain-blue);
  border: 1px solid rgba(142, 207, 214, 0.7);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active {
  color: #06222a;
  background-image: linear-gradient(135deg, #8ecfd6, #6fb3bd);
  border-color: rgba(142, 207, 214, 0.9);
}

.btn-secondary {
  /* Dark ink rather than white: white on this green only reaches 3.3:1. The
     darker gradient stop is lifted to #5c9b7f so the ink clears 4.5:1 across
     the whole fill, not just the light end. */
  background-image: linear-gradient(135deg, #6fae8b, #5c9b7f);
  border: 1px solid rgba(92, 155, 127, 0.9);
  color: #06170f;
  font-weight: 600;
}

.btn-secondary:hover {
  background-image: linear-gradient(135deg, #7fbe9b, #66a689);
  color: #04120c;
}

.btn-outline-secondary {
  color: var(--color-wet-moss);
  border: 1px solid rgba(92, 155, 127, 0.7);
  background-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:active {
  color: #06170f;
  background-image: linear-gradient(135deg, #6fae8b, #5c9b7f);
  border-color: rgba(92, 155, 127, 0.9);
}

.btn-outline-light { color: var(--color-rain-mist); border-color: rgba(227, 238, 241, 0.5); }
.btn-outline-light:hover { background-color: rgba(227, 238, 241, 0.12); color: var(--color-white); }


/* ── Cards ────────────────────────────────────────────────────────────────── */

.card {
  --bs-card-bg: rgba(227, 238, 241, 0.97);
  --bs-card-color: #263c43;
  --bs-card-cap-bg: rgba(142, 207, 214, 0.13);
  --bs-card-cap-color: #0d2027;
  background-color: var(--bs-card-bg);
  border-radius: 18px;
  border: 1px solid rgba(142, 207, 214, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  color: var(--bs-card-color);
}

.card:hover  { border-color: rgba(142, 207, 214, 0.7); }
.card-header { background: linear-gradient(90deg, rgba(92,155,127,0.12), rgba(142,207,214,0.16)); border-bottom: 1px solid rgba(142,207,214,0.4); color: var(--bs-card-cap-color); font-weight: 600; }
.card-body,
.card-body p,
.card-body li,
.card-footer { color: var(--bs-card-color); }
.card h1, .card h2, .card h3,
.card h4, .card h5, .card h6,
.card-title { color: #0d2027; }
.card a:not(.btn) { color: #175f68; }
.card a:not(.btn):hover { color: #274f3e; }
.card .text-muted { color: #526870 !important; }


/* Testimonials sit directly on the storm page. Keep these particular text
   boxes atmospheric instead of switching to the generic light card surface. */
.testimonials .card {
  --bs-card-bg: rgba(9, 30, 37, 0.96);
  --bs-card-color: #dcebed;
  background:
    linear-gradient(145deg, rgba(15, 48, 56, 0.96), rgba(7, 24, 31, 0.98));
  border: 1px solid rgba(142, 207, 214, 0.28) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32) !important;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonials .card:hover {
  border-color: rgba(142, 207, 214, 0.62) !important;
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.42) !important;
  transform: translateY(-4px);
}

.testimonials .card .card-title,
.testimonials .card h1, .testimonials .card h2,
.testimonials .card h3, .testimonials .card h4,
.testimonials .card h5, .testimonials .card h6 {
  color: var(--color-rain-blue);
}

.testimonials .card .card-body,
.testimonials .card .card-body p,
.testimonials .card .card-body li {
  color: var(--bs-card-color);
}

.testimonials .card .text-muted { color: var(--color-cloud-grey) !important; }
.testimonials .card a:not(.btn) { color: var(--color-rain-blue); }
.testimonials .card a:not(.btn):hover { color: #b5e2d0; }


/* ── Modals ───────────────────────────────────────────────────────────────── */

.modal {
  --bs-modal-bg: rgba(227, 238, 241, 0.98);
  --bs-modal-color: #263c43;
  z-index: 5000 !important;
}

.modal-content {
  background-color: var(--bs-modal-bg);
  border: 1px solid rgba(142, 207, 214, 0.5);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  color: var(--bs-modal-color);
}

.modal-header { border-bottom-color: rgba(142,207,214,0.4); background-image: linear-gradient(135deg, #6fb3bd, #8ecfd6); color: #0d2027; }
.modal-title,
.modal-body,
.modal-body p,
.modal-body li,
.modal-body h1, .modal-body h2, .modal-body h3,
.modal-body h4, .modal-body h5, .modal-body h6,
.modal-footer { color: var(--bs-modal-color); }
.modal-body a:not(.btn) { color: #175f68; }
.modal .text-muted { color: #526870 !important; }
.modal-footer { border-top-color: rgba(142,207,214,0.4); }
.modal-backdrop.show { background-color: rgba(0,0,0,0.5); z-index: 4444 !important; }


/* ── Dropdowns ────────────────────────────────────────────────────────────── */

.dropdown-menu {
  --bs-dropdown-bg: rgba(227, 238, 241, 0.98);
  --bs-dropdown-color: #0d2027;
  --bs-dropdown-link-color: #0d2027;
  --bs-dropdown-link-hover-bg: rgba(142, 207, 214, 0.18);
  --bs-dropdown-link-hover-color: #06222a;
  --bs-dropdown-link-active-bg: rgba(142, 207, 214, 0.32);
  --bs-dropdown-link-active-color: #06222a;
  --bs-dropdown-header-color: #46626b;
  background-color: var(--bs-dropdown-bg);
  color: var(--bs-dropdown-color);
  border: 1px solid rgba(142, 207, 214, 0.45);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  padding: 0.4rem;
}

.dropdown-header { color: var(--bs-dropdown-header-color); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.dropdown-item { color: var(--bs-dropdown-link-color); border-radius: 9px; }
.dropdown-item i { color: var(--color-wet-moss); }
.dropdown-item:hover,
.dropdown-item:focus { background-color: var(--bs-dropdown-link-hover-bg); color: var(--bs-dropdown-link-hover-color); }
.dropdown-item:hover i, .dropdown-item:focus i { color: var(--bs-dropdown-link-hover-color); }
.dropdown-item.active, .dropdown-item:active { background-color: var(--bs-dropdown-link-active-bg); color: var(--bs-dropdown-link-active-color); }
.dropdown-menu .text-muted { color: #526870 !important; }
.dropdown-divider { border-top-color: rgba(13, 32, 39, 0.15); }


/* ── Lists & accordions ───────────────────────────────────────────────────── */

.list-group-item {
  background-color: transparent;
  border-color: rgba(142, 207, 214, 0.25);
  color: var(--bs-body-color);
  transition: all 0.2s ease;
}

.list-group-item:hover { background-color: rgba(142, 207, 214, 0.08); transform: translateX(6px); }

.accordion { --bs-accordion-bg: transparent; }
.accordion-item { background-color: transparent; border: 1px solid rgba(142,207,214,0.45); border-radius: 14px; margin-bottom: 0.75rem; transition: all 0.22s ease; }
.accordion-item:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.3); transform: translateY(-2px); }
.accordion-button { background-color: var(--bs-dark); border: none; color: var(--bs-body-color); font-weight: 600; border-radius: 14px; }
.accordion-button.collapsed { color: rgba(227,238,241,0.78); background: var(--bs-dark); }
.accordion-button:not(.collapsed) { background: linear-gradient(90deg, #5c9b7f, #8ecfd6); color: #06222a; box-shadow: 0 0 18px rgba(142,207,214,0.45); }
.accordion-button:not(.collapsed)::after { filter: brightness(0.1); }
.accordion-button:focus { box-shadow: 0 0 0 0.25rem rgba(142,207,214,0.35); }
.accordion-body { background-color: var(--bs-light); border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; border-top: 1px solid rgba(142,207,214,0.4); color: #33484f; }


/* ── Tables ───────────────────────────────────────────────────────────────── */

.table { --bs-table-bg: var(--bs-dark); --bs-table-striped-bg: rgba(142,207,214,0.08); --bs-table-border-color: rgba(142,207,214,0.45); border-collapse: separate; border-spacing: 0; }
.table thead { background: linear-gradient(90deg, #5c9b7f, #8ecfd6); border-bottom: 2px solid rgba(8,19,26,0.9); }
.table th { font-weight: 700; color: #06222a; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; }
.table td { vertical-align: middle; border-bottom: 1px solid rgba(142,207,214,0.35); color: var(--bs-body-color); }
.table-responsive { border-radius: 14px; overflow: hidden; border: 1px solid rgba(142,207,214,0.5); }


/* ── Navbar ───────────────────────────────────────────────────────────────── */

.navbar {
  --bs-navbar-color: rgba(227, 238, 241, 0.88);
  --bs-navbar-hover-color: #ffffff;
  --bs-navbar-disabled-color: rgba(227, 238, 241, 0.45);
  --bs-navbar-active-color: #a8e0e5;
  --bs-navbar-brand-color: #f4fafb;
  --bs-navbar-brand-hover-color: #a8e0e5;
  --bs-navbar-toggler-border-color: rgba(142, 207, 214, 0.55);
  background-color: var(--bs-navbar-bg) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(142, 207, 214, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.navbar .navbar-brand {
  color: var(--bs-navbar-brand-color);
  font-family: var(--bs-heading-font-family);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus { color: var(--bs-navbar-brand-hover-color); }
.navbar .nav-link { color: var(--bs-navbar-color); }
.navbar .nav-link:hover,
.navbar .nav-link:focus { color: var(--bs-navbar-hover-color); text-decoration: none; }
.navbar .nav-link.active,
.navbar .nav-link.show { color: var(--bs-navbar-active-color); }


/* ── Forms ────────────────────────────────────────────────────────────────── */

.form-control, .form-select { background-color: var(--color-rain-mist); border: 1px solid rgba(142,207,214,0.65); color: #0d2027; transition: all 0.2s ease-in-out; }
.form-control:focus, .form-select:focus { background-color: var(--color-rain-mist); border-color: #8ecfd6; box-shadow: 0 0 0 0.2rem rgba(142,207,214,0.4); color: #0d2027; }
.form-control::placeholder { color: #60757c; opacity: 1; }
.form-floating > label,
.form-text { color: #a9c0c6; }
.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
.input-group-text { background-color: #cbdde1; color: #344b53; border-color: rgba(142,207,214,0.65); }
.form-check-input { background-color: var(--color-rain-mist); border-color: #6fa8af; }
.form-check-input:checked { background-color: #5c9b7f; border-color: #5c9b7f; }
/* Dark ink on the lighter green, like .btn-secondary — white on this green only
   reaches 3.3:1 */
.form-control[type="file"]::file-selector-button { background: linear-gradient(135deg, #6fae8b, #5c9b7f); color: #06170f; border: none; padding: 0.4rem 0.8rem; margin-right: 0.75rem; border-radius: 4px; font-weight: 600; cursor: pointer; }

.alert { border: 1px solid rgba(142,207,214,0.6); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.badge { box-shadow: 0 0 10px rgba(142,207,214,0.35); }
.progress { background-color: rgba(8,19,26,0.7); border: 1px solid rgba(142,207,214,0.45); }
.progress-bar { background-image: linear-gradient(90deg, #5c9b7f, #8ecfd6); box-shadow: 0 0 10px rgba(142,207,214,0.6); }


/* ── Scrollbar ────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #061016; }
::-webkit-scrollbar-thumb { background-color: #4f8c94; border-radius: 10px; border: 2px solid #061016; }
::-webkit-scrollbar-thumb:hover { background-color: #6fb3bd; }
::-webkit-scrollbar-corner { background: transparent; }


/* ── Calendar ─────────────────────────────────────────────────────────────── */

.calendar { background: radial-gradient(circle at top, rgba(15,40,48,0.96), rgba(8,19,26,0.98)); border-radius: 18px; border: 1px solid rgba(142,207,214,0.35); box-shadow: 0 16px 35px rgba(0,0,0,0.5); overflow: hidden; }
.calendar .table { background: transparent; }
.calendar thead th { background: linear-gradient(90deg, #5c9b7f, #8ecfd6); color: #06222a !important; border-bottom: 1px solid rgba(142,207,214,0.6); font-weight: 600; }
.calendar .calendar-cell { background: rgba(8,19,26,0.96); color: var(--bs-body-color); border-color: rgba(142,207,214,0.18); }
.calendar .calendar-cell:hover { background: radial-gradient(circle at top, rgba(142,207,214,0.12), rgba(8,19,26,1)); box-shadow: 0 0 14px rgba(142,207,214,0.35); animation: none; }
.calendar .calendar-cell .date.badge { background: rgba(142,207,214,0.96); color: #06222a; }
.calendar .item-preview { background: rgba(227,238,241,0.10); border-color: rgba(142,207,214,0.6) !important; color: var(--bs-body-color); }
.calendar .item-preview small, .calendar .item-preview .text-muted { color: rgba(159,182,189,0.9) !important; }
.calendar-cell { transition: all 0.2s ease-in-out; border: 1px solid rgba(142,207,214,0.2); }
.calendar-cell:hover { background-color: rgba(142,207,214,0.16); box-shadow: 0 0 15px rgba(142,207,214,0.4); animation: subtlePulse 1.6s ease-in-out infinite; }

.fact-preview { background-color: rgba(var(--color-rain-mist-rgb),0.92); transition: all 0.2s ease-in-out; border-left: 3px solid var(--bs-primary); color: #33484f; }
.fact-preview:hover { background-color: rgba(142,207,214,0.16); transform: translateX(6px); box-shadow: 0 0 14px rgba(142,207,214,0.35); }
.hover-shadow:hover { box-shadow: 0 0 20px rgba(142,207,214,0.45); }


/* ── Navbar menus ───────────────────────────────────────────────────────────
   The account/theme and language menus share the testimonial cards' dark,
   rain-washed glass rather than the generic light dropdown surface. */
body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu {
  --bs-dropdown-bg: rgba(9, 30, 37, 0.97);
  --bs-dropdown-color: #dcebed;
  --bs-dropdown-link-color: #dcebed;
  --bs-dropdown-link-hover-bg: rgba(142, 207, 214, 0.14);
  --bs-dropdown-link-hover-color: #f4fafb;
  --bs-dropdown-link-active-bg: rgba(92, 155, 127, 0.32);
  --bs-dropdown-link-active-color: #ffffff;
  --bs-dropdown-header-color: #9fb6bd;
  background:
    linear-gradient(145deg, rgba(15, 48, 56, 0.97), rgba(7, 24, 31, 0.99));
  color: var(--bs-dropdown-color);
  border: 1px solid rgba(142, 207, 214, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item {
  color: var(--bs-dropdown-link-color);
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item i {
  color: var(--color-rain-blue);
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item:hover,
body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item:focus {
  color: var(--bs-dropdown-link-hover-color);
  background-color: var(--bs-dropdown-link-hover-bg);
  text-decoration: none;
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item:hover i,
body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item:focus i {
  color: #b5e2d0;
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item.active,
body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item:active {
  color: var(--bs-dropdown-link-active-color);
  background-color: var(--bs-dropdown-link-active-bg);
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-header {
  color: var(--bs-dropdown-header-color);
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-divider {
  height: 0;
  margin: 0.4rem 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(142, 207, 214, 0.22);
  opacity: 1;
}

body[data-theme="monsoon"] .navbar
:is(#languageDropdown, #userDropdown) + .dropdown-menu .dropdown-item.text-muted {
  color: var(--color-cloud-grey) !important;
}


/* ── Notification bell ──────────────────────────────────────────────────────
   nav.html moves the panel to <body>; fixed positioning is therefore required
   for the JS-supplied top/left coordinates to take effect. */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  color: rgba(227, 238, 241, 0.88);
  font-size: 17px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.notif-bell:hover {
  color: #ffffff;
  background-color: rgba(142, 207, 214, 0.12);
  transform: translateY(-1px);
}

.notif-bell:focus-visible {
  outline: 2px solid var(--color-rain-blue);
  outline-offset: 3px;
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 18px;
  background: #b9584f;
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 0 0 2px #07181f, 0 2px 7px rgba(0, 0, 0, 0.35);
}

.notif-dropdown {
  position: fixed;
  width: min(310px, calc(100vw - 16px));
  background:
    linear-gradient(145deg, rgba(15, 48, 56, 0.98), rgba(7, 24, 31, 0.995));
  color: #dcebed;
  border: 1px solid rgba(142, 207, 214, 0.32);
  border-radius: 14px;
  z-index: 9999;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  overflow: hidden;
  animation: monsoonNotifFadeIn 0.2s ease;
}

.notif-header {
  padding: 12px 16px 9px;
  color: var(--color-rain-blue);
  border-bottom: 1px solid rgba(142, 207, 214, 0.2);
  font-family: var(--bs-heading-font-family);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notif-dropdown ul {
  max-height: 280px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
}

.notif-dropdown ul li {
  padding: 12px 16px;
  color: #dcebed;
  border-bottom: 1px solid rgba(142, 207, 214, 0.1);
  font-family: var(--bs-body-font-family);
  font-size: 0.85rem;
  line-height: 1.55;
  transition: background-color 0.15s ease;
}

.notif-dropdown ul li:hover { background-color: rgba(142, 207, 214, 0.1); }
.notif-dropdown ul li:last-child { border-bottom: 0; }

#notifEmptyDesktop,
#notifEmptyMobile {
  display: none;
  margin: 0;
  padding: 18px;
  color: var(--color-cloud-grey);
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
}

.notif-dropdown ::-webkit-scrollbar { width: 5px; }
.notif-dropdown ::-webkit-scrollbar-thumb { background: #4f8c94; border-radius: 4px; }
.notif-dropdown ::-webkit-scrollbar-track { background: transparent; }

@keyframes monsoonNotifFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Theme picker in nav ──────────────────────────────────────────────────── */

.theme-picker__menu   { min-width: 200px; }
.theme-picker__option { display: flex; align-items: center; gap: 8px; }
.theme-picker__icon   { font-size: 1rem; width: 1.4rem; text-align: center; }


/* ── Reduced motion: the weather stops, the page stays ────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .monsoon-drizzle,
  .monsoon-drop,
  .monsoon-leaf,
  .monsoon-flash { display: none !important; }

  body::before,
  .monsoon-puddle::after,
  .theme-banner p,
  .theme-easter-egg span { animation: none !important; }
}
