/*
=========================================================
HOME LANDING CONSOLIDATED CSS

Migrated from landing.js without changing functional
JavaScript. This stylesheet is loaded after the existing
Homepage styles so the approved final cascade remains
authoritative.
=========================================================
*/

/* ===== Book Store slider ===== */
.home-book-store-section {
            padding-top: 42px !important;
            padding-bottom: 42px !important;
        }

        .home-book-store-heading-row {
            width: min(1180px, calc(100% - 28px));
            margin: 0 auto 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            direction: rtl;
        }

        .home-book-store-heading {
            margin: 0 !important;
            text-align: right !important;
        }

        .home-book-store-heading h2 {
            margin-bottom: 0 !important;
        }

        .home-book-store-heading p {
            display: none !important;
        }

        .home-book-store-open {
            text-decoration: none;
            white-space: nowrap;
            border-radius: 16px;
            padding: 13px 24px;
            background: #1F3A2E;
            color: #fff;
            font-weight: 950;
            box-shadow: 0 12px 24px rgba(31,58,46,.16);
        }

        .home-book-store-shell {
            position: relative;
            width: min(1180px, calc(100% - 28px));
            margin: 0 auto;
            padding: 24px 58px;
            border-radius: 30px;
            background:
                radial-gradient(circle at top left, rgba(212,169,90,.16), transparent 32%),
                linear-gradient(180deg, #fff, #FFFCF5);
            border: 1px solid rgba(31,58,46,.08);
            box-shadow: 0 18px 46px rgba(31,58,46,.08);
            overflow: hidden;
        }

        .home-book-store-slider {
            display: flex;
            gap: 14px;
            overflow-x: auto;
            scroll-behavior: smooth;
            scrollbar-width: none;
            -ms-overflow-style: none;
            padding: 4px 0 8px;
        }

        .home-book-store-slider::-webkit-scrollbar {
            display: none;
        }

        .home-book-store-card {
            flex: 0 0 172px;
            width: 172px;
            min-width: 172px;
            background: #FAF6EC;
            border: 1px solid rgba(31,58,46,.08);
            border-radius: 22px;
            overflow: hidden;
            box-shadow: 0 10px 24px rgba(31,58,46,.06);
        }

        .home-book-store-cover {
            aspect-ratio: 3 / 4;
            background: #1F3A2E;
            display: grid;
            place-items: center;
            color: #D4A95A;
            font-size: 2rem;
        }

        .home-book-store-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .home-book-store-info {
            padding: 11px 9px;
            display: grid;
            gap: 6px;
            text-align: center;
        }

        .home-book-store-info h3 {
            margin: 0;
            color: #1F3A2E;
            font-size: .84rem;
            line-height: 1.35;
            min-height: 2.7em;
            overflow: hidden;
        }

        .home-book-store-info span {
            color: #8A6A2A;
            font-weight: 950;
            font-size: .78rem;
        }

        .home-book-store-info strong {
            color: #1F3A2E;
            font-weight: 950;
            font-size: .95rem;
        }

        .home-book-slider-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 5;
            width: 44px;
            height: 44px;
            border-radius: 999px;
            border: 2px solid rgba(31,58,46,.22);
            background: rgba(255,255,255,.96);
            color: #1F3A2E;
            cursor: pointer;
            font-family: Cairo, sans-serif;
            font-weight: 950;
            font-size: 30px;
            line-height: 1;
            display: grid;
            place-items: center;
            box-shadow: 0 10px 26px rgba(31,58,46,.14);
            transition: .2s ease;
        }

        .home-book-slider-btn:hover {
            background: #1F3A2E;
            color: #fff;
            transform: translateY(-50%) scale(1.04);
        }

        .home-book-slider-prev {
            left: 12px;
        }

        .home-book-slider-next {
            right: 12px;
        }

        @media (max-width: 700px) {
            .home-book-store-heading-row {
                display: grid;
                text-align: center;
            }

            .home-book-store-heading {
                text-align: center !important;
            }

            .home-book-store-open {
                width: 100%;
                text-align: center;
            }

            .home-book-store-shell {
                width: calc(100% - 18px);
                padding: 14px 46px;
                border-radius: 24px;
            }

            .home-book-store-card {
                flex-basis: 145px;
                width: 145px;
                min-width: 145px;
            }

            .home-book-slider-btn {
                width: 36px;
                height: 36px;
                font-size: 24px;
            }

            .home-book-slider-prev {
                left: 7px;
            }

            .home-book-slider-next {
                right: 7px;
            }
        }


/* ===== Book Store button ===== */
.home-book-store-open,
        a.home-book-store-open,
        .home-page .home-book-store-open {
            background: linear-gradient(135deg, #173D2D, #1F4D3A) !important;
            color: #FFFFFF !important;
            border: 1px solid rgba(255,255,255,.14) !important;
            text-shadow: 0 1px 2px rgba(0,0,0,.22) !important;
            box-shadow: 0 14px 28px rgba(23,61,45,.20) !important;
        }

        .home-book-store-open:hover,
        a.home-book-store-open:hover {
            background: linear-gradient(135deg, #D4A95A, #B8893A) !important;
            color: #173D2D !important;
            text-shadow: none !important;
            transform: translateY(-1px);
        }

        .home-nav-links a[href="#reviews"],
        .home-nav-links a[href="#/reviews"] {
            display: none !important;
        }


/* ===== Telegram registration field ===== */
/* TELEGRAM_REGISTER_STATIC_FIELD_V1 */
.telegram-register-field-clean {
    display: grid !important;
    gap: 7px !important;
    margin-top: 10px !important;
    text-align: right !important;
    direction: rtl !important;
}

.telegram-register-field-clean label {
    color: #183d2f !important;
    font-weight: 900 !important;
}

.telegram-register-field-clean label b {
    color: #0088cc !important;
    font-weight: 950 !important;
}

.telegram-register-field-clean label em {
    color: #98a2b3 !important;
    font-style: normal !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.telegram-register-field-clean input {
    width: 100% !important;
    height: 44px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 9px !important;
    padding: 10px 12px !important;
    background: #f8fafc !important;
    color: #183d2f !important;
    font-size: 14px !important;
    font-family: inherit !important;
    outline: none !important;
    text-align: left !important;
    direction: ltr !important;
    box-sizing: border-box !important;
}

.telegram-register-field-clean input:focus {
    background: #fff !important;
    border-color: #0088cc !important;
    box-shadow: 0 0 0 3px rgba(0,136,204,.12) !important;
}

.telegram-register-field-clean small {
    color: #667085 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
    font-weight: 700 !important;
}


/* ===== Active-session modal ===== */
.active-session-modal-overlay {
            position: fixed; inset: 0;
            background: rgba(0, 0, 0, 0.55);
            display: flex; align-items: center; justify-content: center;
            z-index: 2147483647; padding: 16px;
            animation: asm-fade-in 0.18s ease-out;
        }
        @keyframes asm-fade-in { from { opacity: 0; } to { opacity: 1; } }
        .active-session-modal-box {
            background: #fff; border-radius: 16px;
            padding: 28px 24px 24px;
            max-width: 440px; width: 100%;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
            text-align: center;
            font-family: 'Cairo', sans-serif;
            animation: asm-pop-in 0.22s cubic-bezier(.2,.9,.3,1);
        }
        @keyframes asm-pop-in {
            from { transform: translateY(20px) scale(.96); opacity: 0; }
            to { transform: translateY(0) scale(1); opacity: 1; }
        }
        .active-session-modal-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
        .active-session-modal-title {
            color: #173D2D; font-size: 18px; font-weight: 700;
            margin: 0 0 10px; line-height: 1.5;
        }
        .active-session-modal-text {
            color: #4a4a4a; font-size: 15px; line-height: 1.7; margin: 0 0 22px;
        }
        .active-session-modal-actions {
            display: flex; flex-direction: column; gap: 10px;
        }
        .active-session-modal-btn {
            border: none; padding: 12px 20px; border-radius: 10px;
            font-size: 15px; font-weight: 600; cursor: pointer;
            font-family: inherit;
            transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.18s ease;
        }
        .active-session-modal-btn.confirm {
            background: #173D2D; color: #fff;
            box-shadow: 0 4px 12px rgba(23, 61, 45, 0.25);
        }
        .active-session-modal-btn.confirm:hover {
            background: #0f2a1f; transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(23, 61, 45, 0.32);
        }
        .active-session-modal-btn.cancel { background: #f1f1f1; color: #444; }
        .active-session-modal-btn.cancel:hover { background: #e5e5e5; }
        @media (min-width: 520px) {
            .active-session-modal-actions { flex-direction: row-reverse; }
            .active-session-modal-btn { flex: 1; }
        }


/* ===== General embedded mobile layout ===== */
/* ===== Mobile landing polish only ===== */
@media (max-width: 768px) {
    .home-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        padding: 10px 12px !important;
        background: rgba(249, 245, 235, .96) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(0,0,0,.06) !important;
    }

    .home-nav {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 0 !important;
    }

    .home-brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
    }

    .home-brand-mark {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        font-size: 22px !important;
    }

    .home-brand strong {
        font-size: 20px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 250px !important;
    }

    .home-brand small {
        font-size: 13px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 250px !important;
    }

    .home-nav-links {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px 10px !important;
        margin: 4px 0 0 !important;
        order: 3 !important;
    }

    .home-nav-links a {
        padding: 7px 6px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        text-align: center !important;
        background: rgba(255,255,255,.35) !important;
        color: #3f4a44 !important;
        font-weight: 800 !important;
    }

    .home-nav-actions {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        order: 4 !important;
        margin-top: 4px !important;
    }

    .home-login-btn,
    .home-signup-btn {
        width: 100% !important;
        min-height: 46px !important;
        padding: 10px 14px !important;
        font-size: 17px !important;
        border-radius: 999px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .home-section {
        padding-top: 34px !important;
        padding-bottom: 34px !important;
    }

    .home-section-heading h2 {
        font-size: 30px !important;
        line-height: 1.25 !important;
    }

    .home-about .home-about-grid {
        gap: 14px !important;
    }

    .home-about .home-about-photo {
        aspect-ratio: 16 / 9 !important;
        max-height: none !important;
        border-radius: 18px !important;
    }

    .home-about .home-about-content {
        padding: 18px 16px !important;
        border-radius: 18px !important;
    }

    .home-about .home-about-content p {
        font-size: 15px !important;
        line-height: 1.75 !important;
        margin-bottom: 16px !important;
        text-align: center !important;
    }

    .home-about .home-inline-links {
        gap: 4px !important;
        justify-content: center !important;
    }

    .home-about .home-inline-links a {
        padding: 6px 4px !important;
        font-size: 9px !important;
        min-width: 0 !important;
        min-height: 34px !important;
    }
}

@media (max-width: 420px) {
    .home-brand strong {
        font-size: 18px !important;
        max-width: 210px !important;
    }

    .home-brand small {
        font-size: 12px !important;
        max-width: 210px !important;
    }

    .home-brand-mark {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    .home-nav-links {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-nav-links a {
        font-size: 13px !important;
        padding: 7px 4px !important;
    }

    .home-about .home-mini-stats {
        gap: 6px !important;
    }

    .home-about .home-mini-stats strong {
        font-size: 19px !important;
    }

    .home-about .home-mini-stats span {
        font-size: 10px !important;
    }
}


/* ===== Teacher responsive layout ===== */
@media (max-width: 980px) {
                    .home-about .home-about-grid {
                        grid-template-columns: 1fr !important;
                    }

                    .home-about .home-about-photo {
                        order: 1;
                    }

                    .home-about .home-about-content {
                        order: 2;
                        padding: 22px !important;
                    }

                    .home-about .home-mini-stats {
                        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
                        gap: 8px !important;
                    }

                    .home-about .home-mini-stats > div {
                        padding: 12px 6px !important;
                        border-radius: 14px !important;
                    }

                    .home-about .home-mini-stats strong {
                        font-size: 21px !important;
                        margin-bottom: 3px !important;
                    }

                    .home-about .home-mini-stats span {
                        font-size: 11px !important;
                        line-height: 1.35 !important;
                    }
                }


/* ===== Final compact mobile overrides ===== */
@media (max-width: 768px) {
    /* ===== Header compact mobile only ===== */
    .home-header {
        padding: 7px 10px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        background: rgba(250, 246, 236, .97) !important;
        backdrop-filter: blur(10px) !important;
    }

    .home-nav {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 6px !important;
        align-items: center !important;
        padding: 0 !important;
    }

    .home-brand {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
    }

    .home-brand-mark {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 19px !important;
    }

    .home-brand strong {
        font-size: 17px !important;
        line-height: 1.1 !important;
        max-width: 235px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .home-brand small {
        font-size: 11px !important;
        line-height: 1.1 !important;
        max-width: 235px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    /* الخمس أزرار في صف واحد إجباري */
    .home-nav-links {
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        width: 100% !important;
        margin: 3px 0 0 !important;
        order: 3 !important;
    }

    .home-nav-links a {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 7px 1px !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
        text-align: center !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.55) !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* تسجيل الدخول وإنشاء الحساب جنب بعض */
    .home-nav-actions {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 7px !important;
        width: 100% !important;
        margin-top: 5px !important;
        order: 4 !important;
    }

    .home-login-btn,
    .home-signup-btn {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 8px 5px !important;
        font-size: 13.5px !important;
        line-height: 1.15 !important;
        border-radius: 999px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    /* ===== About mobile only ===== */
    .home-about .home-about-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 0 12px !important;
        max-width: 100% !important;
    }

    .home-about .home-about-photo {
        order: 1 !important;
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        border-radius: 18px !important;
        overflow: hidden !important;
    }

    .home-about .home-about-photo img {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important;
        border-radius: 18px !important;
        display: block !important;
    }

    .home-about .home-about-content {
        order: 2 !important;
        padding: 16px 14px !important;
        border-radius: 18px !important;
    }

    .home-about .home-about-content p {
        font-size: 15px !important;
        line-height: 1.65 !important;
        margin-bottom: 14px !important;
        text-align: center !important;
    }

    .home-about .home-mini-stats {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        margin-bottom: 14px !important;
    }

    .home-about .home-mini-stats > div {
        padding: 10px 4px !important;
        border-radius: 14px !important;
    }

    .home-about .home-mini-stats strong {
        font-size: 19px !important;
        margin-bottom: 2px !important;
    }

    .home-about .home-mini-stats span {
        font-size: 10px !important;
        line-height: 1.25 !important;
    }

    /* أزرار النبذة الثلاثة جنب بعض */
    .home-about .home-inline-links {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 4px !important;
        width: 100% !important;
        justify-content: stretch !important;
    }

    .home-about .home-inline-links a {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 34px !important;
        padding: 6px 2px !important;
        font-size: 9px !important;
        border-radius: 999px !important;
        white-space: nowrap !important;
        text-align: center !important;
    }
}

@media (max-width: 390px) {
    .home-brand strong {
        font-size: 15.5px !important;
        max-width: 205px !important;
    }

    .home-brand small {
        font-size: 10.5px !important;
        max-width: 205px !important;
    }

    .home-nav-links a {
        font-size: 9.5px !important;
        padding: 7px 1px !important;
    }

    .home-login-btn,
    .home-signup-btn {
        font-size: 12.5px !important;
    }
}
