@media (max-width: 1199.98px) {
    .container { max-width: 100%; padding-left: 28px; padding-right: 28px; }
    .navbar .nav-link { padding-left:8px !important; padding-right:8px !important; font-size:.82rem; }
    .hero-content h1 { font-size:clamp(2.7rem,5vw,4.2rem); }
}

@media (max-width: 991.98px) {
    .topbar-inner { padding-top:7px; padding-bottom:7px; }
    .main-navbar { padding:12px 0; }
    .navbar-collapse { padding:16px 0 6px; border-top:1px solid var(--line); margin-top:12px; }
    .navbar-nav { align-items:stretch !important; }
    .navbar .nav-link { padding:10px 0 !important; }
    .navbar .nav-link:after { left:0; right:auto; width:45px; }
    .rtl-mode .navbar .nav-link:after { left:auto; right:0; }
    .hero-section { padding-top:54px; }
    .hero-carousel-inner { min-height:0; }
    .hero-visual { justify-content:center; margin-top:12px; }
    .hero-image-frame { margin:0 auto; max-width:500px; }
    .hero-note.note-top { left:0; }
    .hero-note.note-bottom { right:0; }
    .trust-grid { grid-template-columns:repeat(2,1fr); }
    .trust-grid > div:nth-child(2) { border-right:0; }
    .rtl-mode .trust-grid > div:nth-child(2) { border-left:0; }
    .trust-grid > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
    .process-grid { grid-template-columns:repeat(2,1fr); }
    .feature-band { grid-template-columns:1fr; }
    .feature-item + .feature-item { border-left:0; border-top:1px solid var(--line); }
    .rtl-mode .feature-item + .feature-item { border-right:0; border-top:1px solid var(--line); }
    .quote-grid { grid-template-columns:1fr; }
    .footer-main { grid-template-columns:1.2fr 1fr; gap:36px 28px; }
    .cta-card { flex-direction:column; align-items:flex-start; padding:40px 34px; }
    .enroll-side-card { position:static; }
    .timeline-item { grid-template-columns:55px 64px 1fr; }
    .timeline:before { left:27px; }
    .rtl-mode .timeline:before { left:auto; right:27px; }
}

@media (max-width: 767.98px) {
    .container { padding-left:18px; padding-right:18px; }
    .topbar-inner { justify-content:center; text-align:center; gap:7px 14px; }
    .topbar-inner > div:first-child { justify-content:center; }
    .topbar-link span { display:none; }
    .brand { min-width:0; }
    .brand-mark { width:40px; height:40px; border-radius:12px; }
    .brand-copy strong { font-size:.92rem; }
    .brand-copy small { font-size:.62rem; }
    .hero-section { padding:44px 0 40px; }
    .hero-content h1 { font-size:clamp(2.3rem,11vw,3.35rem); letter-spacing:-.035em; }
    .hero-content p { font-size:.94rem; }
    .hero-actions { align-items:stretch; }
    .hero-actions .btn { width:100%; justify-content:center; }
    .hero-trustline { gap:10px; font-size:.73rem; }
    .hero-image-frame { padding:12px; border-radius:24px; }
    .hero-image-frame img { border-radius:17px; }
    .hero-note { min-width:0; padding:8px 10px; border-radius:12px; }
    .hero-note .note-icon { width:32px; height:32px; font-size:.85rem; }
    .hero-note strong { font-size:.68rem; }
    .hero-note small { font-size:.58rem; }
    .hero-note.note-top { top:16px; left:-4px; }
    .hero-note.note-bottom { right:-3px; bottom:16px; }
    .hero-controls { margin-top:14px; }
    .trust-grid { grid-template-columns:1fr 1fr; }
    .trust-grid > div { padding:15px 10px; }
    .trust-grid strong { font-size:1rem; }
    .trust-grid span { font-size:.64rem; }
    .section-pad { padding:72px 0; }
    .section-heading h2 { font-size:2.05rem; }
    .section-art { padding:12px; border-radius:24px; }
    .art-tag { left:20px; bottom:20px; font-size:.66rem; padding:8px 11px; }
    .course-card { padding:24px; }
    .course-card.tall { min-height:0; }
    .process-grid { grid-template-columns:1fr; }
    .teacher-mini-card, .teacher-mini-card.offset { width:100%; margin-left:0; }
    .cta-section { padding:18px 0 72px; }
    .cta-card { padding:34px 22px; border-radius:24px; }
    .cta-card h2 { font-size:2rem; }
    .cta-actions { width:100%; }
    .cta-actions .btn { width:100%; text-align:center; }
    .page-hero { padding:72px 0 62px; }
    .page-hero h1 { font-size:2.45rem; }
    .content-card, .contact-form-card { padding:24px; }
    .registration-aside { padding:28px 22px; }
    .registration-card > .row > div:last-child { padding:22px; }
    .timeline-item { grid-template-columns:42px 58px 1fr; gap:10px; padding:20px 0; }
    .timeline:before { left:21px; }
    .rtl-mode .timeline:before { left:auto; right:21px; }
    .timeline-icon { width:58px; height:58px; border-radius:18px; border-width:6px; }
    .timeline-item h3 { font-size:1rem; }
    .timeline-item p { font-size:.77rem; }
    .quote-card { padding:24px; }
    .quote-highlight { padding:28px; }
    .quote-highlight p { font-size:1.25rem; }
    .footer-main { grid-template-columns:1fr; gap:28px; }
    .footer-bottom { flex-direction:column; align-items:flex-start; }
    .whatsapp-float { width:54px; height:54px; right:14px; bottom:72px; }
}

@media (max-width: 479.98px) {
    .container { padding-left:14px; padding-right:14px; }
    .hero-content h1 { font-size:2.22rem; }
    .hero-trustline { display:grid; gap:8px; }
    .hero-note.note-top { left:3px; }
    .hero-note.note-bottom { right:3px; }
    .trust-grid { grid-template-columns:1fr; }
    .trust-grid > div { border-right:0 !important; border-left:0 !important; border-bottom:1px solid var(--line); }
    .trust-grid > div:last-child { border-bottom:0; }
    .section-heading h2 { font-size:1.9rem; }
    .btn-brand, .btn-outline-brand, .btn-light-brand, .btn-ghost-light { padding:10px 16px; }
    .page-hero h1 { font-size:2.15rem; }
    .registration-card { border-radius:22px; }
    .registration-aside h2 { font-size:1.75rem; }
    .contact-list a { padding:13px; }
    .footer-bottom div { flex-wrap:wrap; }
}

@media (min-width: 992px) {
    .rtl-mode .navbar-collapse { flex-grow:1; }
    .rtl-mode .navbar-nav { margin-right:auto !important; margin-left:0 !important; }
}

@media (max-width: 767.98px) {
    .topbar-inner { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; }
    .topbar-contact { flex-wrap: nowrap !important; }
    .topbar-inner .language-switcher { margin-left: auto !important; margin-right: 0 !important; }
}

/* Part 4 responsive refinements */
@media (max-width: 991.98px) {
    .hero-fullscreen,
    .hero-full-carousel,
    .hero-full-carousel .carousel-inner,
    .hero-full-item,
    .hero-full-content-wrap {
        min-height: 74vh;
        height: 74vh;
    }

    .hero-full-content { padding-top: 62px; }
}

@media (max-width: 767.98px) {
    .topbar-inner,
    .topbar-contact,
    .language-switcher { direction: ltr !important; }

    .topbar-inner { justify-content: space-between !important; }
    .topbar-contact { justify-content: flex-start !important; }
    .topbar-link span { display: none; }
    .language-switcher { margin-left: auto !important; margin-right: 0 !important; }

    .hero-fullscreen,
    .hero-full-carousel,
    .hero-full-carousel .carousel-inner,
    .hero-full-item,
    .hero-full-content-wrap {
        min-height: 78vh;
        height: 78vh;
    }

    .hero-full-content { padding: 48px 0 92px; }
}

@media (max-width: 479.98px) {
    .news-label span { display: none; }
    .news-label { padding: 0 12px; min-width: 42px; justify-content: center; }
    .news-track { padding-left: 16px; gap: 42px; }

    .hero-fullscreen,
    .hero-full-carousel,
    .hero-full-carousel .carousel-inner,
    .hero-full-item,
    .hero-full-content-wrap {
        min-height: 82vh;
        height: 82vh;
    }

    .hero-full-content { padding: 40px 0 86px; }
    .hero-full-content h1 { font-size: 2.25rem; }
}


/* =========================================================
   URDU FORM LABEL FIX - MOBILE
   Jameel Noori Nastaleeq can have wider glyphs, so labels
   must always stay inside their Bootstrap column.
========================================================= */

html[lang="ur"] .registration-card .form-label {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    text-align: right;
    line-height: 2;
    padding: 0;
    box-sizing: border-box;
}

/* Make sure Bootstrap columns can shrink correctly */
html[lang="ur"] .registration-card .row > [class*="col-"] {
    min-width: 0;
}

/* Inputs/selects must also stay inside their column */
html[lang="ur"] .registration-card .form-control,
html[lang="ur"] .registration-card .form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Error messages should also wrap */
html[lang="ur"] .registration-card .text-danger {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 2;
}

/* Mobile */
@media (max-width: 767.98px) {

    html[lang="ur"] .registration-card .form-label {
        font-size: 0.92rem;
        line-height: 2.15;
        width: 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    html[lang="ur"] .registration-card .row {
        margin-left: 0;
        margin-right: 0;
    }

    html[lang="ur"] .registration-card .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    html[lang="ur"] .registration-card .form-control,
    html[lang="ur"] .registration-card .form-select {
        width: 100%;
        max-width: 100%;
    }
}

/* Small mobile */
@media (max-width: 480px) {

    html[lang="ur"] .registration-card .form-label {
        font-size: 0.88rem;
        line-height: 2.1;
    }

    html[lang="ur"] .registration-card .text-danger {
        font-size: 0.8rem;
        line-height: 1.9;
    }

}