/* ═══════════════════════════════════════════════════════
   HOME PAGE — complete rebuild
   Turjman Islam · Islamic website homepage
   ═══════════════════════════════════════════════════════ */

@font-face {
    font-family: 'ITCHandelGothicArabic';
    src: url('../font/Tajawal-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Yuzarsif';
    src: url('../font/Yuzarsif-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Amiri';
    src: url('../font/Amiri-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'ReemKufi';
    src: url('../font/ReemKufi-Regular.ttf') format('truetype');
}

:root {
    --white: #FFF;
    --black: #000;
    --transformBG: #fffaf6;
    --border: rgba(0,0,0,.2);
    --primary: #775347;
    --primaryHover: rgba(119,83,71,.05);
    --secondery: #fdeedb;
    --seconderyHover: #e4d6c5;
    --thirdly: #c79c78;
    --thirdlyHover: #b38c6c;
    --lightGrey: #f8f8f8;
    --margin: 15px;
    --radius: 8px;
    --transition: 0.46s;
    --hero-h: 540px;
    --section-gap: 56px;
    --pad-x: 12.5%;
}

*, *:before, *:after {
    font-family: 'ITCHandelGothicArabic', serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--transformBG);
    display: grid;
    grid-template-areas: "header" "main" "footer";
    gap: 0;
}

body main {
    grid-area: main;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* ─────────────────────────────────────────────
   SHARED SECTION HEADER
───────────────────────────────────────────── */
.home-section {
    padding: 0 var(--pad-x);
    margin-bottom: var(--section-gap);
}

.section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-hd .section-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-hd .section-label .bar {
    width: 4px;
    height: 26px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--primary), var(--thirdly));
    flex-shrink: 0;
}

.section-hd h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Yuzarsif', serif;
}

.section-hd .section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.section-hd .section-actions a,
.section-hd .section-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    font-family: 'ITCHandelGothicArabic', serif;
    cursor: pointer;
    transition: background .18s, color .18s;
    border: 1.5px solid rgba(119,83,71,.22);
    background: transparent;
    color: var(--primary);
}

.section-hd .section-actions a:hover,
.section-hd .section-actions button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ─────────────────────────────────────────────
   1. HERO
───────────────────────────────────────────── */
.hero {
    position: relative;
    height: var(--hero-h);
    overflow: hidden;
    margin-bottom: var(--section-gap);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30,15,10,.3) 0%,
        rgba(119,83,71,.5) 55%,
        rgba(50,28,18,.82) 100%
    );
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px var(--pad-x);
    gap: 6px;
}

.hero-arabic {
    font-family: 'ReemKufi', serif;
    font-size: clamp(52px, 8vw, 96px);
    color: var(--white);
    line-height: 1.1;
    text-shadow: 0 2px 24px rgba(0,0,0,.45);
}

.hero-sep {
    width: 56px;
    height: 2.5px;
    background: var(--thirdly);
    border-radius: 3px;
    margin: 10px auto;
}

.hero-subtitle {
    font-family: 'Yuzarsif', serif;
    font-size: clamp(18px, 3vw, 34px);
    color: var(--secondery);
}

.hero-author {
    font-family: 'Amiri', serif;
    font-size: clamp(13px, 1.8vw, 19px);
    color: rgba(255,255,255,.7);
    margin-top: 2px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 14px;
    font-family: 'ITCHandelGothicArabic', serif;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.hero-cta .cta-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(119,83,71,.55);
}

.hero-cta .cta-primary:hover {
    background: var(--thirdlyHover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(119,83,71,.6);
}

.hero-cta .cta-ghost {
    background: rgba(255,255,255,.14);
    color: var(--white);
    border-color: rgba(255,255,255,.42);
    backdrop-filter: blur(6px);
}

.hero-cta .cta-ghost:hover {
    background: rgba(255,255,255,.26);
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   2. QUICK ACCESS — 6 nav cards
───────────────────────────────────────────── */
.quick-access {
    padding: 0 var(--pad-x);
    margin-bottom: var(--section-gap);
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.qa-card {
    position: relative;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    transition: transform .25s, box-shadow .25s;
}

.qa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

.qa-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.qa-card:hover img { transform: scale(1.07); }

.qa-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(25,12,8,.78) 0%, rgba(0,0,0,.08) 65%);
}

.qa-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--white);
}

.qa-card-label i { font-size: 15px; flex-shrink: 0; }

.qa-card-label span {
    font-family: 'Yuzarsif', serif;
    font-size: 13.5px;
    line-height: 1.3;
}

/* ─────────────────────────────────────────────
   3. STATS BANNER
───────────────────────────────────────────── */
.stats-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #9e6c5b 100%);
    padding: 36px var(--pad-x);
    margin-bottom: var(--section-gap);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--white);
    padding: 10px 16px;
    border-right: 1px solid rgba(255,255,255,.15);
}

.stat-item:last-child { border-right: none; }

.stat-icon { font-size: 22px; opacity: .7; margin-bottom: 6px; }

.stat-num {
    font-family: 'Yuzarsif', serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--secondery);
    line-height: 1;
}

.stat-label { font-size: 13.5px; opacity: .82; margin-top: 2px; }

/* ─────────────────────────────────────────────
   4. RECENT VERSES — horizontal scroll
───────────────────────────────────────────── */
.verses-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.verses-scroll::-webkit-scrollbar { display: none; }

.verse-card {
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid rgba(119,83,71,.1);
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.verse-card:hover {
    background: var(--secondery);
    border-color: var(--thirdly);
    transform: translateY(-3px);
}

.verse-card .vc-surah {
    font-family: 'Yuzarsif', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.verse-card .vc-ayah {
    font-size: 12px;
    color: #999;
}

.verse-card .vc-badge {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--secondery);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--primary);
    width: fit-content;
    transition: background .2s;
}

.verse-card:hover .vc-badge { background: var(--seconderyHover); }

/* ─────────────────────────────────────────────
   5. HADITHS
───────────────────────────────────────────── */
.hadith-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hadith-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 16px;
    background: var(--white);
    border: 1px solid rgba(119,83,71,.1);
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    align-items: start;
}

.hadith-card:hover {
    border-color: var(--thirdly);
    box-shadow: 0 6px 20px rgba(119,83,71,.12);
    transform: translateY(-2px);
}

.hadith-card .hc-num {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--secondery);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Yuzarsif', serif;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.hadith-card .hc-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    line-height: 1.55;
    text-align: left;
}

.hadith-card .hc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hadith-card .hc-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--transformBG);
    border: 1px solid rgba(119,83,71,.1);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    color: #777;
}

/* ─────────────────────────────────────────────
   6. NAMES GRID
───────────────────────────────────────────── */
.names-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.name-tile {
    background: linear-gradient(145deg, var(--primary) 0%, #9a6758 100%);
    border-radius: 16px;
    padding: 22px 16px 18px;
    cursor: pointer;
    transition: transform .22s, box-shadow .22s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(119,83,71,.22);
    position: relative;
    overflow: hidden;
}

.name-tile::before {
    content: '';
    position: absolute;
    top: -22px;
    right: -22px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}

.name-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(119,83,71,.35);
}

.name-tile .nt-arabic {
    font-family: 'Amiri', serif;
    font-size: 36px;
    color: var(--white);
    line-height: 1.2;
}

.name-tile .nt-phonetic {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondery);
}

.name-tile .nt-translate {
    font-size: 12px;
    color: rgba(255,255,255,.65);
}

/* ─────────────────────────────────────────────
   7. ARTICLES SLIDER
───────────────────────────────────────────── */
.articles-slider .splide__track {
    border-radius: 14px;
    cursor: grab;
}

.articles-slider .splide__slide {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    height: 230px;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
}

.articles-slider .splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.articles-slider .splide__slide:hover img { transform: scale(1.04); }

.articles-slider .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(25,12,8,.88) 0%, transparent 100%);
    padding: 30px 16px 14px;
    color: var(--white);
    font-family: 'Yuzarsif', serif;
    font-size: 15px;
    line-height: 1.3;
}

.articles-progress {
    height: 3px;
    background: rgba(119,83,71,.15);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.articles-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--thirdly));
    width: 0;
    transition: width 300ms ease;
    border-radius: 3px;
}

/* ─────────────────────────────────────────────
   8. QUESTIONS GRID
───────────────────────────────────────────── */
.questions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.q-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid rgba(119,83,71,.1);
    padding: 18px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.q-card:hover {
    border-color: var(--thirdly);
    box-shadow: 0 6px 20px rgba(119,83,71,.12);
    transform: translateY(-2px);
}

.q-card .qc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Yuzarsif', serif;
    font-size: 12.5px;
    color: var(--primary);
    background: var(--secondery);
    border-radius: 999px;
    padding: 3px 12px;
    width: fit-content;
}

.q-card .qc-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.q-card .qc-answer {
    background: var(--transformBG);
    border-radius: 10px;
    padding: 12px 14px;
    border-left: 3px solid var(--thirdly);
}

.q-card .qc-answer-lbl {
    font-family: 'Yuzarsif', serif;
    font-size: 11.5px;
    color: var(--thirdly);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: .5px;
}

.q-card .qc-answer p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

/* ─────────────────────────────────────────────
   9. ABOUT BANNER
───────────────────────────────────────────── */
.about-banner {
    padding: 0 var(--pad-x);
    margin-bottom: var(--section-gap);
}

.about-inner {
    background: linear-gradient(135deg, var(--secondery) 0%, #f5e8d5 100%);
    border-radius: 20px;
    padding: 38px 48px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 36px;
    align-items: center;
    border: 1px solid rgba(119,83,71,.12);
    box-shadow: 0 4px 20px rgba(119,83,71,.08);
}

.about-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 6px 20px rgba(119,83,71,.22);
    flex-shrink: 0;
}

.about-text h3 {
    font-family: 'Yuzarsif', serif;
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}

.about-text .about-role {
    font-size: 13px;
    color: var(--thirdly);
    font-weight: 600;
    margin-bottom: 12px;
}

.about-text p {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-cta {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 13px;
    text-decoration: none;
    transition: background .18s;
    border: none;
    cursor: pointer;
    font-family: 'ITCHandelGothicArabic', serif;
}

.about-cta:hover { background: var(--thirdlyHover); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1200px) {
    :root { --pad-x: 6%; }
    .qa-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-banner { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 900px) {
    :root { --hero-h: 420px; --pad-x: var(--margin); }
    .names-grid { grid-template-columns: repeat(2, 1fr); }
    .questions-grid { grid-template-columns: 1fr; }
    .about-inner { grid-template-columns: 1fr; text-align: center; gap: 20px; padding: 28px 24px; }
    .about-avatar { margin: 0 auto; }
}

@media (max-width: 640px) {
    :root { --hero-h: 300px; --section-gap: 38px; }
    .qa-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .qa-card { height: 125px; }
    .stats-banner { padding: 28px var(--margin); }
    .hero-cta a { padding: 10px 20px; font-size: 13px; }
    .hadith-card { grid-template-columns: 42px 1fr; }
    .hadith-card .hc-num { width: 42px; height: 42px; font-size: 17px; }
    .name-tile .nt-arabic { font-size: 28px; }
}

@media (max-width: 480px) {
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
    .names-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stats-banner { grid-template-columns: 1fr 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 14px; }
    .stat-item:nth-last-child(-n+2) { border-bottom: none; }
    .section-hd h2 { font-size: 17px; }
}
