/* =============================================================================
   SCHOOL WEBSITE — DESIGN SYSTEM
   Phase 1: Requirements + UX + Design System
   RTL-Native | Arabic-First | Modern Minimal
   ============================================================================= */

/* =============================================================================
   1. FONT FACE — Cairo Self-Hosted
   ============================================================================= */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cairo/cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cairo/cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+FEFF, U+FFFD;
}


/* =============================================================================
   2. DESIGN TOKENS — CSS Custom Properties
   ============================================================================= */
:root {
  /* --- Color Palette --- */
  --color-primary:        #1a3a5c;   /* أزرق داكن عميق — اللون الرئيسي */
  --color-primary-light:  #2d5a8a;   /* أزرق متوسط — للـ Hover */
  --color-accent:         #2d6a9f;   /* أزرق أكثر إشراقًا — للـ Links والـ CTAs */
  --color-accent-light:   #e8f1f9;   /* أزرق فاتح جدًا — للخلفيات الثانوية */

  --color-secondary:      #3d5a73;   /* رمادي-أزرق — للعناصر الثانوية */

  /* --- Neutral Palette --- */
  --color-bg:             #f7f8fa;   /* خلفية الصفحة — أبيض دافئ تقريبًا */
  --color-surface:        #ffffff;   /* سطح الـ Cards والـ Nav */
  --color-surface-alt:    #f0f4f8;   /* سطح بديل للـ Sections */

  /* --- Text --- */
  --color-text:           #1a1e2e;   /* النص الرئيسي — شبه أسود */
  --color-text-muted:     #64748b;   /* النص الثانوي والـ Meta */
  --color-text-light:     #94a3b8;   /* النص الخافت جدًا */
  --color-text-inverse:   #ffffff;   /* النص على الخلفيات الداكنة */

  /* --- Borders --- */
  --color-border:         #e2e8f0;   /* حدود افتراضية */
  --color-border-light:   #f1f5f9;   /* حدود خفيفة جدًا */

  /* --- Feedback Colors --- */
  --color-success:        #16a34a;
  --color-success-light:  #dcfce7;
  --color-warning:        #d97706;
  --color-warning-light:  #fef3c7;
  --color-danger:         #dc2626;
  --color-danger-light:   #fee2e2;
  --color-focus:          #2d6a9f;   /* لون Focus Ring */

  /* ==========================================================================
     Typography Scale
     ========================================================================== */
  --font-family:          'Cairo', 'Segoe UI', system-ui, sans-serif;

  --font-size-xs:         0.75rem;    /* 12px */
  --font-size-sm:         0.875rem;   /* 14px */
  --font-size-base:       1rem;       /* 16px */
  --font-size-md:         1.125rem;   /* 18px */
  --font-size-lg:         1.25rem;    /* 20px */
  --font-size-xl:         1.5rem;     /* 24px */
  --font-size-2xl:        1.875rem;   /* 30px */
  --font-size-3xl:        2.25rem;    /* 36px */
  --font-size-4xl:        3rem;       /* 48px */
  --font-size-5xl:        3.75rem;    /* 60px */

  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:    1.3;
  --line-height-normal:   1.6;
  --line-height-relaxed:  1.8;

  --letter-spacing-tight: -0.01em;
  --letter-spacing-normal: 0;

  /* ==========================================================================
     Spacing Scale (4px base unit)
     ========================================================================== */
  --space-1:   0.25rem;   /* 4px  */
  --space-2:   0.5rem;    /* 8px  */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */
  --space-32:  8rem;      /* 128px */

  /* ==========================================================================
     Border Radius
     ========================================================================== */
  --radius-sm:   0.25rem;   /* 4px  */
  --radius-md:   0.5rem;    /* 8px  */
  --radius-lg:   0.75rem;   /* 12px */
  --radius-xl:   1rem;      /* 16px */
  --radius-2xl:  1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ==========================================================================
     Shadows
     ========================================================================== */
  --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 12px 0 rgba(0, 0, 0, 0.07);
  --shadow-lg:  0 8px 24px 0 rgba(0, 0, 0, 0.09);
  --shadow-xl:  0 16px 48px 0 rgba(0, 0, 0, 0.12);

  /* ==========================================================================
     Container Widths
     ========================================================================== */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1280px;
  --container-2xl:  1440px;

  /* ==========================================================================
     Transitions
     ========================================================================== */
  --transition-fast:    150ms ease;
  --transition-normal:  250ms ease;
  --transition-slow:    400ms ease;

  /* ==========================================================================
     Z-Index Scale
     ========================================================================== */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-fixed:    300;
  --z-overlay:  400;
  --z-modal:    500;
  --z-toast:    600;

  /* ==========================================================================
     Navigation Height
     ========================================================================== */
  --nav-height:         68px;
  --nav-height-mobile:  60px;
}


/* =============================================================================
   3. CSS RESET & BASE
   ============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL override for Bootstrap */
[dir="rtl"] body { text-align: right; }

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: var(--font-family);
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-family);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =============================================================================
   4. TYPOGRAPHY UTILITIES
   ============================================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-4xl)); }
h2 { font-size: clamp(var(--font-size-xl), 3.5vw, var(--font-size-3xl)); }
h3 { font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-2xl)); }
h4 { font-size: clamp(var(--font-size-md), 2vw, var(--font-size-xl)); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

.text-muted    { color: var(--color-text-muted) !important; }
.text-light    { color: var(--color-text-light)  !important; }
.text-primary  { color: var(--color-primary)     !important; }
.text-accent   { color: var(--color-accent)      !important; }


/* =============================================================================
   5. LAYOUT UTILITIES
   ============================================================================= */
.container-site {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 768px) {
  .container-site { padding-inline: var(--space-4); }
}

.section {
  padding-block: var(--space-20);
}

.section-sm {
  padding-block: var(--space-12);
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-3xl));
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: var(--line-height-relaxed);
}


/* =============================================================================
   6. BUTTON SYSTEM
   ============================================================================= */
.btn-site {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

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

/* Primary Button */
.btn-primary-site {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn-primary-site:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary-light);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline Button */
.btn-outline-site {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-outline-site:hover {
  background-color: var(--color-surface-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Ghost Button */
.btn-ghost-site {
  background-color: transparent;
  color: var(--color-accent);
  border-color: transparent;
  padding-inline: var(--space-2);
}

.btn-ghost-site:hover {
  color: var(--color-primary);
  background-color: var(--color-accent-light);
}

/* Button Sizes */
.btn-sm-site {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg-site {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-md);
  border-radius: var(--radius-lg);
}


/* =============================================================================
   7. CARD SYSTEM
   ============================================================================= */
.card-site {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

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

.card-site .card-body {
  padding: var(--space-6);
}

.card-site .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
}


/* =============================================================================
   8. NAVIGATION
   ============================================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-fixed);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.nav-logo-sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-regular);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-link-item a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link-item a:hover,
.nav-link-item a.active {
  color: var(--color-primary);
  background-color: var(--color-accent-light);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--color-border);
  cursor: pointer;
  gap: 5px;
  transition: background var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--color-surface-alt);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.nav-mobile {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  left: 0;
  bottom: 0;
  background: var(--color-surface);
  z-index: var(--z-overlay);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

[dir="rtl"] .nav-mobile {
  transform: translateX(-100%);
}

.nav-mobile.is-open {
  transform: translateX(0);
}

.nav-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-mobile-links a {
  display: block;
  padding: var(--space-4) var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-light);
}

.nav-mobile-links a:hover {
  color: var(--color-primary);
  background-color: var(--color-accent-light);
  border-color: transparent;
}

.nav-mobile-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* Responsive: show hamburger on mobile */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
  .nav-actions .btn-site { display: none; }
  .site-nav { height: var(--nav-height-mobile); }
  .nav-mobile { top: var(--nav-height-mobile); }
}


/* =============================================================================
   9. HERO SECTION
   ============================================================================= */
.hero-section {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  background-color: var(--color-surface);
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg-shape::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 106, 159, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-bg-shape::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26, 58, 92, 0.04) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-20);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero-tag::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--color-primary);
  display: block;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-desc {
  font-size: clamp(var(--font-size-base), 2vw, var(--font-size-md));
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  max-width: 520px;
  margin-bottom: var(--space-10);
}

[dir="rtl"] .hero-desc { margin-right: 0; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: var(--space-16);
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  max-width: 100%;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hero-stat-num {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero Visual (right column) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual-card {
  position: relative;
  width: 100%;
  max-width: 460px;
}

.hero-shape-main {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #dbeafe 100%);
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-shape-inner {
  width: 70%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  opacity: 0.12;
  animation: morphBlob 8s ease-in-out infinite;
}

.hero-logo-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-center img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(26, 58, 92, 0.15));
}

@keyframes morphBlob {
  0%, 100% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
  33%       { border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%; }
  66%       { border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; }
}

/* Floating mini-card */
.hero-float-card {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.hero-float-card .fc-icon {
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.hero-float-card-1 {
  bottom: 10%;
  right: -10%;
  animation: floatCard1 4s ease-in-out infinite;
}

.hero-float-card-2 {
  top: 10%;
  left: -10%;
  animation: floatCard2 5s ease-in-out infinite;
}

[dir="rtl"] .hero-float-card-1 { right: auto; left: -10%; }
[dir="rtl"] .hero-float-card-2 { left: auto;  right: -10%; }

@keyframes floatCard1 {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes floatCard2 {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

@media (max-width: 991px) {
  .hero-section {
    min-height: auto;
  }
  .hero-visual { display: none; }
  .hero-content { padding-block: var(--space-16); }
}

@media (max-width: 576px) {
  .hero-content { padding-block: var(--space-12); }
  .hero-stats { gap: var(--space-6); }
}


/* =============================================================================
   10. NEWS SECTION
   ============================================================================= */
.news-section {
  background-color: var(--color-bg);
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: var(--space-6);
}

/* Main featured news — in RTL grid, column 1 is on the RIGHT (start side) */
.news-card-main {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.news-card-main .news-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #e0ecf8 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.news-card-main .news-body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Secondary news cards */
.news-card-side {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

[dir="rtl"] .news-card-side { flex-direction: row; }

.news-card-side:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card-side .news-img-side {
  width: 130px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, #e0ecf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.news-card-side .news-body {
  padding: var(--space-4) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Shared news elements */
.news-category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.news-title {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
  text-decoration: none;
  display: block;
}

.news-card-main .news-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

.news-card-side .news-title {
  font-size: var(--font-size-base);
}

.news-title:hover {
  color: var(--color-primary);
}

.news-excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  flex: 1;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  margin-top: auto;
}

.news-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-card-main {
    grid-column: 1;
    grid-row: auto;
  }
  .news-card-main .news-img { height: 220px; }
  .news-card-side { flex-direction: column; }
  .news-card-side .news-img-side {
    width: 100%;
    height: 140px;
  }
}


/* =============================================================================
   11. ACTIVITIES SECTION
   ============================================================================= */
.activities-section {
  background-color: var(--color-surface);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.activity-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.activity-card:hover {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-border);
}

.activity-icon {
  width: 52px;
  height: 52px;
  background: var(--color-accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.activity-content { flex: 1; }

.activity-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.activity-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.activity-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
}

@media (max-width: 991px) {
  .activities-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .activities-grid { grid-template-columns: 1fr; }
}


/* =============================================================================
   12. LIBRARY SECTION
   ============================================================================= */
.library-section {
  background-color: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.library-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.library-section .section-label { color: #90c4e8; }
.library-section .section-title { color: var(--color-text-inverse); }
.library-section .section-desc  { color: rgba(255,255,255,0.7); }

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.library-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.library-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  transition: background var(--transition-normal);
}

.library-card:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
}

.library-card:hover::before {
  background: rgba(255,255,255,0.6);
}

.library-card-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.library-card-content { flex: 1; }

.library-stage-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.library-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-2);
}

.library-card-desc {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.65);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

.library-card-footer {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.1);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.library-card-count {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.5);
}

.library-arrow {
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-lg);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.library-card:hover .library-arrow {
  color: white;
  transform: translateX(-4px);
}

[dir="rtl"] .library-card:hover .library-arrow {
  transform: translateX(-4px);
}

@media (max-width: 768px) {
  .library-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .library-card { padding: var(--space-6); }
}

@media (min-width: 769px) and (max-width: 991px) {
  .library-grid { grid-template-columns: repeat(2, 1fr); }
}


/* =============================================================================
   13. COMPLAINTS CTA SECTION
   ============================================================================= */
.complaints-section {
  background-color: var(--color-bg);
}

.complaints-inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.complaints-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.complaints-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.complaints-icon-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.complaints-icon-box.complaint {
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.complaints-icon-box.suggestion {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.complaints-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

.complaints-title {
  font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-2xl));
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.complaints-desc {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: var(--line-height-relaxed);
}

.complaints-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn-complaint {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.btn-complaint:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

.btn-suggestion {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

.btn-suggestion:hover {
  background: #15803d;
  border-color: #15803d;
  color: white;
}

@media (max-width: 768px) {
  .complaints-inner {
    padding: var(--space-10) var(--space-6);
  }
  .complaints-actions { flex-direction: column; }
  .complaints-actions .btn-site { width: 100%; justify-content: center; }
}


/* =============================================================================
   14. FOOTER
   ============================================================================= */
.site-footer {
  background-color: var(--color-text);
  color: rgba(255,255,255,0.75);
  padding-top: var(--space-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  text-decoration: none;
}

.footer-brand-img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  object-fit: contain;
  /* White bg container so logo PNG is always visible on dark footer */
  background: rgba(255,255,255,0.9);
  padding: 4px;
}

.footer-brand-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: white;
  line-height: 1.3;
}

.footer-brand-desc {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-6);
}

/* Social links */
.footer-social {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

/* Footer columns */
.footer-col-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: white;
  margin-bottom: var(--space-5);
  letter-spacing: 0.03em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: white; }

/* Contact info */
.footer-contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.55);
}

.footer-contact-icon {
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 2px;
  font-size: var(--font-size-base);
}

/* Footer bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-5);
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

@media (max-width: 576px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; text-align: center; }
}


/* =============================================================================
   15. MISC UTILITIES
   ============================================================================= */
.divider {
  height: 1px;
  background: var(--color-border-light);
  margin-block: var(--space-12);
}

.badge-site {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
}

.badge-primary { background: var(--color-accent-light); color: var(--color-accent); }
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-light);  color: var(--color-danger);  }

/* Skip to content (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  right: var(--space-4);
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

/* Prevent horizontal overflow globally */
.overflow-guard {
  overflow-x: hidden;
  max-width: 100%;
}


/* =============================================================================
   16. BOOTSTRAP OVERRIDES (RTL-aware)
   ============================================================================= */
/* Ensure Bootstrap RTL inherits our fonts */
.container,
.container-fluid,
.row,
[class*="col-"] {
  font-family: var(--font-family);
}

/* Fix Bootstrap's text-muted to use our token */
.text-muted {
  color: var(--color-text-muted) !important;
}


/* =============================================================================
   17. PRINT STYLES
   ============================================================================= */
@media print {
  .site-nav,
  .nav-mobile,
  .nav-toggle,
  .hero-float-card,
  .site-footer { display: none !important; }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

/* =============================================================================
   18. GOOGLE LOGIN BUTTON
   ============================================================================= */
.btn-google-login {
  transition: all 0.2s ease-in-out;
}
.btn-google-login:hover {
  background-color: #f1f3f4 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px);
}

/* =============================================================================
   19. GLOBAL PAGE LOADER
   ============================================================================= */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-surface);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}
#global-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
