
/*
MR BUS Legacy / Generated Page Compatibility Layer
This file protects older sheet-generated pages after moving away from Elementor/Hello Elementor.
It gives non-home pages a premium full-width shell while you migrate each sitemap group CSS.
*/

:root{
  --mrbus-legacy-gap:2cm;
  --mrbus-legacy-blue:#075fb0;
  --mrbus-legacy-sky:#13a8ee;
  --mrbus-legacy-deep:#041e38;
  --mrbus-legacy-red:#e94224;
  --mrbus-legacy-soft:#f4fbff;
  --mrbus-legacy-text:#17324a;
  --mrbus-legacy-muted:#49647b;
  --mrbus-legacy-line:rgba(7,95,176,.14);
}

body:not(.mrbus-master-home) .mrbus-page-main{
  width:100%;
  overflow:hidden;
  background:
    radial-gradient(circle at 10% 0%,rgba(19,168,238,.11),transparent 30%),
    linear-gradient(180deg,#f4fbff 0%,#fff 42%,#eef9ff 100%);
}

body:not(.mrbus-master-home) .mrbus-entry-content,
body:not(.mrbus-master-home) .entry-content,
body:not(.mrbus-master-home) .page-content{
  width:100%;
  max-width:none;
}

/* If an old page has its own section system, preserve it but make it full width. */
body:not(.mrbus-master-home) .mrbus-entry-content > section,
body:not(.mrbus-master-home) .entry-content > section,
body:not(.mrbus-master-home) .page-content > section,
body:not(.mrbus-master-home) main > section{
  width:100%;
}

/* Common old generated content wrappers. */
[class*="mrbus-"][class*="-wrap"],
[class*="mrbus-"][class*="-shell"],
[class*="swat-"][class*="-wrap"],
[class*="swat-"][class*="-shell"],
.mrbus-shell,
.swat-shell,
.page-shell,
.content-shell{
  width:calc(100% - (var(--mrbus-legacy-gap) * 2));
  max-width:1920px;
  margin-left:auto;
  margin-right:auto;
}

/* Premium default content cards if pages have plain editor HTML. */
body:not(.mrbus-master-home) .mrbus-page-card{
  border-radius:34px;
  background:rgba(255,255,255,.90);
  border:1px solid rgba(196,232,255,.92);
  box-shadow:0 24px 70px rgba(4,74,130,.10);
}

/* Typography protection for generated pages. */
body:not(.mrbus-master-home) h1,
body:not(.mrbus-master-home) h2,
body:not(.mrbus-master-home) h3{
  text-transform:none;
  letter-spacing:-.03em;
}

body:not(.mrbus-master-home) h1{
  color:#063b70;
  font-size:clamp(34px,4vw,64px);
  line-height:1.05;
}

body:not(.mrbus-master-home) h2{
  color:#063b70;
  font-size:clamp(27px,2.8vw,48px);
  line-height:1.1;
}

body:not(.mrbus-master-home) h3{
  color:#075fb0;
  font-size:clamp(21px,1.8vw,30px);
  line-height:1.16;
}

body:not(.mrbus-master-home) p,
body:not(.mrbus-master-home) li{
  color:#38536d;
  font-size:17px;
  line-height:1.78;
}

/* Common premium cards/grids used in generated pages. */
[class*="grid"],
.mrbus-grid,
.swat-grid{
  max-width:100%;
}

.mrbus-card,
.swat-card,
.service-card,
.route-card,
.fleet-card,
.price-card,
.info-card{
  border-radius:26px;
  background:#fff;
  border:1px solid rgba(196,232,255,.92);
  box-shadow:0 16px 44px rgba(4,74,130,.08);
}

.mrbus-btn,
.swat-btn,
.button,
.wp-block-button__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:999px;
  border:0;
  text-decoration:none!important;
  font-weight:900;
  background:linear-gradient(135deg,#075fb0,#13a8ee);
  color:#fff!important;
  box-shadow:0 12px 28px rgba(5,103,180,.20);
}

body:not(.mrbus-master-home) table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:18px;
  border:1px solid rgba(7,95,176,.15);
  background:#fff;
}

body:not(.mrbus-master-home) th,
body:not(.mrbus-master-home) td{
  padding:14px 16px;
  border-bottom:1px solid rgba(7,95,176,.10);
  text-align:left;
  vertical-align:top;
}

body:not(.mrbus-master-home) th{
  color:#fff;
  background:linear-gradient(135deg,#075fb0,#13a8ee);
}

@media(max-width:1380px){
  :root{--mrbus-legacy-gap:44px}
}

@media(max-width:767px){
  :root{--mrbus-legacy-gap:12px}
  [class*="mrbus-"][class*="-wrap"],
  [class*="mrbus-"][class*="-shell"],
  [class*="swat-"][class*="-wrap"],
  [class*="swat-"][class*="-shell"],
  .mrbus-shell,
  .swat-shell,
  .page-shell,
  .content-shell{
    width:calc(100% - 24px);
  }
}


/* V1.2: Generated raw pages should not be forced into theme card spacing. */
body:not(.mrbus-master-home) .mrbus-standard-page{
  padding:0 0 0;
}

body:not(.mrbus-master-home) .mrbus-standard-page > .mrbus-core-page:first-child,
body:not(.mrbus-master-home) .mrbus-standard-page > section:first-child{
  margin-top:0;
}

/* Hide any old importer/page-title blocks if they survive. */
.page-header,
.entry-title,
.post-title{
  display:none!important;
}


/* V1.3 generated/legacy page fixes */
body:not(.mrbus-master-home) .mrbus-standard-page{
  padding-top:0;
}

body:not(.mrbus-master-home) .mrbus-standard-page > .mrbus-legacy-wp-page:first-child,
body:not(.mrbus-master-home) .mrbus-standard-page > .mrbus-core-page:first-child{
  margin-top:0;
}

.page-header,
.entry-title,
.post-title{
  display:none!important;
}

/* Stop old imported pages from becoming narrow when raw-rendered. */
.mrbus-standard-page > .mrbus-legacy-wp-page,
.mrbus-standard-page > .mrbus-core-page{
  width:100%;
}

/* Admin bar preview compensation handled by WP admin styles; do not damage public view. */
