
:root {
    --bg: #f6f0e5;
    --gold: #b08d57;
    --gold-light: #d4af37;
    --brown: #5c4033;
    --green: #0f5132;
    --green-light: #198754;
    --text: #2d2d2d;
    --text-muted: #6b5c4e;
    --card-bg: #fffdf8;
    --border: rgba(176,141,87,0.2);
    --shadow: 0 8px 32px rgba(92,64,51,0.12);
    --shadow-hover: 0 16px 48px rgba(92,64,51,0.22);
    

  }

  [data-theme="dark"] {
        --bg: #0f1115;
    --gold: #d4af37;
    --gold-light: #f0c94d;
    --brown: #c8a96b;
    --green: #1f7a53;
    --green-light: #2aab72;
    --text: #f1f1f1;
    --text-muted: #a89880;
    --card-bg: #1a1d24;
    --border: rgba(212,175,55,0.15);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.6);
  }

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

  body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
  }

  /* ===== SCROLLBAR ===== */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

  /* ===== TOP BAR ===== */
  .top-bar {
    background: #3e1d0ec2;
    padding: 9px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.88);
    font-family: 'Cairo', sans-serif;
  }
  .top-bar .hijri { display: flex; align-items: center; gap: 8px; }
  .social-icons { display: flex; align-items: center; gap: 10px; }
  .social-icons a {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    text-decoration: none;
    font-size: 15px;
  }
  .social-icons a:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
  .pulse { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }

  /* ===== HEADER ===== */
  .header {
    position: relative;
    overflow: hidden;
    padding: 32px 40px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /**background: var(--card-bg);**/
    border-bottom: 1px solid var(--border);
  }

  .header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='%23b08d57' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='12' fill='none' stroke='%23b08d57' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 60px 60px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 1;
  }
  .brand-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(15,81,50,0.3);
  }
  .brand-text h1 {
    font-family: 'Aref Ruqaa', serif;
    font-size: 28px;
    color: var(--green);
    line-height: 1.1;
  }
  [data-theme="dark"] .brand-text h1 { color: var(--gold); }
  .brand-text p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

  .sheikh-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    z-index: 1;
  }
  .sheikh-avatar {
    width: 200px;
    height: 200px;
    min-width: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--brown));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(176,141,87,0.4);
    animation: glow 3s ease-in-out infinite;
    overflow: hidden;
  }
  .sheikh-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  .sheikh-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .sheikh-text h3 {
    font-family: 'Aref Ruqaa', serif;
    font-size: 35px;
    color: var(--green);
    font-weight: 700;
    line-height: 1.3;
    padding-right: 30px;
  }
  [data-theme="dark"] .sheikh-text h3 { color: var(--gold); }
  .sheikh-text p { font-size: 14px; color: var(--text-muted); padding-right: 0;}
  @keyframes glow {
    0%,100%{ box-shadow: 0 0 0 3px var(--gold), 0 0 20px rgba(176,141,87,0.3); }
    50%{ box-shadow: 0 0 0 3px var(--gold), 0 0 35px rgba(176,141,87,0.6); }
  }

  /* ===== NAV ===== */
  .nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0f1115;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 4px 20px rgba(15,81,50,0.3);
  }
  .nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 16px 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 3px solid transparent;
    transition: all 0.25s;
    white-space: nowrap;
  }
  .nav a:hover, .nav a.active {
    color: #fff;
    border-bottom-color: var(--gold);
    background: rgba(255,255,255,0.06);
  }
  .nav-spacer { flex: 1; }
  .theme-toggle {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }
  .theme-toggle:hover { background: rgba(255,255,255,0.2); }

  /* hamburger btn — hidden on desktop, shown on mobile */
  .nav-hamburger {
    display: none;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .nav-hamburger:hover { background: rgba(255,255,255,0.22); }
  @media (max-width: 768px) {
    .nav-hamburger { display: flex !important; }
    /* Hide nav links on mobile, show only hamburger + theme */
    .nav > a { display: none; }
    .nav-spacer { display: none; }
  }

  /* ===== SIDEBAR ===== */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.open { display: block; opacity: 1; }
  .sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #0f1115;
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    box-shadow: -8px 0 32px rgba(0,0,0,0.5);
    overflow-y: auto;
  }
  .sidebar.open { right: 0; }
  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(176,141,87,0.2);
  }
  .sidebar-head h3 { font-family: "Aref Ruqaa", serif; color: var(--gold); font-size: 20px; }
  .sidebar-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .sidebar-close:hover { background: rgba(255,255,255,0.16); color: #fff; }
  .sidebar-links { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
  .sidebar-links a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 3px solid transparent;
    transition: all 0.22s;
    font-family: "Cairo", sans-serif;
  }
  .sidebar-links a:hover, .sidebar-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-right-color: var(--gold);
  }
  .sidebar-links a .sl-icon { font-size: 20px; width: 26px; text-align: center; }
  .sidebar-footer {
    padding: 16px 22px;
    border-top: 1px solid rgba(176,141,87,0.15);
    display: flex; align-items: center; justify-content: space-between;
  }
  .sidebar-footer span { color: rgba(255,255,255,0.4); font-size: 12px; }

  /* ===== SKELETON LOADING ===== */
  @keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
  }
  .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
  }
  .sk-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
  .sk-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 0; }
  .sk-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
  .sk-label { height: 10px; width: 60px; }
  .sk-title-1 { height: 14px; width: 90%; }
  .sk-title-2 { height: 14px; width: 65%; }
  .sk-meta { height: 10px; width: 80%; margin-top: 6px; }
  .sk-audio { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
  .sk-circle { width: 52px; height: 52px; min-width: 52px; border-radius: 50%; }
  .sk-audio-info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
  .sk-audio-t { height: 14px; width: 80%; }
  .sk-audio-m { height: 10px; width: 50%; }


  /* ===== HERO ===== */
  .hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
  }
  .hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,#1a0f05 0%,#3a1f0a 40%,#0f1a12 100%);
  }
  .hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpolygon points='40,5 75,25 75,55 40,75 5,55 5,25' fill='none' stroke='white' stroke-width='1.5'/%3E%3Ccircle cx='40' cy='40' r='15' fill='none' stroke='white' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='3' fill='white'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    animation: drift 20s linear infinite;
  }
  @keyframes drift { from{background-position:0 0} to{background-position:80px 80px} }

  .hero-content { position: relative; z-index: 1; padding: 60px 24px; }
  .hero-ayah {
    font-family: 'Aref Ruqaa', serif;
    font-size: clamp(28px, 5vw, 52px);
    color: #fff;
    line-height: 1.5;
    margin-bottom: 16px;
    animation: fadeInDown 1s ease;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  }
  @keyframes fadeInDown { from{opacity:0;transform:translateY(-30px)} to{opacity:1;transform:translateY(0)} }
  .hero-sub {
    color: rgba(255,255,255,0.75);
    font-size: 16px;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease 0.2s both;
  }
  .hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInDown 1s ease 0.4s both;
  }
  .btn-gold {
    background: linear-gradient(135deg, var(--gold), #8a6a38);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(176,141,87,0.4);
  }
  .btn-gold:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(176,141,87,0.6); }
  .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 14px 32px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; transform: translateY(-3px); }

  /* ===== QUICK SECTIONS ===== */
  .quick-sections {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    padding: 0 32px;
  }
  .qs-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 28px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.25s;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-muted);
    min-width: 100px;
  }
  .qs-item:hover { border-bottom-color: var(--gold); color: var(--gold); }
  .qs-item .qs-icon { font-size: 28px; }
  .qs-item span { font-size: 13px; font-weight: 600; }

  /* ===== SECTIONS ===== */
  .section { padding: 60px 32px; }
  .section-alt { background: var(--card-bg); }
  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
  }
  .section-title {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 26px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
  }
  .see-all {
    color: var(--gold);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
  }
  .see-all:hover { gap: 8px; }

  /* ===== VIDEO CARDS ===== */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
  .card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    cursor: pointer;
   /* box-shadow: var(--shadow);*/
   box-shadow: 0 4px 20px rgba(217,119,6,.35);
  }
  .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
  }

  .card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--green), #0a3d26);
    overflow: hidden;
  }
  .card-thumb-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.7;
  }
  .card-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
  }
  .play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .card:hover .play-btn { opacity: 1; }
  .play-circle {
    width: 56px;
    height: 56px;
    background: rgba(176,141,87,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 30px rgba(176,141,87,0.6);
  }

  .card-body { padding: 18px; }
  .card-label {
    font-size: 11px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
  }
  .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
  }
  .card-views { display: flex; align-items: center; gap: 4px; }

  /* ===== AUDIO CARD ===== */
  .audio-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    /*box-shadow: var(--shadow);*/
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(217,119,6,.35);
  }
  .audio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--gold); }
  .audio-play {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(160deg,#1a0f05 0%,#3a1f0a 40%,#0f1a12 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(15,81,50,0.3);
    transition: transform 0.2s;
  }
  .audio-card:hover .audio-play { transform: scale(1.1); }
  .audio-info { flex: 1; min-width: 0; }
  .audio-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .audio-meta { font-size: 12px; color: var(--text-muted); }
  .audio-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
  }
  .wave-bar {
    width: 3px;
    background: var(--gold);
    border-radius: 2px;
    animation: wave-anim 1.2s ease-in-out infinite;
  }
  .wave-bar:nth-child(2) { animation-delay: 0.1s; }
  .wave-bar:nth-child(3) { animation-delay: 0.2s; }
  .wave-bar:nth-child(4) { animation-delay: 0.15s; }
  .wave-bar:nth-child(5) { animation-delay: 0.05s; }
  @keyframes wave-anim {
    0%,100%{ height: 8px; opacity: 0.4; }
    50%{ height: 24px; opacity: 1; }
  }
  /**.audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }**/
.audio-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); gap: 16px; }
  /* ===== BOOK CARD ===== */
  .books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
  .book-card {
    cursor: pointer;
    transition: all 0.35s;
    text-align: center;
    /**margin-right: 51px;**/
  }
  .book-card:hover { transform: translateY(-8px); }
  .book-cover {
    position: relative;
    width: 100%;
    /**aspect-ratio: 3/4;**/
    border-radius: 8px 14px 14px 8px;
    overflow: hidden;
    box-shadow: -6px 6px 20px rgba(0,0,0,0.25), inset -3px 0 8px rgba(0,0,0,0.15);
    margin-bottom: 14px;
  }
  .book-cover-inner {
   /** position: absolute;**/
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
   /** padding: 16px;**/
    font-size: 36px;
  }
  .book-spine {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: rgba(0,0,0,0.2);
  }
  .book-title-text {
    font-family: 'Aref Ruqaa', serif;
    font-size: 14px;
    color: #fff;
    text-align: center;
    line-height: 1.4;
    margin-top: 8px;
  }
  .book-card h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
  .book-card .book-pages { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
  .book-btns { display: flex; gap: 8px; justify-content: center; }
  .book-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Cairo', sans-serif;
    transition: all 0.2s;
  }
  .book-btn-primary { background: var(--gold); color: #fff; }
  .book-btn-secondary { background: var(--border); color: var(--text-muted); border: 1px solid var(--border); }
  .book-btn:hover { opacity: 0.85; transform: scale(0.97); }

  /* ===== QUOTE SECTION ===== */
  .quote-section {
background: linear-gradient(160deg,#1a0f05 0%,#3a1f0a 40%,#0f1a12 100%);
    padding: 60px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .quote-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpolygon points='40,5 75,25 75,55 40,75 5,55 5,25' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 80px 80px;
  }
  .quote-text {
    font-family: 'Aref Ruqaa', serif;
    font-size: clamp(22px, 4vw, 38px);
    color: #fff;
    line-height: 1.6;
    position: relative;
    max-width: 700px;
    margin: 0 auto 12px;
  }
  .quote-source { color: rgba(255,255,255,0.65); font-size: 15px; position: relative; }
  .quote-ornament { font-size: 60px; color: rgba(212,175,55,0.3); line-height: 1; margin-bottom: 12px; }

  /* ===== STATS ===== */
  .stats-section {
    background: #3e1d0ec2;
    padding: 48px 32px;
  }
  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
  .stat-item { text-align: center; }
  .stat-icon { font-size: 32px; margin-bottom: 8px; }
  .stat-num {
    font-family: 'Reem Kufi', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 4px;
  }
  .stat-label { color: rgba(255,255,255,0.7); font-size: 13px; }
  .stat-live { color: #fff; font-size: 12px; display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 4px; }

  /* ===== SEARCH BAR ===== */
  .search-wrap { padding: 24px 32px; background: var(--card-bg); border-bottom: 1px solid var(--border); }
  .search-wrap.in-header { padding: 0; background: transparent; border-bottom: none; width: 100%; max-width: 500px; }
  .search-box {
    min-width: 440px;
    margin: 0 auto;
    position: relative;
  }
  .search-input {
    width: 100%;
    padding: 16px 52px 16px 20px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
  }
  .search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(176,141,87,0.15); }
  .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
  }

  /* ===== ARTICLES / READING SECTION ===== */
  .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
  .article-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
  }
  .article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
  }
  .article-card-top {
    display: flex;
    align-items: stretch;
    min-height: 130px;
  }
  .article-accent {
    width: 6px;
    min-height: 100%;
    flex-shrink: 0;
    border-radius: 0;
  }
  .article-header {
    padding: 20px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
  }
  .article-title {
    /**font-family: 'Reem Kufi', sans-serif;**/
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .article-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    padding: 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    margin-top: auto;
  }
  .article-meta-info {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
  }
  .article-meta-info span { display: flex; align-items: center; gap: 4px; }
  .article-read-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Cairo', sans-serif;
    transition: gap 0.2s;
  }
  .article-read-btn:hover { gap: 8px; }
  /* Featured large card */
  .article-card.featured {
    grid-column: span 2;
    flex-direction: column;
  }
  .article-card.featured .article-accent {
    width: 100%;
    height: 6px;
    min-height: unset;
  }
  .article-card.featured .article-card-top {
    flex: 1;
    flex-direction: column;
    min-height: 160px;
    overflow: hidden;
  }
  .article-card.featured .article-header { padding: 24px 22px 12px; }
  .article-card.featured .article-title { font-size: 20px; -webkit-line-clamp: 3; }
  .article-card.featured .article-excerpt { -webkit-line-clamp: 3; padding: 0 22px; }
  .article-card.featured .article-footer { padding: 14px 22px; }
  .article-featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
  }
  @media (max-width: 768px) {
    .article-card.featured { grid-column: span 1; flex-direction: column; }
    .section-title {font-size: 20px;}
    .audio-grid{grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));}
    .book-cover-inner{position: absolute;}
    .hideonmobile{display: none;}
  }

  /* ===== FATAWA SECTION ===== */
  .fatawa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
  }
  .fatwa-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
  }
  .fatwa-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
  }
  .fatwa-card-head {
    display: flex;
    align-items: stretch;
    gap: 0;
  }
  .fatwa-accent {
    width: 5px;
    flex-shrink: 0;
    border-radius: 0;
  }
  .fatwa-body {
    padding: 18px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .fatwa-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .fatwa-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.5px;
  }
  .fatwa-hot {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
  }
  .fatwa-new {
    background: rgba(15,81,50,0.12);
    color: var(--green-light);
  }
  .fatwa-views-badge {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .fatwa-question {
   /**font-family: 'Reem Kufi', sans-serif;**/
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fatwa-summary {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fatwa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-top: 1px solid var(--border);
    margin-top: auto;
  }
  .fatwa-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
  }
  .fatwa-meta span { display: flex; align-items: center; gap: 3px; }
  .fatwa-read-btn {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Cairo', sans-serif;
    transition: gap 0.2s;
  }
  .fatwa-read-btn:hover { gap: 8px; }

  /* Featured fatwa — spans full width */
  .fatwa-card.fatwa-featured {
    grid-column: 1 / -1;
    flex-direction: row;
    max-height: 180px;
  }
  .fatwa-card.fatwa-featured .fatwa-body {
    padding: 20px 22px 14px;
    justify-content: center;
  }
  .fatwa-card.fatwa-featured .fatwa-question {
    font-size: 19px;
    -webkit-line-clamp: 2;
  }
  .fatwa-card.fatwa-featured .fatwa-summary {
    -webkit-line-clamp: 2;
  }
  @media (max-width: 768px) {
    .fatwa-card.fatwa-featured { grid-column: span 1; flex-direction: column; max-height: unset; }
    .fatawa-grid { grid-template-columns: 1fr; }
  }

  /* ===== FOOTER ===== */
  .footer {
    background: #0a0d12;
    color: rgba(255,255,255,0.75);
    padding: 60px 32px 24px;
  }
  .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 48px; }
  .footer-brand h2 {
    font-family: 'Aref Ruqaa', serif;
    font-size: 24px;
    color: var(--gold);
    margin-bottom: 8px;
  }
  .footer-brand p { font-size: 14px; line-height: 1.7; }
  .footer-col h4 {
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
  .footer-links a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; transition: color 0.2s; }
  .footer-links a:hover { color: var(--gold); }
  .footer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-stat { text-align: center; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 12px; }
  .footer-stat .num { font-family: 'Reem Kufi', sans-serif; font-size: 24px; color: var(--gold-light); }
  .footer-stat .lbl { font-size: 11px; color: rgba(255,255,255,0.5); }
  .newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
  .newsletter-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
  }
  .newsletter-btn {
    padding: 10px 16px;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.2s;
  }
  .newsletter-btn:hover { opacity: 0.85; }
  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
    gap: 12px;
  }
  .footer-bottom a { color: var(--gold); text-decoration: none; }

  /* ===== RADIO BAR ===== */
  .radio-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(10,13,18,0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(176,141,87,0.3);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .radio-bar .r-live { display: flex; align-items: center; gap: 8px; color: #4ade80; font-size: 13px; font-weight: 700; }
  .radio-bar .r-title { color: #fff; font-size: 14px; font-weight: 600; flex: 1; }
  .radio-bar .r-subtitle { color: rgba(255,255,255,0.5); font-size: 12px; }
  .radio-controls { display: flex; align-items: center; gap: 12px; }
  .radio-btn {
    background: var(--gold);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }
  .radio-btn:hover { transform: scale(1.1); }
  .radio-wave { display: flex; align-items: center; gap: 2px; height: 24px; }
  .radio-wave .wb {
    width: 3px;
    background: var(--gold);
    border-radius: 2px;
    animation: wave-anim 1.4s ease-in-out infinite;
  }
  .radio-wave .wb:nth-child(2) { animation-delay: 0.1s; }
  .radio-wave .wb:nth-child(3) { animation-delay: 0.2s; }
  .radio-wave .wb:nth-child(4) { animation-delay: 0.15s; }

  /* ===== MOBILE ===== */
  @media (max-width: 768px) {
    /* Header fixes */
    .header {
      padding: 16px;
      flex-direction: column;
      align-items: stretch;
      gap: 14px;
    }
    .sheikh-info {
      flex-direction: row;
      align-items: center;
      gap: 14px;
    }
    .sheikh-avatar {
      width: 70px;
      height: 70px;
      min-width: 70px;
      font-size: 36px;
    }
    .sheikh-text h3 {
      font-size: 18px;
      padding-right: 0;
      line-height: 1.3;
    }
    .sheikh-text p {
      font-size: 12px;
      padding-right: 0;
    }
    .sheikh-text span {
      font-size: 12px;
    }
    /* Search bar full width on mobile */
    .search-wrap {
      padding: 0;
      background: transparent;
      border-bottom: none;
    }
    .search-box {
      min-width: unset;
      width: 100%;
    }
    .search-input { font-size: 14px; padding: 12px 48px 12px 16px; }

    /* Nav */
    .nav { padding: 0 8px; overflow-x: auto; }
    .nav a { padding: 14px 10px; font-size: 13px; }
    .nav-hamburger { display: flex; }

    /* Sections */
    .section { padding: 40px 16px; }
    .quick-sections { padding: 0 8px; }
    .qs-item { padding: 14px 14px; min-width: 80px; }
    .qs-item .qs-icon { font-size: 22px; }
    .qs-item span { font-size: 11px; }

    .footer { padding: 40px 16px 100px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero { min-height: 380px; }
    .radio-bar { padding: 10px 16px; gap: 10px; }
    .stats-section { padding: 32px 16px; }
    body { padding-bottom: 80px; }

    /* Audio grid single column */
    .audio-grid { /**grid-template-columns: 1fr;**/ }
    /* Books grid 2 col */
    .books-grid { grid-template-columns: repeat(2, 1fr); /**gap: 16px;**/ }
  }

  /* ===== ANIMATIONS ===== */
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-in.visible { opacity: 1; transform: translateY(0); }

  /* ===== READING MODE ===== */
  .reading-mode-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gold);
    border: none;
    width: 42px;
    border-radius: 24px;
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(176,141,87,0.4);
    z-index: 150;
    transition: all 0.3s;
  }
  .reading-mode-btn:hover { transform: translateY(-50%) scale(1.05); }

  /* ===== FLOATING AUDIO PLAYER ===== */
  .float-player {
    position: fixed;
    bottom: -120px;
    left: 0;
    right: 0;
    z-index: 300;
    background: rgba(10,13,18,0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(176,141,87,0.35);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: bottom 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  }
  .float-player.active { bottom: 0; }
  .fp-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(15,81,50,0.4);
    flex-shrink: 0;
  }
  .fp-info { flex: 1; min-width: 0; }
  .fp-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
  }
  .fp-sub { font-size: 11px; color: rgba(255,255,255,0.5); }
  .fp-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .fp-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .fp-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.08); }
  .fp-btn.fp-play {
    background: var(--gold);
    width: 44px; height: 44px; font-size: 17px;
    box-shadow: 0 4px 16px rgba(176,141,87,0.4);
  }
  .fp-btn.fp-play:hover { background: var(--gold-light); }
  .fp-btn.fp-close { background: rgba(255,255,255,0.06); font-size: 13px; }
  .fp-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .fp-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .fp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s;
  }
  .fp-time { font-size: 11px; color: rgba(255,255,255,0.45); white-space: nowrap; }
  .fp-wave { display: flex; align-items: center; gap: 2px; height: 22px; margin-left: 4px; }
  .fp-wave .fw { width: 3px; background: var(--gold); border-radius: 2px; }
  .fp-wave .fw.playing { animation: wave-anim 1.1s ease-in-out infinite; }
  .fp-wave .fw:nth-child(2).playing { animation-delay: 0.1s; }
  .fp-wave .fw:nth-child(3).playing { animation-delay: 0.2s; }
  .fp-wave .fw:nth-child(4).playing { animation-delay: 0.15s; }
  @media (max-width: 600px) {
    .float-player { padding: 10px 12px; gap: 10px; }
    .fp-progress-wrap { display: none; }
    .fp-sub { display: none; }
    .fp-icon { width: 38px; height: 38px; font-size: 18px; }
    .fp-title { font-size: 13px; }
  }
  [data-theme="dark"] .card-title a { color: var(--text); }
  [data-theme="dark"] .audio-title a { color: var(--text); }
  [data-theme="dark"] .audio-meta a { color: var(--text); }
