/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=Noto+Naskh+Arabic:wght@400;600;700&family=Cinzel:wght@400;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Dark Mode (default) */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1628;
  --bg-card: #111827;
  --bg-card-hover: #1a2340;
  --accent-gold: #c9a84c;
  --accent-gold-light: #e8c97a;
  --accent-navy: #1e3a6e;
  --accent-teal: #0d9488;
  --accent-teal-light: #14b8a6;
  --text-primary: #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(201,168,76,0.15);
  --border-light: rgba(255,255,255,0.06);
  --navbar-bg: rgba(10,14,26,0.92);
  --shadow-gold: 0 0 30px rgba(201,168,76,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #0f1e3d 50%, #0a1628 100%);
  --gradient-gold: linear-gradient(135deg, #c9a84c, #e8c97a);
  --gradient-nav: linear-gradient(180deg, rgba(10,14,26,0.98) 0%, rgba(10,14,26,0.85) 100%);
}

[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #eef2fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4ff;
  --accent-gold: #b8860b;
  --accent-gold-light: #d4a017;
  --accent-navy: #1e3a6e;
  --accent-teal: #0d9488;
  --accent-teal-light: #0f766e;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: rgba(184,134,11,0.2);
  --border-light: rgba(0,0,0,0.08);
  --navbar-bg: rgba(248,249,252,0.95);
  --shadow-gold: 0 0 30px rgba(184,134,11,0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
  --gradient-hero: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 50%, #e8eeff 100%);
  --gradient-nav: linear-gradient(180deg, rgba(248,249,252,0.98) 0%, rgba(248,249,252,0.92) 100%);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Naskh Arabic', serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 3px; }

/* ===== SELECTION ===== */
::selection { background: var(--accent-gold); color: #000; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; right: 0; left: 0; z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  height: 60px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; }

.nav-logo-text {
  font-family: 'Aref Ruqaa', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1.2;
}

.nav-logo-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: 'Noto Naskh Arabic', serif;
  font-weight: 400;
}

.nav-menu {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.25s;
  position: relative;
  white-space: nowrap;
}

.nav-menu a::after {
  content: '';
  position: absolute; bottom: 4px; right: 50%; left: 50%;
  height: 2px; background: var(--gradient-gold); border-radius: 1px;
  transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--accent-gold);
  background: rgba(201,168,76,0.08);
}

.nav-menu a:hover::after, .nav-menu a.active::after {
  right: 8px; left: 8px;
}

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

.btn-theme {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all 0.25s;
}

.btn-theme:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: rotate(20deg);
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all 0.3s;
}

/* ===== NEWS TICKER ===== */
.news-ticker {
  background: linear-gradient(90deg, var(--accent-navy), #122550, var(--accent-navy));
  border-bottom: 1px solid var(--border);
  height: 38px; overflow: hidden;
  display: flex; align-items: center;
  margin-top: 70px;
}

.ticker-label {
  background: var(--gradient-gold);
  color: #000;
  font-family: 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0 1rem;
  height: 100%; display: flex; align-items: center;
  white-space: nowrap; flex-shrink: 0;
  gap: 0.4rem;
}

.ticker-track {
  flex: 1; overflow: hidden; position: relative;
}

.ticker-content {
  display: flex; align-items: center;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #c8d8f0;
  gap: 3rem;
  padding-right: 100%;
}

.ticker-content span { padding: 0 1rem; }
.ticker-content .sep { color: var(--accent-gold); font-size: 0.6rem; }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== QUICK ACCESS BAR ===== */
.quick-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  padding: 0.6rem 2rem;
  display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: 'Noto Naskh Arabic', serif;
  transition: all 0.25s;
  cursor: pointer;
}

.quick-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(201,168,76,0.06);
  transform: translateY(-1px);
}

.quick-btn i { font-size: 0.85rem; }

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-block;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border);
  color: var(--accent-gold);
  font-size: 0.75rem;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-family: 'Noto Naskh Arabic', serif;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.section-title {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.section-title .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  width: 60px; height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; top: 0; right: 0; left: 0;
  height: 2px;
  background: var(--gradient-gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s ease;
}

.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.card:hover::before { transform: scaleX(1); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: 12px; border: none;
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--gradient-gold);
  color: #0a0e1a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,168,76,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
  background: rgba(201,168,76,0.1);
  transform: translateY(-2px);
}

.btn-teal {
  background: var(--accent-teal);
  color: #fff;
}

.btn-teal:hover {
  background: var(--accent-teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13,148,136,0.3);
}

/* ===== GRID ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1280px; margin: 0 auto;
}

.footer-brand .brand-logo {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img { width: 48px; height: 48px; border-radius: 10px; }

.footer-brand-name {
  font-family: 'Aref Ruqaa', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1.3;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex; gap: 0.5rem;
}

.social-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.25s;
}

.social-btn:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #000; transform: translateY(-2px);
}

.footer-col h4 {
  font-family: 'Aref Ruqaa', serif;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  display: flex; align-items: center; gap: 0.4rem;
  transition: all 0.2s;
}

.footer-links a:hover { color: var(--accent-gold); padding-right: 4px; }
.footer-links a::before { content: '›'; color: var(--accent-gold); }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted); font-size: 0.83rem;
}

.footer-contact-item i { color: var(--accent-gold); margin-top: 2px; flex-shrink: 0; }
.footer-contact-item a { color: var(--text-muted); text-decoration: none; }
.footer-contact-item a:hover { color: var(--accent-gold); }

.footer-bottom {
  max-width: 1280px; margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}

.footer-bottom-text {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-bottom-text a { color: var(--accent-gold); text-decoration: none; }
.footer-bottom-text a:hover { text-decoration: underline; }

.footer-designer-badge {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.footer-designer-badge a { color: var(--accent-gold); text-decoration: none; font-weight: 600; }

/* ===== AI CHAT BUTTON ===== */
.ai-chat-btn {
  position: fixed;
  bottom: 2rem; left: 2rem;
  z-index: 999;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent-teal), #0f766e);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 6px 25px rgba(13,148,136,0.45);
  transition: all 0.3s;
  animation: pulse-ai 3s infinite;
}

@keyframes pulse-ai {
  0%, 100% { box-shadow: 0 6px 25px rgba(13,148,136,0.45); }
  50% { box-shadow: 0 6px 40px rgba(13,148,136,0.7), 0 0 0 8px rgba(13,148,136,0.1); }
}

.ai-chat-btn:hover { transform: scale(1.1) rotate(5deg); }

/* ===== AI CHAT WINDOW ===== */
.ai-chat-window {
  position: fixed;
  bottom: 6rem; left: 2rem;
  z-index: 998;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: none; flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.ai-chat-window.open { display: flex; }

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

.ai-chat-header {
  background: linear-gradient(135deg, var(--accent-teal), #0f766e);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
  justify-content: space-between;
}

.ai-header-info { display: flex; align-items: center; gap: 0.75rem; }
.ai-avatar {
  width: 38px; height: 38px; background: rgba(255,255,255,0.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.ai-header-text h4 { color: #fff; font-size: 0.9rem; font-weight: 700; }
.ai-header-text span { color: rgba(255,255,255,0.7); font-size: 0.75rem; }

.ai-close-btn {
  background: rgba(255,255,255,0.2); border: none; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; color: #fff; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.ai-close-btn:hover { background: rgba(255,255,255,0.3); }

.ai-chat-body {
  flex: 1; padding: 1rem; overflow-y: auto;
  max-height: 320px; display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 200px;
}

.ai-msg {
  max-width: 85%; padding: 0.65rem 0.9rem; border-radius: 14px;
  font-size: 0.85rem; line-height: 1.6;
  animation: fadeIn 0.2s ease;
}

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

.ai-msg.bot {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
}

.ai-msg.user {
  background: var(--accent-teal);
  color: #fff;
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
}

.ai-typing { display: flex; gap: 4px; align-items: center; padding: 0.65rem 0.9rem; }
.ai-typing span {
  width: 6px; height: 6px; background: var(--text-muted);
  border-radius: 50%; animation: typing 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

.ai-chat-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-light);
  display: flex; gap: 0.5rem;
}

.ai-input {
  flex: 1; background: var(--bg-secondary);
  border: 1px solid var(--border-light); border-radius: 10px;
  padding: 0.55rem 0.85rem; color: var(--text-primary);
  font-family: 'Noto Naskh Arabic', serif; font-size: 0.85rem;
  outline: none; resize: none; direction: rtl;
  transition: border-color 0.2s;
}

.ai-input:focus { border-color: var(--accent-teal); }

.ai-send-btn {
  width: 38px; height: 38px;
  background: var(--accent-teal); border: none; border-radius: 10px;
  color: #fff; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-send-btn:hover { background: var(--accent-teal-light); transform: scale(1.05); }

/* ===== NOTIFICATION POPUP ===== */
.welcome-popup {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: popFadeIn 0.4s ease;
}

@keyframes popFadeIn { from { opacity: 0; } to { opacity: 1; } }

.welcome-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 420px; width: 90%;
  text-align: center;
  position: relative;
  animation: popSlide 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popSlide {
  from { transform: scale(0.8) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.welcome-icon {
  width: 72px; height: 72px; margin: 0 auto 1.25rem;
  background: rgba(201,168,76,0.1); border: 2px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

.welcome-box h2 {
  font-family: 'Aref Ruqaa', serif;
  font-size: 1.6rem; color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.welcome-box p {
  color: var(--text-secondary); font-size: 0.9rem;
  line-height: 1.7; margin-bottom: 1.5rem;
}

.welcome-close {
  background: var(--gradient-gold); color: #0a0e1a;
  border: none; padding: 0.7rem 2rem; border-radius: 12px;
  font-family: 'Noto Naskh Arabic', serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}

.welcome-close:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201,168,76,0.35); }

/* ===== COUNTER WIDGET ===== */
.countdown-widget {
  display: flex; gap: 1rem; justify-content: center;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem 1.25rem;
  text-align: center; min-width: 80px;
}

.countdown-num {
  font-family: 'Cinzel', serif;
  font-size: 2rem; font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}

.countdown-label {
  color: var(--text-muted); font-size: 0.75rem; margin-top: 0.25rem;
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: var(--gradient-hero);
  padding: 5rem 2rem 3rem;
  margin-top: 108px;
  text-align: center;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(201,168,76,0.08), transparent);
}

.page-hero h1 {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--text-primary); position: relative;
}

.page-hero .hero-sub {
  color: var(--text-secondary); margin-top: 0.5rem; font-size: 1rem;
  position: relative;
}

/* ===== BADGE LABEL ===== */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.75rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}

.badge-gold { background: rgba(201,168,76,0.15); color: var(--accent-gold); border: 1px solid var(--border); }
.badge-teal { background: rgba(13,148,136,0.15); color: var(--accent-teal-light); }
.badge-navy { background: rgba(30,58,110,0.2); color: #7ba3e0; }

/* ===== COMMENTS SECTION ===== */
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px; padding: 1.25rem;
  display: flex; gap: 1rem;
}

.comment-avatar {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--gradient-gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Aref Ruqaa', serif; font-size: 1.1rem;
  color: #0a0e1a; font-weight: 700;
}

.comment-body { flex: 1; }
.comment-author { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; }
.comment-date { color: var(--text-muted); font-size: 0.75rem; }
.comment-text { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; margin-top: 0.4rem; }

.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; padding: 1.5rem;
  margin-top: 1.5rem;
}

.form-group { margin-bottom: 1rem; }
.form-label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 0.4rem;
}

.form-control {
  width: 100%; background: var(--bg-secondary);
  border: 1px solid var(--border-light); border-radius: 10px;
  padding: 0.7rem 1rem; color: var(--text-primary);
  font-family: 'Noto Naskh Arabic', serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s; direction: rtl;
}

.form-control:focus { border-color: var(--accent-gold); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ===== DECORATIVE ELEMENTS ===== */
.gold-line {
  height: 1px; background: var(--gradient-gold);
  border: none; margin: 0.5rem 0; opacity: 0.4;
}

.dot-pattern {
  position: absolute; opacity: 0.03;
  background-image: radial-gradient(circle, #c9a84c 1px, transparent 1px);
  background-size: 24px 24px;
  inset: 0; pointer-events: none;
}

/* ===== ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.slide-right { opacity: 0; transform: translateX(30px); transition: all 0.6s ease; }
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* ===== MOBILE MENU ===== */
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }

  .nav-menu.open {
    display: flex; flex-direction: column;
    position: fixed; top: 70px; right: 0; left: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem; z-index: 999;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section { padding: 3rem 1.25rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .quick-bar { padding: 0.5rem 1rem; }
  .ai-chat-window { width: calc(100vw - 2rem); left: 1rem; }
  .news-ticker { margin-top: 70px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 1rem; }
  .welcome-box { padding: 1.75rem 1.25rem; }
}

/* ===== TABLE STYLES ===== */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--accent-navy);
  color: var(--accent-gold-light);
  font-family: 'Aref Ruqaa', serif;
  padding: 0.9rem 1rem; text-align: center;
  font-weight: 700; font-size: 0.9rem;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 0.75rem 1rem; text-align: center;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: background 0.2s;
}

.data-table tr:hover td { background: var(--bg-card-hover); }
.data-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; overflow: hidden;
  overflow-x: auto;
}

/* ===== MAP EMBED ===== */
.map-wrap {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-light);
  aspect-ratio: 16/7;
}

.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.tab-btn {
  padding: 0.5rem 1.25rem; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  color: var(--text-secondary); cursor: pointer;
  font-family: 'Noto Naskh Arabic', serif; font-size: 0.85rem;
  transition: all 0.25s;
}

.tab-btn.active, .tab-btn:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== GALLERY GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 12px; overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  position: relative;
  border: 1px solid var(--border-light);
}

.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}

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

.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 1rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption { color: #fff; font-size: 0.85rem; font-weight: 600; }

/* ===== PROFILE CARD ===== */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.profile-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--accent-navy), #0d1f45);
  position: relative;
}

.profile-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(201,168,76,0.15), transparent);
}

.profile-avatar-wrap {
  position: absolute; bottom: -40px; right: 2rem;
}

.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid var(--accent-gold);
  object-fit: cover;
  background: var(--bg-card);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.profile-body { padding: 3.5rem 2rem 2rem; }
.profile-name {
  font-family: 'Aref Ruqaa', serif; font-size: 1.5rem;
  color: var(--text-primary); margin-bottom: 0.25rem;
}

.profile-title { color: var(--accent-gold); font-size: 0.9rem; margin-bottom: 1rem; }
.profile-bio { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; }

.profile-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.profile-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem; border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary); font-size: 0.82rem;
  text-decoration: none; transition: all 0.25s;
}

.profile-link:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.profile-link i { font-size: 0.9rem; }

/* ===== TOP STUDENTS ===== */
.rank-1 .rank-num { color: #ffd700; }
.rank-2 .rank-num { color: #c0c0c0; }
.rank-3 .rank-num { color: #cd7f32; }

.rank-num {
  font-family: 'Cinzel', serif; font-size: 1.6rem;
  font-weight: 700; line-height: 1;
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px; padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all 0.3s;
}

.student-card:hover {
  border-color: var(--accent-gold);
  transform: translateX(-4px);
  box-shadow: var(--shadow-card);
}

.student-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gradient-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Aref Ruqaa', serif; font-size: 1.2rem;
  color: #0a0e1a; font-weight: 700; flex-shrink: 0;
}

.student-info { flex: 1; }
.student-name { font-weight: 700; font-size: 0.95rem; }
.student-class { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.2rem; }
.student-score {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--accent-gold);
}
