:root{
  --bg:#f5efe4;
  --surface:#fffdf8;
  --primary:#1f5f3f;
  --primary-light:#2f7a57;
  --gold:#c8a96b;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e7dcc8;
  --shadow:0 12px 40px rgba(0,0,0,.06);
}

[data-theme="dark"]{
  --bg:#000;
  --surface:#0c0c0c;
  --primary:#2f7a57;
  --text:#f3f4f6;
  --muted:#9ca3af;
  --border:#1c1c1c;
  --shadow:0 12px 40px rgba(0,0,0,.4);
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',sans-serif;
}

/* NAVBAR */
.navbar-custom{
  background:rgba(255,253,248,.9);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
  padding:14px 0;
}

[data-theme="dark"] .navbar-custom{
  background:rgba(0,0,0,.85);
}

.brand{
  font-weight:800;
  font-size:24px;
  color:var(--primary);
  text-decoration:none;
}

.icon-btn{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
}

/* HERO */
.hero {
    position: relative;
    z-index: 50 !important; /* Forces the hero container to the front layer */
    pointer-events: auto !important; /* Re-enables pointer interactions explicitly */
    padding: 60px 0;
    text-align: center;
}

/* Ensure the wrapper container inside hero allows interactions */
.hero .container {
    position: relative;
    z-index: 51 !important;
    pointer-events: auto !important;
}

/* Explicitly safeguard interactive elements */
.search-box, 
.filters, 
.filter-btn, 
.search-box input {
    position: relative;
    z-index: 60 !important;
    pointer-events: auto !important;
}

.hero h1{
  font-size:54px;
  font-weight:800;
}

.hero p{
  color:var(--muted);
  max-width:700px;
  margin:auto;
}

.search-box{
  margin-top:30px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:24px;
  padding:14px;
  box-shadow:var(--shadow);
}

.search-box input{
  border:none;
  background:transparent;
  width:100%;
  padding:12px;
  outline:none;
  color:var(--text);
}

/* FILTERS */
.filters{
  display:flex;
  gap:10px;
  justify-content:center;
  margin:25px 0;
  flex-wrap:wrap;
}

.filter-btn{
  padding:10px 18px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  cursor:pointer;
  font-size:14px;
}

.filter-btn.active{
  background:var(--primary);
  color:#fff;
  border-color:var(--primary);
}

/* SURAH GRID */
.surah-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:26px;
  padding:20px;
  box-shadow:var(--shadow);
  transition:.3s;
  height:100%;
}

.surah-card:hover{
  transform:translateY(-5px);
}

.surah-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}

.surah-num{
  width:40px;
  height:40px;
  border-radius:12px;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}

.arabic{
  font-family:'Amiri',serif;
  font-size:22px;
  text-align:right;
}

.meta{
  font-size:13px;
  color:var(--muted);
}

.badge-type{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:#edf7f0;
  color:#1f5f3f;
}

[data-theme="dark"] .badge-type{
  background:#142018;
  color:#8de2b0;
}

.read-btn{
  margin-top:12px;
  width:100%;
  border:none;
  background:var(--primary);
  color:#fff;
  padding:10px;
  border-radius:14px;
}

/* CONTINUE */
.continue-box{
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff;
  padding:30px;
  border-radius:26px;
  margin:40px 0;
}

.continue-box h3{
  font-weight:800;
}
/* Mobile-specific responsive interactive layer fix */
@media (max-width: 991px) {
    .hero {
        position: relative !important;
        z-index: 9999 !important; /* Lifts it above mobile navbar backdrops */
        pointer-events: auto !important; /* Forces mobile browsers to register taps */
    }

    .hero .container,
    .hero .search-box, 
    .hero .filters, 
    .hero .filter-btn, 
    .hero input {
        position: relative !important;
        z-index: 10000 !important; /* Ensures input field and buttons sit on the very top layer */
        pointer-events: auto !important;
    }
}
