/**
 * ثهلان – طبقة متميزة: جبل التاريخ، ومنارة الثقافة
 * يُحمّل بعد style.css
 */

/* ========== متغيرات إضافية ========== */
:root {
  --glow: 0 0 40px rgba(160, 82, 45, 0.08);
  --glow-strong: 0 0 60px rgba(201, 162, 39, 0.1);
  --gradient-hero: linear-gradient(160deg, #2D2419 0%, #362A20 25%, #4A3D32 50%, #362A20 75%, #2D2419 100%);
  --gradient-accent: linear-gradient(135deg, #C9A227 0%, #A0522D 50%, #8B4513 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
  --border-glow: 1px solid rgba(201, 162, 39, 0.3);
}

[data-theme="dark"] {
  --glow: 0 0 40px rgba(201, 123, 74, 0.06);
  --glow-strong: 0 0 50px rgba(212, 168, 75, 0.08);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
}

/* ========== إمكانية الوصول ========== */
.skip-link {
  position: absolute;
  top: -100px;
  right: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--primary-2);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.25s var(--ease);
  box-shadow: var(--shadow-hover);
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ========== شعار ثهلان الموحد (صورة) ========== */
.logo .logo-icon img {
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========== شعار الهيرو (تاريخ يُروى.. وهوية تتجدد) – بدون خلفية، متناسق مع الصفحة ========== */
.hero-tagline {
  grid-column: 1 / -1;
  margin: 0 0 12px;
  padding: 0;
  text-align: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* «تاريخ يُروى.. وهوية تتجدد»: أبيض دائماً في النمطين الداكن والفاتح */
.hero-tagline,
.hero-tagline *,
[data-theme="dark"] .hero-tagline {
  color: #fff !important;
  background: transparent !important;
}

/* ========== هيرو متميز + خلفية فيديو (شعار مداد / قريباً) خلف الشعار ========== */
.hero {
  background: var(--gradient-hero);
  background-size: 400% 400%;
  animation: heroGradient 14s ease infinite;
  position: relative;
}

/* طبقة تظليل خفيفة فوق الفيديو (الفيديو يظهر من style.css) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ========== قصة الغلاف واختيارات المحرر – يُحدد في hero-boxes.css ========== */

/* ========== بطاقات متميزة ========== */
.card {
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(45, 42, 38, 0.04);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card:hover {
  box-shadow: var(--shadow-hover), var(--glow);
  border-color: rgba(160, 82, 45, 0.25);
}

.card:hover::before {
  opacity: 1;
}

.card .tag {
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(160, 82, 45, 0.2);
}

/* ========== أزرار متميزة ========== */
.btn-primary {
  background: var(--gradient-accent);
  background-size: 200% 200%;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 8px 28px rgba(184, 134, 11, 0.4);
}

/* ========== عناوين الأقسام ========== */
.lane h3 {
  position: relative;
  padding-right: 20px;
  border-right: none;
}

.lane h3::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 5px;
  background: var(--gradient-accent);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(184, 134, 11, 0.25);
}

/* ========== الهيدر ========== */
header {
  background: rgba(245, 241, 235, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

[data-theme="dark"] header {
  background: rgba(26, 24, 22, 0.9);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}

header.scrolled {
  box-shadow: 0 4px 24px rgba(45, 42, 38, 0.08);
}

[data-theme="dark"] header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* ========== الفوتر ========== */
footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  box-shadow: 0 -2px 20px rgba(45, 42, 38, 0.04);
}

[data-theme="dark"] footer {
  background: linear-gradient(180deg, #1f1d1b 0%, var(--bg) 100%);
  box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.15);
}

/* ========== النشرة ========== */
.newsletter {
  background: linear-gradient(145deg, #2D2A26 0%, #1a1816 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.newsletter:hover {
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.25), 0 0 40px rgba(201, 162, 39, 0.06);
}

/* ========== اختيارات المحرر – يُحدد في hero-boxes.css ========== */

/* ========== السايد بلوك ========== */
.side-block {
  box-shadow: 0 4px 24px rgba(45, 42, 38, 0.05);
  border: 1px solid var(--border);
}

.side-block:hover {
  box-shadow: var(--shadow);
  border-color: rgba(160, 82, 45, 0.2);
}

/* ========== قصة الغلاف – يُحدد في hero-boxes.css ========== */

/* النمط الداكن: إزالة أي خلفية بيضاء خلف الشعار (الهيدر والفوتر) */
[data-theme="dark"] .logo-icon,
[data-theme="dark"] .footer-logo img {
  background: transparent !important;
}
