/* ============================================ */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #010713;
    --bg2: #020b1a;
    --panel: #04142b;
    --panel2: #061a35;
    --line: #0756a6;
    --line-soft: rgba(20, 111, 218, 0.38);
    --blue: #1396ff;
    --blue2: #39b6ff;
    --text: #f5f8ff;
    --muted: #9aaac1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #010713;
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    overflow: hidden;
}

button {
    font: inherit;
    color: inherit;
}

.app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background:
        radial-gradient(circle at 48% -5%, rgba(0, 75, 170, 0.13), transparent 32%),
        linear-gradient(180deg, #010815, #020916 70%, #010713);
}

/* =========================================================
   هدر جدید راهنما (فیکس در بالا)
   ========================================================= */
.help-main-header {
    flex: 0 0 72px;
    border-bottom: 1px solid rgba(34, 106, 207, 0.25);
    background: #020b1a;
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.help-header-content {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
}

.help-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.help-header-ball {
    font-size: 28px;
    filter: drop-shadow(0 0 12px rgba(0, 133, 255, 0.4));
}

.help-header-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* =========================================================
   صفحه راهنما
   ========================================================= */
.page {
    position: absolute;
    inset: 0;
}

.guide-page {
    z-index: 10;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% 0, rgba(0, 69, 165, 0.10), transparent 30%),
        #010815;
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-top: 0;
}

.guide-page.open {
    transform: translateX(0);
}

/* =========================================================
   کارت‌های راهنما
   ========================================================= */
.lesson-grid {
    flex: 1;
    overflow-y: auto;
    padding: 80px 16px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #0756a6 transparent;
    margin-top: 0;
}

.lesson-grid::-webkit-scrollbar {
    width: 4px;
}

.lesson-grid::-webkit-scrollbar-thumb {
    background: #0756a6;
    border-radius: 10px;
}

.lesson-card {
    min-height: 90px;
    border: 1px solid rgba(17, 108, 219, 0.4);
    border-radius: 10px;
    background: linear-gradient(145deg, #061b38, #041329);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 1fr 82px;
    grid-template-rows: 1fr 20px;
    align-items: center;
    gap: 4px;
    text-align: start;
}

.lesson-card:hover {
    border-color: #1295ff;
    box-shadow: 0 0 16px rgba(0, 124, 255, 0.18);
}

.lesson-card.active {
    border-color: #1295ff;
    box-shadow: 0 0 20px rgba(0, 124, 255, 0.25);
}

.lesson-card:active {
    transform: scale(0.985);
}

.lesson-text {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    align-self: center;
    padding-right: 5px;
}

.lesson-text b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-text small {
    display: block;
    margin-top: 4px;
    color: #9aacbf;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-card img {
    width: 76px;
    height: 67px;
    object-fit: contain;
    grid-column: 2;
    grid-row: 1;
    filter: drop-shadow(0 0 8px rgba(0, 143, 255, 0.5));
}

.lesson-meta {
    grid-column: 1 / 3;
    grid-row: 2;
    border-top: 1px solid rgba(42, 119, 207, 0.15);
    padding-top: 3px;
    display: flex;
    justify-content: space-between;
    color: #8293ad;
    font-size: 12px;
}

/* =========================================================
   پنل جزئیات
   ========================================================= */
.detail-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    visibility: hidden;
    pointer-events: none;
    isolation: isolate;
}

.detail-layer.open {
    visibility: visible;
    pointer-events: auto;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 3, 12, 0.60);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-layer.open .detail-backdrop {
    opacity: 1;
}

.detail-panel {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    width: min(100%, 500px);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 15%, rgba(52, 57, 255, 0.14), transparent 25%),
        linear-gradient(180deg, #030a1b, #06142c 60%, #041127);
    border-left: 1px solid rgba(42, 130, 255, 0.55);
    box-shadow: -18px 0 50px rgba(0, 40, 125, 0.32);
    transform: translateX(105%);
    transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.detail-layer.open .detail-panel {
    transform: translateX(0);
}

/* =========================================================
   هدر پنل جزئیات
   ========================================================= */
.detail-header {
    flex: 0 0 76px;
    border-bottom: 1px solid rgba(34, 106, 207, 0.25);
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    padding: 12px 14px;
    color: #aebed3;
    font-size: 14px;
    background: #1a1a2e;
    flex-shrink: 0;
    z-index: 10;
}

.detail-header > span {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #d8e8ff;
}

.detail-header .square-button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.detail-header .square-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   محتوای پنل
   ========================================================= */
.detail-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 14px 35px;
    scrollbar-width: thin;
    scrollbar-color: #0756a6 transparent;
}

.detail-content::-webkit-scrollbar {
    width: 4px;
}

.detail-content::-webkit-scrollbar-thumb {
    background: #0756a6;
    border-radius: 10px;
}

/* =========================================================
   تصویر بزرگ
   ========================================================= */
.detail-hero {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.detail-hero img {
    width: 88%;
    max-width: 330px;
    height: 195px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(0, 138, 255, 0.6));
}

.detail-hero-fallback {
    width: 88%;
    max-width: 330px;
    height: 190px;
    display: none;
    place-items: center;
    font-size: 90px;
    filter: drop-shadow(0 0 18px rgba(0, 138, 255, 0.6));
}

/* =========================================================
   عنوان
   ========================================================= */
.detail-title {
    padding: 0 8px;
    text-align: start;
}

.detail-title h2 {
    font-size: 23px;
    line-height: 1.6;
    color: white;
    margin: 0;
}

.detail-title .description {
    color: #9dacc0;
    font-size: 12px;
    line-height: 2;
    margin-top: 3px;
}

.detail-title .intro {
    color: #c0cada;
    font-size: 12px;
    line-height: 2.2;
    margin: 15px 0;
}

/* =========================================================
   لیست جزئیات راهنما (جایگزین آکاردئون)
   ========================================================= */
.detail-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.detail-list-item {
    border: 1px solid rgba(25, 104, 205, 0.43);
    border-radius: 11px;
    background: linear-gradient(145deg, #061a37, #041329);
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-list-item:hover {
    border-color: rgba(22, 143, 255, 0.68);
    box-shadow: 0 0 15px rgba(0, 116, 255, 0.13);
}

.detail-list-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.detail-list-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.75);
    flex-shrink: 0;
}

.detail-list-title h3 {
    font-size: 14px;
    line-height: 1.7;
    color: white;
    margin: 0;
    font-weight: 700;
}

.detail-list-text {
    margin: 0;
    padding-right: 16px;
    color: #b5c1d2;
    font-size: 12px;
    line-height: 2.2;
    text-align: start;
}

/* =========================================================
   واکنش‌گرا
   ========================================================= */
@media (max-width: 480px) {
    .help-main-header {
        flex-basis: 60px;
        height: 60px;
        padding: 0 12px;
    }

    .help-header-content {
        height: 60px;
    }

    .help-header-ball {
        font-size: 22px;
    }

    .help-header-title {
        font-size: 16px;
    }

    .lesson-grid {
        gap: 5px;
        padding: 80px 12px 20px;
    }

    .lesson-card {
        min-height: 78px;
        grid-template-columns: 1fr 62px;
        padding: 8px 10px;
    }

    .lesson-card img {
        width: 56px;
        height: 50px;
    }

    .lesson-text b {
        font-size: 14px;
    }

    .lesson-text small {
        font-size: 12px;
    }

    .lesson-meta {
        font-size: 12px;
    }

    .detail-panel {
        width: 100%;
        border-left: 0;
    }

    .detail-header {
        flex-basis: 72px;
        height: 72px;
    }

    .detail-header > span {
        font-size: 14px;
    }

    .detail-hero {
        min-height: 180px;
    }

    .detail-hero img {
        height: 165px;
    }

    .detail-hero-fallback {
        height: 160px;
        font-size: 70px;
    }

    .detail-title h2 {
        font-size: 20px;
    }

    .detail-list-title h3 {
        font-size: 14px;
    }

    .detail-list-text {
        font-size: 12px;
        line-height: 2;
    }

    .detail-list-item {
        padding: 10px 12px;
    }
}

@media (min-width: 768px) {
    .detail-panel {
        border-radius: 16px 0 0 16px;
    }
}
/* =========================================================
   آکاردئون (فقط در بخش «کسب درآمد» استفاده می‌شود)
   ========================================================= */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.accordion-item {
    overflow: hidden;
    border: 1px solid rgba(25, 104, 205, 0.43);
    border-radius: 11px;
    background: linear-gradient(145deg, #061a37, #041329);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.accordion-item.open {
    border-color: rgba(22, 143, 255, 0.68);
    box-shadow: 0 0 15px rgba(0, 116, 255, 0.13);
}

.accordion-header {
    width: 100%;
    min-height: 60px;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 1fr 34px 36px;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    text-align: start;
    cursor: pointer;
}

.accordion-title-wrap {
    min-width: 0;
}

.accordion-header h3 {
    font-size: 16px;
    line-height: 1.7;
    color: white;
    margin: 0;
    font-weight: 700;
}

.accordion-arrow {
    grid-column: 2;
    grid-row: 1;
    color: #55b7ff;
    font-size: 22px;
    transition: transform 0.3s ease;
    text-align: center;
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-number {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #0a4e9e;
    color: #d8efff;
    font-size: 12px;
    font-weight: 600;
    grid-column: 3;
    grid-row: 1;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 14px;
}

.accordion-content-inner {
    padding: 0 0 14px;
}

.accordion-content p {
    margin: 0 0 8px;
    color: #b5c1d2;
    font-size: 12px;
    line-height: 2.2;
    text-align: start;
    position: relative;
    padding-right: 12px;
}

.accordion-content p::before {
    content: "";
    position: absolute;
    top: 9px;
    right: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.7);
}

@media (max-width: 480px) {
    .accordion-header {
        min-height: 54px;
        padding: 8px 12px;
    }

    .accordion-header h3 {
        font-size: 14px;
    }

    .accordion-number {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .accordion-content p {
        font-size: 12px;
    }
}
