/* ============================================================
   ROOT VARIABLES & RESET
   ============================================================ */
:root {
  --red: #D21034;
  --red-light: #e83e5e;
  --green: #007A3D;
  --green-light: #2e9c62;
  --black: #1a1a2e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --bg-core: #f3efe6;
  --bg-layer-a: #f7f3ea;
  --bg-layer-b: #ece7dd;
  --text-main: #111111;
  --text-secondary: #3a3a3a;
  --text-muted: #5a5a5a;
  --pointer-x: 50%;
  --pointer-y: 50%;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --gray-50: #111827;
  --gray-100: #1f2937;
  --gray-200: #374151;
  --gray-500: #9ca3af;
  --gray-600: #d1d5db;
  --gray-700: #e5e7eb;
  --gray-800: #f3f4f6;
  --white: #1f2937;
  --black: #f9fafb;
  --bg-core: #040404;
  --bg-layer-a: #070b14;
  --bg-layer-b: #0b1020;
  --text-main: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #aab2c4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  transition: var(--transition);
  width: 100%;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: -22vmax;
  z-index: -2;
  pointer-events: none;
  display: none;
  background: none;
  filter: none;
  transform: translate3d(0, 0, 0);
  animation: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
  background: none;
  opacity: 0;
  mix-blend-mode: normal;
  animation: none;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% 10%, rgba(74, 107, 255, 0.18), transparent 30%),
    radial-gradient(circle at 90% 11%, rgba(131, 77, 255, 0.14), transparent 28%),
    radial-gradient(circle at 79% 78%, rgba(210, 16, 52, 0.12), transparent 38%),
    linear-gradient(150deg, var(--bg-core) 0%, var(--bg-layer-a) 44%, var(--bg-layer-b) 100%);
}

[data-theme="dark"] body::before {
  display: block;
  background:
    radial-gradient(62vmax 44vmax at calc(18% + var(--parallax-x)) calc(17% + var(--parallax-y)), rgba(66, 120, 255, 0.22), transparent 56%),
    radial-gradient(50vmax 38vmax at calc(85% - var(--parallax-x)) calc(14% + var(--parallax-y)), rgba(158, 91, 255, 0.14), transparent 54%),
    radial-gradient(58vmax 44vmax at calc(79% - var(--parallax-x)) calc(82% - var(--parallax-y)), rgba(210, 16, 52, 0.12), transparent 58%),
    linear-gradient(162deg, var(--bg-core), var(--bg-layer-b));
  filter: blur(26px) saturate(114%);
}

[data-theme="dark"] body::after {
  display: block;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(66, 130, 255, 0.16), transparent 20%),
    radial-gradient(circle at 22% 77%, rgba(210, 16, 52, 0.13), transparent 24%),
    repeating-radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: 0.62;
}

@keyframes ambientDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-1.3%, 1.1%, 0) scale(1.04); }
  100% { transform: translate3d(1.2%, -1.2%, 0) scale(1.02); }
}

@keyframes particleFloat {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-0.6%, 0.8%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

body.opening-splash-open {
  overflow: hidden;
}

.opening-splash {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 25%, rgba(210, 16, 52, 0.24), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(0, 122, 61, 0.2), transparent 50%),
    linear-gradient(145deg, #090a0e 0%, #11151f 42%, #0f1118 100%);
  opacity: 1;
  transition: opacity 0.32s ease;
}

.opening-splash.is-closing {
  opacity: 0;
}

.opening-splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.opening-splash-glow {
  position: absolute;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.24;
  animation: splashPulse 4s ease-in-out infinite;
}

.opening-splash-glow-red {
  top: -10%;
  right: -8%;
  background: #d21034;
}

.opening-splash-glow-green {
  bottom: -14%;
  left: -8%;
  background: #007a3d;
  animation-delay: -2s;
}

.opening-splash-content {
  position: relative;
  width: min(92vw, 840px);
  text-align: center;
  color: #ffffff;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: rgba(7, 11, 18, 0.62);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(7px);
  animation: splashEnter 0.55s ease both;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.opening-splash-content.is-locked {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  pointer-events: none;
}

.opening-splash.is-started .opening-splash-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.opening-splash-intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 48%),
    linear-gradient(160deg, rgba(210, 16, 52, 0.12), rgba(0, 122, 61, 0.12));
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.opening-splash-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.opening-splash-intro-box {
  text-align: center;
  color: #ffffff;
  background: rgba(10, 13, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 30px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  animation: splashIntroPulse 1.5s ease-in-out infinite;
}

.opening-splash-intro-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 8px;
}

.opening-splash-intro-box h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4.2vw, 40px);
}

.opening-splash-intro-box p {
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
  opacity: 0.9;
}

.opening-splash-kicker {
  font-size: clamp(12px, 1.7vw, 14px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 12px;
}

.opening-splash-top-card {
  width: fit-content;
  margin: 0 auto 14px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.opening-splash-logo-wrap {
  width: fit-content;
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 30px rgba(210, 16, 52, 0.22);
}

.opening-splash-logo {
  display: block;
  width: clamp(72px, 12vw, 110px);
  height: clamp(72px, 12vw, 110px);
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.3));
}

.opening-splash-content h1 {
  font-size: clamp(32px, 5.8vw, 58px);
  line-height: 1.18;
  margin: 0 0 10px;
}

.opening-splash-content h2 {
  font-size: clamp(17px, 2.8vw, 27px);
  color: #f4f5f8;
  margin: 0;
}

.opening-splash-date {
  margin-top: 14px;
  font-size: clamp(15px, 2vw, 20px);
  color: #ffdede;
}

.opening-splash-live {
  margin-top: 10px;
  font-size: clamp(21px, 3.2vw, 30px);
  font-weight: 800;
  color: #ceffd8;
}

.opening-splash-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.opening-splash-note {
  margin-top: 18px;
  font-size: 13px;
  opacity: 0.86;
}

@keyframes splashEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splashPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.34;
  }
}

@keyframes splashIntroPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 20px 62px rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 640px) {
  .opening-splash-content {
    width: min(94vw, 94vw);
    border-radius: 22px;
    padding: 24px 16px;
  }

  .opening-splash-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.section-tag {
  display: inline-block;
  background: rgba(210, 16, 52, 0.1);
  color: var(--red);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--gray-800);
}

.section-subtitle {
  color: var(--gray-500);
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position:fixed; /* For Safari */
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  padding: 10px 0;
  transition: var(--transition);
  box-sizing: border-box;
}

header.scrolled {
  padding: 6px 0;
}

@media (min-width: 769px) {
  header.scrolled .logo-icon {
    width: clamp(46px, 7vw, 54px);
    height: clamp(46px, 7vw, 54px);
  }
  header.scrolled .logo-text .ar {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .header-inner {
    padding: 0 16px;
  }
  .hero-content {
    padding: 0 16px;
  }
  .hero {
    padding: 120px 0 60px;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.logo-icon {
  width: clamp(72px, 9vw, 72px);
  height: clamp(72px, 9vw, 72px);
  border-radius: 20px;
  align-items: center;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon img {
  width: clamp(62px, 7.5vw, 62px);
  height: clamp(62px, 7.5vw, 62px);
  border-radius: 1px;
}

.logo-text .ar {
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 700;
  color: var(--gray-800);
}

.logo-text .en {
  font-size: 12px;
  color: var(--gray-500);
}

/* Navigation Desktop */
nav ul {
  display: flex;
  gap: clamp(8px, 2vw, 12px);
  list-style: none;
  overflow-x: auto;
  padding: 4px 0;
  -ms-overflow-style: none;
}

nav ul::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
}

.nav-link > a {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 200;
  padding: clamp(4px, 1.2vw, 6px) clamp(8px, 1.8vw, 10px);
  border-radius: 6px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12px, 2vw, 13px);
  white-space: nowrap;
}

.nav-link > a:hover {
  background: rgba(210, 16, 52, 0.1);
  color: var(--red);
}

.nav-link > a.active {
  background: rgba(210, 16, 52, 0.1);
  color: var(--red);
}

/* Dropdown Desktop */
.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.nav-link:hover .dropdown {
  opacity: 1;
  visibility: visible;
}

.dropdown li {
  list-style: none;
}

.dropdown-link {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--gray-700);
  transition: var(--transition);
}

.dropdown-link:hover {
  background: rgba(210, 16, 52, 0.1);
  color: var(--red);
  padding-right: 24px;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-icon, .dark-toggle, .lang-btn {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-icon:hover, .dark-toggle:hover, .lang-btn:hover {
  background: var(--red);
  color: white;
  transform: scale(1.05);
}

/* Quick actions: stack language + dark mode vertically inside a compact panel */
.quick-actions {
  position: relative;
}

.quick-panel {
  position: absolute;
  top: 48px;
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 110;
  min-width: 70px;
}

.quick-panel.show {
  opacity: 1;
  visibility: visible;
}

.quick-panel .lang-btn,
.quick-panel .dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 16px;
  padding: 0;
  margin: 0;
}

.quick-panel .lang-btn span {
  display: none !important;
}

.quick-panel .lang-btn:hover,
.quick-panel .dark-toggle:hover {
  background: var(--red);
  color: white;
}

/* Notifications */
.notif-container {
  position: relative;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--white);
  display: none;
}

.notif-panel {
  position: absolute;
  top: 50px;
  left: 0;
  width: 250px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

/* Keep notifications panel inside viewport in LTR mode */
[dir="ltr"] .notif-panel {
  left: auto;
  right: 0;
}

.notif-panel.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .notif-panel {
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
}

.notif-header {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.notif-mark {
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.notif-item.unread {
  background: rgba(210, 16, 52, 0.05);
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-top: 6px;
}

/* ============================================================
   MOBILE DROPDOWN MENU (منسدلة وليس جانبية)
   ============================================================ */

/* Menu toggle button - يظهر فقط على الموبايل */
.menu-toggle {
  display: none;
  background: var(--gray-100);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  z-index: 1001;
}

.menu-toggle:hover,
.menu-toggle:active {
  background: rgba(210, 16, 52, 0.2);
}

/* Dropdown menu (القائمة المنسدلة) */
.dropdown-menu {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10000;
  max-height: 80vh;
  width: 90%;
  max-width: 400px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(135deg, rgba(210, 16, 52, 0.05), transparent);
}

.dropdown-header span {
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-800);
}

.dropdown-close {
  background: var(--gray-100);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.dropdown-close:hover {
  background: var(--red);
  color: white;
}

.dropdown-nav {
  padding: 8px 0;
}

.dropdown-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 600;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
  font-size: 15px;
}

.dropdown-nav a:hover {
  background: rgba(210, 16, 52, 0.05);
  color: var(--red);
  padding-right: 28px;
}

.dropdown-nav a i {
  width: 24px;
  text-align: center;
  font-size: 18px;
}

.dropdown-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  justify-content: center;
}

.dropdown-footer .menu-item-toggle {
  flex: 1;
  padding: 10px;
  background: var(--gray-100);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.dropdown-footer .menu-item-toggle:hover {
  background: var(--red);
  color: white;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 125px 0 80px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.countdown-card,
.panel-card,
.exec-card,
.sec-card,
.membership-card,
.member-card,
.news-side-card,
.news-card,
.article-card,
.event-card,
.guide-card,
.mini-calendar,
.ssu-modal-card {
  position: relative;
  overflow: hidden;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.countdown-card::before,
.panel-card::before,
.exec-card::before,
.sec-card::before,
.membership-card::before,
.member-card::before,
.news-side-card::before,
.news-card::before,
.article-card::before,
.event-card::before,
.guide-card::before,
.mini-calendar::before,
.ssu-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.26), transparent 36%, rgba(255, 255, 255, 0.08) 74%, transparent 100%);
  opacity: 0.72;
}

.countdown-card:hover,
.panel-card:hover,
.exec-card:hover,
.sec-card:hover,
.membership-card:hover,
.member-card:hover,
.news-side-card:hover,
.news-card:hover,
.article-card:hover,
.event-card:hover,
.guide-card:hover,
.mini-calendar:hover,
.ssu-modal-card:hover {
  transform: translateY(-5px);
}

:root:not([data-theme="dark"]) .countdown-card,
:root:not([data-theme="dark"]) .panel-card,
:root:not([data-theme="dark"]) .exec-card,
:root:not([data-theme="dark"]) .sec-card,
:root:not([data-theme="dark"]) .membership-card,
:root:not([data-theme="dark"]) .member-card,
:root:not([data-theme="dark"]) .news-side-card,
:root:not([data-theme="dark"]) .news-card,
:root:not([data-theme="dark"]) .article-card,
:root:not([data-theme="dark"]) .event-card,
:root:not([data-theme="dark"]) .guide-card,
:root:not([data-theme="dark"]) .mini-calendar,
:root:not([data-theme="dark"]) .ssu-modal-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:root:not([data-theme="dark"]) .countdown-card::before,
:root:not([data-theme="dark"]) .panel-card::before,
:root:not([data-theme="dark"]) .exec-card::before,
:root:not([data-theme="dark"]) .sec-card::before,
:root:not([data-theme="dark"]) .membership-card::before,
:root:not([data-theme="dark"]) .member-card::before,
:root:not([data-theme="dark"]) .news-side-card::before,
:root:not([data-theme="dark"]) .news-card::before,
:root:not([data-theme="dark"]) .article-card::before,
:root:not([data-theme="dark"]) .event-card::before,
:root:not([data-theme="dark"]) .guide-card::before,
:root:not([data-theme="dark"]) .mini-calendar::before,
:root:not([data-theme="dark"]) .ssu-modal-card::before {
  display: none;
}

:root:not([data-theme="dark"]) .countdown-card:hover,
:root:not([data-theme="dark"]) .panel-card:hover,
:root:not([data-theme="dark"]) .exec-card:hover,
:root:not([data-theme="dark"]) .sec-card:hover,
:root:not([data-theme="dark"]) .membership-card:hover,
:root:not([data-theme="dark"]) .member-card:hover,
:root:not([data-theme="dark"]) .news-side-card:hover,
:root:not([data-theme="dark"]) .news-card:hover,
:root:not([data-theme="dark"]) .article-card:hover,
:root:not([data-theme="dark"]) .event-card:hover,
:root:not([data-theme="dark"]) .guide-card:hover,
:root:not([data-theme="dark"]) .mini-calendar:hover,
:root:not([data-theme="dark"]) .ssu-modal-card:hover {
  transform: none;
}

[data-theme="dark"] .countdown-card,
[data-theme="dark"] .panel-card,
[data-theme="dark"] .exec-card,
[data-theme="dark"] .sec-card,
[data-theme="dark"] .membership-card,
[data-theme="dark"] .member-card,
[data-theme="dark"] .news-side-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .article-card,
[data-theme="dark"] .event-card,
[data-theme="dark"] .registration-card,
[data-theme="dark"] .guide-card,
[data-theme="dark"] .mini-calendar,
[data-theme="dark"] .ssu-modal-card {
  background: rgba(10, 10, 15, 0.72);
  border: 1px solid rgba(160, 170, 210, 0.24);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 38px rgba(46, 102, 255, 0.08), 0 0 20px rgba(210, 16, 52, 0.06);
}

[data-theme="dark"] .countdown-card:hover,
[data-theme="dark"] .panel-card:hover,
[data-theme="dark"] .exec-card:hover,
[data-theme="dark"] .sec-card:hover,
[data-theme="dark"] .membership-card:hover,
[data-theme="dark"] .member-card:hover,
[data-theme="dark"] .news-side-card:hover,
[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .article-card:hover,
[data-theme="dark"] .event-card:hover,
[data-theme="dark"] .registration-card:hover,
[data-theme="dark"] .guide-card:hover,
[data-theme="dark"] .mini-calendar:hover,
[data-theme="dark"] .ssu-modal-card:hover {
  border-color: rgba(99, 146, 255, 0.42);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 44px rgba(66, 130, 255, 0.14), 0 0 26px rgba(210, 16, 52, 0.1);
}


.hero-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 16px;
}

.hero .badge-pill {
  color: #000000;
  font-weight: 700;
}

[data-theme="dark"] .hero .badge-pill,
[data-theme="dark"] .hero-text h2,
[data-theme="dark"] .hero-text p {
  color: #ffffff;
  font-weight: 700;
}

.hero-text h2 {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 18px;
  color: #000000;
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 9px 12px;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  width: fit-content;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-light);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--red);
  color: var(--red);
  background: transparent;
}

.btn-outline:hover {
  background: var(--red);
  color: white;
}

.hero-cta .btn-outline {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  padding: 8px 14px;
  width: fit-content;
  flex: 0 0 auto;
}

.hero-cta .btn-outline:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
  transform: translateY(-2px);
}

.hero-cta .btn-history {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.hero-cta .btn-history:hover {
  background: var(--red-light);
  border-color: var(--red-light);
  color: #ffffff;
}

[data-theme="dark"] .hero-cta .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero-cta .btn-outline:hover {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn-sm,
[data-theme="dark"] .read-btn,
[data-theme="dark"] .gallery-tab,
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .mini-cal-today-btn,
[data-theme="dark"] .social-btn,
[data-theme="dark"] .form-submit,
[data-theme="dark"] .footer-newsletter button,
[data-theme="dark"] .newsletter button,
[data-theme="dark"] .dropdown-footer .menu-item-toggle,
[data-theme="dark"] #dropdownMenu .quick-settings-btn {
  color: #fff;
}

[data-theme="dark"] .btn-outline {
  border-color: rgba(255, 255, 255, 0.72);
  background: transparent;
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

[data-theme="dark"] .hero-stat span {
  color: #ffffff;
  font-weight: 700;
}

.btn-green {
  background: var(--green);
  color: white;
}

.btn-green:hover {
  background: var(--green-light);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--red);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

/* Countdown Card */
.countdown-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.countdown-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.countdown-event {
  font-size: 14px;
  color: var(--red);
  margin-bottom: 16px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.count-item {
  text-align: center;
}

.count-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--red);
  display: block;
}

.count-label {
  font-size: 12px;
  color: var(--gray-500);
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  display: block;
}

.hero-stat span {
  font-size: 12px;
  color: #000000;
  font-weight: 700;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-img {
  position: relative;
}

.about-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-img-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--red);
  color: white;
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
}

.about-img-badge strong {
  font-size: 24px;
  display: block;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.value-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.bg-red-soft { background: rgba(210, 16, 52, 0.1); }
.color-red { color: var(--red); }
.bg-green-soft { background: rgba(0, 122, 61, 0.1); }
.color-green { color: var(--green); }

/* ============================================================
   STRUCTURE SECTION
   ============================================================ */
.structure-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.structure-nav ul {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.structure-nav ul li {
  list-style: none;
}

.structure-nav ul li a {
  text-decoration: none;
  padding: 10px 20px;
  background: var(--white);
  border-radius: 50px;
  color: var(--gray-700);
  font-weight: 600;
  transition: var(--transition);
}

.structure-nav ul li a:hover,
.structure-nav ul li a.active {
  background: var(--red);
  color: white;
}

.guide-nav {
  margin-bottom: 48px;
}

.panel-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.structure-stages-card { margin-bottom: 28px; }
.structure-stages-text { line-height: 1.9; color: var(--gray-700); margin-bottom: 18px; }

.stages-list {
  display: grid;
  gap: 14px;
}

.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid transparent;
}

.stage-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stage-content h4 {
  margin: 0 0 6px;
  font-size: 17px;
}

.stage-content p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.8;
}

.stage-legislative {
  background: rgba(210, 16, 52, 0.06);
  border-color: rgba(210, 16, 52, 0.2);
}

.stage-legislative .stage-icon {
  background: rgba(210, 16, 52, 0.14);
  color: var(--red);
}

.stage-guidance {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(202, 138, 4, 0.25);
}

.stage-guidance .stage-icon {
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
}

.stage-executive {
  background: rgba(0, 122, 61, 0.07);
  border-color: rgba(0, 122, 61, 0.25);
}

.stage-executive .stage-icon {
  background: rgba(0, 122, 61, 0.16);
  color: var(--green);
}

.panel-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--red), var(--red-light));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.panel-icon i {
  font-size: 32px;
  color: white;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .stage-item {
    padding: 12px;
    gap: 10px;
  }

  .stage-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
    border-radius: 10px;
  }

  .stage-content h4 {
    font-size: 15px;
  }
}

/* Exec Grid */
.exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.exec-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  /* Defer rendering until scrolled into view to keep structure section snappy */
  content-visibility: auto;
  contain-intrinsic-size: 320px 380px;
}

.exec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.exec-photo {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.exec-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exec-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--red);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
}

.exec-info {
  padding: 20px;
}

.exec-info h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.show-more-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 640px) {
  .exec-hidden {
    display: none !important;
  }
}

.role {
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.exec-contact {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.exec-contact a {
  color: var(--gray-500);
  transition: var(--transition);
}

.exec-contact a:hover {
  color: var(--red);
}

/* Secretariat Grid */
.secretariat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.sec-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.sec-card:hover {
  transform: translateY(-4px);
}

.sec-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.sec-icon-academic { background: rgba(245,158,11,0.1); color: #d97706; }
.sec-icon-social { background: rgba(0,122,61,0.1); color: var(--green); }
.sec-icon-culture { background: rgba(139,92,246,0.1); color: #7c3aed; }
.sec-icon-sports { background: rgba(59,130,246,0.1); color: #3b82f6; }
.sec-icon-media { background: rgba(239,68,68,0.1); color: #ef4444; }
.sec-icon-finance { background: rgba(16,185,129,0.1); color: #10b981; }
.sec-icon-external { background: rgba(210,16,52,0.1); color: var(--red); }

.sec-tasks {
  margin: 16px 0;
}

.sec-tasks h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--gray-600);
}

.sec-tasks ul {
  padding-inline-start: 20px;
}

.sec-tasks li {
  font-size: 13px;
  margin-bottom: 4px;
}

.sec-leader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.sec-leader img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.sec-leader-info span {
  font-size: 11px;
  color: var(--gray-500);
}

.sec-leader-info strong {
  font-size: 14px;
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  padding: 60px 0;
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item strong {
  font-size: 48px;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
}

/* ============================================================
   MEMBERS SECTION
   ============================================================ */
.members-section {
  padding: 80px 0;
}

.membership-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.membership-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.membership-card:hover {
  transform: translateY(-4px);
}

.membership-card.featured {
  border: 2px solid var(--green);
  transform: scale(1.02);
}

.membership-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.member-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  padding: 20px;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.member-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info h4 {
  margin-bottom: 4px;
}

.major {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.member-sec-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
}

/* Registration Form */
.reg-form {
  background: var(--gray-50);
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-top: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group.full {
  grid-column: span 2;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(210,16,52,0.1);
}

.form-submit {
  margin-top: 24px;
  background: var(--red);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.form-submit:hover {
  background: var(--red-light);
  transform: translateY(-2px);
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
#news {
  padding: 80px 0;
}

.news-featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.news-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
}

.news-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-main-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 24px;
}

.news-cat {
  display: inline-block;
  background: var(--red);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  margin-bottom: 12px;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-side-card {
  display: flex;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.news-side-img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.news-side-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-side-info {
  padding: 12px;
}

.news-side-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.news-cat-small {
  font-size: 10px;
  color: var(--red);
  font-weight: 600;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 48px 0;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-img {
  position: relative;
  height: 200px;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
}

.news-card-body {
  padding: 20px;
}

.news-card-body h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.news-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--gray-500);
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  padding: 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
  margin-top: 48px;
  overflow: hidden;
}

.newsletter h3 {
  margin-bottom: 12px;
  line-height: 1.5;
}

.newsletter p {
  line-height: 1.8;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 24px auto 0;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
}

.newsletter-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  background: var(--green);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 640px) {
  #news,
  .gallery-section {
    padding: 56px 0;
  }

  .newsletter {
    padding: 30px 18px;
    margin-top: 32px;
    border-radius: 26px;
  }

  .newsletter h3 {
    font-size: 22px;
  }

  .newsletter p {
    font-size: 15px;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 100%;
    margin-top: 22px;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
    min-height: 54px;
    border-radius: 18px;
  }

  .newsletter-form input {
    text-align: center;
    padding: 14px 16px;
  }

  .newsletter-form button {
    padding: 14px 18px;
    box-shadow: 0 10px 22px rgba(0, 132, 61, 0.28);
  }

  .section-head {
    margin-bottom: 34px;
  }

  .section-title {
    font-size: 30px;
    line-height: 1.25;
  }
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  padding: 80px 0;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.gallery-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--gray-100);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.gallery-tab.active,
.gallery-tab:hover {
  background: var(--red);
  color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: white;
  font-size: 32px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-img {
  height: 180px;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  padding: 20px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-author img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.article-status {
  display: inline-block;
  font-size: 12px;
  margin-top: 12px;
}

.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.read-btn {
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}

.read-btn:hover {
  background: var(--red-light);
}

.article-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 120000;
  padding: 32px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.article-modal.show { display: flex; }

.article-modal__content {
  background: var(--white);
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: calc(90vh - 32px);
  overflow-y: auto;
}

.article-modal__close {
  position: absolute;
  top: 12px;
  left: 12px;
  border: none;
  background: var(--gray-100);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

.article-modal__content h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.article-modal__content p {
  color: var(--gray-700);
  line-height: 1.7;
  white-space: pre-line;
}

.about-history-source {
  display: none;
}

@media (max-width: 640px) {
  .article-modal__content {
    max-height: calc(100vh - 80px);
    padding: 28px 20px 24px;
  }
}

.status-published { color: var(--green); }
.status-review { color: #f59e0b; }

/* ============================================================
   ACTIVITIES SECTION
   ============================================================ */
#activities {
  padding: 80px 0;
}

.events-filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--gray-100);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--red);
  color: white;
}

.activities-top {
  display: grid;
  grid-template-columns: 2fr 320px;
  gap: 32px;
}

.events-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.event-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  box-shadow: var(--shadow-md);
}

.event-img {
  position: relative;
  height: 100%;
}

.event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-date-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: white;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  min-width: 50px;
}

.event-date-badge strong {
  font-size: 18px;
  display: block;
}

.event-date-badge span {
  font-size: 10px;
}

.event-body {
  padding: 20px;
}

.event-sec-tag {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}

.event-body h3 {
  font-size: 18px;
  margin: 8px 0;
}

.event-details {
  display: flex;
  gap: 16px;
  margin: 12px 0;
  font-size: 13px;
  color: var(--gray-500);
}

.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.event-attendees {
  font-size: 13px;
  color: var(--gray-500);
}

/* Upcoming Sidebar */
.upcoming-sidebar {
  background: var(--gray-50);
  padding: 24px;
  border-radius: var(--radius);
  position: sticky;
  top: 100px;
}

.upcoming-sidebar h3 {
  margin-bottom: 20px;
}

.upcoming-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.upcoming-date {
  background: var(--red);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  min-width: 60px;
}

.upcoming-date strong {
  font-size: 18px;
  display: block;
}

/* Mini Calendar */
.mini-calendar {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

/* ============================================================
   SSU QUICK MODALS (COUNTDOWN + REGISTER)
   ============================================================ */
.ssu-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.ssu-modal.show {
  display: flex;
}

.ssu-modal-card {
  width: min(560px, 100%);
  border-radius: 16px;
  background: var(--white);
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  padding: 18px;
}

.dark-mode .ssu-modal-card {
  background: #101723;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.08);
}

.ssu-modal-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.ssu-modal-text {
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

.dark-mode .ssu-modal-text {
  color: #b7c0d1;
}

.ssu-event-meta {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 122, 61, 0.08);
}

.ssu-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ssu-empty-events-state {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px dashed rgba(59, 130, 246, 0.45);
  font-weight: 700;
  font-size: 0.92rem;
}

.mini-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-calendar h4 {
  margin: 0;
}

.mini-cal-today-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 122, 61, 0.12);
  color: var(--green);
  font-family: inherit;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.mini-cal-today-btn:hover {
  background: rgba(0, 122, 61, 0.2);
  transform: translateY(-1px);
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.cal-header span {
  font-weight: 800;
  color: var(--gray-800);
}

.cal-header button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(210, 16, 52, 0.08);
  border: 1px solid rgba(210, 16, 52, 0.12);
  color: var(--red);
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.cal-header button:hover {
  background: var(--red);
  color: #fff;
  transform: translateY(-1px);
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-name {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
  color: var(--gray-500);
}

.cal-day {
  text-align: center;
  padding: 10px 6px;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(148, 163, 184, 0.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.cal-day.is-button {
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.cal-day.is-button:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 16, 52, 0.16);
  background: rgba(210, 16, 52, 0.08);
}

.cal-day.is-empty {
  background: transparent;
}

.cal-day.today {
  background: var(--red);
  color: white;
}

.cal-day.has-event {
  background: rgba(210, 16, 52, 0.1);
  color: var(--red);
  font-weight: 600;
}

.cal-day.selected {
  border-color: rgba(0, 122, 61, 0.35);
  background: rgba(0, 122, 61, 0.12);
  color: var(--green);
  font-weight: 800;
}

.cal-day.has-event::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  margin: 5px auto 0;
  border-radius: 50%;
  background: currentColor;
}

.mini-cal-agenda {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mini-cal-agenda h5 {
  margin: 0 0 10px;
  font-size: 14px;
}

.mini-cal-agenda-list {
  display: grid;
  gap: 10px;
}

.mini-cal-agenda-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.mini-cal-agenda-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gray-800);
}

.mini-cal-agenda-item span {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
}

[data-theme="dark"] .mini-calendar {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.94));
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mini-calendar h4,
[data-theme="dark"] .cal-header span {
  color: #f3f4f6;
}

[data-theme="dark"] .mini-cal-today-btn {
  background: rgba(0, 122, 61, 0.24);
  color: #fff;
}

[data-theme="dark"] .mini-cal-today-btn:hover {
  background: rgba(0, 122, 61, 0.36);
}

[data-theme="dark"] .cal-header button {
  background: rgba(210, 16, 52, 0.22);
  border-color: rgba(210, 16, 52, 0.32);
  color: #fecdd3;
}

[data-theme="dark"] .cal-day-name {
  color: #cbd5e1;
}

[data-theme="dark"] .cal-day {
  background: rgba(148, 163, 184, 0.14);
  color: #e5e7eb;
}

[data-theme="dark"] .cal-day.is-button:hover {
  border-color: rgba(210, 16, 52, 0.3);
  background: rgba(210, 16, 52, 0.24);
}

[data-theme="dark"] .cal-day.has-event {
  background: rgba(210, 16, 52, 0.26);
  color: #fecdd3;
}

[data-theme="dark"] .cal-day.selected {
  border-color: rgba(0, 122, 61, 0.5);
  background: rgba(0, 122, 61, 0.3);
  color: #d1fae5;
}

[data-theme="dark"] .mini-cal-agenda {
  border-top-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .mini-cal-agenda-item {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.26);
}

[data-theme="dark"] .mini-cal-agenda h5,
[data-theme="dark"] .mini-cal-agenda-item strong {
  color: #f3f4f6;
}

[data-theme="dark"] .mini-cal-agenda-item span {
  color: #cbd5e1;
}

/* ============================================================
   GUIDELINES SECTION
   ============================================================ */
.guidelines-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.guide-panel {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.guide-tabs-container {
  position: relative;
}

.guide-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.guide-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.step-item {
  display: flex;
  gap: 20px;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.checklist li i {
  color: var(--green);
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: 8px;
}

.doc-dl {
  margin-right: auto;
  color: var(--red);
  cursor: pointer;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.emergency-card {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
  text-align: center;
}

.emergency-card i {
  font-size: 32px;
  margin-bottom: 8px;
}

/* ============================================================
   LINKS SECTION
   ============================================================ */
#links {
  padding: 80px 0;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.links-group {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 24px;
}

.links-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.links-group-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.link-item:hover {
  transform: translateX(-8px);
  box-shadow: var(--shadow-md);
}

.link-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.link-item-info {
  flex: 1;
}

.link-item-info h4 {
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.link-item-info span {
  font-size: 11px;
  color: var(--gray-500);
}

.arrow {
  color: var(--gray-400);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 32px 0;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.social-btn {
  padding: 8px 16px;
  border-radius: 50px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.social-btn:hover {
  transform: translateY(-2px);
}

.social-facebook { background: #1877f2; }
.social-instagram { background: #e4405f; }
.social-tiktok { background: #000000; }
.social-telegram { background: #0088cc; }
.social-twitter { background: #000000; }
.social-whatsapp { background: #25d366; }
.social-linkedin { background: #082a69; }


.contact-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.success-msg {
  display: none;
  margin-top: 20px;
  padding: 12px;
  background: rgba(0,122,61,0.1);
  color: var(--green);
  border-radius: 8px;
  text-align: center;
}

.success-msg.show {
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--gray-800);
  color: white;
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin: 16px 0;
  opacity: 0.7;
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.footer-col h4 {
  margin-bottom: 20px;
  font-size: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: white;
  padding-right: 8px;
}

.footer-newsletter {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.footer-newsletter input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
}

.footer-newsletter button {
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.footer-newsletter button:hover {
  background: var(--red-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-credit,
.footer-credit:visited,
.footer-credit:active,
.footer-credit:focus {
  color: white !important;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.footer-credit:hover {
  color: white !important;
  opacity: 0.82;
}

.footer-flag span {
  font-size: 12px;
  opacity: 0.6;
}

.flag-stripe {
  display: flex;
  height: 4px;
  width: 60px;
  margin-top: 8px;
}

.flag-stripe div {
  flex: 1;
}

[data-theme="dark"] header .logo .er h2 {
  color: #fff !important;
}

[data-theme="dark"] header .btn-icon,
[data-theme="dark"] header .menu-toggle,
[data-theme="dark"] header .quick-panel .lang-btn,
[data-theme="dark"] header .quick-panel .dark-toggle {
  color: #fff;
}

[data-theme="dark"] footer {
  background: #0d1524;
  color: #fff;
}

[data-theme="dark"] footer .logo .logo-text .ar,
[data-theme="dark"] footer .logo .logo-text .en {
  color: #fff !important;
}

[data-theme="dark"] .footer-col h4,
[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .footer-bottom,
[data-theme="dark"] .footer-flag span {
  color: #fff;
}

[data-theme="dark"] .footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .footer-col ul li a:hover {
  color: #fff;
}

[data-theme="dark"] .footer-social a {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .footer-newsletter input {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

@media (max-width: 640px) {
  footer {
    padding: 40px 0 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand,
  .footer-col {
    text-align: right;
  }

  .footer-social {
    flex-wrap: wrap;
  }

  .footer-newsletter {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-newsletter input,
  .footer-newsletter button {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    gap: 12px;
  }

  .footer-flag {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

[dir="ltr"] footer {
  direction: ltr;
  text-align: left;
}

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

[dir="ltr"] footer .footer-brand,
[dir="ltr"] footer .footer-col {
  text-align: left;
}

[dir="ltr"] footer .logo,
[dir="ltr"] footer .footer-social,
[dir="ltr"] footer .footer-col ul li a,
[dir="ltr"] footer .footer-newsletter,
[dir="ltr"] footer .footer-bottom,
[dir="ltr"] footer .footer-flag {
  direction: ltr;
}

[dir="ltr"] footer .footer-col ul li a:hover {
  padding-right: 0;
  padding-left: 8px;
}

[dir="ltr"] footer .footer-newsletter input {
  text-align: left;
}

[dir="ltr"] footer .footer-bottom {
  text-align: left;
}

[dir="ltr"] footer .footer-flag {
  align-items: flex-start;
}

/* Back to Top */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   REGISTRATIONS
   ============================================================ */
.registrations-section {
  padding: 80px 0;
  background: var(--gray-50);
}

.registration-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.registrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.registration-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.registration-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.registration-media {
  position: relative;
  height: 180px;
  background: var(--gray-100);
}

.registration-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.registration-status {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.registration-status.open {
  color: var(--green);
}

.registration-status.soon {
  color: #b45309;
}

.registration-status.closed {
  color: var(--gray-600);
}

.registration-card h3 {
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  padding: 20px 20px 0;
}

.registration-card p {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.8;
  padding: 0 20px;
}

.registration-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  padding: 0 20px;
}

.registration-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.registration-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}

.registration-actions .btn {
  width: 100%;
  justify-content: center;
}

[data-theme="dark"] #registrations .filter-chip,
[data-theme="dark"] .registration-actions .btn {
  color: #fff;
}

[data-theme="dark"] #registrations .filter-chip:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #registrations .filter-chip.active,
[data-theme="dark"] #registrations .filter-chip:hover {
  background: var(--red);
  color: #fff;
}

[data-theme="dark"] .registration-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.72);
}

.registration-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  border: 1px dashed var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 34px 20px;
  color: var(--gray-600);
}

.registration-empty i {
  font-size: 34px;
  color: var(--red);
  margin-bottom: 10px;
}

.registration-empty h3 {
  color: var(--gray-800);
  margin-bottom: 6px;
}

[data-theme="dark"] .registration-status.soon {
  color: #fbbf24;
}

@media (max-width: 576px) {
  .registrations-section {
    padding: 56px 0;
  }

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

  .registration-card {
    min-height: auto;
  }
}

.back-top:hover {
  background: var(--red-light);
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .back-top {
    right: 18px;
    bottom: 22px;
    width: 44px;
    height: 44px;
  }
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  margin: 0 24px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in, .fade-left, .fade-right {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-left {
  transform: translateX(-30px);
}

.fade-right {
  transform: translateX(30px);
}

.fade-in.visible, .fade-left.visible, .fade-right.visible {
  opacity: 1;
  transform: translate(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE STYLES
   ============================================================ */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .activities-top {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* إخفاء القائمة العادية وإظهار زر القائمة */
  nav {
    display: none !important;
  }
  
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .quick-actions {
    display: none !important;
  }

  /* إخفاء أزرار اللغة والوضع المظلم من الهيدر في الموبايل (لأنها موجودة في القائمة) */
  .dark-toggle,
  .lang-btn {
    display: none !important;
  }

  /* تحسينات للهيرو */
  .notif-container {
    display: none !important;
  }

  .quick-actions {
    display: block !important;
  }

  .quick-actions .btn-icon,
  .quick-panel .lang-btn,
  .quick-panel .dark-toggle {
    display: flex !important;
  }

  .hero-text h1 {
    font-size: 32px;
  }
  
  .hero-text h2 {
    font-size: 18px;
  }
  
  .hero-text p {
    font-size: 16px;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
  }
  
  /* تحسينات للبطاقات */
  .membership-types {
    grid-template-columns: 1fr;
  }
  
  .membership-card.featured {
    transform: scale(1);
  }
  
  .news-featured {
    grid-template-columns: 1fr;
  }
  
  .event-card {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full {
    grid-column: span 1;
  }
  
  /* تحسينات لهيكل الاتحاد والإرشادات */
  .structure-nav ul,
  .guide-nav ul {
    gap: 6px !important;
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 8px !important;
  }
  
  .structure-nav a,
  .guide-nav a {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    gap: 4px !important;
  }
  
    .structure-nav a i,
    .guide-nav a i {
      font-size: 16px !important;
      width: 16px !important;
    }
  }
  
    /* ============================================================
     MOBILE DROPDOWN MENU FIX - للشاشات الصغيرة
     ============================================================ */

/* التأكد من ظهور زر القائمة على جميع الشاشات الصغيرة */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  
  /* إخفاء القائمة العادية */
  nav:not(.dropdown-nav) {
    display: none !important;
  }
}

/* تنسيق القائمة المنسدلة للشاشات الصغيرة */
@media (max-width: 768px) {
  .dropdown-menu {
    position: fixed !important;
    top: 90px !important;
    left: 50% !important;
    transform: translate(-50%, 0) scale(0.98) !important;
    width: 94% !important;
    max-width: 420px !important;
    max-height: calc(100vh - 140px) !important;
    background: var(--white) !important;
    border-radius: 20px !important;
    z-index: 10000 !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
  }
  
  .dropdown-menu.active {
    transform: translate(-50%, 0) scale(1) !important;
  }
  
  .dropdown-header {
    padding: 16px 20px !important;
    background: linear-gradient(135deg, var(--red), var(--red-light)) !important;
    border-radius: 20px 20px 0 0 !important;
  }
  
  .dropdown-header span {
    color: white !important;
    font-size: 18px !important;
  }
  
  .dropdown-close {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
  }
  
  .dropdown-close:hover {
    background: white !important;
    color: var(--red) !important;
  }
  
  .dropdown-nav a {
    padding: 14px 20px !important;
    font-size: 16px !important;
    border-bottom: 1px solid var(--gray-200) !important;
  }
  
  .dropdown-nav a i {
    width: 28px !important;
    font-size: 18px !important;
  }
  
  .dropdown-footer {
    padding: 16px 20px !important;
    gap: 12px !important;
  }
  
  .dropdown-footer .menu-item-toggle {
    padding: 12px !important;
    font-size: 14px !important;
    background: var(--gray-100) !important;
    border-radius: 12px !important;
  }
  
  /* منع التمرير خلف القائمة */
  body.dropdown-open {
    overflow: hidden !important;
  }
}

/* للشاشات الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
  .dropdown-menu {
    width: 96% !important;
    max-width: 360px !important;
  }
  
  .dropdown-nav a {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  
  .dropdown-nav a i {
    width: 24px !important;
    font-size: 16px !important;
  }
  
  .dropdown-header span {
    font-size: 16px !important;
  }
  
  .dropdown-footer .menu-item-toggle {
    padding: 10px !important;
    font-size: 13px !important;
  }
}
/* ============================================================
   RESET MOBILE MENU - حل نهائي لمشكلة القائمة
   ============================================================ */

/* إخفاء أي عناصر قديمة للقائمة */
.mobile-menu,
.menu-overlay,
#mobile-menu,
#menuOverlay {
  display: none !important;
}

/* زر القائمة - يظهر فقط على الشاشات الصغيرة */
.menu-toggle {
  display: none !important;
  background: var(--gray-100);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

/* إظهار زر القائمة على الشاشات الصغيرة */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex !important;
  }
  
  /* إخفاء القائمة العادية */
  nav {
    display: none !important;
  }
}

/* القائمة المنسدلة - تصميم جديد */
.dropdown-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 85%;
  max-width: 350px;
  max-height: min(85vh, calc(100vh - 32px));
  height: min(85vh, calc(100vh - 32px));
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: white;
}

.dropdown-header span {
  font-size: 18px;
  font-weight: 700;
}

.dropdown-close {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: var(--transition);
}

.dropdown-close:hover {
  background: white;
  color: var(--red);
  transform: rotate(90deg);
}

.dropdown-nav {
  padding: 8px 0;
}

.dropdown-body {
  flex: 1;
  min-height: 0;
  padding: 8px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dropdown-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 600;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
  font-size: 15px;
}

.dropdown-nav a:hover {
  background: rgba(210, 16, 52, 0.08);
  color: var(--red);
  padding-right: 28px;
}

.dropdown-nav a i {
  width: 24px;
  font-size: 18px;
  color: var(--red);
}

.dropdown-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.dropdown-footer .menu-item-toggle {
  flex: 1;
  padding: 12px;
  background: var(--white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  transition: var(--transition);
}

.dropdown-footer .menu-item-toggle:hover {
  background: var(--red);
  color: white;
}

/* منع التمرير عند فتح القائمة */
body.dropdown-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Override: keep structure/guidelines tabs visible on mobile */
@media (max-width: 992px) {
  nav.structure-nav,
  nav.guide-nav,
  .guide-nav {
    display: block !important;
  }
  /* Ensure the hamburger stays visible after overrides */
  header .menu-toggle {
    display: flex !important;
  }
}

/* Header mobile fixes */
@media (max-width: 768px) {
  header {
    padding: 10px 0;
    width: 100%;
  }
  .header-inner {
    padding: 0 16px;
    width: 100%;
  }
  .logo-icon {
    width: 52px;
    height: 52px;
  }
  .logo-text .ar {
    font-size: 15px;
  }
  .menu-toggle {
    z-index: 3;
  }
}

/* Mobile dropdown hard overrides to ensure content visibility */
/* Mobile dropdown hard overrides to ensure content visibility */

@media (max-width: 768px) {

  #dropdownMenu {

    background: var(--white) !important;
    color: var(--gray-800) !important;

  }

  #dropdownMenu .dropdown-header {

    background: linear-gradient(135deg, var(--red), var(--red-light)) !important;

    color: white !important;

  }

  #dropdownMenu .dropdown-body {

    display: block !important;

    padding: 8px 0 !important;

    overflow-y: auto !important;

    background: var(--white) !important;

  }
  #dropdownMenu .dropdown-nav {
    display: block !important;
  }
  #dropdownMenu .dropdown-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 20px !important;
    color: var(--gray-800) !important;
    font-weight: 700 !important;
    border-bottom: 1px solid var(--gray-200) !important;
  }
  #dropdownMenu .dropdown-nav a i {
    color: var(--red) !important;
  }
}

/* Full-height mobile drawer so the menu ends at the bottom of the screen */
@media (max-width: 992px) {
  #dropdownMenu {
    top: 0;
    left: 0%;
    right: 35%;
    transform: none;
    width: min(180px, 100vw);
    max-width: min(180px, 100vw);
    height: 120vh;
    max-height: 100vh;
    border-radius: 0 18px 18px 0;
    margin: 0;
    overflow:scroll;
    box-sizing: border-box;
  }
  #dropdownMenu.active {
    transform: none;
  }
  #dropdownMenu .dropdown-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
}

/* ============================================================
   Custom mobile dropdown tweaks (slimmer + quick settings)
   ============================================================ */
#dropdownMenu {
  width: min(180px, 88vw) !important;
  max-width: min(180px, 88vw) !important;
}

#dropdownMenu .dropdown-nav a {
  padding: 12px 16px !important;
  gap: 5px !important;
}

#dropdownMenu .dropdown-nav a i {
  width: 20px !important;
}

#dropdownMenu .dropdown-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

#dropdownMenu .quick-settings-btn {
  justify-content: center;
  font-weight: 700;
  gap: 10px;
  width: 100%;
  flex: 0 0 auto;
}

#dropdownMenu .quick-panel-mobile {
  display: none;
  gap: 12px;
  margin-top: 6px;
  padding: 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  justify-content: center;
  width: 100%;
}

#dropdownMenu .quick-panel-mobile.show {
  display:block;
}

#dropdownMenu .quick-panel-mobile .menu-item-toggle {
  flex: 0 0 48px;
  padding: 10px;
  border-radius: 12px;
}

/* ============================================================
   SIDE DRAWER MENU (Mobile + Desktop)
   ============================================================ */
.header-inner nav {
  display: none !important;
}

header .menu-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 9999;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

#dropdownMenu {
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  transform: translateX(105%) !important;
  width: min(320px, 80vw) !important;
  max-width: min(320px, 80vw) !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 0 0 18px !important;
  box-shadow: -14px 0 32px rgba(0, 0, 0, 0.18) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  z-index: 10000 !important;
}

[dir="ltr"] #dropdownMenu {
  left: 0 !important;
  right: auto !important;
  transform: translateX(-105%) !important;
  border-radius: 0 0 18px 0 !important;
  box-shadow: 14px 0 32px rgba(0, 0, 0, 0.18) !important;
}

#dropdownMenu.active {
  transform: translateX(0) !important;
}

[dir="ltr"] #dropdownMenu.active {
  transform: translateX(0) !important;
}

#dropdownMenu .dropdown-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-radius: 0;
}

#dropdownMenu .dropdown-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#dropdownMenu .dropdown-footer {
  border-radius: 0 0 0 18px;
  background: var(--gray-50);
}

[dir="ltr"] #dropdownMenu .dropdown-footer {
  border-radius: 0 0 18px 0;
}

.dropdown-nav a.active {
  background: rgba(210, 16, 52, 0.08);
  color: var(--red);
}

@media (min-width: 1200px) {
  #dropdownMenu {
    width: 340px !important;
    max-width: 340px !important;
  }
}

@media (max-width: 768px) {
  #dropdownMenu {
    width: min(280px, 86vw) !important;
    max-width: min(280px, 86vw) !important;
  }
}

body.dropdown-open {
  overflow: hidden;
  position: relative;
  width: 100%;
}

@media (hover: none), (pointer: coarse) {
  a,
  button,
  .btn,
  .btn-icon,
  .menu-toggle,
  .dropdown-link,
  .menu-item-toggle,
  .gallery-tab,
  .filter-chip,
  .read-btn,
  .social-btn,
  .link-item {
    -webkit-tap-highlight-color: transparent;
  }

  .btn:hover,
  .btn-icon:hover,
  .dark-toggle:hover,
  .lang-btn:hover,
  .menu-toggle:hover,
  .dropdown-link:hover,
  .dropdown-nav a:hover,
  .dropdown-footer .menu-item-toggle:hover,
  .quick-panel .lang-btn:hover,
  .quick-panel .dark-toggle:hover,
  .read-btn:hover,
  .social-btn:hover {
    transform: none;
  }

  .btn-icon:hover,
  .dark-toggle:hover,
  .lang-btn:hover,
  .menu-toggle:hover {
    background: var(--gray-100);
    color: inherit;
  }

  .dropdown-link:hover,
  .dropdown-nav a:hover,
  .dropdown-footer .menu-item-toggle:hover {
    background: transparent;
    color: inherit;
  }

  .gallery-tab:not(.active):hover,
  .filter-chip:not(.active):hover {
    background: var(--gray-100);
    color: inherit;
  }

  [data-theme="dark"] header .btn-icon:hover,
  [data-theme="dark"] header .menu-toggle:hover,
  [data-theme="dark"] header .quick-panel .lang-btn:hover,
  [data-theme="dark"] header .quick-panel .dark-toggle:hover {
    color: #fff;
  }
}
