﻿/* ==========================================================================
   1. VARIABLES
   ========================================================================== */

:root {
  --brand-primary: #0A4D68;
  --brand-secondary: #E0B000;
  --brand-ink: #0F172A;
  --brand-sand: #F5F3EF;
  --brand-sky: #E7F3F6;
  --surface: rgba(255, 255, 255, 0.82);
  --border: rgba(15, 23, 42, 0.08);
  --muted: #64748b;
  --radius-lg: 20px;
  --radius-md: 14px;
  color-scheme: light;
}

[data-theme="dark"] {
  --brand-primary: #5CC8E9;
  --brand-secondary: #FFD666;
  --brand-ink: #F8FAFC;
  --brand-sand: #0B1120;
  --brand-sky: #131C2A;
  --surface: rgba(11, 17, 32, 0.98);
  --surface-elevated: #162032;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --muted: #94A3B8;
  --glow-primary: rgba(92, 200, 233, 0.15);
  --glow-secondary: rgba(255, 214, 102, 0.15);
  color-scheme: dark;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--brand-ink);
  background: linear-gradient(0deg, var(--brand-sand), #ffffff);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(10, 77, 104, 0.15);
  color: inherit;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
}

.subtle {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
  width: 92%; /* fallback */
  max-width: 1200px;
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0; /* fallback */
  padding: clamp(3.5rem, 6vw, 6rem) 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid div {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem; /* fallback */
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 600;
  color: var(--brand-primary);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.member-grid,
.event-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* ==========================================================================
   5. NAVIGATION
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  margin: 0 auto;
  width: min(1200px, 92%);
  gap: 1rem;
}

.nav-left {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  justify-content: flex-start;
  align-items: center;
}

.nav-left a,
.nav-left .nav-toggle {
  font-weight: 500;
  color: inherit;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.nav-right-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

.nav-right {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  align-items: center;
}

.nav-right a {
  font-weight: 500;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 16px;
  background: var(--brand-primary);
}

.brand-text p {
  margin: 0;
}

.brand-text p:first-child {
  font-weight: 600;
  line-height: 1.2;
}

.brand-text p:last-child {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a,
.nav-toggle {
  font-weight: 500;
  color: inherit;
}

.nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-toggle {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font: inherit;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.nav-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -2px;
}

.nav-group.open .nav-caret {
  transform: rotate(-135deg);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  display: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.15);
  padding: 0.6rem;
  min-width: 170px;
  z-index: 120;
}

.nav-group.open .dropdown-panel {
  display: grid;
  gap: 0.35rem;
}

.dropdown-panel a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-ink);
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
}

.dropdown-panel a:hover,
.dropdown-panel a:focus-visible {
  background: rgba(10, 77, 104, 0.08);
}

.dropdown-panel .nav-group {
  position: relative;
}

.dropdown-panel .nav-toggle {
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-ink);
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-panel .nav-toggle:hover {
  background: rgba(10, 77, 104, 0.08);
}

.dropdown-panel .nav-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: 0;
}

.dropdown-panel .nav-group.open .nav-caret {
  transform: rotate(-45deg);
}

.dropdown-panel .dropdown-panel {
  position: relative;
  top: 0;
  left: 0;
  margin-left: 0.75rem;
  margin-top: 0;
  box-shadow: none;
  border: none;
  padding: 0;
  background: transparent;
  display: grid;
  gap: 0.35rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.dropdown-panel .dropdown-panel a {
  font-weight: 500;
}

.dropdown-panel .dropdown-panel[hidden] {
  display: none;
}

.dropdown-panel .nav-group.open .dropdown-panel {
  max-height: 500px;
  margin-top: 0.35rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  background: currentColor;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.theme-toggle:hover .icon {
  color: white;
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
  color: var(--brand-ink);
  transition: color 0.3s ease;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

/* ==========================================================================
   6. MOBILE NAVIGATION
   ========================================================================== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--brand-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  text-decoration: none;
  z-index: 110;
}

.mobile-search-btn:hover {
  color: var(--brand-primary);
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: white;
  z-index: 101;
  overflow-y: auto;
  padding: 80px 2rem 2rem;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav .nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav .nav-links > a {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 500;
}

.mobile-nav .nav-group {
  border-bottom: 1px solid var(--border);
}

.mobile-nav .nav-toggle {
  width: 100%;
  text-align: left;
  padding: 1rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav .dropdown-panel {
  position: static;
  display: none;
  background: var(--brand-sand);
  padding: 0.5rem 0 0.5rem 1rem;
  box-shadow: none;
  border: none;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.mobile-nav .dropdown-panel[aria-hidden="false"] {
  display: block;
}

.mobile-nav .dropdown-panel a {
  padding: 0.75rem 0;
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
}

.mobile-nav .dropdown-panel .nav-group {
  border: none;
  margin-left: 1rem;
}

.mobile-nav .dropdown-panel .nav-group .nav-toggle {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 0;
}

.mobile-nav .actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav .actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.mobile-nav .actions button {
  width: 100%;
  justify-content: center;
}

.mobile-nav-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.mobile-nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-icon-btn:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.mobile-nav-icon-btn svg {
  width: 16px;
  height: 16px;
}

.mobile-nav-panels {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-nav-panel.active {
  transform: translateX(0);
}

.mobile-nav-panel.exit-left {
  transform: translateX(-30%);
}

.mobile-nav-panel .nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav-panel .nav-links a {
  display: block;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.mobile-nav-panel .nav-links a:hover {
  color: var(--brand-primary);
}

.nav-drill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.nav-drill:hover {
  color: var(--brand-primary);
}

.nav-drill svg {
  opacity: 0.5;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--brand-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.nav-back:hover {
  opacity: 0.8;
}

.nav-back svg {
  opacity: 0.8;
}
/* ==========================================================================
   7. COMPONENTS
   ========================================================================== */

/* --- Buttons --- */

.btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: #ffffff;
  color: var(--brand-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 44px;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: transparent;
}

.btn-secondary {
  background: var(--brand-secondary);
  color: #111;
  border-color: transparent;
}

.btn-outline {
  background: transparent;
}

.btn-icon {
  width: 44px;
  height: 44px;
  justify-content: center;
  border-radius: 50%;
  padding: 0.2rem;
}

.btn-link {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* --- Icon --- */

.icon {
  width: 18px;
  height: 18px;
}

/* --- Card --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.card img {
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card h3,
.card h4 {
  margin-top: 0;
}

/* --- Badge --- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-sky);
  color: var(--brand-ink);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-contrast {
  background: var(--brand-secondary);
  color: #111;
}

/* --- Tabs --- */

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tabs button {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 500;
  cursor: pointer;
}

.tabs button.active {
  background: rgba(10, 77, 104, 0.12);
  border-color: rgba(10, 77, 104, 0.3);
  color: var(--brand-primary);
}

.tab-panel {
  margin-top: 1.75rem;
}

/* --- Modal --- */

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem; /* fallback */
  padding: clamp(1.75rem, 3vw, 2.5rem);
  width: 100%; /* fallback */
  max-width: 500px;
  width: min(500px, 100%);
  position: relative;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.amount-grid button {
  border-radius: 16px;
  padding: 0.65rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}

.amount-grid button.active {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(10, 77, 104, 0.12);
}

/* --- Search Field --- */

.search-field {
  position: relative;
}

.search-field input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.75rem 2.75rem;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--brand-ink);
}

.search-field .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}

/* --- Forms --- */

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--brand-ink);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: rgba(10, 77, 104, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.12);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F172A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-ink);
}

input[type="checkbox"] {
  width: auto;
  accent-color: var(--brand-primary);
}

/* --- List --- */

.list {
  list-style: disc;
  margin: 0.75rem 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Testimonials --- */

.testimonials-carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonials-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  height: 400px;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
}

.testimonial-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: fit-content;
  max-width: 100%;
  height: auto;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.testimonial-quote {
  flex: 0 1 auto;
  position: relative;
  padding-top: 0.5rem;
  width: fit-content;
  max-width: 100%;
}

.quote-icon {
  width: 32px;
  height: 32px;
  color: var(--brand-secondary);
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--brand-ink);
  margin: 0;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.testimonial-avatar {
  width: 100px;
  height: 100px;
  min-width: 100px;
  min-height: 100px;
  border-radius: 50%;
  background: var(--brand-sky);
  display: grid;
  align-items: center;
  justify-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.testimonial-avatar .icon {
  width: 40px;
  height: 40px;
  color: var(--brand-primary);
}

.testimonials-indicators {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.testimonials-indicators .indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand-primary);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.testimonials-indicators .indicator:hover {
  transform: scale(1.2);
}

.testimonials-indicators .indicator.active {
  background: var(--brand-primary);
}

/* --- Initiative Card --- */

.initiative-card {
  text-align: center;
}

.initiative-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* --- Meeting Card (Board Meetings) --- */

.meeting-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.meeting-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.meeting-header {
  background: linear-gradient(135deg, var(--brand-primary), #0d5f7a);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.meeting-number {
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.meeting-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}

.meeting-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

.meeting-content {
  padding: 1.5rem;
}

.meeting-section {
  margin-bottom: 1.5rem;
}

.meeting-section:last-child {
  margin-bottom: 0;
}

.meeting-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--brand-primary);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-sky);
}

.meeting-section h4 .icon {
  width: 18px;
  height: 18px;
}

.attendees-list,
.agenda-list,
.decisions-list {
  margin: 0;
  padding-left: 1.25rem;
  list-style: none;
}

.attendees-list li,
.agenda-list li,
.decisions-list li {
  position: relative;
  padding: 0.35rem 0;
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--brand-ink);
}

.attendees-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--brand-primary);
  border-radius: 50%;
}

.agenda-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--brand-secondary);
  border-radius: 2px;
}

.decisions-list li::before {
  content: "\2713";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  color: #10B981;
  font-weight: bold;
  font-size: 0.9rem;
}

.discussion-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.discussion-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  color: var(--brand-ink);
  line-height: 1.5;
}

.discussion-list li:last-child {
  border-bottom: none;
}

.discussion-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  top: 0.5rem;
  color: var(--brand-primary);
  font-size: 1.2rem;
  opacity: 0.6;
}

.discussion-list li strong {
  color: var(--brand-primary);
  font-weight: 600;
}

.actions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.actions-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--brand-ink);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
  border-radius: var(--radius-sm);
}

.actions-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.actions-list li::before {
  content: "\2794";
  position: absolute;
  left: 0;
  top: 0.75rem;
  color: var(--brand-secondary);
  font-size: 1rem;
}

.actions-list li strong {
  color: var(--brand-primary);
  font-weight: 600;
  background: rgba(10, 77, 104, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.meeting-footer {
  padding: 1.25rem 1.5rem;
  background: var(--brand-sand);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.meeting-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Nafhum Member --- */

.nafhum-member {
  cursor: default;
}

.nafhum-member > div:first-child {
  position: relative;
  flex-shrink: 0;
}

.nafhum-member > div:first-child img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.35);
}

.nafhum-member:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(10, 77, 104, 0.15);
  border-color: rgba(10, 77, 104, 0.15);
}

.nafhum-member:hover > div:first-child {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(10, 77, 104, 0.25);
}

/* --- World Map Styles --- */

.world-map-section {
  background: linear-gradient(135deg, var(--brand-ink) 0%, #1a2d3d 100%);
  overflow: hidden;
}

.world-map-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-lg);
  overflow: visible;
}

#world-map {
  border-radius: var(--radius-lg);
  background: transparent !important;
}

.jqvmap-zoomin,
.jqvmap-zoomout {
  display: none !important;
}

.jqvmap-region {
  cursor: pointer;
}

.map-tooltip {
  position: absolute;
  background: white;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  min-width: 200px;
  max-width: 280px;
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.map-tooltip h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-tooltip-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.map-tooltip-stat {
  text-align: center;
  padding: 0.5rem;
  background: var(--brand-sky);
  border-radius: 8px;
}

.map-tooltip-stat .number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: block;
}

.map-tooltip-stat .label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.map-tooltip-countries {
  font-size: 0.8rem;
  color: var(--muted);
}

.region-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.region-stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.region-stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.region-stat-card.highlighted {
  background: rgba(10, 77, 104, 0.4);
  border-color: var(--brand-primary);
}

.region-stat-card .region-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.region-stat-card .region-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.region-stat-card .region-members {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-secondary);
}

/* --- Theme Chipset --- */

.theme-chipset {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.95rem 1.1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.chips {
  display: flex;
  gap: 0.4rem;
}

.chip {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}
/* ==========================================================================
   8. HOMEPAGE
   ========================================================================== */

#home {
  position: relative !important;
  min-height: 600px;
}

#home .container {
  position: relative;
  z-index: 2;
}

#home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 1;
  pointer-events: none;
}

.network-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  opacity: 1 !important;
  pointer-events: none;
}

.section.animated-gradient {
  position: relative;
  overflow: hidden;
}

.section.animated-gradient .container {
  position: relative;
  z-index: 2;
}

.hero-media {
  position: relative;
}

.hero-illustration {
  width: 100%;
  height: 300px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.08);
  position: relative;
  min-height: 0;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-image.active {
  opacity: 1;
}

.hero-indicators {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-indicators .indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand-primary);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.hero-indicators .indicator:hover {
  transform: scale(1.2);
}

.hero-indicators .indicator.active {
  background: var(--brand-primary);
}

.hero-footnote {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.9rem 1.1rem;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* --- Honorary President Section (Homepage) --- */

.honorary-president-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0A4D68 0%, #0d5a7a 50%, #0A4D68 100%);
}

.honorary-decorative-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brand-secondary) 20%,
    var(--brand-secondary) 80%,
    transparent 100%);
}

.honorary-president-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

.honorary-portrait-wrapper {
  position: relative;
}

.honorary-portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid var(--brand-secondary);
  box-shadow:
    0 0 30px rgba(224, 176, 0, 0.3),
    0 25px 60px rgba(0, 0, 0, 0.3);
  aspect-ratio: 1 / 1;
}

.honorary-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.honorary-emblem {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 50px;
  height: 50px;
  background: var(--brand-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(224, 176, 0, 0.4);
}

.honorary-emblem .icon {
  width: 26px;
  height: 26px;
  color: #111;
}

.honorary-text-content {
  color: white;
}

.honorary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-secondary);
  color: #111;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.honorary-badge .icon {
  width: 16px;
  height: 16px;
}

.honorary-text-content h2 {
  font-size: 2.2rem; /* fallback */
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: white;
}

.honorary-titles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.honorary-titles span {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.honorary-quote {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--brand-secondary);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
}

.honorary-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.btn-honorary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-secondary);
  color: #111;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
}

.btn-honorary:hover {
  background: #c9a000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 176, 0, 0.35);
}

.btn-honorary .icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   9. INTRO ANIMATION
   ========================================================================== */

.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #0d1117 0%, #010409 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  overflow: hidden;
  perspective: 1000px;
}

.intro-overlay::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(224, 176, 0, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: introGlow 2.5s ease-out forwards;
  border-radius: 50%;
}

.intro-overlay.complete {
  animation: overlayFadeOut 0.6s ease-out forwards;
}

.intro-logo-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-logo {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  box-shadow:
    0 0 40px rgba(224, 176, 0, 0.4),
    0 0 80px rgba(224, 176, 0, 0.2),
    0 0 120px rgba(10, 77, 104, 0.3);
  animation: introZoom 2.2s ease-in-out forwards;
  object-fit: cover;
}

.intro-ring {
  position: absolute;
  border: 2px solid rgba(224, 176, 0, 0.3);
  border-radius: 50%;
  animation: ringExpand 2s ease-out forwards;
}

.intro-ring:nth-child(1) {
  width: 140px;
  height: 140px;
  animation-delay: 0.1s;
}

.intro-ring:nth-child(2) {
  width: 180px;
  height: 180px;
  animation-delay: 0.25s;
}

.intro-ring:nth-child(3) {
  width: 220px;
  height: 220px;
  animation-delay: 0.4s;
}

.intro-stars {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.intro-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: starShoot 2s ease-out forwards;
}

.intro-skip-btn {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: introSkipFadeIn 0.5s ease 0.3s forwards;
  opacity: 0;
}

.intro-skip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.intro-skip-btn:focus {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

.intro-skip-btn:focus-visible {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

.intro-skip-icon {
  transition: transform 0.2s ease;
}

.intro-skip-btn:hover .intro-skip-icon {
  transform: translateX(4px);
}

.intro-overlay.complete .intro-skip-btn {
  opacity: 0;
  pointer-events: none;
}

@keyframes introGlow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes introZoom {
  0% { transform: scale(0.5); opacity: 0; }
  8% { transform: scale(0.9); opacity: 1; }
  15% { transform: scale(1); opacity: 1; }
  100% { transform: scale(80); opacity: 0; }
}

@keyframes ringExpand {
  0% { transform: scale(0.6); opacity: 0; }
  10% { opacity: 0.5; }
  100% { transform: scale(10); opacity: 0; }
}

@keyframes starShoot {
  0% { transform: translateZ(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  100% { transform: translateZ(500px) scale(0); opacity: 0; }
}

@keyframes overlayFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

@keyframes introSkipFadeIn {
  to { opacity: 1; }
}

/* ==========================================================================
   10. PAGE LOADER
   ========================================================================== */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-sand) 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.page-loader-spinner {
  width: 40px;
  height: 40px;
  margin-top: 1.5rem;
  border: 3px solid var(--brand-sky);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

.page-loader-text {
  margin-top: 1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
/* ==========================================================================
   11. HONORARY PRESIDENT PAGE
   ========================================================================== */

.honorary-page-hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #0d6a8f 100%);
  color: white;
  position: relative;
  padding: 4rem 0;
}

.honorary-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(224, 176, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.honorary-page-hero .container {
  position: relative;
  z-index: 1;
}

.honorary-hero-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  align-items: center;
}

.honorary-page-portrait {
  border-radius: var(--radius-lg);
  border: 6px solid var(--brand-secondary);
  box-shadow:
    0 0 40px rgba(224, 176, 0, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.honorary-page-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.honorary-hero-text h1 {
  font-size: 2.5rem; /* fallback */
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.honorary-hero-arabic {
  font-size: 1.5rem;
  color: var(--brand-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.honorary-hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.honorary-hero-roles span {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.honorary-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.honorary-stat {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.honorary-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-secondary);
  display: block;
}

.honorary-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

.honorary-section {
  padding: 4rem 0;
}

.honorary-section-dark {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #0d5a7a 100%);
  color: white;
}

.honorary-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.honorary-section-title .icon {
  width: 28px;
  height: 28px;
  color: var(--brand-secondary);
}

.honorary-timeline {
  position: relative;
  padding-left: 2.5rem;
}

.honorary-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-secondary), var(--brand-primary));
}

.honorary-timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.honorary-timeline-item:last-child {
  padding-bottom: 0;
}

.honorary-timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 18px;
  height: 18px;
  background: var(--brand-secondary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(224, 176, 0, 0.4);
}

.honorary-timeline-date {
  font-weight: 600;
  color: var(--brand-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.honorary-timeline-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--brand-ink);
}

.honorary-timeline-content p {
  color: var(--muted);
  line-height: 1.6;
}

.honorary-vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.honorary-vision-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.honorary-vision-card .icon {
  width: 48px;
  height: 48px;
  color: var(--brand-secondary);
  margin-bottom: 1rem;
}

.honorary-vision-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: white;
}

.honorary-vision-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.honorary-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.honorary-related-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  color: var(--brand-ink);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.honorary-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-secondary);
}

.honorary-related-card .icon {
  width: 32px;
  height: 32px;
  color: var(--brand-primary);
  margin-bottom: 0.75rem;
}

.honorary-related-card h4 {
  font-size: 0.95rem;
  margin: 0;
}

/* ==========================================================================
   12. SEARCH PAGE
   ========================================================================== */

.search-section {
  min-height: 70vh;
  padding-top: 3rem;
}

.search-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.search-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.search-container {
  position: relative;
  margin-bottom: 2rem;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper input {
  width: 100%;
  padding: 1.1rem 3.25rem;
  font-size: 1.15rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(10, 77, 104, 0.1);
}

.search-input-wrapper input::placeholder {
  color: var(--muted);
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--muted);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-sky);
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.search-clear:hover {
  color: var(--brand-ink);
  background: var(--border);
}

.search-clear .icon {
  width: 18px;
  height: 18px;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.15);
  z-index: 100;
  max-height: 420px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: var(--brand-ink);
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.selected {
  background: var(--brand-sky);
}

.dropdown-item .item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.dropdown-item .item-icon .icon {
  width: 20px;
  height: 20px;
}

.dropdown-item .item-content {
  flex: 1;
  min-width: 0;
}

.dropdown-item .item-title {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item .item-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dropdown-item .item-arrow {
  width: 16px;
  height: 16px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dropdown-item:hover .item-arrow,
.dropdown-item.selected .item-arrow {
  opacity: 1;
}

.dropdown-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--brand-sand);
}

.dropdown-footer .view-all {
  font-size: 0.875rem;
  color: var(--brand-primary);
  font-weight: 500;
}

.dropdown-item mark,
.result-card mark {
  background: rgba(224, 176, 0, 0.35);
  color: inherit;
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

.search-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.search-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: white;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--brand-ink);
}

.search-tabs button .icon {
  width: 16px;
  height: 16px;
}

.search-tabs button:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.search-tabs button.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.recent-searches,
.popular-searches {
  margin-bottom: 2rem;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.recent-header span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.clear-recent {
  background: none;
  border: none;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.clear-recent:hover {
  text-decoration: underline;
}

.recent-list,
.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recent-item,
.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--brand-sky);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--brand-ink);
}

.recent-item .icon,
.search-tag .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.recent-item:hover,
.search-tag:hover {
  background: white;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.results-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.results-query {
  color: var(--brand-ink);
  font-weight: 500;
}

.results-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.result-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.result-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.result-icon .icon {
  width: 22px;
  height: 22px;
}

.result-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--brand-ink);
}

.result-description {
  margin: 0;
  line-height: 1.55;
  font-size: 0.9rem;
}

.search-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.search-empty .empty-icon {
  width: 72px;
  height: 72px;
  color: var(--muted);
  opacity: 0.4;
  margin-bottom: 1.25rem;
}

.search-empty h3 {
  margin: 0 0 0.5rem;
  color: var(--brand-ink);
  font-size: 1.3rem;
}

.search-browse {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1rem;
}

.browse-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--brand-ink);
  transition: all 0.15s ease;
}

.browse-card .icon {
  width: 28px;
  height: 28px;
  color: var(--brand-primary);
}

.browse-card span {
  font-weight: 500;
  font-size: 0.95rem;
}

.browse-card:hover {
  border-color: var(--brand-primary);
  background: var(--brand-sky);
  transform: translateY(-2px);
}

/* Search Highlight Animations */

@keyframes searchHighlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 176, 0, 0.7); background-color: rgba(224, 176, 0, 0.15); }
  30% { box-shadow: 0 0 0 15px rgba(224, 176, 0, 0); background-color: rgba(224, 176, 0, 0.25); }
  60% { box-shadow: 0 0 0 0 rgba(224, 176, 0, 0); background-color: rgba(224, 176, 0, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(224, 176, 0, 0); background-color: transparent; }
}

@keyframes searchHighlightGlow {
  0%, 100% { outline-color: transparent; }
  25%, 75% { outline-color: var(--brand-secondary); }
}

.search-highlight {
  animation: searchHighlightPulse 2.5s ease-out forwards;
  outline: 3px solid var(--brand-secondary);
  outline-offset: 4px;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 10;
}

.search-highlight::before {
  content: 'Found';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: fadeOutUp 2.5s ease-out forwards;
  white-space: nowrap;
}

@keyframes fadeOutUp {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.search-highlight-inline {
  background: linear-gradient(120deg, rgba(224, 176, 0, 0.3) 0%, rgba(224, 176, 0, 0.1) 100%);
  animation: highlightFade 3s ease-out forwards;
}

@keyframes highlightFade {
  0% { background: linear-gradient(120deg, rgba(224, 176, 0, 0.4) 0%, rgba(224, 176, 0, 0.2) 100%); }
  100% { background: transparent; }
}

.search-scroll-indicator {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: var(--brand-secondary);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease-out, fadeOut 3s ease-out 0.3s forwards;
  z-index: 1000;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}
/* ==========================================================================
   13. IN-PAGE NAVIGATION
   ========================================================================== */

.inpage-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inpage-nav.visible {
  opacity: 1;
  visibility: visible;
}

.inpage-nav__list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}

.inpage-nav__item {
  margin: 0;
}

.inpage-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.inpage-nav__link:hover {
  color: var(--brand-primary);
  background: var(--brand-sky);
}

.inpage-nav__link.is-active {
  color: var(--brand-primary);
  background: var(--brand-sky);
  font-weight: 600;
}

.inpage-nav__link.is-active::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--brand-primary);
  border-radius: 2px;
  margin-right: 0.25rem;
}

.inpage-nav__link--top {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--brand-secondary);
}

.inpage-nav__link--top:hover {
  color: var(--brand-primary);
}

.inpage-nav__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   14. SCROLL TO TOP
   ========================================================================== */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(10, 77, 104, 0.3);
  z-index: 99;
}

.scroll-to-top:hover {
  background: var(--brand-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 77, 104, 0.4);
}

.scroll-to-top:focus {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ==========================================================================
   15. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  z-index: 10000;
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - 3rem);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 100%;
  position: relative;
}

.toast.visible {
  transform: translateX(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-ink);
  line-height: 1.4;
  word-wrap: break-word;
  margin: 0;
}

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin: -4px -4px -4px 0;
  border-radius: 4px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--brand-ink);
}

.toast-close:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.toast-close svg {
  width: 16px;
  height: 16px;
}

.toast--success {
  border-left: 4px solid #22c55e;
}

.toast--success .toast-icon {
  color: #22c55e;
}

.toast--error {
  border-left: 4px solid #ef4444;
}

.toast--error .toast-icon {
  color: #ef4444;
}

.toast--warning {
  border-left: 4px solid #f59e0b;
}

.toast--warning .toast-icon {
  color: #f59e0b;
}

.toast--info {
  border-left: 4px solid #3b82f6;
}

.toast--info .toast-icon {
  color: #3b82f6;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 4px;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  border-radius: 0 0 0 var(--radius-md);
  transition: width linear;
}

.toast--success .toast-progress { background: #22c55e; }
.toast--error .toast-progress { background: #ef4444; }
.toast--warning .toast-progress { background: #f59e0b; }
.toast--info .toast-progress { background: #3b82f6; }

/* ==========================================================================
   16. FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background: rgba(255, 255, 255, 0.93);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer ul a {
  position: relative;
  display: inline-block;
  transition: color 0.2s ease;
}

.footer ul a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-secondary);
  transition: width 0.3s ease;
}

.footer ul a:hover::after {
  width: 100%;
}

.footer .social {
  display: flex;
  gap: 0.75rem;
}

.footer .social a {
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  align-items: center;
  justify-items: center;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer .social a:hover {
  background: rgba(15, 23, 42, 0.05);
  transform: scale(1.1);
  border-color: var(--brand-secondary);
}

.footer .social a svg {
  transition: transform 0.2s ease;
}

.footer .social a:hover svg {
  transform: scale(1.1);
}

.footer-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ==========================================================================
   17. ANIMATIONS
   ========================================================================== */

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animated-gradient {
  background: linear-gradient(-45deg,
    var(--brand-sky),
    var(--brand-sand),
    #d4ecf2,
    #f0ede8,
    var(--brand-sky)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.reveal-fade,
.reveal-left,
.reveal-right,
.reveal-up {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-fade {
  transform: translateY(20px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up {
  transform: translateY(30px);
}

.reveal-fade.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-up.visible {
  opacity: 1;
  transform: none;
}
/* ==========================================================================
   18. DARK MODE
   ========================================================================== */

[data-theme="dark"] body {
  background: linear-gradient(180deg, #0F172A 0%, #0C1322 100%);
  background-attachment: fixed;
  color: #F1F5F9;
}

/* --- Dark Mode: Navigation --- */

[data-theme="dark"] header {
  background: #0B1120 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-bar {
  background: #0B1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-left,
[data-theme="dark"] .nav-right,
[data-theme="dark"] .nav-right-wrapper,
[data-theme="dark"] .actions {
  background: transparent;
}

[data-theme="dark"] .brand-mark {
  background: #0B1120;
  border-radius: 16px;
}

[data-theme="dark"] .brand-mark img {
  background: white;
  border-radius: 12px;
}

[data-theme="dark"] .brand-text p {
  color: #F1F5F9;
}

[data-theme="dark"] .brand-text p:last-child {
  color: #94A3B8;
}

[data-theme="dark"] .nav-left a,
[data-theme="dark"] .nav-right a {
  color: #F1F5F9;
}

[data-theme="dark"] .nav-toggle {
  color: #F1F5F9;
}

[data-theme="dark"] .nav-links a {
  color: #F1F5F9;
}

[data-theme="dark"] .dropdown-panel {
  background: #0B1120;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-panel a {
  color: #E2E8F0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .dropdown-panel a:hover {
  background: rgba(92, 200, 233, 0.1);
  color: var(--brand-primary);
}

[data-theme="dark"] .dropdown-panel .nav-toggle {
  color: #F1F5F9;
}

[data-theme="dark"] .dropdown-panel .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Dark Mode: Theme Toggle --- */

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* --- Dark Mode: Mobile Navigation --- */

[data-theme="dark"] .mobile-menu-toggle {
  color: #F1F5F9;
}

[data-theme="dark"] .mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav-overlay {
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .mobile-nav {
  background: #0B1120 !important;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mobile-nav .nav-links > a {
  color: #F1F5F9;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav .nav-group {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav .nav-toggle {
  color: #F1F5F9;
}

[data-theme="dark"] .mobile-nav .dropdown-panel {
  background: #0B1120 !important;
}

[data-theme="dark"] .mobile-nav .dropdown-panel a {
  color: #E2E8F0;
}

[data-theme="dark"] .mobile-nav .actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav-bottom {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav-icon-btn {
  color: #E2E8F0;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .mobile-nav-icon-btn:hover {
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

[data-theme="dark"] .nav-drill {
  color: #E2E8F0;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-drill:hover {
  color: var(--brand-secondary);
}

[data-theme="dark"] .nav-back {
  color: var(--brand-secondary);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* --- Dark Mode: Typography --- */

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #F8FAFC;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] h1 {
  background: linear-gradient(135deg, #F8FAFC 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label {
  color: #E2E8F0;
}

[data-theme="dark"] a {
  color: var(--brand-primary);
  transition: all 0.2s ease;
}

[data-theme="dark"] a:hover {
  color: #7DD3FC;
  text-shadow: 0 0 8px var(--glow-primary);
}

[data-theme="dark"] .subtle,
[data-theme="dark"] p.subtle,
[data-theme="dark"] span.subtle {
  color: #94A3B8;
}

[data-theme="dark"] ol li,
[data-theme="dark"] ul li {
  color: #E2E8F0;
}

[data-theme="dark"] dt {
  color: #F1F5F9;
}

[data-theme="dark"] dd {
  color: #E2E8F0;
}

[data-theme="dark"] blockquote {
  color: #E2E8F0;
  border-color: var(--brand-secondary);
}

[data-theme="dark"] hr {
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Dark Mode: Inline style overrides --- */

[data-theme="dark"] [style*="color: var(--brand-ink)"],
[data-theme="dark"] [style*="color:var(--brand-ink)"],
[data-theme="dark"] h1[style*="color"],
[data-theme="dark"] h2[style*="color"],
[data-theme="dark"] h3[style*="color"],
[data-theme="dark"] h4[style*="color"],
[data-theme="dark"] h5[style*="color"],
[data-theme="dark"] h6[style*="color"],
[data-theme="dark"] p[style*="color: var(--brand"],
[data-theme="dark"] span[style*="color: var(--brand"] {
  color: #F1F5F9 !important;
}

[data-theme="dark"] [style*="color: #0F172A"],
[data-theme="dark"] [style*="color:#0F172A"],
[data-theme="dark"] [style*="color: #1E293B"],
[data-theme="dark"] [style*="color:#1E293B"] {
  color: #F1F5F9 !important;
}

[data-theme="dark"] [style*="color: white"],
[data-theme="dark"] [style*="color:#fff"],
[data-theme="dark"] [style*="color: #fff"] {
  color: #F1F5F9 !important;
}

[data-theme="dark"] [style*="border: 4px solid var(--brand-primary)"] {
  border-color: var(--brand-primary) !important;
}

/* --- Dark Mode: Section backgrounds --- */

[data-theme="dark"] .section {
  background-color: #0B1120;
}

[data-theme="dark"] .section[style*="background"] {
  background: #0F172A !important;
}

/* --- Dark Mode: Class-based background overrides --- */

[data-theme="dark"] .bg-light { background: #0F172A; }
[data-theme="dark"] .bg-sky { background: #0B1120; }
[data-theme="dark"] .bg-sand { background: #0B1120; }
[data-theme="dark"] .bg-white-glass { background: rgba(11, 17, 32, 0.98); }

/* --- Dark Mode: Card (consolidated) --- */

[data-theme="dark"] .card {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

[data-theme="dark"] .card:hover {
  border-color: rgba(92, 200, 233, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-primary);
  transform: translateY(-2px);
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card p,
[data-theme="dark"] .card span,
[data-theme="dark"] .card li {
  color: #E2E8F0;
}

/* --- Dark Mode: Grid items --- */

[data-theme="dark"] .grid > div[style*="background"],
[data-theme="dark"] .grid > article[style*="background"] {
  background: #131C2A !important;
}

[data-theme="dark"] .split > .card {
  background: #131C2A !important;
}

[data-theme="dark"] article[style*="background"] {
  background: #0F172A !important;
}

[data-theme="dark"] article.card,
[data-theme="dark"] .card[style*="text-align: center"],
[data-theme="dark"] .card[style*="padding"] {
  background: #131C2A !important;
}

/* --- Dark Mode: Buttons --- */

[data-theme="dark"] .btn {
  color: white;
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #3AA8C9 100%);
  box-shadow: 0 4px 15px rgba(92, 200, 233, 0.3);
  transition: all 0.3s ease;
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 6px 25px rgba(92, 200, 233, 0.4);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary {
  background: linear-gradient(135deg, var(--brand-secondary) 0%, #E6B84D 100%);
  color: #0F172A;
  box-shadow: 0 4px 15px rgba(255, 214, 102, 0.25);
}

[data-theme="dark"] .btn-secondary:hover {
  box-shadow: 0 6px 25px rgba(255, 214, 102, 0.35);
}

[data-theme="dark"] .btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F1F5F9;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(92, 200, 233, 0.1);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: 0 0 20px var(--glow-primary);
}

/* --- Dark Mode: Forms --- */

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F1F5F9;
  transition: all 0.3s ease;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--glow-primary);
  outline: none;
}

[data-theme="dark"] ::placeholder {
  color: #64748B;
}

/* --- Dark Mode: Footer --- */

[data-theme="dark"] .footer {
  background: linear-gradient(180deg, #0F172A 0%, #080D16 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .footer a {
  color: #94A3B8;
  transition: all 0.2s ease;
}

[data-theme="dark"] .footer a:hover {
  color: var(--brand-primary);
  text-shadow: 0 0 10px var(--glow-primary);
}

[data-theme="dark"] .footer p,
[data-theme="dark"] .footer span,
[data-theme="dark"] .footer-note {
  color: #94A3B8;
}

/* --- Dark Mode: Stat elements --- */

[data-theme="dark"] .hero-stat,
[data-theme="dark"] .stat-number {
  color: #F8FAFC;
  text-shadow: 0 0 20px var(--glow-primary);
}

[data-theme="dark"] .stat-label {
  color: #94A3B8;
}

[data-theme="dark"] .stat-grid {
  background: transparent;
}

[data-theme="dark"] .stat-number,
[data-theme="dark"] .stat-label,
[data-theme="dark"] [class*="stat"] {
  color: #F1F5F9;
}

/* --- Dark Mode: Testimonials, Event, News cards --- */

[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .event-card,
[data-theme="dark"] .news-card {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

[data-theme="dark"] .testimonial-card:hover,
[data-theme="dark"] .event-card:hover,
[data-theme="dark"] .news-card:hover {
  border-color: rgba(92, 200, 233, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 15px var(--glow-primary);
  transform: translateY(-3px);
}

/* --- Dark Mode: Badge/Tag/Chip --- */

[data-theme="dark"] .badge,
[data-theme="dark"] .tag,
[data-theme="dark"] .chip {
  background: linear-gradient(135deg, rgba(92, 200, 233, 0.15) 0%, rgba(92, 200, 233, 0.05) 100%);
  color: var(--brand-primary);
  border: 1px solid rgba(92, 200, 233, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* --- Dark Mode: Tables --- */

[data-theme="dark"] table {
  color: #E2E8F0;
}

[data-theme="dark"] table th {
  background: #131C2A;
  color: #F1F5F9;
}

[data-theme="dark"] table td {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] table td,
[data-theme="dark"] table tr {
  background: #0B1120;
  color: #E2E8F0;
}

[data-theme="dark"] table tr:nth-child(even) {
  background: #131C2A;
}

[data-theme="dark"] table tr:nth-child(odd) {
  background: #0B1120;
}

/* --- Dark Mode: Misc elements --- */

[data-theme="dark"] .highlight,
[data-theme="dark"] [class*="highlight"] {
  background: #131C2A;
  color: #E2E8F0;
}

[data-theme="dark"] .box,
[data-theme="dark"] [class*="box"] {
  background: #131C2A;
}

[data-theme="dark"] .alert,
[data-theme="dark"] .notice,
[data-theme="dark"] [class*="alert"],
[data-theme="dark"] [class*="notice"] {
  background: #131C2A;
  color: #E2E8F0;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-item,
[data-theme="dark"] .timeline-content {
  background: #131C2A;
  color: #E2E8F0;
}

[data-theme="dark"] .faq-item,
[data-theme="dark"] .accordion-item {
  background: #131C2A;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .faq-question,
[data-theme="dark"] .accordion-header {
  color: #F1F5F9;
}

[data-theme="dark"] .faq-answer,
[data-theme="dark"] .accordion-content {
  color: #E2E8F0;
}

[data-theme="dark"] .icon[style*="color: var(--brand-primary)"] {
  color: var(--brand-primary) !important;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal {
  background: #0F172A;
  color: #E2E8F0;
}

[data-theme="dark"] .modal h2,
[data-theme="dark"] .modal h3 {
  color: #F1F5F9;
}

[data-theme="dark"] .reveal-up,
[data-theme="dark"] .reveal-left,
[data-theme="dark"] .reveal-right {
  color: inherit;
}

/* --- Dark Mode: Homepage --- */

[data-theme="dark"] #home::before {
  background: rgba(15, 23, 42, 0.5);
}

[data-theme="dark"] .network-bg {
  opacity: 0.4;
}

[data-theme="dark"] .animated-gradient {
  background: linear-gradient(-45deg, #0F172A, #080D16, #1A3A5C, #0D2438, #080D16) !important;
  background-size: 400% 400%;
}

[data-theme="dark"] .hero-illustration[style*="background"] {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-illustration {
  border-radius: 16px;
  overflow: hidden;
}

[data-theme="dark"] .hero-image.active {
  opacity: 1;
}

/* --- Dark Mode: Page Loader --- */

[data-theme="dark"] .page-loader {
  background: radial-gradient(ellipse at center, #0F172A 0%, #080D16 100%);
}

/* --- Dark Mode: In-page Navigation --- */

[data-theme="dark"] .inpage-nav {
  background: rgba(15, 23, 42, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .inpage-nav__link {
  color: #94A3B8;
  transition: all 0.2s ease;
}

[data-theme="dark"] .inpage-nav__link:hover {
  color: var(--brand-primary);
}

[data-theme="dark"] .inpage-nav__link.is-active {
  color: var(--brand-primary);
  background: rgba(92, 200, 233, 0.1);
}

/* --- Dark Mode: Scroll to Top --- */

[data-theme="dark"] .scroll-to-top {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

[data-theme="dark"] .scroll-to-top:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-primary);
}

/* --- Dark Mode: Theme Chipset --- */

[data-theme="dark"] .theme-chipset {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Dark Mode: Toast --- */

[data-theme="dark"] .toast {
  background: #131C2A;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .toast-message {
  color: #F1F5F9;
}

[data-theme="dark"] .toast-close {
  color: #94A3B8;
}

[data-theme="dark"] .toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #F1F5F9;
}

/* --- Dark Mode: Selection & Scrollbar --- */

[data-theme="dark"] ::selection {
  background: rgba(92, 200, 233, 0.3);
  color: #F8FAFC;
}

[data-theme="dark"] *:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--glow-primary);
}

[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0F172A;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 5px;
  border: 2px solid #0F172A;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* --- Dark Mode: Inline white backgrounds --- */

[data-theme="dark"] div[style*="background: #ffffff"],
[data-theme="dark"] div[style*="background:#ffffff"],
[data-theme="dark"] div[style*="background: #FFFFFF"],
[data-theme="dark"] div[style*="background:#FFFFFF"] {
  background: #0F172A !important;
}

/* --- Dark Mode: Honorary President Page --- */

[data-theme="dark"] .honorary-related-card {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text-primary);
}

[data-theme="dark"] .honorary-related-card h4 {
  color: var(--text-primary);
}

[data-theme="dark"] .honorary-timeline-content {
  color: var(--text-primary);
}

[data-theme="dark"] .honorary-timeline-content h4 {
  color: var(--text-primary);
}

[data-theme="dark"] .honorary-timeline-content p {
  color: var(--text-secondary);
}

[data-theme="dark"] .honorary-timeline-date {
  color: var(--brand-secondary);
}
/* ==========================================================================
   19. RTL SUPPORT
   ========================================================================== */

[dir="rtl"] {
  font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
  text-align: right;
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

[dir="rtl"] .nav-bar {
  direction: rtl;
}

[dir="rtl"] .nav-left {
  justify-content: flex-end;
}

[dir="rtl"] .nav-right-wrapper {
  justify-content: flex-start;
}

[dir="rtl"] .dropdown-panel {
  left: auto;
  right: 0;
}

[dir="rtl"] .dropdown-panel .nav-toggle {
  text-align: right;
}

[dir="rtl"] .dropdown-panel .dropdown-panel {
  margin-left: 0;
  margin-right: 0.75rem;
}

[dir="rtl"] .nav-caret {
  transform: rotate(-135deg);
}

[dir="rtl"] .nav-group.open .nav-caret {
  transform: rotate(45deg);
}

[dir="rtl"] .dropdown-panel .nav-caret {
  transform: rotate(-135deg);
}

[dir="rtl"] .dropdown-panel .nav-group.open .nav-caret {
  transform: rotate(135deg);
}

[dir="rtl"] .btn .icon {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .btn .icon:first-child {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-grid {
  direction: rtl;
}

[dir="rtl"] .stat-grid {
  direction: rtl;
}

[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .grid {
  direction: rtl;
}

[dir="rtl"] .footer-grid {
  direction: rtl;
}

[dir="rtl"] .footer ul {
  padding-left: 0;
  padding-right: 0;
}

[dir="rtl"] .social {
  justify-content: flex-start;
}

[dir="rtl"] .reveal-left {
  transform: translateX(40px);
}

[dir="rtl"] .reveal-right {
  transform: translateX(-40px);
}

[dir="rtl"] .icon + span,
[dir="rtl"] span + .icon {
  margin-left: 0;
  margin-right: 0.45rem;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
  text-align: right;
}

[dir="rtl"] .badge {
  direction: rtl;
}

[dir="rtl"] .split {
  direction: rtl;
}

[dir="rtl"] .testimonial-card {
  text-align: right;
}

[dir="rtl"] .testimonial-author {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .quote-icon {
  transform: scaleX(-1);
}

[dir="rtl"] .modal-card {
  text-align: right;
}

[dir="rtl"] .modal-close {
  left: 1rem;
  right: auto;
}

[dir="rtl"] .theme-chipset {
  left: 24px;
  right: auto;
}

[dir="rtl"] .mobile-nav {
  left: -100%;
  right: auto;
}

[dir="rtl"] .mobile-nav.active {
  left: 0;
  right: auto;
}

[dir="rtl"] .mobile-menu-toggle {
  order: -1;
}

[dir="rtl"] ul {
  padding-right: 0;
}

[dir="rtl"] li {
  text-align: right;
}

[dir="rtl"] .tabs {
  direction: rtl;
}

[dir="rtl"] .event-grid article {
  flex-direction: row-reverse;
}

[dir="rtl"] .initiative-card {
  text-align: right;
}

[dir="rtl"] .amount-grid {
  direction: rtl;
}

[dir="rtl"] .search-box input {
  padding-left: 1rem;
  padding-right: 3rem;
}

[dir="rtl"] .search-box .icon {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-footnote {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .hero-indicators {
  direction: rtl;
}

[dir="rtl"] .meeting-card {
  text-align: right;
}

[dir="rtl"] .network-card {
  text-align: right;
}

[dir="rtl"] .map-tooltip {
  text-align: right;
}

[dir="rtl"] [data-lucide="arrow-right"] {
  transform: scaleX(-1);
}

[dir="rtl"] [data-lucide="arrow-left"] {
  transform: scaleX(-1);
}

[dir="rtl"] [data-lucide="chevron-right"] {
  transform: scaleX(-1);
}

[dir="rtl"] [data-lucide="chevron-left"] {
  transform: scaleX(-1);
}

[dir="rtl"] .container {
  direction: rtl;
}

[dir="rtl"] .inpage-nav {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .inpage-nav__link.is-active::before {
  margin-right: 0;
  margin-left: 0.25rem;
}

[dir="rtl"] .scroll-to-top {
  right: auto;
  left: 2rem;
}

[dir="rtl"] .toast-container {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .toast {
  transform: translateX(-120%);
  border-left: none;
  border-right-width: 4px;
  border-right-style: solid;
}

[dir="rtl"] .toast.visible {
  transform: translateX(0);
}

[dir="rtl"] .toast.hiding {
  transform: translateX(-120%);
}

[dir="rtl"] .toast--success { border-right-color: #22c55e; border-left: none; }
[dir="rtl"] .toast--error { border-right-color: #ef4444; border-left: none; }
[dir="rtl"] .toast--warning { border-right-color: #f59e0b; border-left: none; }
[dir="rtl"] .toast--info { border-right-color: #3b82f6; border-left: none; }

[dir="rtl"] .toast-progress {
  right: 4px;
  left: auto;
  border-radius: 0 0 var(--radius-md) 0;
}

[dir="rtl"] .toast-close {
  margin: -4px 0 -4px -4px;
}

/* ==========================================================================
   20. RESPONSIVE
   ========================================================================== */

/* --- Breakpoint: 1200px --- */

@media (max-width: 1200px) {
  .inpage-nav {
    display: none;
  }
}

@media (min-width: 1201px) {
  /* JS adds .has-inpage-nav to body as fallback for browsers without :has() */
  body.has-inpage-nav main .container,
  body.has-inpage-nav main .footer-grid {
    padding-right: 180px;
  }

  body.has-inpage-nav .site-footer .container,
  body.has-inpage-nav .site-footer .footer-grid {
    padding-right: 180px;
  }

  [dir="rtl"] body.has-inpage-nav main .container,
  [dir="rtl"] body.has-inpage-nav main .footer-grid {
    padding-right: 0;
    padding-left: 180px;
  }

  [dir="rtl"] body.has-inpage-nav .site-footer .container,
  [dir="rtl"] body.has-inpage-nav .site-footer .footer-grid {
    padding-right: 0;
    padding-left: 180px;
  }
}

/* --- Breakpoint: 1024px --- */

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-left {
    display: none;
  }

  .nav-right {
    display: none;
  }

  .nav-right-wrapper {
    display: none;
  }

  .mobile-search-btn {
    display: flex;
  }

  .nav-bar {
    grid-template-columns: auto 1fr auto auto;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-illustration {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-zigzag {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .story-zigzag > div:first-child {
    order: 1;
  }

  .story-zigzag > div:last-child {
    order: 2;
  }

  .story-zigzag img {
    height: 240px !important;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 180px !important;
  }

  .photo-gallery .gallery-item[style*="grid-column: span 2"] {
    grid-column: span 1 !important;
  }
}

/* --- Breakpoint: 992px --- */

@media (max-width: 992px) {
  .honorary-hero-content {
    grid-template-columns: 280px 1fr;
    gap: 2rem;
  }

  .honorary-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .honorary-vision-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .honorary-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Breakpoint: 900px --- */

@media (max-width: 900px) {
  #hero .container > div {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  #hero .profile-ring {
    margin: 2rem auto 0 !important;
    width: 200px !important;
    height: 200px !important;
  }

  [dir="rtl"] .nav-bar {
    grid-template-columns: auto 1fr auto;
  }

  [dir="rtl"] .mobile-nav {
    left: -100%;
    right: auto;
  }

  [dir="rtl"] .mobile-nav.active {
    left: 0;
  }
}

/* --- Breakpoint: 768px --- */

@media (max-width: 768px) {
  .search-tabs {
    gap: 0.4rem;
  }

  .search-tabs button {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  .search-tabs button span {
    display: none;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chapter-divider {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .chapter-divider > div:first-child,
  .chapter-divider > div:last-child {
    display: none !important;
  }

  .chapter-divider > div:nth-child(2) {
    width: 100%;
    justify-content: center;
  }

  #beginning .card > div[style*="display: flex; gap: 2.5rem"] {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center;
  }

  #beginning .card > div[style*="display: flex; gap: 2.5rem"] > div:first-child {
    margin: 0 auto;
  }

  #impact-stats .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .world-map-container {
    margin-bottom: 1.5rem;
  }

  .region-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .region-stat-card {
    padding: 1rem;
  }

  .region-stat-card .region-members {
    font-size: 1.25rem;
  }

  .map-tooltip {
    display: none;
  }

  .meeting-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .meeting-date {
    font-size: 0.9rem;
  }

  .meeting-content {
    padding: 1rem;
  }

  .meeting-footer {
    padding: 1rem;
    flex-direction: column;
  }

  .meeting-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .honorary-president-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .honorary-portrait-wrapper {
    max-width: 280px;
    margin: 0 auto;
  }

  .honorary-titles {
    justify-content: center;
  }

  .honorary-quote {
    border-left: none;
    border-top: 4px solid var(--brand-secondary);
  }

  .honorary-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .honorary-page-portrait {
    max-width: 280px;
    margin: 0 auto;
  }

  .honorary-hero-roles {
    justify-content: center;
  }

  .honorary-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .honorary-vision-grid {
    grid-template-columns: 1fr;
  }

  .honorary-related-grid {
    grid-template-columns: 1fr;
  }

  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }

  [dir="rtl"] .scroll-to-top {
    right: auto;
    left: 1.5rem;
  }

  /* Force inline-style grids to single column on tablets/phones */
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns: 200px 1fr"],
  [style*="grid-template-columns: 1fr minmax(0, 300px)"],
  [style*="grid-template-columns: minmax(0, 200px) 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Ensure tables inside cards can scroll */
  .card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent any element from overflowing viewport */
  .container,
  .content-narrow {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* --- Breakpoint: 640px --- */

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-footnote {
    position: static;
    margin-top: 1rem;
  }

  .theme-chipset {
    display: none;
  }

  .nav-bar {
    gap: 0.75rem;
  }

  .actions {
    gap: 0.35rem;
  }

  .photo-gallery {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 200px !important;
  }

  .photo-gallery .gallery-item[style*="grid-row: span 2"] {
    grid-row: span 1 !important;
  }
}

/* --- Breakpoint: 600px --- */

@media (max-width: 600px) {
  [dir="rtl"] .split {
    direction: rtl;
  }

  [dir="rtl"] .hero-grid {
    direction: rtl;
  }
}

/* --- Breakpoint: 480px --- */

@media (max-width: 480px) {
  .intro-skip-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .search-input-wrapper input {
    padding: 1rem 2.75rem;
    font-size: 1rem;
  }

  .browse-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .browse-card {
    padding: 1.25rem 0.75rem;
  }

  #impact-stats .grid-4 {
    grid-template-columns: 1fr !important;
  }

  #impact-stats .counter {
    font-size: 2.5rem !important;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }

  .toast {
    padding: 0.875rem 1rem;
  }

  .toast-message {
    font-size: 0.85rem;
  }
}

/* Hide in-page nav on mobile — it overlaps content */
@media (max-width: 768px) {
  .inpage-nav {
    display: none !important;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* Small phones (375px and below — iPhone SE, Galaxy S series) */
@media (max-width: 375px) {
  .container {
    width: 95%;
  }

  .member-grid,
  .event-grid {
    grid-template-columns: 1fr;
  }

  .browse-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .browse-card {
    padding: 1rem 0.5rem;
  }

  h1, .hero h1 {
    font-size: 1.5rem !important;
  }

  h2 {
    font-size: 1.25rem;
  }

  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-height: 44px;
  }

  .intro-overlay::before {
    width: 200px;
    height: 200px;
  }

  .intro-ring:nth-child(1) { width: 100px; height: 100px; }
  .intro-ring:nth-child(2) { width: 130px; height: 130px; }
  .intro-ring:nth-child(3) { width: 160px; height: 160px; }
}

/* Tiny phones (320px — iPhone SE 1st gen, Galaxy Fold closed) */
@media (max-width: 320px) {
  .container {
    width: 96%;
  }

  .browse-grid {
    grid-template-columns: 1fr;
  }

  .nav-bar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .btn {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   21. UTILITIES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--brand-secondary);
  outline-offset: 2px;
  z-index: 10000;
}

/* Form loading state */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.loading::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: inherit;
  border-radius: inherit;
}

/* Form validation */
.form-input.error {
  border-color: #dc2626;
}

.form-input.success {
  border-color: #16a34a;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

/* Language visibility */
.lang-en { display: block; }
.lang-ar { display: none; }

span.lang-en, p.lang-en { display: block; }
span.lang-ar, p.lang-ar { display: none; }

[dir="rtl"] .lang-en { display: none; }
[dir="rtl"] .lang-ar { display: block; }

[dir="rtl"] span.lang-en, [dir="rtl"] p.lang-en { display: none; }
[dir="rtl"] span.lang-ar, [dir="rtl"] p.lang-ar { display: block; }

/* Modal focus */
.modal:focus {
  outline: none;
}

.modal[aria-hidden="false"] {
  outline: 2px solid transparent;
}

/* ==========================================================================
   22. NEW UTILITY CLASSES
   ========================================================================== */

/* Semantic background classes */
.bg-light { background: rgba(255, 255, 255, 0.65); }
.bg-sky { background: var(--brand-sky); }
.bg-sand { background: var(--brand-sand); }
.bg-white-glass { background: rgba(255, 255, 255, 0.75); }

/* Typography utilities */
.page-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

/* Layout utilities */
.content-narrow { max-width: 56rem; }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.5rem; }

/* ==========================================================================
   23. ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .page-loader-spinner {
    animation: none;
  }

  .page-loader-logo {
    animation: none;
  }

  .btn:hover,
  .card:hover,
  .footer .social a:hover {
    transform: none;
  }

  .intro-overlay {
    display: none !important;
  }

  .intro-skip-btn {
    display: none !important;
  }

  .toast {
    transition: opacity 0.2s ease;
    transform: none !important;
  }

  .toast.visible {
    transform: none !important;
  }

  .toast.hiding {
    transform: none !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border: rgba(15, 23, 42, 0.3);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .card {
    border-width: 2px;
  }
}

:focus-visible {
  outline: 3px solid var(--brand-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================
   Instagram Embed Grid
   ============================ */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.instagram-card {
  background: white;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instagram-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.instagram-iframe-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.instagram-iframe-wrapper iframe {
  display: block;
  width: 100%;
  min-height: 480px;
}

.instagram-caption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
  line-height: 1.5;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* Skeleton loading placeholders */
.instagram-skeleton {
  min-height: 480px;
  background: var(--brand-sky, #e0f2f7);
  position: relative;
  overflow: hidden;
}

.skeleton-shimmer {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.instagram-loading {
  /* Shown initially, hidden by JS after load */
}

/* Responsive: 3 → 2 → 1 columns */
@media (max-width: 1024px) {
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .instagram-grid {
    grid-template-columns: 1fr;
  }

  .instagram-iframe-wrapper iframe {
    min-height: 400px;
  }
}

/* Dark mode */
[data-theme="dark"] .instagram-card {
  background: var(--card-bg, #1e293b);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .instagram-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .instagram-caption {
  color: var(--text-secondary, #94a3b8);
  border-color: var(--border, #334155);
}

[data-theme="dark"] .instagram-skeleton {
  background: var(--card-bg, #1e293b);
}

[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
}

/* RTL support */
[dir="rtl"] .instagram-section-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .instagram-caption {
  text-align: right;
}

[dir="rtl"] .instagram-badge {
  flex-direction: row-reverse;
}

@media (max-width: 600px) {
  [dir="rtl"] .instagram-section-header {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* ==========================================================================
   CROSS-BROWSER COMPATIBILITY
   ========================================================================== */

/* Flexbox cross-browser */
.grid,
.grid-2,
.grid-3,
.grid-4 {
  display: -ms-grid;
  display: grid;
}

/* Ensure flex-wrap works everywhere */
[style*="flex-wrap: wrap"] {
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-overflow-scrolling: touch;
  }

  /* Fix Safari flex gap fallback */
  .nav-links,
  .actions,
  .mobile-nav-bottom {
    gap: 0.5rem;
  }
}

/* Smooth scroll with cross-browser support */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   DARK MODE — COMPREHENSIVE FIX (Feb 2026)
   Ensures all text, cards, sections, forms, and hero areas respect dark theme.
   ========================================================================== */

/* --- Force light text in dark mode for ALL main content --- */
[data-theme="dark"] main,
[data-theme="dark"] #main-content {
  color: #E2E8F0;
}

[data-theme="dark"] main h1,
[data-theme="dark"] main h2,
[data-theme="dark"] main h3,
[data-theme="dark"] main h4 {
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
  background: none !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] main p,
[data-theme="dark"] main span,
[data-theme="dark"] main li,
[data-theme="dark"] main label,
[data-theme="dark"] main td,
[data-theme="dark"] main th,
[data-theme="dark"] main dt,
[data-theme="dark"] main dd {
  color: #E2E8F0;
}

[data-theme="dark"] main .subtle,
[data-theme="dark"] main p.subtle,
[data-theme="dark"] main span.subtle {
  color: #94A3B8 !important;
}

/* --- Hero section: ensure hero text is readable --- */
[data-theme="dark"] .hero-grid h1,
[data-theme="dark"] .hero-grid .page-title {
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
}

[data-theme="dark"] .hero-grid p,
[data-theme="dark"] .hero-grid .subtle {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .hero-footnote p {
  color: #94A3B8 !important;
}

/* --- Section titles --- */
[data-theme="dark"] .section-title,
[data-theme="dark"] .content-narrow h2 {
  color: #F8FAFC !important;
  -webkit-text-fill-color: #F8FAFC !important;
}

/* --- Card text in dark mode — robust override --- */
[data-theme="dark"] .card,
[data-theme="dark"] .card h2,
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card p,
[data-theme="dark"] .card span,
[data-theme="dark"] .card li,
[data-theme="dark"] .card label,
[data-theme="dark"] .card dt,
[data-theme="dark"] .card dd {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .card .subtle {
  color: #94A3B8 !important;
}

/* --- Inline hardcoded dark colors → force light in dark mode --- */
[data-theme="dark"] [style*="color: #0F172A"],
[data-theme="dark"] [style*="color:#0F172A"],
[data-theme="dark"] [style*="color: #1E293B"],
[data-theme="dark"] [style*="color:#1E293B"],
[data-theme="dark"] [style*="color: #2c3e50"],
[data-theme="dark"] [style*="color:#2c3e50"],
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #1a2332"],
[data-theme="dark"] [style*="color:#1a2332"],
[data-theme="dark"] [style*="color: var(--brand-ink)"],
[data-theme="dark"] [style*="color:var(--brand-ink)"] {
  color: #F1F5F9 !important;
}

/* --- Force dark backgrounds on sections/cards --- */
[data-theme="dark"] .section,
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-sky,
[data-theme="dark"] .bg-sand {
  background-color: #0F172A !important;
  color: #E2E8F0;
}

[data-theme="dark"] .card {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #E2E8F0;
}

/* --- Animated gradient hero in dark mode --- */
[data-theme="dark"] .section.animated-gradient,
[data-theme="dark"] .animated-gradient {
  background: linear-gradient(-45deg, #0F172A, #080D16, #1A3A5C, #0D2438, #080D16) !important;
  background-size: 400% 400%;
}

/* --- Hero illustration box --- */
[data-theme="dark"] .hero-illustration {
  background: linear-gradient(145deg, #131C2A 0%, #0D1520 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Form inputs --- */
[data-theme="dark"] main input,
[data-theme="dark"] main textarea,
[data-theme="dark"] main select {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] main input::placeholder,
[data-theme="dark"] main textarea::placeholder {
  color: #64748B !important;
}

/* --- Buttons with hardcoded dark colors --- */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] button[style*="color: #0F172A"],
[data-theme="dark"] span[style*="color: #0F172A"] {
  color: #0F172A !important; /* Keep dark text on gold/yellow buttons */
}

/* --- Badges --- */
[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Tables --- */
[data-theme="dark"] table {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] th {
  background: rgba(15, 23, 42, 0.8);
  color: #F1F5F9;
}

[data-theme="dark"] td {
  border-color: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}

/* --- Blockquotes & code --- */
[data-theme="dark"] blockquote {
  border-left-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.03);
  color: #CBD5E1;
}

[data-theme="dark"] code {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}

/* --- Honorary section --- */
[data-theme="dark"] .honorary-section-dark {
  color: #E2E8F0;
}

/* --- Grid items with inline backgrounds --- */
[data-theme="dark"] .grid > div,
[data-theme="dark"] .split > div:not(.card) {
  color: #E2E8F0;
}

/* --- Links in dark cards --- */
[data-theme="dark"] .card a:not(.btn) {
  color: var(--brand-primary);
}

/* --- Membership popup modal dark mode --- */
[data-theme="dark"] .mf-card {
  background: #131C2A !important;
  color: #E2E8F0;
}

[data-theme="dark"] .mf-title {
  color: #F8FAFC !important;
}

[data-theme="dark"] .mf-subtitle,
[data-theme="dark"] .mf-label {
  color: #94A3B8 !important;
}

[data-theme="dark"] .mf-input {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .mf-close {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #E2E8F0 !important;
}

[data-theme="dark"] .mf-plan-display {
  background: rgba(92, 200, 233, 0.1) !important;
  border-color: rgba(92, 200, 233, 0.2) !important;
  color: var(--brand-primary) !important;
}

/* ==========================================================================
   END DARK MODE FIX
   ========================================================================== */

/* ==========================================================================
   MOBILE VIEWPORT SAFETY
   ========================================================================== */

/* Prevent any child from causing horizontal overflow */
@media (max-width: 480px) {
  [style*="gap: 4rem"] {
    gap: 1.5rem !important;
  }

  [style*="gap: 3rem"] {
    gap: 1.25rem !important;
  }

  /* Ensure hero media scales down */
  .hero-media,
  .hero-illustration {
    max-width: 100%;
  }

  .hero-illustration {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

/* Ensure Arabic text wraps properly in all browsers */
[dir="rtl"] * {
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
