/* =========================================
   JALAN KELUAR V2 PREMIUM STYLES
========================================= */

:root {
    --primary: #0f5132;
    --primary-dark: #146c43;
    --secondary: #f8f9fa;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --gold: #d4af37;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 12px 30px rgba(0,0,0,0.08);
    --radius: 18px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

/* =========================================
   NAVBAR
========================================= */

.navbar {
    padding: 14px 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
}

.navbar-brand img {
    display: block;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin-left: 10px;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}


/* =========================================
   HERO SECTION V3 (ULTRA PREMIUM)
========================================= */

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 100px 0 80px;
    text-align: center;

    background: linear-gradient(
        135deg,
        #f7f3ea 0%,
        #efe7d8 45%,
        #ece2cf 100%
    );
}

/* BACKGROUND + DOOR + OVERLAY */
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to right,
            rgba(247,243,234,0.97) 0%,
            rgba(247,243,234,0.88) 40%,
            rgba(247,243,234,0.4) 70%,
            transparent 100%
        ),
        url('/assets/img/door-light.png') no-repeat right center;

    background-size: contain;
    opacity: 1;
    pointer-events: none;
}

/* GLOW BESAR */
.hero-section::after {
    content: "";
    position: absolute;

    right: -180px;
    top: -120px;

    width: 600px;
    height: 600px;

    background: radial-gradient(
        circle,
        rgba(255,215,140,0.55) 0%,
        rgba(255,215,140,0.25) 40%,
        rgba(255,215,140,0.08) 70%,
        transparent 100%
    );

    filter: blur(60px);
    animation: glowMove 7s ease-in-out infinite alternate;
}

/* LIGHT PULSE DARI PINTU */
.hero-section .light-beam {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60%;
    height: 100%;

    background: linear-gradient(
        to left,
        rgba(255,220,140,0.18),
        transparent 70%
    );

    animation: beamPulse 5s ease-in-out infinite;
    pointer-events: none;
}

/* KABUT HALUS */
.hero-section .mist {
    position: absolute;
    inset: 0;

    background: radial-gradient(
        circle at bottom,
        rgba(255,255,255,0.25),
        transparent 60%
    );

    opacity: 0.6;
    animation: mistMove 12s ease-in-out infinite alternate;
    pointer-events: none;
}

/* CONTENT */
.hero-section > .container {
    position: relative;
    z-index: 2;
}

/* =========================================
   TYPOGRAPHY (ENHANCED)
========================================= */

.hero-badge {
    display: inline-block;
    background: rgba(15,81,50,0.12);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;

    backdrop-filter: blur(6px);
    border: 1px solid rgba(15,81,50,0.1);
}

.hero-title {
    font-size: 3.1rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;

    color: #1c1c1c;

    text-shadow:
        0 1px 0 #fff,
        0 6px 20px rgba(0,0,0,0.08);
}

.hero-title span {
    color: var(--primary);
    text-shadow: 0 4px 16px rgba(15,81,50,0.35);
}

.hero-subtitle {
    max-width: 760px;
    margin: 0 auto 35px;
    color: var(--text-muted);
    font-size: 1.12rem;
    line-height: 1.9;
}

/* =========================================
   BUTTON UPGRADE
========================================= */

.hero-actions .btn-success {
    background: linear-gradient(135deg, #0f5132, #146c43);
    border: none;
    box-shadow: 0 6px 20px rgba(15,81,50,0.25);
}

.hero-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15,81,50,0.35);
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes glowMove {
    0% { transform: translate(0,0); opacity: 0.6; }
    100% { transform: translate(-40px,25px); opacity: 1; }
}

@keyframes beamPulse {
    0%,100% { opacity: 0.2; }
    50% { opacity: 0.45; }
}

@keyframes mistMove {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(-20px); opacity: 0.7; }
}


/* =========================================
   SEARCH BAR
========================================= */

.search-box {
    max-width: 720px;
    margin: 40px auto 0;
    background: white;
    border-radius: 60px;
    padding: 10px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 50px;
}

.search-box button {
    border-radius: 50px;
    padding: 12px 24px;
}

/* =========================================
   BUTTONS
========================================= */

.btn-success {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-success:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-success {
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 600;
}

/* =========================================
   CARDS
========================================= */

.card {
    border: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.card-body {
    padding: 28px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-text {
    color: var(--text-muted);
    min-height: 90px;
}

.bookmark-note {
    background: #f7fbf7;
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    color: #374151;
}

.bookmark-note strong {
    display: block;
    color: var(--primary);
    margin-bottom: 3px;
}

/* =========================================
   CATEGORY SECTION
========================================= */

.category-card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--radius);
    transition: 0.3s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,81,50,0.1);
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 15px;
}

/* =========================================
   SECTION GENERAL
========================================= */

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    max-width: 680px;
    margin: 0 auto 50px;
}

/* =========================================
   FOOTER
========================================= */

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.site-footer h5 {
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.site-footer a:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-brand {
    max-width: 360px;
    margin: 0 auto;
}

.site-footer hr {
    border-color: rgba(0,0,0,0.08);
}

.site-footer small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer .d-flex a {
    font-size: 0.95rem;
    font-weight: 500;
}

@media (min-width: 992px) {
    .footer-brand {
        margin: 0;
    }
}

/* =========================================
   SECTION BOX
========================================= */

.section-box {
    background: white;
    padding: 28px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.3rem;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        border-radius: 24px;
    }

    .search-box button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
        line-height: 1.8;
    }

    .hero-badge {
        text-align: center;
    }

    .section-title,
    .section-subtitle {
        text-align: center;
        padding-left: 12px;
        padding-right: 12px;
    }

    .card-text {
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions a {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }
}

/* =========================================
   LIVE SEARCH DROPDOWN
========================================= */

.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-top: 10px;
    overflow: hidden;
    z-index: 999;
    border: 1px solid var(--border);
}

.search-item {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
    transition: 0.3s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(15,81,50,0.05);
}

.search-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.search-item small {
    color: var(--text-muted);
    display: block;
    line-height: 1.4;
}

.search-item.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 18px;
}

/* Search parent fix */
.search-box {
    position: relative;
}

/* =========================================
   MOBILE BOTTOM NAVIGATION (PWA STYLE)
========================================= */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.mobile-bottom-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: 0.3s;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
    color: var(--primary);
}

.mobile-bottom-nav .icon {
    font-size: 1.2rem;
}

.mobile-bottom-nav .mobile-nav-cta {
    color: var(--primary);
}

.mobile-bottom-nav .mobile-nav-cta .icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 85px;
    }
}

/* =========================================
   FORCE OVERRIDE FOOTER LINKS
========================================= */

.site-footer a:not(.btn),
.site-footer a:not(.btn):visited,
.site-footer a:not(.btn):active,
.site-footer a:not(.btn):focus {
    color: var(--text-muted) !important;
    text-decoration: none !important;
}

.site-footer a:not(.btn):hover {
    color: var(--primary) !important;
    text-decoration: none !important;
}

.site-footer .btn-success,
.site-footer .btn-success:visited,
.site-footer .btn-success:focus,
.site-footer .btn-success:active {
    color: #ffffff !important;
}

.site-footer .btn-success:hover {
    color: #ffffff !important;
}

/* =========================================
   CATEGORY LINK SYSTEM
========================================= */

.category-main-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.category-main-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

.category-main-link h6 {
    color: var(--text-dark);
    font-weight: 700;
}

/* =========================================
   ALL CATEGORY SITEMAP
========================================= */

.all-categories-wrapper {
    margin-top: 25px;
}

.all-categories-wrapper h5 {
    font-weight: 700;
    color: var(--primary);
}

.all-categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    max-width: 1000px;
    margin: 0 auto;
    line-height: 2;
}

.all-category-link {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.96rem;
}

.all-category-link:hover {
    background: rgba(15,81,50,0.08);
    color: var(--primary-dark) !important;
    text-decoration: none !important;
}

/* =========================================
   MOBILE CATEGORY IMPROVEMENT
========================================= */

@media (max-width: 768px) {

    .all-categories-list {
        gap: 8px 10px;
        padding: 0 10px;
    }

    .all-category-link {
        font-size: 0.9rem;
    }

    .category-main-link h6 {
        font-size: 0.95rem;
    }
}

/* =========================================
   CATEGORY PAGE
========================================= */

.category-problem-list {
    padding-left: 22px;
}

.category-problem-list li {
    margin-bottom: 18px;
    color: var(--text-dark);
}

.category-problem-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.category-problem-list a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.category-problem-list small {
    color: var(--text-muted);
    line-height: 1.6;
    display: block;
}

/* =========================================
   SPACING REFINEMENT + BACK BUTTON FIX
========================================= */

.btn.mb-4 {
    margin-bottom: 1.25rem !important;
}

.section-back-btn {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    display: inline-block;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Hero internal pages lebih rapat */
.hero-section.py-5 {
    padding-top: 2.8rem !important;
    padding-bottom: 1.6rem !important;
}

.hero-section.py-5 .hero-title {
    margin-bottom: 12px !important;
}

.hero-section.py-5 .hero-subtitle {
    margin-bottom: 10px !important;
}

/* Section setelah hero lebih rapat */
.hero-section.py-5 + section.py-5 {
    padding-top: 0.8rem !important;
}

.section-box {
    margin-bottom: 18px !important;
}

/* =========================================
   BUTTON TEXT FIX GLOBAL
========================================= */

.btn-success,
.btn-success:visited,
.btn-success:focus,
.btn-success:active,
.btn-success:hover {
    color: #ffffff !important;
}

/* =========================================
   SEARCH BUTTON MOBILE POLISH
========================================= */

.search-box button {
    white-space: nowrap;
}

/* =========================================
   CATEGORY CARD TITLE FIX
========================================= */

.category-card h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text-dark);
}

/* =========================================
   CATEGORY PAGE ORDERED LIST POLISH
========================================= */

.category-problem-list {
    padding-left: 24px;
    margin: 0;
}

.category-problem-list li {
    margin-bottom: 18px;
    padding-left: 4px;
}

/* =========================================
   MOBILE GLOBAL POLISH
========================================= */

@media (max-width: 768px) {

    .py-5 {
        padding-top: 2.2rem !important;
        padding-bottom: 2.2rem !important;
    }

    .hero-section.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 1.1rem !important;
    }

    .hero-section.py-5 .hero-title {
        margin-bottom: 10px !important;
    }

    .hero-section.py-5 .hero-subtitle {
        margin-bottom: 8px !important;
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-section.py-5 + section.py-5 {
        padding-top: 0.5rem !important;
    }

    .section-back-btn {
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        display: inline-block;
    }

    .section-box {
        padding: 22px;
    }

    .category-card {
        padding: 24px 16px;
    }

    .search-box {
        padding: 12px;
    }

    .search-box input {
        padding: 14px 16px;
    }

    .hero-actions {
        gap: 12px;
    }

    .hero-actions a {
        width: 100%;
    }
}

/* =========================================
   ARABIC TEXT SUPPORT
========================================= */

.arabic-text {
    text-align: center;
    margin: 0;
    padding: 0;
}

.arabic-original {
    font-family: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
    direction: rtl;
    unicode-bidi: embed;
    display: block;
    font-size: 1.65rem;
    line-height: 1.9;
    margin: 0 0 6px 0;
    padding: 0;
}

.arabic-translation {
    direction: ltr;
    unicode-bidi: plaintext;
    display: block;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    white-space: normal;
    color: var(--text-dark);
}

.arabic-translation br {
    display: block;
    margin: 2px 0;
    content: "";
}

/* =========================================
   PROBLEM ACTION BUTTONS + RATING
========================================= */

.rating-stars {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-stars button {
    background: rgba(15,81,50,0.08);
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.rating-stars button:hover {
    background: rgba(15,81,50,0.18);
    transform: translateY(-2px);
}

.problem-line-list {
    margin: 0;
    padding-left: 1.2rem;
}

.problem-line-list li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.problem-check-list {
    list-style: none;
    padding-left: 0;
}

.problem-check-list li {
    position: relative;
    padding-left: 30px;
}

.problem-check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* =========================================
   PROBLEM DETAIL V3
========================================= */

.problem-detail-page {
    padding: 32px 0 0;
    background: linear-gradient(180deg, #fbfcfb 0%, #f6f9f6 100%);
}

.problem-detail-container {
    max-width: 1040px;
}

.problem-detail-page .section-back-btn {
    border: 1px solid rgba(15,81,50,0.12);
    background: #fff;
    color: var(--text-dark);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.04);
}

.problem-detail-hero {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
}

.problem-detail-hero .hero-badge {
    margin-bottom: 18px;
}

.problem-detail-hero h1 {
    color: var(--primary);
    font-size: 3.1rem;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 18px;
}

.problem-detail-hero p {
    color: #374151;
    font-size: 1.08rem;
    margin: 0;
}

.problem-content-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 26px;
    align-items: start;
    background: #fff;
    border: 1px solid rgba(15,81,50,0.06);
    border-radius: 10px;
    padding: 30px 42px;
    margin-bottom: 16px;
    box-shadow: 0 10px 28px rgba(17,24,39,0.055);
}

.problem-card-icon,
.problem-cta-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #eef4ef;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
}

.problem-card-body h4 {
    font-size: 1.35rem;
    margin: 0 0 10px;
    font-weight: 800;
    color: var(--text-dark);
}

.problem-card-body p {
    margin-bottom: 0;
    color: #111827;
}

.problem-content-card .arabic-text {
    text-align: center;
}

.problem-content-card .arabic-original {
    color: var(--primary);
    font-size: 2.7rem;
    line-height: 2.05;
    text-align: center;
    letter-spacing: 0;
    margin-bottom: 12px;
    text-wrap: balance;
}

.problem-dalil-text .arabic-translation {
    font-size: 1.08rem;
    color: #1f2937;
    line-height: 1.75;
}

.arabic-source {
    color: var(--primary);
    font-weight: 800;
    margin-top: 8px;
}

.problem-cta-card {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #f1f8f1, #fbfdfb);
    border: 1px solid rgba(15,81,50,0.06);
    border-radius: 10px;
    padding: 26px 36px;
    margin: 18px 0 24px;
    box-shadow: 0 10px 28px rgba(17,24,39,0.045);
}

.problem-cta-icon {
    background: var(--primary);
    color: #fff;
}

.problem-cta-card h4 {
    font-weight: 800;
    margin: 0 0 6px;
}

.problem-cta-card p {
    margin: 0;
    color: #374151;
}

.problem-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 48px;
    max-width: 700px;
    margin: 0 auto 34px;
}

.problem-action-row .btn {
    width: 100%;
    background: #fff;
    color: var(--primary) !important;
    border: 1px solid rgba(15,81,50,0.55);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(17,24,39,0.04);
}

.problem-related-section {
    margin-top: 30px;
    padding-bottom: 34px;
}

.problem-related-section h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.problem-related-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.problem-related-pill {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 14px 16px;
    background: #fff;
    color: var(--text-dark);
    text-decoration: none;
    border: 1px solid rgba(15,81,50,0.06);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(17,24,39,0.055);
    font-weight: 700;
    line-height: 1.35;
}

.problem-related-pill:hover {
    color: var(--primary);
}

.problem-related-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef4ef;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.problem-card-icon svg,
.problem-cta-icon svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.problem-icon-warning svg {
    color: #92400e;
}

.problem-summary-card {
    background: linear-gradient(135deg, #ffffff, #f7fbf7);
}

.problem-alert-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 22px;
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 22px 28px;
    margin-bottom: 16px;
}

.problem-alert-card h4 {
    font-weight: 800;
    margin: 0 0 6px;
    color: #78350f;
}

.problem-alert-card p {
    margin: 0;
    color: #4b5563;
}

.problem-dua-text {
    background: #f8fbf8;
    border-left: 4px solid var(--primary);
    padding: 16px 18px;
    border-radius: 8px;
    line-height: 1.85;
}

.problem-checklist {
    display: grid;
    gap: 10px;
}

.problem-checklist label {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    cursor: pointer;
    line-height: 1.6;
}

.problem-checklist input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--primary);
}

.problem-checklist input:checked + span {
    color: var(--text-muted);
    text-decoration: line-through;
}

.problem-feedback-card {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 22px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15,81,50,0.08);
    border-radius: 10px;
    padding: 22px 28px;
    margin-bottom: 28px;
    box-shadow: 0 10px 28px rgba(17,24,39,0.045);
}

.problem-feedback-card h4 {
    margin: 0 0 4px;
    font-weight: 800;
}

.problem-feedback-card p {
    margin: 0;
    color: #4b5563;
}

.problem-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.problem-feedback-actions button,
.problem-feedback-actions a {
    border: 1px solid rgba(15,81,50,0.28);
    background: #fff;
    color: var(--primary);
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.problem-feedback-actions button:hover,
.problem-feedback-actions a:hover {
    background: rgba(15,81,50,0.07);
}

.problem-detail-page + .site-footer {
    margin-top: 0 !important;
    background: var(--primary);
    border-top: none;
}

.problem-detail-page + .site-footer > .container {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

.problem-detail-page + .site-footer .row.g-4,
.problem-detail-page + .site-footer hr,
.problem-detail-page + .site-footer .row.text-center.mb-3,
.problem-detail-page + .site-footer #pwa-install-btn,
.problem-detail-page + .site-footer > .text-center.my-4 {
    display: none !important;
}

.problem-detail-page + .site-footer small {
    color: #fff;
}

/* =========================================
   CHAT PAGE
========================================= */

.chat-page-section {
    padding: 54px 0;
    background: linear-gradient(180deg, #fbfcfb 0%, #f1f6f2 100%);
}

.chat-shell {
    max-width: 900px;
    margin: 0 auto;
}

.chat-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 28px;
}

.chat-intro h1 {
    color: var(--primary);
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 1.18;
    margin-bottom: 14px;
}

.chat-intro p {
    color: #4b5563;
    font-size: 1.08rem;
}

.chat-context-card {
    display: grid;
    gap: 4px;
    max-width: 720px;
    margin: 0 auto 18px;
    background: #fff;
    border: 1px solid rgba(15,81,50,0.08);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 8px 22px rgba(17,24,39,0.045);
}

.chat-context-card strong {
    color: var(--primary);
}

.chat-context-card span {
    font-weight: 800;
    color: var(--text-dark);
}

.chat-context-card small {
    color: var(--text-muted);
    line-height: 1.6;
}

.chat-setup-card,
.chat-panel {
    background: #fff;
    border: 1px solid rgba(15,81,50,0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(17,24,39,0.07);
}

.chat-setup-card {
    padding: 28px;
}

.chat-label {
    display: block;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.chat-story-input {
    width: 100%;
    min-height: 190px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    font: inherit;
    line-height: 1.6;
    outline: none;
}

.chat-story-input:focus,
.chat-field:focus {
    border-color: rgba(15,81,50,0.55);
    box-shadow: 0 0 0 4px rgba(15,81,50,0.08);
}

.quick-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.quick-choice {
    border: 1px solid rgba(15,81,50,0.22);
    background: #fff;
    color: var(--primary);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 700;
}

.quick-choice.active {
    background: var(--primary);
    color: #fff;
}

.chat-primary-btn {
    width: 100%;
}

.gender-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gender-btn {
    border: 1px solid rgba(15,81,50,0.22);
    background: #fff;
    color: var(--primary);
    border-radius: 10px;
    padding: 12px;
    font-weight: 800;
}

.gender-btn.active {
    background: var(--primary);
    color: #fff;
}

.chat-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.hidden {
    display: none !important;
}

.chat-panel {
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-height: 620px;
}

.chat-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--primary);
    color: #fff;
}

.chat-panel-header small {
    display: block;
    opacity: 0.9;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.chat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    overflow-y: auto;
    background: #f4efe8;
}

.chat-message {
    max-width: min(82%, 620px);
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 0.98rem;
    line-height: 1.55;
}

.chat-message.user {
    align-self: flex-end;
    background: #dcf8c6;
}

.chat-message.model {
    align-self: flex-start;
    background: #fff;
}

.msg-time {
    color: #6b7280;
    font-size: 0.72rem;
    margin-top: 5px;
    text-align: right;
}

.chat-input-area {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-top: 1px solid var(--border);
}

.chat-input-area textarea {
    resize: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    outline: none;
}

.chat-input-area button {
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    padding: 0 20px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .hero-section::before {
        background-size: 120%;
        opacity: 0.2;
    }

    .hero-section::after {
        width: 300px;
        height: 300px;
        right: -100px;
        top: -80px;
    }

    .problem-detail-page {
        padding-top: 22px;
    }

    .problem-detail-hero h1 {
        font-size: 2.15rem;
    }

    .problem-content-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px;
    }

    .problem-content-card .arabic-text,
    .problem-content-card .arabic-original {
        text-align: center;
    }

    .problem-cta-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px;
    }

    .problem-cta-icon,
    .problem-card-icon {
        margin: 0 auto;
    }

    .problem-action-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .problem-related-list {
        grid-template-columns: 1fr;
    }

    .problem-alert-card,
    .problem-feedback-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 22px;
    }

    .problem-feedback-actions {
        justify-content: center;
    }

    .problem-dalil-text .arabic-original,
    .problem-content-card .arabic-original {
        font-size: 2.15rem;
        line-height: 2;
    }

    .chat-page-section {
        padding: 34px 0;
    }

    .chat-intro h1 {
        font-size: 2rem;
    }

    .chat-setup-card {
        padding: 20px;
    }

    .chat-detail-actions,
    .gender-options {
        grid-template-columns: 1fr;
    }

    .chat-panel {
        min-height: 560px;
    }

    .chat-message {
        max-width: 90%;
    }
}
