/*
 * MDPS — Master Responsive Stylesheet
 * Replaces: inner-pages-responsive.css + scattered responsive in nav-override.css
 *
 * Breakpoints:
 *   XL  desktop       1280px +          (no changes — baseline design)
 *   LG  large tablet  1025px – 1279px
 *   MD  tablet        769px  – 1024px
 *   SM  mobile        481px  – 768px
 *   XS  small mobile  320px  – 480px
 *
 * Scope rules:
 *   Homepage  (body.mdsn-front-page) — all rules explicitly excluded
 *   Inner pages (body.mdsn-full-width) — Elementor + header + footer
 *   Shared classes (.mdsn-*, .hero, .stats-*, etc.) — both pages
 *
 * NEVER use rules outside @media blocks except reset/global overflow guard.
 */

/* ─── GLOBAL OVERFLOW GUARD (safe on all pages) ──────────────── */
html, body { overflow-x: hidden !important; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }


/* ══════════════════════════════════════════════════════════════
   LG — 1025px to 1279px
   Large tablets / small laptops
   ══════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) and (max-width: 1279px) {

  /* Container */
  .mdsn-container {
    padding-left: 32px;
    padding-right: 32px;
  }

  /* Elementor container */
  body.mdsn-full-width .elementor-section.elementor-section-boxed > .elementor-container,
  body.mdsn-full-width .elementor-section > .elementor-container {
    max-width: 100%;
    padding-left: 32px;
    padding-right: 32px;
  }

  /* Header — slightly smaller logo */
  .mdsn-logo-wrap img { width: 64px; height: 64px; }
  .mdsn-school-name { font-size: 19px; }

  /* Nav — keep horizontal but slightly smaller padding */
  .mdsn-nav-menu li a { padding: 12px 13px; font-size: 13px; }

  /* Homepage grids */
  .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .leadership-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }

  /* Elementor 3-col → 2 col at this size */
  body.mdsn-full-width .elementor-column.elementor-col-33 { width: 50%; }
}


/* ══════════════════════════════════════════════════════════════
   MD — max 1024px
   Tablet landscape + small laptops
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* ── Container ─────────────────────────────────────────── */
  .mdsn-container {
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* ── Elementor container ───────────────────────────────── */
  body.mdsn-full-width .elementor-section.elementor-section-boxed > .elementor-container,
  body.mdsn-full-width .elementor-section > .elementor-container {
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  /* ── Header ────────────────────────────────────────────── */
  .mdsn-logo-wrap img { width: 62px; height: 62px; }
  .mdsn-school-name { font-size: 18px; }
  .mdsn-nav-menu li a { padding: 12px 12px; font-size: 13px; }

  /* ── Homepage section grids ────────────────────────────── */
  .pillars-grid    { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .leadership-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .gallery-grid    { grid-template-columns: repeat(3, 1fr) !important; gap: 14px !important; }
  html body .gallery-grid .gallery-item { height: 240px !important; min-height: 240px !important; max-height: 240px !important; }
  .footer-grid     { grid-template-columns: 1fr 1fr; gap: 32px; }
  .facilities-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .why-grid        { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .faculty-grid    { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* ── Elementor columns ─────────────────────────────────── */
  body.mdsn-full-width .elementor-column.elementor-col-33 { width: 50%; }
  body.mdsn-full-width .elementor-column.elementor-col-25 { width: 50%; }

  /* ── Split sections (55/45 commit, approach etc.) ──────── */
  body.mdsn-full-width .elementor-column.elementor-col-55,
  body.mdsn-full-width .elementor-column.elementor-col-45 { width: 100%; }

  /* ── Elementor typography ──────────────────────────────── */
  body.mdsn-full-width .elementor-widget-heading h1.elementor-heading-title {
    font-size: clamp(28px, 4vw, 40px) !important;
  }
  body.mdsn-full-width .elementor-widget-heading h2.elementor-heading-title {
    font-size: clamp(24px, 3.5vw, 34px) !important;
  }

  /* ── Inner page card padding ───────────────────────────── */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:16px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:18px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:20px"] {
    padding: 26px 22px !important;
  }
}


/* ══════════════════════════════════════════════════════════════
   SM — max 768px
   Mobile landscape + tablet portrait
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Global ────────────────────────────────────────────── */
  .mdsn-container { padding-left: 16px; padding-right: 16px; }
  section { width: 100%; }

  /* ── Topbar — hidden on mobile ─────────────────────────── */
  .mdsn-topbar { display: none !important; }

  /* ── Marquee ───────────────────────────────────────────── */
  .mdsn-marquee       { font-size: 11px; padding: 5px 0; }
  .mdsn-marquee-label { font-size: 10px; padding: 3px 10px; margin-right: 10px; }

  /* ── Header ────────────────────────────────────────────── */
  .mdsn-header-inner {
    padding: 8px 0;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
  }
  /* Logo LEFT */
  .mdsn-logo-wrap {
    flex: 1;
    gap: 8px;
    min-width: 0;
    order: 1;
  }
  .mdsn-logo-wrap img { width: 44px; height: 44px; }
  .mdsn-school-name   { font-size: 14px; line-height: 1.2; white-space: normal; }
  .mdsn-school-unit   { font-size: 9px; letter-spacing: 0.5px; }
  .mdsn-school-tagline{ font-size: 9px; }

  /* Admissions btn MIDDLE */
  .mdsn-btn-admit {
    order: 2;
    flex-shrink: 0;
    padding: 9px 12px;
    font-size: 11px;
    letter-spacing: 0;
    white-space: nowrap;
    gap: 5px;
  }

  /* Hamburger RIGHT */
  .mdsn-hamburger {
    display: flex !important;
    order: 3;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
  }

  /* ── Nav — mobile accordion ────────────────────────────── */
  .mdsn-nav-wrap               { display: none; width: 100%; }
  .mdsn-nav-wrap.open          { display: block; }
  .mdsn-nav-menu               { flex-direction: column; }
  .mdsn-nav-menu li            { width: 100%; position: relative; }
  .mdsn-nav-menu li a          { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 14px; }
  .mdsn-nav-menu li ul         { position: static; display: none; box-shadow: none; min-width: unset; background: rgba(0,0,0,.25); }
  .mdsn-nav-menu li.sub-open > ul { display: flex !important; }
  .mdsn-nav-menu li ul li a    { padding: 10px 24px; font-size: 13px; }
  /* Arrow indicator for parent items */
  .mdsn-nav-menu li:has(> ul) > a::after  { content: ' ▾'; font-size: 11px; opacity: .7; }
  .mdsn-nav-menu li.sub-open > a::after   { content: ' ▴'; }

  /* ── Homepage hero ──────────────────────────────────────── */
  .hero { height: 280px; }
  .hero-content { padding: 0 12px; max-width: 100%; }
  .hero-content h1 { font-size: 20px; margin-bottom: 10px; }
  .hero-content p  { font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
  .hero-badge      { font-size: 9px; padding: 3px 10px; margin-bottom: 10px; letter-spacing: 1px; }
  .hero-btns       { gap: 8px; flex-wrap: wrap; }
  .btn-hero-primary, .btn-hero-outline { padding: 9px 14px; font-size: 12px; }
  .hero-arrow      { width: 32px; height: 32px; font-size: 16px; }
  .hero-overlay    { background: linear-gradient(to right, rgba(0,0,0,.8) 0%, rgba(0,0,0,.4) 100%); }

  /* ── Stats bar ──────────────────────────────────────────── */
  .stats-bar     { padding: 0; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item     { padding: 18px 12px; }
  .stat-number   { font-size: 34px; }
  .stat-label    { font-size: 10px; letter-spacing: 1px; }
  .stat-item:not(:last-child)::after { display: none; }

  /* ── Notice + Events + Quick Links ─────────────────────── */
  .notice-section  { padding: 40px 0; }
  .notice-grid     { grid-template-columns: 1fr; gap: 20px; }
  .ql-grid         { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .ql-item         { padding: 12px 6px; }
  .ql-item i       { font-size: 22px; }
  .ql-item span    { font-size: 11px; }

  /* ── About section ──────────────────────────────────────── */
  .about-section   { padding: 48px 0; }
  .about-grid      { grid-template-columns: 1fr; gap: 28px; }
  .about-img-wrap  { order: -1; }
  .about-img-frame img { height: 220px; }
  .about-badge     { width: 90px; height: 90px; bottom: -14px; right: -10px; }
  .about-features  { grid-template-columns: 1fr 1fr; gap: 8px; }
  .about-text h2   { font-size: 24px; }
  .about-text p    { font-size: 14px; }
  .btn-outline     { margin-left: 0; margin-top: 10px; }

  /* ── Section title ──────────────────────────────────────── */
  .section-title   { margin-bottom: 28px; }
  .section-title h2{ font-size: 24px; }
  .section-title p { font-size: 14px; padding: 0 8px; }

  /* ── Gallery ────────────────────────────────────────────── */
  .gallery-section { padding: 48px 0; }
  .gallery-tabs    { gap: 6px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
  .gallery-tab     { padding: 7px 14px; font-size: 12px; }
  html body .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  html body .gallery-grid .gallery-item { height: 180px !important; min-height: 180px !important; max-height: 180px !important; }

  /* ── Pillars ────────────────────────────────────────────── */
  .pillars-section { padding: 48px 0; }
  .pillars-grid    { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pillar-card     { padding: 20px 14px; }
  .pillar-icon     { width: 56px; height: 56px; font-size: 24px; }
  .pillar-card h3  { font-size: 15px; }
  .pillar-card p   { font-size: 12px; }

  /* ── Why Choose Us ──────────────────────────────────────── */
  .why-section     { padding: 48px 0; }
  .why-grid        { grid-template-columns: 1fr 1fr; gap: 14px; }
  .why-card        { padding: 20px 14px; }
  .why-card h3     { font-size: 14px; }
  .why-card p      { font-size: 12px; }

  /* ── Leadership ─────────────────────────────────────────── */
  .leadership-section { padding: 48px 0; }
  .leadership-grid    { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .leader-img         { height: 180px; }
  .leader-body        { padding: 14px 12px; }
  .leader-body h4     { font-size: 15px; }
  .leader-body p      { font-size: 12px; }

  /* ── Faculty ────────────────────────────────────────────── */
  .faculty-section { padding: 48px 0; }
  .faculty-grid    { grid-template-columns: 1fr 1fr; gap: 16px; }
  .faculty-photo img { height: 200px; }

  /* ── Houses ─────────────────────────────────────────────── */
  .houses-section  { padding: 48px 0; }
  .houses-grid     { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
  .house-card      { padding: 18px 12px; }
  .house-icon      { font-size: 28px; }
  .house-card h3   { font-size: 16px; }

  /* ── Sports ─────────────────────────────────────────────── */
  .sports-section  { padding: 48px 0; }
  .sports-cols     { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }

  /* ── Facilities ─────────────────────────────────────────── */
  .facilities-section { padding: 48px 0; }
  .facilities-grid    { grid-template-columns: 1fr 1fr; gap: 14px; }
  .facility-card      { padding: 18px 14px; }

  /* ── CTA banner ─────────────────────────────────────────── */
  .cta-section        { padding: 48px 0; }
  .cta-section h2     { font-size: 24px; }
  .cta-section p      { font-size: 15px; margin-bottom: 20px; }
  .cta-btns           { gap: 10px; flex-direction: column; align-items: center; }
  .btn-cta-white,
  .btn-cta-outline    { padding: 12px 28px; font-size: 13px; width: 100%; max-width: 320px; text-align: center; }

  /* ── Footer ─────────────────────────────────────────────── */
  .site-footer       { padding: 40px 0 0; }
  .footer-grid       { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-col h4     { font-size: 14px; }
  .footer-bottom     { font-size: 12px; text-align: center; padding: 14px 12px; line-height: 1.8; }
  .footer-social     { justify-content: flex-start; }

  /* ── Scroll top ─────────────────────────────────────────── */
  .scroll-top { bottom: 16px; right: 16px; width: 38px; height: 38px; font-size: 16px; }

  /* ══ INNER PAGES — Elementor ═══════════════════════════════ */

  /* All Elementor columns stack */
  body.mdsn-full-width .elementor-column { width: 100% !important; }
  body.mdsn-full-width .elementor-row    { flex-wrap: wrap !important; }

  /* Elementor container padding */
  body.mdsn-full-width .elementor-section.elementor-section-boxed > .elementor-container,
  body.mdsn-full-width .elementor-section > .elementor-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Prevent any Elementor element from overflowing */
  body.mdsn-full-width .elementor-section,
  body.mdsn-full-width .elementor-container,
  body.mdsn-full-width .elementor-column,
  body.mdsn-full-width .elementor-widget-wrap,
  body.mdsn-full-width .elementor-widget-text-editor {
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
  }

  /* Column spacing when stacked */
  body.mdsn-full-width .elementor-column + .elementor-column { margin-top: 20px; }
  body.mdsn-full-width .elementor-column > .elementor-element-populated { padding: 10px 0 !important; }

  /* Section vertical padding */
  body.mdsn-full-width .elementor-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  /* Hero section — less padding */
  body.mdsn-full-width .elementor-section:first-of-type {
    padding-top: 50px !important;
    padding-bottom: 44px !important;
  }

  /* Headings */
  body.mdsn-full-width .elementor-widget-heading h1.elementor-heading-title {
    font-size: clamp(22px, 6vw, 34px) !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
  body.mdsn-full-width .elementor-widget-heading h2.elementor-heading-title {
    font-size: clamp(20px, 5vw, 28px) !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }
  body.mdsn-full-width .elementor-widget-heading h3.elementor-heading-title {
    font-size: clamp(16px, 4vw, 22px) !important;
  }
  body.mdsn-full-width .elementor-widget-heading p.elementor-heading-title {
    font-size: 15px !important;
    text-align: center !important;
  }
  body.mdsn-full-width .elementor-widget-heading {
    text-align: center !important;
  }

  /* Body text */
  body.mdsn-full-width .elementor-widget-text-editor p {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }
  body.mdsn-full-width .elementor-widget-text-editor * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Divider centred */
  body.mdsn-full-width .elementor-widget-divider { text-align: center !important; }

  /* All inline card divs */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:16px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:18px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius:20px"] {
    padding: 22px 16px !important;
    border-radius: 12px !important;
  }

  /* Stats strip: 4-col → 2-col */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  body.mdsn-full-width .elementor-widget-text-editor div[style*="grid-template-columns:repeat(4"] > div:nth-child(2) {
    border-right: none !important;
  }

  /* Inline flex rows — wrap on small screens */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="display:flex"] {
    flex-wrap: wrap !important;
  }
  /* Inline grids — allow override */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="display:grid"] {
    display: grid !important;
  }

  /* Icon + text commitment items */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="width:42px;height:42px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="width:44px;height:44px"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="width:48px;height:48px"] {
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
  }

  /* Dark navy promise card */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="background:#0d1b3d"],
  body.mdsn-full-width .elementor-widget-text-editor div[style*="background: #0d1b3d"] {
    padding: 26px 20px !important;
    border-radius: 14px !important;
  }
  body.mdsn-full-width .elementor-widget-text-editor div[style*="background:#0d1b3d"] h3 {
    font-size: 18px !important;
  }

  /* Buttons — full width on mobile */
  body.mdsn-full-width .elementor-widget-text-editor a[style*="padding:14px"],
  body.mdsn-full-width .elementor-widget-text-editor a[style*="padding: 14px"] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 13px 20px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
  /* CTA button group */
  body.mdsn-full-width .elementor-widget-text-editor div[style*="display:flex;align-items:center;justify-content:center"] {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  body.mdsn-full-width .elementor-widget-text-editor div[style*="display:flex;align-items:center;justify-content:center"] a {
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Images inside text-editor (leader portraits, gallery) */
  body.mdsn-full-width .elementor-widget-text-editor img {
    width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
  /* Elementor image widget */
  body.mdsn-full-width .elementor-widget-image img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Contact form — all fields full width */
  body.mdsn-full-width .elementor-form .elementor-field-group,
  body.mdsn-full-width .elementor-field-group.elementor-col-50,
  body.mdsn-full-width .elementor-field-group.elementor-col-33,
  body.mdsn-full-width .elementor-form .elementor-field-type-submit {
    width: 100% !important;
    flex-basis: 100% !important;
  }
  body.mdsn-full-width .elementor-form .elementor-button,
  body.mdsn-full-width .elementor-form .e-form__buttons__wrapper__button {
    width: 100% !important;
    text-align: center !important;
  }

  /* Inner page header */
  body.mdsn-full-width .mdsn-topbar      { display: none !important; }
  body.mdsn-full-width .mdsn-hamburger   { display: flex !important; }
  body.mdsn-full-width .mdsn-nav-wrap    { display: none; width: 100%; }
  body.mdsn-full-width .mdsn-nav-wrap.open { display: block; }
  body.mdsn-full-width .mdsn-nav-menu    { flex-direction: column; }
  body.mdsn-full-width .mdsn-nav-menu li { width: 100%; }
  body.mdsn-full-width .mdsn-nav-menu li a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
  body.mdsn-full-width .mdsn-nav-menu li ul { position: static; box-shadow: none; }

  /* Inner page footer */
  body.mdsn-full-width .site-footer      { padding: 40px 0 0 !important; }
  body.mdsn-full-width .footer-grid      { grid-template-columns: 1fr !important; gap: 28px !important; }
  body.mdsn-full-width .footer-bottom    { text-align: center; font-size: 12px; line-height: 1.8; }
  body.mdsn-full-width .footer-contact-list li { align-items: flex-start; }
}


/* ══════════════════════════════════════════════════════════════
   XS — max 480px
   Small phones (iPhone SE, Galaxy A series)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* ── Container ─────────────────────────────────────────── */
  .mdsn-container { padding-left: 12px; padding-right: 12px; }

  /* ── Header ─────────────────────────────────────────────── */
  .mdsn-logo-wrap img { width: 38px; height: 38px; }
  .mdsn-school-name   { font-size: 12px; }
  .mdsn-school-unit,
  .mdsn-school-tagline { display: none !important; }
  .mdsn-btn-admit     { padding: 8px 9px; font-size: 10px; }
  .mdsn-btn-admit i   { display: none !important; }
  .mdsn-hamburger     { width: 36px; height: 36px; font-size: 16px; }

  /* ── Hero ───────────────────────────────────────────────── */
  .hero              { height: 240px; }
  .hero-content h1   { font-size: 17px; }
  .hero-content p    { display: none; }
  .btn-hero-primary,
  .btn-hero-outline  { padding: 8px 12px; font-size: 11px; }
  .hero-arrow        { width: 28px; height: 28px; font-size: 14px; }

  /* ── Stats ──────────────────────────────────────────────── */
  .stat-number       { font-size: 28px; }
  .stat-label        { font-size: 9px; }

  /* ── Section titles ─────────────────────────────────────── */
  .section-title h2  { font-size: 22px; }

  /* ── Grid layouts ───────────────────────────────────────── */
  .pillars-grid      { grid-template-columns: 1fr 1fr; gap: 10px; }
  .why-grid          { grid-template-columns: 1fr; gap: 12px; }
  .leadership-grid   { grid-template-columns: 1fr 1fr; gap: 12px; }
  .faculty-grid      { grid-template-columns: 1fr; }
  .facilities-grid   { grid-template-columns: 1fr; gap: 12px; }
  .houses-grid       { grid-template-columns: 1fr 1fr; gap: 10px; }
  html body .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  html body .gallery-grid .gallery-item { height: 150px !important; min-height: 150px !important; max-height: 150px !important; }
  .about-features    { grid-template-columns: 1fr; }
  .ql-grid           { grid-template-columns: 1fr 1fr; }
  .notice-grid       { gap: 16px; }
  .footer-grid       { gap: 24px; }

  /* ── Cards ──────────────────────────────────────────────── */
  .pillar-card  { padding: 18px 12px; }
  .why-card     { padding: 18px 12px; }
  .house-card   { padding: 14px 10px; }
  .facility-card{ padding: 14px 12px; }
  .leader-img   { height: 150px; }

  /* ── CTA ────────────────────────────────────────────────── */
  .cta-section h2            { font-size: 20px; }
  .btn-cta-white,
  .btn-cta-outline           { font-size: 12px; padding: 11px 20px; }

  /* ── Footer ─────────────────────────────────────────────── */
  .footer-bottom             { font-size: 11px; }

  /* ── Elementor on XS ────────────────────────────────────── */
  body.mdsn-full-width .elementor-section.elementor-section-boxed > .elementor-container,
  body.mdsn-full-width .elementor-section > .elementor-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body.mdsn-full-width .elementor-section {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }
  body.mdsn-full-width .elementor-widget-heading h1.elementor-heading-title {
    font-size: clamp(20px, 7vw, 26px) !important;
  }
  body.mdsn-full-width .elementor-widget-heading h2.elementor-heading-title {
    font-size: clamp(18px, 6vw, 24px) !important;
  }
  body.mdsn-full-width .elementor-widget-heading h3.elementor-heading-title {
    font-size: clamp(15px, 5vw, 20px) !important;
  }
  body.mdsn-full-width .elementor-widget-text-editor div[style*="border-radius"] {
    padding: 18px 14px !important;
    border-radius: 10px !important;
  }
  body.mdsn-full-width .mdsn-school-unit,
  body.mdsn-full-width .mdsn-school-tagline { display: none !important; }
  body.mdsn-full-width .mdsn-btn-admit i    { display: none !important; }
}


/* ══════════════════════════════════════════════════════════════
   SPECIAL — 320px (very small phones, Galaxy A01 etc.)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {

  .mdsn-container { padding-left: 10px; padding-right: 10px; }
  .mdsn-school-name { font-size: 11px; }
  .mdsn-btn-admit   { padding: 7px 8px; font-size: 9px; }
  .hero             { height: 200px; }
  .hero-content h1  { font-size: 15px; }
  .stat-number      { font-size: 24px; }
  .stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid,
  .leadership-grid,
  .houses-grid      { grid-template-columns: 1fr 1fr; }
  .why-grid,
  .faculty-grid,
  .facilities-grid  { grid-template-columns: 1fr; }
  html body .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 4px !important; }
  html body .gallery-grid .gallery-item { height: 130px !important; min-height: 130px !important; max-height: 130px !important; }
  .section-title h2 { font-size: 20px; }
  .cta-section h2   { font-size: 18px; }

  body.mdsn-full-width .elementor-section.elementor-section-boxed > .elementor-container,
  body.mdsn-full-width .elementor-section > .elementor-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  body.mdsn-full-width .elementor-widget-heading h1.elementor-heading-title {
    font-size: 18px !important;
  }
  body.mdsn-full-width .elementor-widget-heading h2.elementor-heading-title {
    font-size: 16px !important;
  }
}

