.q-mobile-toggle { display: none; }
.q-mobile-menu { display: none; }
.quran-site > .q-footer { margin-top: 34px; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }

@media (max-width: 991px) {
  .q-header { padding: 9px 0; }
  .q-header .container { min-height: 58px; }
  .q-brand { width: 94px; height: 54px; flex: 0 0 auto; }
  .q-nav { display: none !important; }
  .q-header .q-button-sm { display: none; }
  .q-mobile-toggle { width: 45px; height: 42px; display: grid; place-items: center; border: 1px solid #d5dfed; border-radius: 3px; background: #fff; color: var(--navy); font-size: 23px; }
  .q-mobile-menu { display: block; position: fixed; inset: 0; z-index: 999; visibility: hidden; opacity: 0; transition: .25s; }
  .q-mobile-menu.is-open { visibility: visible; opacity: 1; }
  .q-mobile-menu__overlay { position: absolute; inset: 0; background: #031b4299; }
  .q-mobile-menu__panel { position: absolute; top: 0; right: 0; width: min(335px, 88vw); height: 100%; overflow-y: auto; padding: 25px; background: #fff; transform: translateX(105%); transition: transform .3s ease; box-shadow: -8px 0 30px #031b4230; }
  .q-mobile-menu.is-open .q-mobile-menu__panel { transform: translateX(0); }
  .q-mobile-menu__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e0e7f0; padding-bottom: 18px; margin-bottom: 14px; }
  .q-mobile-menu__brand { color: var(--navy); font: 700 19px 'Playfair Display',serif; }
  .q-mobile-menu__close { border: 0; background: transparent; color: var(--navy); font-size: 26px; }
  .q-mobile-menu nav a { display: block; padding: 13px 12px; border-bottom: 1px solid #edf0f5; color: var(--text); text-decoration: none; font-weight: 700; }
  .q-mobile-menu nav a.active { margin-top: 7px; background: var(--navy); color: #fff; border-radius: 3px; border-bottom: 0; }
  .q-mobile-menu .q-button { display: flex; justify-content: center; margin-top: 24px; }
  body.q-mobile-lock { overflow: hidden; }
  .premium-hero { min-height: 650px; }
  .premium-hero:before { background: linear-gradient(90deg,#031b42f2,#031b42ce); }
  .intro-panel { margin-top: 0; }
  .intro-panel .row { box-shadow: none; }
  .intro-panel article { min-height: auto; }
  .home-image { height: 390px; }
  .q-page-hero { padding: 70px 0 62px; }
  .q-section { padding: 65px 0; }
  .q-footer { padding-top: 48px; }
  .teacher-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-box, .teacher-cta-box { border-radius: 4px; }
  .reference-feature-card, .course-ref, .course-visual-card { min-width: 0; }
}
@media (max-width: 575px) {
  .quran-site > .q-footer { margin-top: 20px; }
  body.quran-site { font-size: 15px; }
  .container { padding-left: 18px; padding-right: 18px; }
  .premium-hero { min-height: 590px; padding: 75px 0; }
  .premium-hero h1 { font-size: 44px; letter-spacing: -1px; }
  .premium-hero .q-lead { font-size: 16px; }
  .premium-hero .q-button { margin: 4px 0; width: 100%; justify-content: center; }
  .hero-note { font-size: 12px; margin-top: 26px; }
  .q-section h2, .q-cta h2 { font-size: 33px; }
  .q-page-hero h1 { font-size: 39px; }
  .q-page-hero>div>p:not(.q-eyebrow) { font-size: 16px; }
  .home-image { height: 300px; }
  .image-frame:after { width: 90px; height: 90px; border-width: 8px; bottom: -16px; left: -12px; }
  .course-photo { height: 190px; }
  .q-form { padding: 22px 17px; }
  .q-map { height: 290px; }
  .q-footer .container:before { width: 95px; height: 70px; }
  .q-footer h4 { margin-top: 12px; }
  .q-footer-bottom { margin-top: 12px; }
  .q-cta { padding: 62px 0; }
  .q-button { max-width: 100%; white-space: normal; justify-content: center; text-align: center; }
  .q-contact-line { align-items: center; }
  .q-contact-line span { overflow-wrap: anywhere; }
  .teacher-info-grid { grid-template-columns: 1fr; }
  .support-box, .teacher-cta-box { padding: 28px 20px; }
  .plan-card-featured { transform: none !important; }
  .premium-footer .row > div { margin-bottom: 8px; }
}

/* Responsive refinements for the shared Al Suffha design system */
@media (max-width: 1199px) {
  .q-nav { gap: 3px; }
  .q-nav a { padding-inline: 10px; }
  .q-section { padding-block: 82px; }
}

@media (max-width: 991px) {
  body.quran-site { padding-top: 77px; }
  .q-header { min-height: 77px; }
  .q-header .container { min-height: 58px; }
  .q-mobile-toggle {
    border-color: var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
  }
  .q-mobile-toggle:hover { background: var(--surface-soft); color: var(--primary-light); }
  .q-mobile-menu { z-index: 1200; }
  .q-mobile-menu__overlay { background: rgba(3, 27, 66, .72); backdrop-filter: blur(3px); }
  .q-mobile-menu__panel { padding: 26px 22px; box-shadow: -18px 0 50px rgba(3, 27, 66, .18); }
  .q-mobile-menu nav a { border-color: var(--border); border-radius: var(--radius-sm); margin-block: 3px; transition: background-color var(--transition), color var(--transition); }
  .q-mobile-menu nav a:hover { background: var(--surface-soft); color: var(--primary-light); }
  .q-mobile-menu nav a.active { background: var(--primary); color: var(--surface); }
  .q-page-hero { padding-block: 80px 70px; }
  .q-section { padding-block: 72px; }
  .q-section-head { margin-bottom: 42px; }
  .q-form { padding: 30px; }
}

@media (max-width: 767px) {
  .container { width: min(100% - 28px, 720px); padding-inline: 0; }
  .q-section { padding-block: 64px; }
  .q-page-hero { padding-block: 68px 60px; }
  .q-section-head { margin-bottom: 34px; }
  .q-program,
  .q-info-card,
  .course-info-card,
  .plan-card { padding: 26px 22px; }
  .q-cta,
  .course-detail-cta,
  .teacher-cta-box,
  .support-box { box-shadow: var(--shadow-md); }
}

@media (max-width: 575px) {
  body.quran-site { padding-top: 75px; }
  .q-header { min-height: 75px; }
  .q-brand { width: 86px; height: 52px; }
  .q-mobile-toggle { width: 43px; height: 41px; }
  .q-page-hero h1 { font-size: clamp(36px, 11vw, 45px); }
  .q-section h2,
  .q-cta h2 { font-size: clamp(31px, 9vw, 38px); }
  .q-section { padding-block: 58px; }
  .q-page-hero { padding-block: 60px 54px; }
  .q-eyebrow { font-size: 10px; letter-spacing: 1.8px; }
  .q-button { min-height: 48px; }
  .q-form { padding: 24px 18px; }
  .premium-footer-logo { margin-bottom: 12px !important; }
  .premium-footer h4 { font-size: 18px; }
  .premium-footer li a,
  .footer-contact-line { font-size: 13px; }
}
