/* ======================================
   المصحف الذهبي - الأنماط الرئيسية
   Golden Quran - Main Styles
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #d1fae5;
  --gold: #b7791f;
  --gold-light: #f6d860;
  --gold-dark: #92600a;
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --bg-main: #fafaf7;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0,0,0,0.08);
  --quran-bg: #fdf8ee;
  --quran-text: #2d1a0a;
  --header-bg: rgba(255,255,255,0.95);
  --gradient-start: #064e3b;
  --gradient-end: #059669;
}

[data-theme="dark"] {
  --primary: #34d399;
  --primary-dark: #10b981;
  --primary-light: #064e3b;
  --gold: #f6d860;
  --gold-light: #fef08a;
  --text-dark: #f9fafb;
  --text-medium: #d1d5db;
  --text-light: #9ca3af;
  --bg-main: #0f1117;
  --bg-card: #1a1f2e;
  --border: #2d3748;
  --shadow: rgba(0,0,0,0.3);
  --quran-bg: #1a1208;
  --quran-text: #fef3c7;
  --header-bg: rgba(15,17,23,0.95);
  --gradient-start: #022c22;
  --gradient-end: #064e3b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  direction: rtl;
  line-height: 1.7;
  transition: background-color 0.3s, color 0.3s;
}

/* ======== HEADER ======== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px var(--shadow);
  transition: all 0.3s;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}

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

.logo-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-medium);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.nav-link .nav-icon {
  font-size: 1rem;
}

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

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

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.mobile-menu-btn {
  display: none;
}

/* ======== MOBILE NAV ======== */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.5);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-panel {
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  padding: 2rem 1.5rem;
  overflow-y: auto;
  box-shadow: -4px 0 20px var(--shadow);
}

/* ======== HERO ======== */
.hero {
  background: linear-gradient(160deg, var(--gradient-start) 0%, var(--gradient-end) 60%, #10b981 100%);
  padding: 5rem 1.5rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero-bismillah {
  font-family: 'Amiri Quran', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-light);
  color: var(--gradient-start);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(246,216,96,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246,216,96,0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

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

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

.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ======== CARDS ======== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 15px var(--shadow);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--primary);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.2rem;
}

.card-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* ======== QURAN READER ======== */
.quran-container {
  max-width: 800px;
  margin: 0 auto;
}

.quran-controls {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 15px var(--shadow);
}

.surah-selector {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-main);
  color: var(--text-dark);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s;
}

.surah-selector:focus {
  outline: none;
  border-color: var(--primary);
}

.reader-settings {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}

.font-size-ctrl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.font-size-ctrl label {
  font-size: 0.85rem;
  color: var(--text-medium);
  font-weight: 600;
}

.font-size-ctrl input[type="range"] {
  -webkit-appearance: none;
  width: 100px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
}

.font-size-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
}

.quran-display {
  background: var(--quran-bg);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(183,121,31,0.2);
  box-shadow: 0 4px 30px rgba(183,121,31,0.1);
  position: relative;
  overflow: hidden;
  max-height: 600px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

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

.surah-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(183,121,31,0.2);
}

.surah-name-arabic {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
}

.surah-info {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.bismillah {
  font-family: 'Amiri Quran', serif;
  font-size: 2rem;
  text-align: center;
  color: var(--quran-text);
  margin-bottom: 2rem;
  line-height: 2;
}

.quran-text-wrap {
  direction: rtl;
  text-align: justify;
}

.quran-line {
  font-family: 'Amiri Quran', serif;
  font-size: 1.6rem;
  line-height: 2.5;
  color: var(--quran-text);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.5s;
  cursor: pointer;
  display: inline;
}

.quran-line.highlighted {
  background: rgba(5,150,105,0.15);
  color: var(--primary-dark);
  border-right: 3px solid var(--primary);
  padding-right: 0.75rem;
}

.ayah-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  margin: 0 0.3rem;
  vertical-align: middle;
}

/* ======== AUDIO PLAYER ======== */
.audio-player {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 15px var(--shadow);
}

.player-info {
  text-align: center;
  margin-bottom: 1rem;
}

.player-surah {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1rem;
}

.player-reciter {
  font-size: 0.85rem;
  color: var(--text-light);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.play-btn {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(5,150,105,0.4);
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(5,150,105,0.5);
}

.ctrl-btn {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ctrl-btn:hover {
  background: var(--primary);
  color: white;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s;
}

.time-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reciter-select {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-dark);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  cursor: pointer;
}

/* ======== AZKAR PAGE ======== */
.azkar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.azkar-category-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  color: var(--text-dark);
  font-family: 'Cairo', sans-serif;
}

.azkar-category-btn:hover,
.azkar-category-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow);
}

.azkar-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.azkar-category-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.azkar-category-count {
  font-size: 0.8rem;
  color: var(--text-light);
}

.zikr-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 15px var(--shadow);
  margin-bottom: 1.5rem;
}

.zikr-text {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  line-height: 2;
  color: var(--text-dark);
  text-align: right;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--quran-bg);
  border-radius: 12px;
  border-right: 4px solid var(--primary);
}

.zikr-translation {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.zikr-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.zikr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.counter-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.5rem 1.5rem;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.75rem;
}

.counter-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.counter-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.75rem;
  margin-right: 0.5rem;
}

/* ======== PROPHETS PAGE ======== */
.prophets-timeline {
  position: relative;
  padding: 1rem 0;
}

.prophets-timeline::before {
  content: '';
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--gold));
  transform: translateX(50%);
}

.prophet-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
  align-items: flex-start;
}

.prophet-item:nth-child(even) {
  flex-direction: row-reverse;
}

.prophet-dot {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-main);
  top: 1.5rem;
  z-index: 1;
}

.prophet-card {
  flex: 1;
  max-width: calc(50% - 2rem);
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 15px var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
}

.prophet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--shadow);
}

.prophet-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.prophet-body {
  padding: 1.5rem;
}

.prophet-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.prophet-title {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.prophet-desc {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.7;
}

.prophet-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.prophet-read-btn:hover {
  background: var(--primary);
  color: white;
}

/* ======== MODAL ======== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  border-radius: 24px 24px 0 0;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #ef4444;
}

.modal-body {
  padding: 2rem;
}

.modal-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.modal-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-medium);
}

.modal-text p {
  margin-bottom: 1rem;
}

.modal-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

/* ======== ADMIN ======== */
.admin-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--gradient-start), #1e3a5f);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-login-card {
  background: white;
  border-radius: 28px;
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-logo .logo-icon {
  margin: 0 auto 0.75rem;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  border-radius: 20px;
}

.admin-logo h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gradient-start);
}

.admin-logo p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-main);
  color: var(--text-dark);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.error-msg {
  background: #fee2e2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
}

.success-msg {
  background: #d1fae5;
  color: #065f46;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid #a7f3d0;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(5,150,105,0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5,150,105,0.4);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ======== DASHBOARD ======== */
.dashboard {
  min-height: 100vh;
  background: var(--bg-main);
}

.dashboard-header {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.dashboard-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 1.5rem 1rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-medium);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  margin-bottom: 0.25rem;
  text-decoration: none;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.dashboard-content {
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ======== FOOTER ======== */
.site-footer {
  background: var(--gradient-start);
  color: white;
  padding: 4rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo .logo-title {
  color: white;
}

.footer-logo .logo-subtitle {
  color: var(--gold-light);
}

.footer-desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 1rem;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ======== STATS SECTION ======== */
.stats-section {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  padding: 4rem 1.5rem;
  color: white;
}

.stats-row {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold-light);
  display: block;
}

.stat-item-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* ======== ANIMATIONS ======== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

/* ======== SCROLL INDICATOR ======== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  z-index: 9999;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.1s;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .prophets-timeline::before {
    display: none;
  }
  
  .prophet-item,
  .prophet-item:nth-child(even) {
    flex-direction: column;
  }
  
  .prophet-card {
    max-width: 100%;
  }
  
  .prophet-dot {
    display: none;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
  }
  
  .sidebar-item {
    white-space: nowrap;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .quran-display {
    padding: 1.5rem 1rem;
  }
  
  .quran-line {
    font-size: 1.3rem;
  }
}

/* ======== UTILITY ======== */
.text-gold { color: var(--gold); }
.text-primary { color: var(--primary-dark); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Page Loader */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--gradient-start);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  transition: opacity 0.5s, visibility 0.5s;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

#page-loader .loader-logo {
  font-size: 3rem;
  animation: spin 2s linear infinite;
}

#page-loader p {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--gold-light);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--gradient-start);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
  pointer-events: all;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* Search */
.search-bar {
  position: relative;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.search-input {
  width: 100%;
  padding: 0.9rem 3rem 0.9rem 1.25rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dark);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(5,150,105,0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ======================================
   إضافات نسخة PHP المحسنة
   Copyright © 2026 Moussaoui Mustapha - baramejpro.com
   ====================================== */
.hero-pro {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-soft {
  background: linear-gradient(135deg,#fffdf7,#f8fafc);
  padding: 4rem 1.5rem;
}
.resource-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1.25rem;
}
.resource-card, .article-view-card, .admin-editor-card, .admin-list-card, .notice-panel, .empty-state-panel {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:0 10px 30px var(--shadow);
}
.resource-card {
  padding:1.35rem;
  display:flex;
  flex-direction:column;
  gap:0.8rem;
}
.resource-icon {
  width:52px;height:52px;border-radius:16px;
  background:linear-gradient(135deg,var(--primary-light),#ecfeff);
  color:var(--primary-dark);
  display:flex;align-items:center;justify-content:center;
  font-size:1.45rem;
}
.resource-title {font-size:1.1rem;font-weight:800;color:var(--text-dark);}
.resource-meta {font-size:0.82rem;color:var(--primary-dark);font-weight:700;}
.resource-desc {font-size:0.92rem;color:var(--text-medium);margin-top:0.35rem;}
.btn-sm {padding:0.55rem 1rem;font-size:0.85rem;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}
.btn-danger {background:#dc2626;color:#fff;border:none;padding:0.55rem 1rem;border-radius:10px;cursor:pointer;font-family:'Cairo',sans-serif;}
.article-card-link {text-decoration:none;color:inherit;}
.article-shell {max-width:900px;margin:0 auto;padding:2rem 1.5rem 4rem;}
.article-view-card {padding:1.5rem;overflow:hidden;}
.article-meta-bar {display:flex;gap:0.5rem;flex-wrap:wrap;margin-bottom:1rem;}
.article-view-title {font-size:clamp(1.8rem,3vw,2.6rem);font-weight:900;color:var(--text-dark);margin-bottom:0.75rem;}
.article-view-excerpt {font-size:1.05rem;color:var(--text-medium);margin-bottom:1.25rem;}
.article-view-image {width:100%;max-height:420px;object-fit:cover;border-radius:18px;border:1px solid var(--border);margin-bottom:1.5rem;}
.article-view-content p {margin-bottom:1rem;color:var(--text-medium);font-size:1rem;line-height:2;}
.library-hero {padding:4rem 1.5rem;text-align:center;background:linear-gradient(135deg,#064e3b,#047857);color:#fff;}
.library-hero h1 {font-size:clamp(1.8rem,4vw,3rem);font-weight:900;margin-bottom:0.75rem;}
.library-hero p {opacity:0.9;max-width:760px;margin:0 auto;}
.notice-panel, .empty-state-panel {padding:1.25rem;}
.empty-state-panel {text-align:center;max-width:560px;margin:3rem auto;}
.mini-header-btn {
  padding:0.55rem 1rem;
  border-radius:10px;
  background:rgba(255,255,255,0.16);
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.dashboard-flash {
  margin:1rem 1.5rem 0;
  padding:0.9rem 1rem;
  border-radius:14px;
  background:#dcfce7;
  color:#166534;
  font-weight:700;
}
.dashboard-flash-error {background:#fee2e2;color:#991b1b;}
.dashboard-section-title {font-size:1.35rem;font-weight:900;color:var(--text-dark);margin-bottom:1.25rem;}
.form-grid-2 {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
.admin-table-wrap {overflow:auto;}
.admin-table {width:100%;border-collapse:collapse;font-size:0.92rem;}
.admin-table th,.admin-table td {padding:0.9rem 0.75rem;border-bottom:1px solid var(--border);text-align:right;vertical-align:top;}
.admin-table th {background:var(--bg-main);color:var(--text-dark);font-weight:800;}
.table-actions {display:flex;gap:0.5rem;flex-wrap:wrap;align-items:center;}
@media (max-width: 768px) {
  .form-grid-2 {grid-template-columns:1fr;}
  .article-shell {padding:1.25rem 1rem 3rem;}
}
