/* =========================================================
   Ente Classroom - mobile / responsive fixes
   Loaded after main.css on every page.
   ========================================================= */

/* ---------- 1. Stop sideways scrolling (white strip on the right) ---------- */
html,
body {
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
}

img {
    max-width: 100%;
}

@media (max-width: 991px) {

    /* Bootstrap g-5 rows are wider than the screen on phones */
    .row.g-5,
    .row.gx-5 {
        --bs-gutter-x: 1.5rem;
    }
}

/* ---------- 2. Mobile header: logo + hamburger aligned ---------- */
@media (max-width: 991px) {
    .primary-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .primary-header-inner .header-logo img {
        max-height: 52px;
        width: auto;
    }

    .mobile-side-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 24px;
        line-height: 1;
        color: var(--ed-color-heading-primary);
    }
}

/* ---------- 3. Mobile side menu ---------- */
@media (max-width: 992px) {
    .mobile-side-menu {
        width: 85%;
        max-width: 340px;
        padding: 25px 22px 40px;
    }

    .mobile-side-menu .side-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        margin-bottom: 20px;
    }

    .mobile-side-menu .side-menu-head img {
        max-height: 45px;
        width: auto;
    }

    .mobile-side-menu .side-menu-head .mobile-side-menu-close {
        position: static;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
    }

    .mobile-side-menu .side-menu-wrap {
        margin-bottom: 20px;
    }

    .mobile-side-menu .ed-primary-btn {
        display: block;
        width: 100%;
        text-align: center;
    }

    .mobile-side-menu .side-menu-list {
        margin: 10px 0 0;
        padding: 0;
    }

    .mobile-side-menu .side-menu-list li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
        font-size: 15px;
        line-height: 1.5;
    }

    .mobile-side-menu .side-menu-list li i {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        margin: 0;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        color: #fff;
        background: var(--ed-color-theme-primary);
    }

    .mobile-side-menu .side-menu-list li span,
    .mobile-side-menu .side-menu-list li a {
        margin: 0 !important;
        padding-left: 0 !important;
        padding-top: 6px;
        font-size: 15px;
        word-break: break-word;
    }
}

/* ---------- 4. Home hero (index.html) ---------- */
@media (max-width: 991px) {
    .hero-section-8 .hero-content-8 {
        padding-top: 50px;
        padding-bottom: 60px;
    }

    .hero-section-8 .section-title {
        font-size: 2.6rem !important;
        line-height: 1.25 !important;
    }

    .hero-mobile-img {
        position: relative;
        max-width: 440px;
        margin: 45px auto 0;
    }

    /* soft blue arch behind the photo, same feel as the desktop curve */
    .hero-mobile-img::before {
        content: "";
        position: absolute;
        inset: -8px -6px auto -6px;
        height: 75%;
        border-radius: 240px 240px 0 0;
        background: linear-gradient(180deg, rgba(1, 170, 227, 0.25), rgba(1, 170, 227, 0));
        z-index: 0;
    }

    .hero-mobile-img img {
        position: relative;
        z-index: 1;
        display: block;
        width: 100%;
        height: 460px;
        object-fit: cover;
        object-position: 48% 15%;
        border-radius: 220px 220px 24px 24px;
        box-shadow: 0 25px 50px rgba(11, 28, 58, 0.18);
    }
}

@media (max-width: 575px) {
    .hero-section-8 .section-title {
        font-size: 2.15rem !important;
    }

    .hero-section-8 .section-title br {
        display: none;
    }

    .hero-mobile-img img {
        height: 400px;
        border-radius: 180px 180px 20px 20px;
    }
}

/* ---------- 5. Inner page header (About, Courses, Gallery, Blog, Contact) ---------- */
@media (max-width: 767px) {
    .page-header {
        padding: 50px 0 !important;
        background-size: cover !important;
        background-position: right center !important;
    }

    .page-header .overlay {
        background: linear-gradient(90deg,
                #F3F7FB 0%,
                #F3F7FB 38%,
                rgba(243, 247, 251, 0.55) 52%,
                rgba(243, 247, 251, 0) 64%);
    }

    .page-header .page-header-content .title {
        font-size: 36px;
        line-height: 1.2;
    }
}

/* phones: keep the student's face on the right, next to the title */
@media (max-width: 540px) {
    .page-header {
        background-size: auto 100% !important;
        background-position: -160px center !important;
    }
}

@media (max-width: 400px) {
    .page-header .page-header-content .title {
        font-size: 32px;
    }
}
