/* =========================
   Modern upgrade layer
   Paste at END of css/2024.css
   ========================= */

:root{
  --ink:#0b1b33;
  --text:#132a4a;
  --muted:#5b6b86;
  --brand:#1f4e79;
  --accent:#fcdd00;
  --card:#ffffff;
  --shadow: 0 12px 30px rgba(0,0,0,.12);
  --radius: 18px;
}

body{
  color: var(--text);
  line-height: 1.5;
}

/* Make legacy fixed widths behave better */
.maintext,
.maintextxxx,
.footer,
.headerblock{
  width: min(980px, calc(100% - 24px)) !important;
}

/* HERO */
.hero{
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  border-bottom: 7px solid var(--accent);
  background: #0c2b52;
}

.hero__bg{
  position:absolute;
  inset:0;
  background:
    linear-gradient(110deg, rgba(8,22,48,.88) 0%, rgba(8,22,48,.55) 55%, rgba(8,22,48,.35) 100%),
    url("https://inflatableracearches.com/gifs/190430-3.jpg") center/cover no-repeat;
  transform: scale(1.02);
}

.hero__inner{
  position: relative;
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
}

.hero__kicker{
  display:inline-block;
  color: rgba(255,255,255,.9);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 10px;
}

.hero__title{
  color:#fff;
  font-family: Merriweather, "Open Sans", system-ui, Arial, sans-serif;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: .4px;
  margin: 0 0 10px 0;
  padding: 0;
  background: none;
  min-height: 0;
}

.hero__lead{
  color: rgba(255,255,255,.92);
  font-size: 16px;
  max-width: 60ch;
  margin: 0 0 16px 0;
}

.hero__cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 12px 0 14px 0;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration:none !important;
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 24px rgba(0,0,0,.22); }

.btn--primary{
  background: linear-gradient(135deg, var(--accent), #ffd84f);
  color: #14253f !important;
  border-color: rgba(0,0,0,.08);
}

.btn--ghost{
  background: rgba(255,255,255,.10);
  color: #fff !important;
}

.btn--small{
  padding: 10px 14px;
  font-size: 14px;
  background: rgba(255,255,255,.08);
  color: #fff !important;
}

.hero__contact{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
  font-size: 14px;
}

.pill a{ color:#fff !important; text-decoration:none; }
.pill a:hover{ text-decoration: underline; }

.pill__label{
  display:inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(252,221,0,.16);
  border: 1px solid rgba(252,221,0,.25);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pill--muted{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(255,255,255,.86);
}

.hero__social{
  margin-top: 12px;
  display:flex;
  gap:10px;
  align-items:center;
}

.iconbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
}

.iconbtn img{ display:block; }

.card{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card--glass{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.5);
  padding: 16px;
}

.card__title{
  margin: 0 0 10px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.ticks{
  margin: 0;
  padding: 0;
}

.ticks li{
  list-style: none;
  margin: 0 0 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.45;
}

.ticks li::before{
  content:"";
  position:absolute;
  left:0;
  top:.25em;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(31,78,121,.15);
  border: 1px solid rgba(31,78,121,.25);
}

.ticks li::after{
  content:"✓";
  position:absolute;
  left:4px;
  top:.05em;
  font-weight: 900;
  color: var(--brand);
}

.card__badges{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.card__badges img{
  height: 54px;
  width:auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.12));
}

/* Main content modern wrapper */
.maintext--modern{
  padding: 18px 0 8px 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.contentgrid{
  display:grid;
  gap: 18px;
  grid-template-columns: 1.2fr .8fr;
  align-items:start;
  padding: 0 12px 16px 12px;
}

.contentgrid__main{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.contentgrid__side{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.noticebar{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.08);
  margin-bottom: 14px;
}

.noticebar__img{
  width:100%;
  height:auto;
  display:block;
}

/* =========================
   Special offer image – mobile overflow fix
   ========================= */

.noticebar__img,
img[src*="specialoffer"]{
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* Extra safety on small screens */
@media (max-width: 680px){
  .noticebar{
    overflow: hidden;   /* prevents any accidental bleed */
  }
}



.featurecards{
  display:grid;
  gap: 10px;
  margin: 14px 0;
}

.feature{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.feature__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(252,221,0,.35);
}

.callout{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31,78,121,.18);
  background: rgba(31,78,121,.06);
  margin: 14px 0;
}

.sidehead{
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.photogrid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.photo{
  margin:0;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.08);
}

.photo img{
  width:100%;
  height: 140px;
  object-fit: cover;
  display:block;
  transition: transform .2s ease;
}

.photo:hover img{ transform: scale(1.03); }

/* Kill legacy float layout clashes inside modern area */
.maintextmain,
.fromtheeditor{
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Responsive */
@media (max-width: 999px){
  .hero__inner,
  .contentgrid{
    grid-template-columns: 1fr;
  }
  .hero__inner{ padding: 26px 0; }
  .photogrid{ grid-template-columns: repeat(3, 1fr); }
  .photo img{ height: 120px; }
}

@media (max-width: 680px){
  .photogrid{ grid-template-columns: repeat(2, 1fr); }
  .photo img{ height: 120px; }
  .btn{ width: 100%; }
  .hero__cta{ gap: 8px; }
}


/* =========================
   Recent arches – mobile stacking fix
   ========================= */

/* Default (desktop / tablet already fine) */
.photogrid{
  display: grid;
  gap: 10px;
}

/* Force single column on small screens */
@media (max-width: 1280px){
  .photogrid{
    grid-template-columns: 1fr !important;
  }

  .photo img{
    width: 100%;
    height: auto;          /* avoid cropping on narrow screens */
    max-width: 100%;
  }
}


/* Hide old menu system completely (safe even if removed) */
.menubar, #cssmenu, .maintextxxx .mobhide { display: none !important; }

/* =========================
   Nav pills – heritage blue version
   ========================= */

.navpills{
  background: #7ab4ce;                 /* heritage blue */
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0 12px 0;
  border-bottom: 4px solid var(--accent, #fcdd00);
}

.navpills__inner{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

/* Individual buttons */
.navpill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none !important;

  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 14px;

  color: #0b1b33;                       /* dark ink for contrast */
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(11,27,51,.15);

  transition: transform .12s ease,
              box-shadow .12s ease,
              background .12s ease,
              border-color .12s ease;
}

.navpill:hover{
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 12px 22px rgba(0,0,0,.18);
  border-color: rgba(11,27,51,.28);
}

/* Active page */
.navpill--active{
  background: #ffffff;
  border-color: rgba(11,27,51,.35);
  box-shadow: 0 10px 18px rgba(0,0,0,.16);
}

/* Primary CTA (Contact) */
.navpill--primary{
  background: linear-gradient(135deg, var(--accent, #fcdd00), #ffd84f);
  border-color: rgba(0,0,0,.12);
  color: #14253f !important;
}

/* Mobile tuning */
@media (max-width: 680px){
  .navpills__inner{
    justify-content: flex-start;
  }
  .navpill{
    padding: 9px 12px;
    font-size: 13.5px;
  }
}




/* =========================
   Ensure modern UI uses site fonts
   ========================= */

/* Base font for all new modern elements */
.hero,
.hero * ,
.navpills,
.navpills * ,
.btn,
.pill,
.callout,
.feature,
.feature * {
  font-family: "Rubik", "Open Sans", "Segoe UI", Arial, Helvetica, sans-serif;
}

/* Headings keep a bit of gravitas */
.hero__title,
.card__title,
.sidehead {
  font-family: Merriweather, "Open Sans", Georgia, serif;
}

/* Navigation pills specifically */
.navpill {
  font-family: "Rubik", "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .03em;
}

/* Telephone + email links */
.hero__contact a,
.callout a {
  font-family: "Rubik", "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
}

/* Small helper text */
.hero__kicker,
.pill__label {
  font-family: "Rubik", "Open Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: .12em;
}

/* =========================
   Modern footer
   ========================= */

.sitefooter{
  margin-top: 18px;
  border-top: 7px solid var(--accent, #fcdd00);
  background: #bcdae7;
}

.sitefooter__top{
  padding: 18px 0 0 0;
}

.sitefooter__badges{
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 0 12px 14px 12px;
}

.sitefooter__badges img{
  height: 64px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.12));
}

.sitefooter__inner{
  width: min(980px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 18px 0;
}

.footergrid{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
  padding: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr 1.2fr;
}

.footerhead{
  margin: 0 0 8px 0;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #0b1b33;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
}

.footerlinks{
  margin: 0;
  padding: 0;
  list-style: none;
}

.footerlinks li{
  margin: 0 0 8px 0;
  padding: 0;
}

.footerlinks a{
  color: #1f4e79;
  text-decoration: none;
  font-weight: 700;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
}

.footerlinks a:hover{
  text-decoration: underline;
  color: #0b1b33;
}

.footercopy{
  margin: 12px 0 0 0;
  font-size: 13px;
  color: #3b4f6b;
  line-height: 1.45;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
}

.footercopy a{ color:#1f4e79; font-weight:800; }
.powered{ opacity: .9; }

/* Responsive footer */
@media (max-width: 900px){
  .footergrid{ grid-template-columns: 1fr; }
  .sitefooter__badges{ justify-content: flex-start; }
}

/* =========================
   Cookie / privacy bar (modern)
   ========================= */

.cookiebar{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
}

.cookiebar__inner{
  width: min(980px, 100%);
  margin: 0 auto;
  background: rgba(11,27,51,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  padding: 12px 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cookiebar__text{
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255,255,255,.92);
}

.cookiebar__text a{
  color: var(--accent, #fcdd00);
  font-weight: 800;
  text-decoration: none;
}
.cookiebar__text a:hover{ text-decoration: underline; }

.cookiebar__actions{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookiebtn{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.cookiebtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0,0,0,.22);
}

.cookiebtn--primary{
  background: linear-gradient(135deg, var(--accent, #fcdd00), #ffd84f);
  color: #14253f;
  border-color: rgba(0,0,0,.08);
}

.cookiebtn--ghost{
  background: rgba(255,255,255,.10);
}

.cookiebar--hide{
  display: none !important;
}

@media (max-width: 740px){
  .cookiebar__inner{
    grid-template-columns: 1fr;
  }
  .cookiebar__actions{
    justify-content: flex-start;
  }
}



/* Hero social links – clean text pills */
.hero__social{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.socialpill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;

  color: #ffffff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  text-decoration: none !important;

  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.socialpill:hover{
  background: rgba(255,255,255,.22);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}

/* Force hero social links to white (override legacy link colours) */
.hero__social a,
.hero__social a:link,
.hero__social a:visited,
.hero__social a:hover,
.hero__social a:active {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* =========================
   Remove bullets from footer lists (override legacy LI rules)
   ========================= */

.sitefooter ul,
.sitefooter li {
  list-style: none !important;
  list-style-image: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.sitefooter li::marker {
  content: "" !important;
}

/* =========================
   Footer dividers
   ========================= */

.footergrid{
  position: relative;
}

/* Vertical dividers between columns (desktop only) */
@media (min-width: 901px){
  .footercol{
    position: relative;
    padding-right: 16px;
  }

  .footercol:not(:last-child)::after{
    content:"";
    position:absolute;
    top: 8px;
    right: -8px;
    width: 1px;
    height: calc(100% - 16px);
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0),
      rgba(0,0,0,.15),
      rgba(0,0,0,0)
    );
  }
}

/* =========================
   Footer contact icons
   ========================= */

.footercontact{
  margin-top: 10px;
}

.footercontact p{
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footercontact a{
  font-weight: 700;
  color: #1f4e79;
  text-decoration: none;
}

.footercontact a:hover{
  text-decoration: underline;
}

/* Icon base */
.footercontact .icon{
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(31,78,121,.12);
  color: #1f4e79;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Phone icon */
.footercontact .icon.phone::before{
  content: "☎";
}

/* Email icon */
.footercontact .icon.email::before{
  content: "✉";
}


/* Ensure "Recent arches" heading uses modern styling (override legacy H2) */
.contentgrid__side .sidehead,
.contentgrid__side h2.sidehead{
  margin: 0 0 10px 0 !important;
  padding: 0 !important;

  font-family: Merriweather, "Open Sans", Georgia, serif !important;
  font-weight: 800 !important;
  font-size: 18px !important;
  letter-spacing: 0 !important;

  color: #0b1b33 !important;
}


/* === Mobile hamburger + dropdown for navpills === */

.navpills__desktop{ display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.navtoggle{ display: none; }

.navmenu{
  width: 100%;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(11,27,51,.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

.navmenu a{
  display: block;
  padding: 12px 14px;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  font-weight: 800;
  color: #0b1b33 !important;
  text-decoration: none !important;
  border-top: 1px solid rgba(0,0,0,.06);
}

.navmenu a:first-child{ border-top: 0; }

.navmenu a:hover{
  background: rgba(31,78,121,.08);
}

.navmenu__primary{
  background: linear-gradient(135deg, var(--accent, #fcdd00), #ffd84f);
  color: #14253f !important;
}

/* Hamburger button styling */
.navtoggle{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.18);
  color: #0b1b33;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}

.navtoggle__label{ font-size: 14px; }

/* Simple hamburger icon */
.navtoggle__icon{
  width: 22px;
  height: 14px;
  position: relative;
  display: inline-block;
}
.navtoggle__icon::before,
.navtoggle__icon::after{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(11,27,51,.9);
  border-radius: 2px;
}
.navtoggle__icon::before{ top: 0; }
.navtoggle__icon::after{ bottom: 0; }
.navtoggle__icon{
  background: rgba(11,27,51,.9);
  height: 2px;
  margin: 6px 0;
  border-radius: 2px;
}

/* Mobile behaviour */
@media (max-width: 680px){
  .navpills__desktop{ display: none; }
  .navtoggle{ display: inline-flex; }
}

/* =========================================
   Fix mobile overflow caused by legacy P margin-right/padding-right
   Only affects the new modern content area
   ========================================= */

.maintext--modern p,
.maintext--modern li,
.maintext--modern ul,
.maintext--modern ol {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

/* Extra safety: make sure modern cards never overflow */
.contentgrid__main,
.contentgrid__side {
  max-width: 100%;
  overflow-x: hidden;
}

/* Optional global safety net (helps catch any stray overflow) */
html, body {
  overflow-x: hidden;
}

/* =========================
   Nav: desktop vs mobile visibility fix
   ========================= */

/* Default: DESKTOP */
.navtoggle {
  display: none !important;
}

.navpills__desktop {
  display: flex;
}

/* MOBILE only */
@media (max-width: 680px) {
  .navtoggle {
    display: inline-flex !important;
  }

  .navpills__desktop {
    display: none !important;
  }
}

/* =========================
   Fix "View full gallery" button on white backgrounds
   ========================= */

.contentgrid__side .btn--small{
  background: rgba(31,78,121,.12) !important;
  color: #0b1b33 !important;
  border: 1px solid rgba(31,78,121,.28) !important;
}

.contentgrid__main .btn--small{
  background: rgba(31,78,121,.12) !important;
  color: #0b1b33 !important;
  border: 1px solid rgba(31,78,121,.28) !important;
}

/* Hover state */
.contentgrid__side .btn--small:hover{
  background: rgba(31,78,121,.20) !important;
  box-shadow: 0 10px 18px rgba(0,0,0,.15);
}

/* =========================
   Inner pages: single-column wide layout
   ========================= */

.contentgrid--single{
  grid-template-columns: 1fr !important;
}

.contentgrid__main--wide{
  width: 100%;
  max-width: 100%;
}

/* Optional: make inner-page content feel more "page-like" */
.contentgrid__main--wide{
  padding: 18px;
}

/* If old pasted content contains fixed-width images/tables, keep them inside the viewport */
.contentgrid__main--wide img,
.contentgrid__main--wide table,
.contentgrid__main--wide iframe{
  max-width: 100%;
}

/* Keep long URLs/strings from forcing horizontal scroll */
.contentgrid__main--wide{
  overflow-wrap: anywhere;
}


/* =========================
   Gallery grid (modern)
   ========================= */

.gallerygrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.galleryitem{
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}

.galleryitem:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0,0,0,.18);
}

.galleryitem img{
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Mobile: single column */
@media (max-width: 680px){
  .gallerygrid{
    grid-template-columns: 1fr;
  }
  .galleryitem img{
    height: auto;
  }
}


/* =========================
   Lightbox
   ========================= */

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active{
  display: flex;
}

.lightbox__img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}

.lightbox__close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* =========================
   Testimonials grid
   ========================= */

.testigrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.testicard{
  background: #ffffff;
  border: 1px solid rgba(11,27,51,.10);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
  position: relative;
}

.testicard blockquote{
  margin: 0;
  color: #0b1b33;
  line-height: 1.55;
  font-size: 16px;
  font-family: "Rubik","Open Sans","Segoe UI",Arial,sans-serif;
}

.testicard blockquote::before{
  content: "“";
  font-family: Merriweather, Georgia, serif;
  font-size: 42px;
  line-height: 1;
  color: rgba(31,78,121,.35);
  display: block;
  margin-bottom: 6px;
}

.testicard figcaption{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
  font-weight: 800;
  color: rgba(11,27,51,.80);
  font-size: 14px;
}

/* Tablet */
@media (max-width: 980px){
  .testigrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 680px){
  .testigrid{
    grid-template-columns: 1fr;
  }
  .testicard{
    padding: 14px;
  }
}


@media (hover:hover){
  .testicard{
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .testicard:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0,0,0,.16);
  }
}
