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

:root {
  --primary-color: #1b4332;
  --primary-light: #2d6a4f;
  --primary-accent: #34a853;
  --gold-accent: #d4af37;
  --bg-gradient: linear-gradient(135deg, #f0f7f4 0%, #ffffff 100%);
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', 'Cairo', Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
}

p, table, h1, h2, h3, h4, button {
  font-family: 'Tajawal', 'Cairo', Arial, sans-serif;
}

/* Loading Screen */
.load {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  background: #ffffff url("../images/loding.gif") no-repeat center center;
  background-size: 80px;
  opacity: 0.95;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Header & Navbar */
.header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.logo img {
  height: 48px;
  width: auto;
  display: block;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  color: var(--text-dark);
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu a:hover {
  color: var(--primary-accent);
  background-color: #f1f5f9;
}

.mobile {
  display: none;
}

.button-menu {
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button-menu:hover {
  background: var(--primary-color);
}

#dropdown-menu {
  margin-top: 0.5rem !important;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  min-width: 220px;
}

#dropdown-menu .dropdown-item {
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.65rem 1.2rem;
  text-align: right;
  transition: background 0.15s ease;
}

#dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9;
  color: var(--primary-accent);
}

/* Main Container */
.body {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.2rem;
  text-align: center;
}

/* Title Buttons & Index Description */
.button-index-quran {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  border: none;
  padding: 0.75rem 2.2rem;
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}

.index_txt {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Table Styling */
.table {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2.5rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
}

.table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table th {
  background-color: #f8fafc;
  color: var(--primary-color);
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1rem 1.2rem;
  border-bottom: 2px solid var(--border-color);
  text-align: center;
}

.table td {
  padding: 0.9rem 1.2rem;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.05rem;
  color: var(--text-dark);
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}

.table tr:hover {
  background-color: #f8fafc;
}

.table tr:last-child td {
  border-bottom: none;
}

.surah-link {
  color: var(--primary-light) !important;
  font-weight: 700;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.surah-link:hover {
  color: var(--primary-color) !important;
  background: #e8f5e9;
  text-decoration: none;
}

/* Audio Player Buttons in Reciter Tables */
.table button {
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
  margin: 0 auto;
}

.table button:hover {
  background: var(--primary-color);
  transform: scale(1.08);
}

.table button.is-playing {
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.table a[download] {
  color: var(--primary-light);
  font-size: 1.25rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.table a[download]:hover {
  color: var(--primary-accent);
  transform: translateY(-2px);
}

/* Quran Surah Metadata Cards */
.quran_info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.quran_info p {
  font-family: 'Cairo', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.quran_info ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quran_info li {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  text-align: center;
}

/* Quran Verse Display */
.quran {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.quran h1 {
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 2.3rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.quran p {
  font-family: 'Amiri', serif;
  font-size: 1.7rem;
  line-height: 2.5;
  color: #0f172a;
  text-align: justify;
  text-align-last: center;
  word-spacing: 2px;
  direction: rtl;
  margin: 0;
}

/* Quran PDF Section */
.quran_pdf ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
  padding: 0;
  margin: 1.5rem 0 2.5rem 0;
  list-style: none;
}

.quran_pdf li {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quran_pdf li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pdf_image img {
  max-width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.name_pdf {
  font-family: 'Cairo', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0.8rem 0;
  text-align: center;
}

.pdf_info {
  width: 100%;
  text-align: right;
  margin-bottom: 1.2rem;
}

.pdf_info p {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.35rem 0;
}

.pdf_info span {
  font-weight: 700;
  color: var(--text-dark);
}

.pdf_text a {
  background: var(--primary-light);
  color: #ffffff !important;
  padding: 0.65rem 1.6rem;
  border-radius: 20px;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.pdf_text a:hover {
  background: var(--primary-color);
}

/* Reciters Index Cards (used in Quran-mp3 index) */
.index {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.index:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.index button {
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  pointer-events: none;
}

.index ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.index li {
  margin-bottom: 0.6rem;
}

.index a {
  color: var(--text-dark);
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.index a:hover {
  color: var(--primary-accent);
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1rem 1.5rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

.fot-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.fot-menu a {
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.fot-menu a:hover {
  color: var(--primary-accent);
}

.desing {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
}

.desing a {
  color: var(--primary-accent);
  font-weight: 700;
}

.go-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99;
  background: var(--primary-light);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.go-top:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* Media Queries & Mobile Responsiveness */
@media (max-width: 820px) {
  .header {
    padding: 0.75rem 1.2rem;
  }
  .menu {
    display: none;
  }
  .mobile {
    display: block;
  }
  .body {
    margin: 1.2rem auto;
    padding: 0 0.8rem;
  }
  .quran {
    padding: 1.5rem 1rem;
  }
  .quran h1 {
    font-size: 1.8rem;
  }
  .quran p {
    font-size: 1.4rem;
    line-height: 2.2;
  }
  .button-index-quran {
    font-size: 1.15rem;
    padding: 0.6rem 1.6rem;
  }
  .table th, .table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.95rem;
  }
}
