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

/* ========================================================
   NEK HUMSAFAR — LUXURY ISLAMIC FAITH ROTATING CARDS (QURAN & HADITH)
   Enhanced High-End Islamic Matrimonial Design
   ======================================================== */

.nh-faith-showcase-section {
    padding: 24px 0 12px 0;
    position: relative;
    z-index: 5;
    background: transparent;
    box-sizing: border-box;
}

/* Ensure stats bar does not awkwardly overlap the faith cards */
.nh-faith-showcase-section + .nh-stats-section {
    margin-top: 22px !important;
    position: relative;
    z-index: 10;
}

.nh-faith-wrapper {
    container-type: inline-size;
    width: 100%;
    margin: 10px 0 14px 0;
    box-sizing: border-box;
}

.nh-faith-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
}

/* Base Card Styling */
.nh-faith-card {
    position: relative;
    border-radius: 24px;
    padding: 26px 28px 22px 28px;
    box-sizing: border-box;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 255px;
    backdrop-filter: blur(8px);
}

.nh-faith-card:hover {
    transform: translateY(-3px);
}

/* Subtle Geometric Watermark Background Emblem */
.nh-faith-watermark {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 120px;
    height: 120px;
    pointer-events: none;
    opacity: 0.045;
    color: currentColor;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nh-faith-card:hover .nh-faith-watermark {
    opacity: 0.08;
    transform: rotate(15deg) scale(1.05);
}

/* ========================================================
   1. QURANIC VERSE CARD (ROYAL GOLD & EMERALD)
   ======================================================== */
.nh-faith-quran-card {
    background: linear-gradient(145deg, #ffffff 0%, #fffdf9 45%, #fbf6ec 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.42);
    box-shadow: 0 14px 38px rgba(183, 137, 61, 0.11), 0 3px 10px rgba(0, 0, 0, 0.03);
    text-align: center;
    color: #9c7128;
}

.nh-faith-quran-card:hover {
    border-color: rgba(212, 175, 55, 0.75);
    box-shadow: 0 18px 46px rgba(183, 137, 61, 0.18), 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Bismillah Header Wrap with Flourishes */
.nh-faith-bismillah-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 12px 0;
    user-select: none;
}

.nh-faith-ornament {
    font-size: 11px;
    color: #c99b45;
    opacity: 0.7;
}

.nh-faith-bismillah {
    font-family: 'Amiri', 'Traditional Arabic', Georgia, serif;
    font-size: clamp(21px, 2.4vw, 27px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    margin: 0;
    background: linear-gradient(135deg, #b7893d 0%, #d8ab50 45%, #966b1e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.04));
}

.nh-faith-verse-content {
    min-height: 125px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2px 0;
}

.nh-faith-arabic {
    font-family: 'Noto Naskh Arabic', 'Amiri', Georgia, serif;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.65;
    color: #043e30;
    margin: 0 0 10px 0;
    direction: rtl;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.nh-faith-translation {
    font-family: 'Georgia', 'Playfair Display', serif;
    font-size: clamp(14.5px, 1.55vw, 17px);
    font-style: italic;
    line-height: 1.58;
    color: #2e3a47;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

.nh-faith-verse-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.24);
    font-size: 11px;
}

.nh-faith-reference-pill {
    background: rgba(201, 155, 69, 0.12);
    border: 1px solid rgba(201, 155, 69, 0.38);
    color: #9c7128;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.22s ease;
    box-shadow: 0 2px 6px rgba(183, 137, 61, 0.06);
}

.nh-faith-reference-pill:hover {
    background: #b7893d;
    color: #ffffff;
    border-color: #b7893d;
    box-shadow: 0 4px 12px rgba(183, 137, 61, 0.25);
    transform: translateY(-1px);
}

.nh-faith-reference-pill svg {
    flex-shrink: 0;
}

/* ========================================================
   2. HADITH CARD (ROYAL EMERALD & MINT)
   ======================================================== */
.nh-faith-hadith-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafffc 50%, #f0fbf6 100%);
    border: 1.5px solid rgba(0, 105, 92, 0.22);
    border-left: 5.5px solid #00695c;
    box-shadow: 0 14px 38px rgba(0, 105, 92, 0.08), 0 3px 10px rgba(0, 0, 0, 0.03);
    text-align: left;
    color: #00695c;
}

.nh-faith-hadith-card:hover {
    border-color: rgba(0, 105, 92, 0.45);
    border-left-color: #004d40;
    box-shadow: 0 18px 46px rgba(0, 105, 92, 0.16), 0 4px 14px rgba(0, 0, 0, 0.05);
}

.nh-faith-kicker-wrap {
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
}

.nh-faith-kicker-badge {
    background: rgba(0, 105, 92, 0.08);
    border: 1px solid rgba(0, 105, 92, 0.22);
    color: #00695c;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 2px 6px rgba(0, 105, 92, 0.05);
}

.nh-faith-kicker-badge svg {
    color: #c99b45;
}

.nh-faith-hadith-content {
    min-height: 125px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 2px 0;
}

.nh-faith-hadith-title-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px 0;
}

.nh-faith-hadith-bullet {
    font-size: 10px;
    color: #c99b45;
}

.nh-faith-hadith-title {
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    color: #00695c;
    letter-spacing: -0.01em;
    margin: 0;
}

.nh-faith-hadith-text {
    font-family: 'Georgia', 'Playfair Display', serif;
    font-size: clamp(14.5px, 1.55vw, 17px);
    font-style: italic;
    line-height: 1.62;
    color: #2e3a47;
    margin: 0;
}

.nh-faith-hadith-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(200, 225, 215, 0.9);
    font-size: 11px;
    color: #556961;
}

.nh-faith-source-pill {
    background: rgba(0, 105, 92, 0.06);
    border: 1px solid rgba(0, 105, 92, 0.18);
    color: #044e3d;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nh-faith-source-pill svg {
    color: #00695c;
    flex-shrink: 0;
}

.nh-faith-link-pill {
    background: rgba(0, 105, 92, 0.08);
    border: 1px solid rgba(0, 105, 92, 0.25);
    color: #00695c;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.22s ease;
}

.nh-faith-link-pill:hover {
    background: #00695c;
    color: #ffffff;
    border-color: #00695c;
    box-shadow: 0 4px 12px rgba(0, 105, 92, 0.25);
    transform: translateY(-1px);
}

/* ========================================================
   CONTROLS: ARROWS & INDICATOR DOTS
   ======================================================== */
.nh-faith-nav-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nh-faith-ctrl-btn {
    background: #ffffff;
    border: 1.5px solid rgba(200, 200, 200, 0.6);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    color: #4a5568;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nh-faith-ctrl-btn:hover {
    background: #c99b45;
    border-color: #c99b45;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(201, 155, 69, 0.3);
    transform: scale(1.08);
}

.nh-faith-hadith-card .nh-faith-ctrl-btn:hover {
    background: #00695c;
    border-color: #00695c;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 105, 92, 0.3);
}

.nh-faith-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nh-faith-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(160, 174, 192, 0.45);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nh-faith-dot.active {
    width: 18px;
    background: linear-gradient(90deg, #c99b45, #dfb256);
    box-shadow: 0 0 8px rgba(201, 155, 69, 0.45);
}

.nh-faith-hadith-card .nh-faith-dot.active {
    background: linear-gradient(90deg, #00695c, #009767);
    box-shadow: 0 0 8px rgba(0, 105, 92, 0.45);
}

/* Smooth Fade & Slide Animation */
@keyframes nhFaithFadeSlide {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nh-faith-animated {
    animation: nhFaithFadeSlide 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================
   CONTAINER QUERIES (ADAPTIVE INSIDE RAIL / COLUMNS)
   ======================================================== */
@container (max-width: 680px) {
    .nh-faith-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .nh-faith-card {
        padding: 20px 20px 18px 20px;
        border-radius: 20px;
        min-height: auto;
    }

    .nh-faith-verse-content,
    .nh-faith-hadith-content {
        min-height: 105px;
    }

    .nh-faith-arabic {
        font-size: 22px;
    }

    .nh-faith-translation,
    .nh-faith-hadith-text {
        font-size: 14.5px;
    }
}

/* ========================================================
   DARK THEME COMPATIBILITY
   ======================================================== */
:root[data-theme=dark] .nh-faith-quran-card,
body.dark-mode .nh-faith-quran-card,
html[data-indianikah-theme=dark] .nh-faith-quran-card {
    background: linear-gradient(145deg, #121c18 0%, #15221e 60%, #172722 100%) !important;
    border-color: rgba(201, 155, 69, 0.42) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5) !important;
}

:root[data-theme=dark] .nh-faith-quran-card:hover,
body.dark-mode .nh-faith-quran-card:hover {
    border-color: rgba(201, 155, 69, 0.75) !important;
}

:root[data-theme=dark] .nh-faith-bismillah,
body.dark-mode .nh-faith-bismillah {
    background: linear-gradient(135deg, #f3d489 0%, #fae8b4 50%, #d8ac4f 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

:root[data-theme=dark] .nh-faith-arabic,
body.dark-mode .nh-faith-arabic {
    color: #6ee7b7 !important;
}

:root[data-theme=dark] .nh-faith-translation,
body.dark-mode .nh-faith-translation {
    color: #f1f5f9 !important;
}

:root[data-theme=dark] .nh-faith-verse-foot,
body.dark-mode .nh-faith-verse-foot {
    border-top-color: rgba(201, 155, 69, 0.25) !important;
}

:root[data-theme=dark] .nh-faith-reference-pill,
body.dark-mode .nh-faith-reference-pill {
    background: rgba(201, 155, 69, 0.18) !important;
    border-color: rgba(201, 155, 69, 0.45) !important;
    color: #f3d489 !important;
}

:root[data-theme=dark] .nh-faith-hadith-card,
body.dark-mode .nh-faith-hadith-card,
html[data-indianikah-theme=dark] .nh-faith-hadith-card {
    background: linear-gradient(145deg, #0e1a17 0%, #12211d 60%, #132420 100%) !important;
    border-color: rgba(45, 75, 65, 0.8) !important;
    border-left: 5.5px solid #10b981 !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5) !important;
}

:root[data-theme=dark] .nh-faith-kicker-badge,
body.dark-mode .nh-faith-kicker-badge {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

:root[data-theme=dark] .nh-faith-hadith-title,
body.dark-mode .nh-faith-hadith-title {
    color: #6ee7b7 !important;
}

:root[data-theme=dark] .nh-faith-hadith-text,
body.dark-mode .nh-faith-hadith-text {
    color: #f1f5f9 !important;
}

:root[data-theme=dark] .nh-faith-hadith-foot,
body.dark-mode .nh-faith-hadith-foot {
    border-top-color: rgba(45, 75, 65, 0.8) !important;
    color: #94a3b8 !important;
}

:root[data-theme=dark] .nh-faith-source-pill,
body.dark-mode .nh-faith-source-pill {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.28) !important;
    color: #6ee7b7 !important;
}

:root[data-theme=dark] .nh-faith-link-pill,
body.dark-mode .nh-faith-link-pill {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

:root[data-theme=dark] .nh-faith-ctrl-btn,
body.dark-mode .nh-faith-ctrl-btn {
    background: #182823 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #cbd5e1 !important;
}

:root[data-theme=dark] .nh-faith-watermark,
body.dark-mode .nh-faith-watermark {
    opacity: 0.08 !important;
}

/* ========================================================
   MEDIA QUERY FALLBACKS FOR OLDER BROWSERS & MOBILE
   ======================================================== */
@media (max-width: 860px) {
    .nh-faith-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nh-faith-card {
        padding: 20px 20px 18px 20px;
        border-radius: 20px;
        min-height: auto;
    }

    .nh-faith-verse-content,
    .nh-faith-hadith-content {
        min-height: 105px;
    }

    .nh-faith-arabic {
        font-size: 22px;
    }

    .nh-faith-translation,
    .nh-faith-hadith-text {
        font-size: 14.5px;
    }
}

@media (max-width: 480px) {
    .nh-faith-showcase-section {
        padding: 16px 0 8px 0;
    }

    .nh-faith-card {
        padding: 18px 16px 16px 16px;
    }

    .nh-faith-verse-content,
    .nh-faith-hadith-content {
        min-height: 95px;
    }

    .nh-faith-arabic {
        font-size: 20px;
        line-height: 1.5;
    }

    .nh-faith-translation,
    .nh-faith-hadith-text {
        font-size: 13.5px;
    }

    .nh-faith-bismillah {
        font-size: 18px;
    }

    .nh-faith-verse-foot,
    .nh-faith-hadith-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nh-faith-nav-controls {
        align-self: flex-end;
    }
}
