:root {
  --bg: #0a0d12;
  --surface: #0f131a;
  --card: #141a23;
  --line: #1f2630;
  --text: #e9eef6;
  --muted: #9aa7b7;
  --accent: #ffb703;
  --accent-2: #219ebc;
  --accent-grad: linear-gradient(135deg, #ffd166, #ffb703);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Tajawal', system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(33,158,188,.12), transparent), var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: rgba(10, 13, 18, 0.65); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { font-weight: 800; letter-spacing: .3px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: var(--shadow); background: #0f131a; }
.brand-name { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#mainNav { display: flex; gap: 10px; }
#mainNav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; transition: background .2s ease, color .2s ease; }
#mainNav a:hover { background: #1d2430; color: #fff; }
.admin-link { color: var(--accent-2) !important; }
.nav-toggle { display: none; background: transparent; color: var(--text); border: 1px solid #2a3340; border-radius: 10px; padding: 8px 12px; }

.hero { position: relative; min-height: 62vh; display: grid; place-items: center; background: linear-gradient(135deg, rgba(33,158,188,.12), rgba(255,183,3,.1)); }
.hero-inner { text-align: center; padding: 24px; }
.hero-inner h1 { font-size: 44px; margin: 0 0 12px; }
.hero-inner p { color: var(--muted); margin: 0 0 18px; }
.btn-primary { background: var(--accent-grad); color: #121212; border: none; padding: 12px 18px; border-radius: 12px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s ease, filter .2s ease; }
.btn-primary:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn-danger { display: inline-block; background: #e63946; color: #fff; padding: 8px 12px; border-radius: 10px; text-decoration: none; }

.section { padding: 60px 0; }
.section-title { font-size: 28px; margin: 0 0 22px; color: var(--accent); position: relative; }
.section-title::after { content: ""; position: absolute; right: 0; bottom: -8px; width: 80px; height: 3px; background: var(--accent-grad); border-radius: 6px; }
.muted { color: var(--muted); }

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

.card { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 40%), var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,0,0,.45); }
.card img { width: 100%; display: block; }
.card .content { padding: 16px; }

.video-card .media { position: relative; padding-top: 56.25%; }
.video-card iframe, .video-card video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.video-card video { object-fit: cover; }
#videos .grid { grid-template-columns: 1fr; }

/* Overlay play button when autoplay is blocked */
.video-card .overlay-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.video-card .overlay-play.show { opacity: 1; pointer-events: auto; }

.about p { line-height: 1.95; }

.news-list { display: grid; gap: 16px; }
.news-item { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.news-item .date { color: var(--muted); font-size: 14px; margin-bottom: 6px; }

.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.contact-card { display: flex; gap: 12px; align-items: center; background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 40%), var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.contact-card .icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(120px 60px at 30% -20%, rgba(255,183,3,.35), rgba(33,158,188,.25)); color: #111; }
.contact-card .details .label { font-size: 13px; color: var(--muted); }
.contact-card .details .link { font-weight: 700; color: var(--text); text-decoration: none; }
.contact .map iframe { width: 100%; height: 320px; border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.cta-bar { display: flex; gap: 10px; margin-top: 18px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 36px; background: var(--surface); }
.site-footer .container { padding: 18px 0; text-align: center; color: var(--muted); }

/* Slider */
.slider { position: relative; width: 100%; height: 62vh; overflow: hidden; border-radius: var(--radius); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.06) saturate(1.05); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); }
.slide .caption { position: absolute; bottom: 24px; right: 24px; background: rgba(20,26,35,.6); backdrop-filter: blur(6px); color: #fff; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); box-shadow: var(--shadow); }
.slide.active { opacity: 1; }
.slider .prev, .slider .next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; box-shadow: var(--shadow); }
.slider .prev { left: 24px; right: auto; }
.slider .next { right: 24px; left: auto; }
.slider .prev:hover, .slider .next:hover { background: rgba(0,0,0,.6); }

/* Admin */
.admin-body { background: #0b0e13; }
.login-card { max-width: 380px; margin: 90px auto; background: var(--card); padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 14px; }
.form label { display: block; margin: 8px 0 6px; color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="url"], .form input[type="date"], .form textarea, .form select, .form input[type="file"] { width: 100%; background: #11151d; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.alert { padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.alert-success { background: rgba(33, 158, 188, .15); border: 1px solid #219ebc; }
.alert-error { background: rgba(230, 57, 70, .15); border: 1px solid #e63946; }
.admin-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.admin-nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 20px 0; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.danger { color: #e63946; }

@media (max-width: 860px) {
  #mainNav { display: none; }
  #mainNav.open { display: flex; flex-direction: column; position: absolute; top: 72px; right: 24px; background: rgba(20,26,35,.9); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
  .nav-toggle { display: inline-block; }
  .contact { grid-template-columns: 1fr; }
  .brand-logo { width: 34px; height: 34px; }
}