@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* ===== المتغيرات ===== */
:root {
  --green:        #005C2E;
  --green-light:  #007A3D;
  --green-dark:   #003d1e;
  --green-pale:   #e8f5ee;
  --gold:         #C9A227;
  --gold-light:   #f7ebb6;
  --gold-dark:    #9e7d1a;
  --red:          #C41E3A;
  --bg:           #f9f6f0;
  --card:         #ffffff;
  --text:         #1a2a1a;
  --text-muted:   #6b7c6b;
  --border:       #ddd5c0;
  --shadow:       0 4px 24px rgba(0,92,46,0.10);
  --shadow-lg:    0 8px 40px rgba(0,92,46,0.18);
  --radius:       14px;
  --radius-sm:    8px;
}

/* ===== أساسيات ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201,162,39,0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,92,46,0.07) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23C9A227' stroke-width='0.4' opacity='0.18'%3E%3Cpolygon points='60,8 72,42 108,42 80,63 91,97 60,76 29,97 40,63 12,42 48,42'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Cline x1='60' y1='8' x2='60' y2='112'/%3E%3Cline x1='8' y1='60' x2='112' y2='60'/%3E%3Cline x1='20' y1='20' x2='100' y2='100'/%3E%3Cline x1='100' y1='20' x2='20' y2='100'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  min-height: 100vh;
}

/* ===== الهيدر ===== */
header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
  color: white;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'%3E%3Cpolygon points='50,5 61,35 93,35 68,54 79,84 50,65 21,84 32,54 7,35 39,35'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.header-top {
  background: rgba(0,0,0,0.15);
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(201,162,39,0.3);
}

.header-top span { color: var(--gold-light); margin: 0 12px; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 40px;
  position: relative;
}

.emblem {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 0 4px var(--gold), 0 0 0 8px rgba(201,162,39,0.2);
  flex-shrink: 0;
}

.header-text { text-align: center; }

.header-text .gov-label {
  font-size: 13px;
  color: var(--gold-light);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.header-text h1 {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-text .subtitle {
  font-size: 14px;
  color: var(--gold-light);
  margin-top: 4px;
}

/* شريط الذهب أسفل الهيدر */
.header-stripe {
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}

/* ===== شريط الزينة ===== */
.decoration-bar {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark));
  padding: 10px 0;
  text-align: center;
  font-size: 20px;
  letter-spacing: 8px;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== الناف ===== */
nav {
  background: white;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
}

nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

nav a:hover, nav a.active {
  color: var(--green);
  border-bottom-color: var(--green);
  background: var(--green-pale);
}

nav a .nav-icon { font-size: 18px; }

/* ===== المحتوى ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ===== البطاقات ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header .icon { font-size: 28px; }

.card-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.card-header p {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.card-body { padding: 32px 28px; }

/* ===== الحقول ===== */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--red);
  margin-right: 3px;
}

.form-group label .hint {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
  margin-right: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: rtl;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,92,46,0.12);
}

input.error, select.error {
  border-color: var(--red);
}

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

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

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
  box-shadow: 0 4px 15px rgba(0,92,46,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,92,46,0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: white;
  box-shadow: 0 4px 15px rgba(201,162,39,0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,162,39,0.4);
}

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

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

.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ===== الإشعارات ===== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 14px;
}

.alert-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.alert-error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.alert-info {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  color: var(--gold-dark);
}

.alert-icon { font-size: 20px; flex-shrink: 0; }

/* ===== بطاقة النجاح ===== */
.success-card {
  text-align: center;
  padding: 40px 32px;
}

.success-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin: 0 auto 24px;
  box-shadow: 0 0 0 12px rgba(0,92,46,0.1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 12px rgba(0,92,46,0.1); }
  50% { box-shadow: 0 0 0 20px rgba(0,92,46,0.05); }
}

.booking-ref-box {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: white;
  padding: 20px 32px;
  border-radius: var(--radius);
  display: inline-block;
  margin: 20px 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  box-shadow: var(--shadow-lg);
}

.booking-ref-box small {
  display: block;
  font-size: 12px;
  opacity: 0.85;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.booking-details {
  background: var(--green-pale);
  border: 1px solid rgba(0,92,46,0.15);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 20px 0;
  text-align: right;
}

.booking-details .detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,92,46,0.1);
  font-size: 14px;
}

.booking-details .detail-row:last-child { border-bottom: none; }
.booking-details .detail-label { color: var(--text-muted); }
.booking-details .detail-value { font-weight: 700; color: var(--green); }

/* ===== بطاقات الرئيسية ===== */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero-badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid var(--gold);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== بطاقات المعلومات ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

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

.info-card .icon {
  font-size: 44px;
  margin-bottom: 14px;
  display: block;
}

.info-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.info-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== العداد التنازلي ===== */
.countdown-section {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: white;
  padding: 32px;
  border-radius: var(--radius);
  text-align: center;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: '☪';
  position: absolute;
  font-size: 200px;
  opacity: 0.05;
  top: -40px;
  right: -20px;
  line-height: 1;
}

.countdown-section h3 {
  font-size: 16px;
  color: var(--gold-light);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.countdown-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  min-width: 80px;
}

.countdown-box .num {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  display: block;
}

.countdown-box .label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
  display: block;
}

/* ===== لوحة الإدارة ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-card .stat-num {
  font-size: 42px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.stat-card.gold .stat-num { color: var(--gold-dark); }
.stat-card.red .stat-num { color: var(--red); }

/* ===== الجدول ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: white;
}

thead th {
  padding: 14px 16px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--green-pale); }
tbody td { padding: 12px 16px; }

/* ===== الشارات ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.badge-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffcc02; }
.badge-danger  { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ===== الفوتر ===== */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 28px 20px;
  margin-top: 60px;
  font-size: 13px;
}

footer .footer-logo { font-size: 28px; margin-bottom: 8px; }
footer strong { color: var(--gold-light); }
footer .footer-stripe {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto;
  max-width: 200px;
  border-radius: 2px;
}

/* ===== بطاقة الحجز للطباعة ===== */
.print-card {
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
  background: linear-gradient(135deg, #fffdf5, white);
  text-align: center;
}

.print-card .print-title {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
}

/* ===== متجاوب ===== */
@media (max-width: 768px) {
  .header-main { padding: 20px; gap: 16px; }
  .emblem { width: 60px; height: 60px; font-size: 30px; }
  nav a { padding: 12px 14px; font-size: 13px; }
  .card-body { padding: 20px 16px; }
  .container { padding: 24px 12px; }
}

/* ===== تحميل ===== */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== شريط التقدم ===== */
.steps-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.step .step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step.active .step-num { background: var(--green); color: white; }
.step.active { color: var(--green); }
.step.done .step-num { background: var(--gold); color: white; }

.step-line { width: 60px; height: 2px; background: var(--border); margin: 0 4px; }
.step-line.done { background: var(--gold); }
