/* ==================== SCHEME DETAIL PAGES - COMPLETE REDESIGN ==================== */

/* Wrapper applied when loaded via loadSchemePage */
.scheme-page-wrapper {
    padding: 0.5rem 1.5rem 2rem 1.5rem;
}

/* ---- Main Scheme Detail Box ---- */
.scheme-detail-box {
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 20px;
    border-top: 5px solid #673AB7;
    box-shadow: 0 8px 32px rgba(103, 58, 183, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle decorative accent */
.scheme-detail-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(103, 58, 183, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Back Button — sits ABOVE the heading ---- */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: #ffffff;
    color: #673AB7;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    border: 2px solid #673AB7;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 1.8rem;
    /* Clear space below before the heading */
    text-decoration: none;
    letter-spacing: 0.2px;
}

.back-btn:hover {
    background: #673AB7;
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.25);
}

/* Heading H3 inside scheme box — comes AFTER the back-btn */
.scheme-detail-box h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #4527A0;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #EDE7F6;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.scheme-detail-box h3::before {
    content: '📋';
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Section subtitles (h4) */
.scheme-detail-box h4.detail-subtitle,
.scheme-detail-box .detail-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #673AB7, #7E57C2) !important;
    padding: 0.65rem 1.2rem !important;
    border-radius: 8px !important;
    margin-top: 2rem !important;
    margin-bottom: 1.2rem !important;
    letter-spacing: 0.3px;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1.2rem !important;
    /* override enhanced-styles padding-left */
}

/* Remove the enhanced-styles left-bar::before on subtitles inside scheme-detail-box */
.scheme-detail-box .detail-subtitle::before,
.scheme-detail-box h4.detail-subtitle::before {
    display: none !important;
    content: none !important;
}

/* Body paragraphs */
.scheme-detail-box p {
    font-size: 1rem;
    line-height: 1.85;
    color: #444444;
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 3px solid #EDE7F6;
}

/* ============================================================
   LISTS — Override enhanced-styles.css completely
   ============================================================ */

/* Reset list-style from enhanced-styles */
.scheme-detail-box .detail-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.5rem 0 !important;
}

/* ---- Each list item: proper padding so bullet NEVER touches text ---- */
.scheme-detail-box .detail-list li {
    font-size: 1rem !important;
    line-height: 1.75 !important;
    color: #444444 !important;
    margin-bottom: 0.7rem !important;

    /* Enough left-padding so the bullet icon has clear space */
    padding: 0.65rem 1rem 0.65rem 3.6rem !important;

    background: #FAFAFA !important;
    border-radius: 8px !important;
    border-left: 3px solid #673AB7 !important;
    position: relative !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
}

.scheme-detail-box .detail-list li:hover {
    background: #F3E5F5 !important;
    transform: translateX(4px) !important;
    padding-left: 3.6rem !important;
    /* prevent jump from enhanced-styles hover */
    color: #333 !important;
}

/* ---- Custom bullet: diamond icon, well-separated from text ---- */
.scheme-detail-box .detail-list:not(.numbered-list) li::before {
    content: '◆' !important;
    position: absolute !important;
    left: 1.2rem !important;
    /* bullet anchored to left */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #673AB7 !important;
    font-size: 0.55rem !important;
    line-height: 1 !important;
    background: none !important;
    /* override enhanced-styles circle background */
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    display: block !important;
    font-weight: normal !important;
}

/* ---- Numbered list ---- */
.scheme-detail-box .detail-list.numbered-list {
    counter-reset: scheme-counter !important;
    list-style: none !important;
}

.scheme-detail-box .detail-list.numbered-list li {
    counter-increment: scheme-counter !important;
    padding-left: 3.8rem !important;
    border-left-color: #9C27B0 !important;
}

.scheme-detail-box .detail-list.numbered-list li::before {
    content: counter(scheme-counter) !important;
    position: absolute !important;
    left: 0.9rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1.6rem !important;
    height: 1.6rem !important;
    background: linear-gradient(135deg, #673AB7, #9C27B0) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* ---- External Link Button ---- */
.scheme-link-external {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.8rem;
    background: linear-gradient(135deg, #673AB7 0%, #4527A0 100%);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.35);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 2rem;
    letter-spacing: 0.2px;
}

.scheme-link-external:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(103, 58, 183, 0.45);
    background: linear-gradient(135deg, #7E57C2 0%, #673AB7 100%);
    color: white;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .scheme-page-wrapper {
        padding: 0.5rem 0.5rem 2rem 0.5rem;
    }

    .scheme-detail-box {
        padding: 1.5rem 1.2rem;
    }

    .scheme-detail-box h3 {
        font-size: 1.35rem;
        margin-bottom: 1.5rem;
    }

    .scheme-detail-box h4.detail-subtitle,
    .scheme-detail-box .detail-subtitle {
        font-size: 1rem !important;
        padding: 0.55rem 1rem !important;
        margin-top: 1.5rem !important;
        flex-wrap: wrap;
    }

    .scheme-detail-box p {
        font-size: 0.95rem;
        padding-left: 0.75rem;
    }

    .scheme-detail-box .detail-list li {
        font-size: 0.93rem !important;
        padding: 0.6rem 0.75rem 0.6rem 3.2rem !important;
    }

    .scheme-detail-box .detail-list:not(.numbered-list) li::before {
        left: 1rem !important;
    }

    .scheme-detail-box .detail-list.numbered-list li {
        padding-left: 3.4rem !important;
    }

    .scheme-detail-box .detail-list.numbered-list li::before {
        left: 0.7rem !important;
    }

    .scheme-link-external {
        padding: 0.75rem 1.3rem;
        font-size: 0.88rem;
        border-radius: 10px;
    }

    .back-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .scheme-detail-box {
        padding: 1.2rem 1rem;
        border-radius: 14px;
    }

    .scheme-detail-box h3 {
        font-size: 1.2rem;
    }

    .scheme-detail-box .detail-list li {
        font-size: 0.9rem !important;
        padding: 0.55rem 0.75rem 0.55rem 3rem !important;
    }

    .scheme-detail-box .detail-list:not(.numbered-list) li::before {
        left: 0.85rem !important;
    }
}