/* ===================
   SELF-HOSTED FONTS — Amiri (Arabic subset, v30)
   =================== */
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-regular-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/amiri-bold-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-italic-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/amiri-bolditalic-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ===================
   CSS CUSTOM PROPERTIES - Matching al-waeli.com WordPress theme
   =================== */
:root {
  /* Calm Teal palette (Option A) */
  --clr-teal: #4E8B86;
  --clr-title: #17384A;
  --clr-text: #6F7A83;
  --clr-text-dark: #2a2a2a;
  --clr-bg: #ffffff;
  --clr-gray-bg: #F3F3F3;
  --clr-sep: #ebebeb;
  --clr-white: #ffffff;
  --clr-accent: #A9D0C9;
  --button-bg: #4E8B86;
  --button-text: #ffffff;
  /* card-bg: slightly darker than section background so panels sit subtly on the gray page */
  --card-bg: #ebebeb;
  --input-bg: var(--clr-gray-bg); /* match page section background */
  --input-border: #dcdcdc; /* slightly darker border for inputs */
  --muted: #BFC7C6;
  --max-width: 1340px;
  --font-arabic: 'Amiri', 'Noto Naskh Arabic', Helvetica, Arial, Verdana, sans-serif;
  --font-condensed: 'Amiri', 'Open Sans Condensed', Helvetica, Arial, Verdana, sans-serif;
  --font-nav: 'Amiri', 'Roboto Condensed', Helvetica, Arial, Verdana, sans-serif;
}

/* ===================
   RESET & BASE
   =================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: 1.7;
  font-size: 16px;
}
main {
  background-color: var(--clr-gray-bg);
  padding-top: 1px; /* prevents margin-collapse with first child */
  flex: 1 0 auto;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===================
   CIRCULAR THUMBNAILS
   =================== */
/* Utility class if direct markup change is preferred */
.img-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
}
.img-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Audio mega-menu thumbnails */
.main-nav .sub-nav.sub-nav--col5 li a img {
  width: 100px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Keep hero/large banners unchanged — only target card-type images */

/* When cards are placed on a gray content background, make their wrappers blend in
   so the rounded white card areas no longer appear as separate white boxes. This
   targets the common card wrappers inside `.content-row.gray-bg`. */
.content-row.gray-bg .img-card .card-img-wrap,
.content-row.gray-bg .year-card .card-img-wrap,
.content-row.gray-bg .month-card .card-img-wrap,
.content-row.gray-bg .quran-card .card-img-wrap {
  background: var(--clr-gray-bg);
  box-shadow: none; /* remove separate shadow so cards sit flat on the gray surface */
}

/* If you prefer keeping a subtle elevation, use a softer shadow instead:
   box-shadow: 0 2px 6px rgba(0,0,0,0.06); */

/* ===================
   PAGE CONTAINER (Boxed layout)
   =================== */
#page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--clr-white);
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Site header must be positioned so the mobile dropdown (position:absolute) anchors to it */
#site-header {
  position: relative;
}

/* ===================
   HEADER / BRANDING
   =================== */
.header-bar {
  background: var(--clr-white);
  padding: 0;
  display: flex;
  align-items: center;
  position: relative;
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: absolute;
  right: 15px;
  z-index: 100;
}
.hamburger-btn span {
  display: block;
  width: 28px;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

.branding {
  flex: 1;
  min-width: 0;
}
.branding a {
  display: block;
}
.branding img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===================
   NAVIGATION
   =================== */
.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--clr-white);
  z-index: 999;
  border-top: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.main-nav.open {
  display: block;
}
.main-nav li {
  border-bottom: 1px solid #f0f0f0;
}
.main-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--clr-text);
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-nav);
  transition: background 0.2s;
}
.main-nav li a:hover {
  background: var(--clr-gray-bg);
}
.main-nav li a i {
  width: 20px;
  text-align: center;
  color: #797979; /* Match dark grey menu icon */
}
.main-nav li a.active {
  color: var(--clr-title);
  font-weight: 700;
}
.main-nav li a.active i {
  color: var(--clr-title);
}

/* Sub-menu */
.sub-nav {
  display: none;
  background: #fafafa;
}
.main-nav li.sub-open .sub-nav {
  display: flex;
  flex-direction: column;
}
.main-nav li.has-mega-menu.sub-open .sub-nav {
  flex-direction: row;
}
.sub-nav li a {
  padding-right: 48px;
  font-size: 14px;
}
.sub-nav li a img {
  width: 40px;
  height: 50px;
  object-fit: cover;
  border-radius: 12px;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}
.nav-backdrop.active {
  display: block;
}

/* Desktop nav */
@media (min-width: 961px) {
  .hamburger-btn { display: none; }
  .main-nav {
    display: flex !important;
    position: relative;
    flex-direction: row;
    box-shadow: none;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    justify-content: space-between;
    padding: 0;
  }
  .main-nav li {
    border-bottom: none;
    border-left: none;
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
  }
  .main-nav > li + li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: #ddd;
  }
  .main-nav li a {
    padding: 10px 16px;
    font-size: 17px;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
  }
  .main-nav li a:hover {
    color: var(--clr-title);
    background: transparent;
  }
  .main-nav li a.active {
    color: var(--clr-title);
  }
  .main-nav li:not(.has-mega-menu):hover > .sub-nav {
    display: flex;
  }
  .sub-nav {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--clr-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    flex-direction: column;
  }
  /* Quran sub-menu: mega-menu centered under nav bar like the online site */
  .has-mega-menu {
    position: static !important;
  }
  .sub-nav.sub-nav--horizontal {
    flex-direction: row;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    justify-content: center;
    transform: none;
    min-width: unset;
    padding: 20px 0;
    gap: 0;
    white-space: nowrap;
  }
  .sub-nav.sub-nav--horizontal li {
    flex: 0 0 25%;
    max-width: 25%;
    display: flex;
    justify-content: center;
  }
  /* 5-column variant for audio years mega-menu */
  .sub-nav.sub-nav--col5 li {
    flex: 0 0 20%;
    max-width: 20%;
    margin-bottom: 5px;
  }
  .sub-nav.sub-nav--col5 li a img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
  }
  .sub-nav.sub-nav--col5 {
    padding: 16px 0;
    flex-wrap: wrap;
    direction: rtl;
    justify-content: flex-start;
  }
  .sub-nav.sub-nav--horizontal li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 5px;
    font-size: 14px;
    color: var(--clr-text-dark);
  }
  .sub-nav.sub-nav--horizontal li a img {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    display: block;

  }
  .sub-nav li a {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ===================
   IMAGE SLIDER
   =================== */
.slider-wrap {
  position: relative;
  overflow: hidden;
  background: var(--clr-teal);
  height: 413px;
}
.slider-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}
.slide {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--clr-teal);
}
.slider-track img {
  max-height: 413px;
  display: block;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s;
  direction: ltr;        /* Prevent RTL from mirroring the arrow characters */
  unicode-bidi: isolate; /* Extra insurance against character mirroring */
}
.slider-arrow:hover {
  background: #000;
}
.slider-prev { left: 15px; }
.slider-next { right: 15px; }

/* ===================
   SECTION TITLE (separator with text)
   =================== */
.section-sep {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 25px 0 25px;
  padding: 0 20px;
}
.section-sep .sep-line {
  flex: 1;
  height: 4px;
  background: var(--clr-sep);
}
.section-sep h2 {
  color: var(--clr-title);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--font-condensed);
}

/* ===================
   CONTENT ROWS
   =================== */
.content-row {
  padding: 0 0 20px;
}
.content-row.gray-bg {
  background: var(--clr-gray-bg);
}

/* ===================
   GRIDS
   =================== */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 10px 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 10px 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding: 10px 40px;
}

/* ===================
   IMAGE CARD (reciters on homepage)
   =================== */
.img-card {
  text-align: center;
  direction: rtl;
}
.img-card a {
  display: block;
}
.img-card .card-img-wrap {
  overflow: hidden;
  border-radius: 12px; /* Original was ~10px */
  display: inline-block;
  position: relative;
  width: 200px;
  height: 260px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Slight generic shadow */
}
.img-card .card-img-wrap img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  display: block;
  transition: transform 0.3s;
}
.img-card a:hover .card-img-wrap img {
  transform: scale(1.05);
}
.img-card .rollover {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.img-card a:hover .rollover {
  opacity: 1;
}
.img-card h2,
.img-card h3 {
  color: var(--clr-title);
  font-size: 18px;
  margin-top: 10px;
  font-weight: 700;
  font-family: var(--font-condensed);
}

/* Year card */
.year-card {
  text-align: center;
  direction: rtl;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.year-card a {
  display: block;
}
.year-card .card-img-wrap {
  overflow: hidden;
  border-radius: 12px;
  display: inline-block;
  position: relative;
  width: 200px;
  height: 260px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.year-card .card-img-wrap img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s;
}
.year-card .rollover {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 12px;
}
.year-card a:hover .rollover {
  opacity: 1;
}
.year-card img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s;
}
.year-card a:hover img {
  transform: scale(1.03);
}
.year-card h3 {
  color: var(--clr-title);
  font-size: 18px;
  margin-top: 8px;
  font-weight: 700;
  font-family: var(--font-condensed);
}

/* Month card */
.month-card {
  text-align: center;
  direction: rtl;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.month-card a {
  display: block;
}
.month-card .card-img-wrap {
  overflow: hidden;
  border-radius: 12px;
  display: inline-block;
  position: relative;
  width: 200px;
  height: 260px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.month-card .card-img-wrap img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s;
}
.month-card .rollover {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 12px;
}
.month-card a:hover .rollover {
  opacity: 1;
}
.month-card img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s;
}
.month-card a:hover img {
  transform: scale(1.03);
}
.month-card h3 {
  color: var(--clr-title);
  font-size: 22px;
  margin-top: 8px;
  font-weight: 700;
  font-family: var(--font-condensed);
}

/* ===================
   FOOTER
   =================== */
#site-footer {
  background-color: var(--clr-teal);
  padding: 7px 20px;
  text-align: center;
}
#site-footer h4 {
  color: var(--clr-white);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.8;
}

/* ===================
   BACK TO TOP
   =================== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: background 0.3s;
  border-radius: 4px;
}
.back-to-top:hover {
  background: #000;
}
.back-to-top.visible {
  display: flex;
}

/* ===================
   CONTACT FORM / BUTTON STYLES
   =================== */
#contact-form {
  transition: none;
}
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  border: 1px solid var(--input-border);
  background: var(--input-bg) !important;
  color: var(--clr-text-dark);
  transition: box-shadow 0.18s ease, border-color 0.12s ease;
  border-radius: 4px;
  padding: 8px 10px;
  box-shadow: none;
}
#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--clr-teal);
  box-shadow: 0 0 0 4px rgba(78,139,134,0.08);
  background: #fff; /* brighten on focus for clarity */
}

#contact-form button[type="submit"] {
  background: var(--button-bg);
  color: var(--button-text);
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.08s ease;
}
#contact-form button[type="submit"]:hover {
  background: var(--clr-accent);
  transform: translateY(-1px);
}
#contact-form #form-status {
  margin-top: 8px;
}

/* ===================
   QURAN INDEX (2x2 grid)
   =================== */
.quran-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding: 30px 40px;
  direction: ltr;
}
.quran-card {
  text-align: center;
  direction: rtl;
}
.quran-card a {
  display: block;
}
.quran-card .card-img-wrap {
  overflow: hidden;
  border-radius: 20px;
  display: inline-block;
  width: 200px;
  height: 260px;
  position: relative;
}
.quran-card .card-img-wrap img {
  width: 200px;
  height: 260px;
  object-fit: fill;
  display: block;
  transition: transform 0.3s;
}
.quran-card a:hover .card-img-wrap img {
  transform: scale(1.05);
}
.quran-card .rollover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 20px;
}
.quran-card a:hover .rollover {
  opacity: 1;
}
.quran-card h2 {
  color: var(--clr-title);
  font-size: 23px;
  margin-top: 12px;
  font-weight: 700;
  font-family: var(--font-condensed);
}

/* ===================
   SR-ONLY (Visually hidden but accessible to screen readers)
   =================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================
   LECTURE PAGE
   =================== */
.lecture-hero {
  text-align: center;
  padding: 5px 5px 5px 5px;
}
.lecture-hero img {
  width: 200px;
  height: 260px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.lecture-hero h1, .lecture-hero h2 {
  color: var(--clr-title);
  font-size: 20px;
  margin-top: 12px;
  font-weight: 700;
  font-family: var(--font-condensed);
  font-style: italic;
}

.lecture-table {
  width: 100%;
  max-width: 800px;
  margin: 10px auto;
  border-collapse: collapse;
  border: 1px solid #d9edf7;
  table-layout: fixed;
}
.lecture-table thead th {
  background: #d9edf7;
  padding: 8.5px 10px;
  text-align: center;
  font-weight: 600;
  font-style: italic;
  color: #8c95a2;
  font-size: 16px;
  line-height: 15px;
  border: 1px solid #d9edf7;
}
.lecture-table thead th.no-border {
  width: 40px;
  border: none;
  background: #d9edf7;
}
.lecture-table tbody tr:nth-child(odd) {
  background: #f9f9f9;
}
.lecture-table tbody tr:nth-child(even) {
  background: #ffffff;
}
.lecture-table tbody tr:hover {
  background: #ebebeb !important;
}
.lecture-table tbody td {
  padding: 9px 10px;
  font-size: 16px;
  line-height: 15px;
  vertical-align: middle;
  border: 1px solid #d9edf7;
}
.lecture-table .col-num {
  width: 40px;
  text-align: center;
  color: var(--clr-text);
}
.lecture-table .col-listen {
  width: 70px;
  text-align: center;
}
.lecture-table .col-listen img {
  display: inline-block;
  vertical-align: middle;
}
.lecture-table .col-listen a:hover {
  opacity: 0.7;
}

.year-block {
  margin-bottom: 30px;
}
.year-block .year-heading {
  text-align: center;
  padding: 15px 20px;
  border-bottom: 2px solid var(--clr-sep);
}
.year-block .year-heading h3 {
  color: var(--clr-title);
  font-size: 18px;
  font-weight: 600;
}

/* ===================
   SURAH TABLE
   =================== */
#surah-container {
  padding: 10px 20px 30px;
  direction: rtl;
}
.surah-table {
  width: 100%;               /* 100% of centered 600px container */
  max-width: 600px;          /* Exact container width from original */
  margin: 10px auto;
  border-collapse: collapse;
  border: 1px solid #d9edf7;
  direction: rtl;
  table-layout: fixed;
}
.surah-table colgroup col:nth-child(1) { width: 20%; }    /* # column */
.surah-table colgroup col:nth-child(3) { width: 20%; }    /* listen column */
.surah-table thead th {
  background: #d9edf7;
  padding: 8.5px 10px;
  font-weight: 600;
  font-style: italic;
  color: #8c95a2;
  font-size: 16px;
  line-height: 15px;
  border: 1px solid #d9edf7;
  text-align: center;
}
.surah-table thead th.no-border {
  border: none;
  background: #d9edf7;
}
/* Alternating row backgrounds - exact from DevTools */
.surah-table tbody tr:nth-child(odd) {
  background: #f9f9f9;
}
.surah-table tbody tr:nth-child(even) {
  background: #ffffff;
}
.surah-table tbody tr:hover {
  background: #ebebeb !important;
}
.surah-table tbody td {
  padding: 9px 10px;         /* Exact from DevTools - gives 33px row height */
  font-size: 16px;
  line-height: 15px;
  border: 1px solid #d9edf7;
  text-align: center;
}
.surah-table .col-num-s {
  width: 60px;
  text-align: center;
  color: var(--clr-text);
}
.surah-table .col-listen {
  width: 100px;
  text-align: center;
}
.surah-table .col-listen img {
  display: inline-block;
  vertical-align: middle;
}
.surah-table .col-listen i,
.surah-table .col-listen span i {
  font-size: 16px;
  color: #888;
}
.surah-table .col-listen a {
  color: var(--clr-teal);
  font-size: 16px;
}
.surah-table .col-listen a:hover {
  color: var(--clr-title);
}

/* ===================
   QURAN PLAYER PAGE
   =================== */
.quran-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
}
.player-reciter-name {
  color: var(--clr-text);
  font-size: 22px;
  margin-top: 4px;
}
.player-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 5px 0 5px;
}
.player-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.player-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--clr-teal);
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  transition: opacity 0.2s;
}
.player-nav-btn:hover {
  opacity: 0.8;
  color: #fff;
}

/* ===================
   VIDEO PAGE
   =================== */
.video-search-bar {
  display: flex;
  justify-content: center;
  padding: 5px 20px 5px;
}
.video-search-bar input {
  width: 100%;
  max-width: 480px;
  padding: 10px 16px;
  border: 2px solid var(--clr-teal);
  border-radius: 30px;
  font-size: 16px;
  font-family: var(--font-main);
  outline: none;
  background: #fff;
  color: var(--clr-text-dark);
}
.video-search-bar input:focus {
  box-shadow: 0 0 0 3px rgba(0,150,136,0.15);
}
.video-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 20px;
}
.video-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.video-thumb-link {
  display: block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.video-thumb-link img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.video-thumb-link:hover img {
  transform: scale(1.04);
}
.video-card-title {
  font-size: 13px;
  text-align: center;
  margin: 6px 4px 0;
  color: var(--clr-text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-no-results {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #888;
}
.video-load-more-wrap {
  text-align: center;
  padding: 10px 20px 30px;
}
.video-load-more-btn {
  padding: 10px 36px;
  background: var(--clr-teal);
  color: #fff;
  border: 2px solid var(--clr-teal);
  border-radius: 30px;
  font-size: 16px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.video-load-more-btn:hover,
.video-load-more-btn:active {
  background: #4a6d6c;
  border-color: #4a6d6c;
  color: #fff;
  outline: none;
}
.video-load-more-btn:focus:not(:hover) {
  background: var(--clr-teal);
  border-color: var(--clr-teal);
  outline: none;
}

/* Video Player Page */
.video-player-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
.video-player-wrap {
  width: 100%;
  margin-bottom: 16px;
}
/* YouTube 16:9 responsive iframe */
.yt-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}
.yt-iframe-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-player-title {
  text-align: center;
  color: var(--clr-title);
  font-size: 22px;
  font-family: var(--font-condensed);
  margin: 0 0 16px;
}
.video-player-nav {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .video-card-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .video-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
  .video-card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================
   BOOKS PAGE
   =================== */
.books-list {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.book-item:hover {
  transform: translateY(-4px);
}
.book-cover {
  width: 100%;
  max-width: 220px;
  flex-shrink: 0;
}
.book-cover img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.book-item h3 {
  color: var(--clr-text-dark);
  font-size: 18px;
  margin-top: 12px;
}
.book-info {
  flex: 1;
}
.book-info h3 {
  color: var(--clr-text-dark);
  font-size: 18px;
  margin-bottom: 8px;
}
.book-info p {
  color: var(--clr-text);
  font-size: 14px;
  margin-bottom: 10px;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--clr-teal);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  transition: opacity 0.2s;
}
.btn-download:hover {
  opacity: 0.8;
  color: white;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--clr-teal);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.8; color: white; }

/* ===================
   GALLERY
   =================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 20px;
}
.gallery-item {
  cursor: pointer;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox-caption {
  text-align: center;
  color: white;
  padding: 10px;
  font-size: 14px;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  font-size: 28px;
  padding: 10px 14px;
  cursor: pointer;
}
.lb-arrow:hover { background: rgba(255,255,255,0.4); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: white;
  border: none;
  font-size: 30px;
  cursor: pointer;
}

/* ===================
   ABOUT PAGE
   =================== */
.about-content {
  padding: 30px 40px;
  line-height: 2;
  color: var(--clr-text-dark);
  font-size: 15px;
}
.about-content h2 {
  color: var(--clr-title);
  font-size: 22px;
  margin-bottom: 15px;
}
.about-content p {
  margin-bottom: 15px;
}

/* Page hero */
.page-hero {
  text-align: center;
  padding: 25px 20px 10px;
}
.page-hero h1 {
  color: var(--clr-title);
  font-size: 24px;
  font-weight: 600;
}

/* Audio index grids */
.months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 10px 20px;
}
.years-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 10px 20px;
}

/* ===================
   PAGE LOADER / SPINNER
   =================== */
#page-loader {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
#page-loader.active {
  display: flex;
}
.page-loader-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(99, 144, 143, 0.25);
  border-top-color: var(--clr-teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================
   RESPONSIVE - MOBILE
   =================== */
@media (max-width: 960px) {

  /* --- Header: Hide banner image, show clean hamburger bar --- */
  .header-bar {
    padding: 0;
    min-height: 50px;
    border-bottom: 1px solid #eee;
  }
  .branding {
    display: none; /* Hide the banner image on mobile, like the original */
  }
  .hamburger-btn {
    position: static; /* Remove absolute positioning so it flows naturally */
    padding: 14px 16px;
    display: flex;
  }

  /* --- Grids: 2 columns on tablet --- */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .quran-grid { grid-template-columns: 1fr; }
  .months-grid { grid-template-columns: repeat(2, 1fr); }
  .years-grid { grid-template-columns: repeat(3, 1fr); }
  .books-list { grid-template-columns: repeat(2, 1fr); }

  /* --- Cards: Allow images to be smaller --- */
  .img-card .card-img-wrap,
  .year-card .card-img-wrap,
  .month-card .card-img-wrap {
    width: 100%;
    max-width: 180px;
    height: 230px;
  }
  .img-card .card-img-wrap img,
  .year-card .card-img-wrap img,
  .month-card .card-img-wrap img {
    width: 100%;
    height: 230px;
  }
}

@media (max-width: 600px) {
  /* --- Grids: 1 column on small phones --- */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .months-grid { grid-template-columns: 1fr; }
  .years-grid { grid-template-columns: repeat(2, 1fr); }
  .books-list { grid-template-columns: 1fr; }

  /* --- Section title smaller on mobile --- */
  .section-sep h2 { font-size: 16px; }

  /* --- Slider arrows smaller on small screens --- */
  .slider-arrow { width: 34px; height: 34px; font-size: 15px; }
}

.empty-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--clr-text);
  font-size: 16px;
}
