/* -------------  Global font & colours ------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');     /* geometric, strong headlines */ 
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');        /* clean, versatile body copy */   
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@600&display=swap');  /* technical, highly legible */   
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@500&display=swap');         /* modern, monospaced feel */      
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@600&display=swap');           /* elegant, narrow sans */      
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@600&display=swap');  /* #3 */
@import url('https://fonts.googleapis.com/css2?family=Tomorrow:wght@600;700&display=swap');

:root{
    --blue: #0a3d62;
    --white: #ffffff;
    --overlay-bg: rgba(0,0,0,.75);     /* darker */
}

/* =====   TOP "MASTHEAD" BANNER  ===== */
.masthead {
    position: relative;
    width: 100%;
    min-height: 345px;          /* adjust to taste                */
    display: flex;
    align-items: center;
    background:
        /* blue overlay on top of photo */
        linear-gradient(to right, rgba(10,61,98,.9), rgba(10,61,98,.7)),
        url('../images/Mori_home_bg.jpg')  center / cover no-repeat;
    color: #fff;
}

/* inner container keeps content max-width */
.banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* fluid logo – grows with viewport, but stays between 120 px ↔ 320 px */
.banner-logo img{
    height: clamp(140px , 11vw , 190px);
    width:  auto;
}


/* CTA area */
.banner-cta{
    display: flex;
    align-items: center;
    gap: .75rem;
}
.btn{
    background:#d02b2b;
    color:#fff;
    padding:.6rem 1.5rem;
    border-radius:3px;
    font-weight:600;
    text-decoration:none;
}
.btn-primary{
    padding: 0.9rem 2.5rem;      /* ↑ height   ←→ width  */
    font-size: 1.05rem;          /* a little larger text */
    font-weight: 600;            /* matches site headings */
    letter-spacing: .2px;
}
.btn:hover{background:#b31f1f;}

/* —— Solid white phone / mail circles —— */
.icon-link{
    /* layout unchanged */
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border:2px solid #fff;
    border-radius:50%;

    /* new bits ↓ */
    background:#fff;           /* solid fill */
    color:var(--blue);         /* phone / mail glyph in brand blue */
    text-decoration:none;      /* ← removes the underline */
    transition:background .25s,color .25s;
}

/* subtle hover effect (optional) */
.icon-link:hover{
    background:#f1f5fa;        /* very-light blue-grey */
}


/* simple placeholder icons (use FontAwesome later) */
.icon-phone::before{content:"📞";}


body{
    font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
    margin:0;
    padding:0;
    background-color:var(--blue);
    color:#000000;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* -------------  Navigation (thin dark strip) ------------- */

nav{                          /* the bar itself */
    background:#f5f5f5;       /* darker blue */
    padding:4px 0;            /* was 10 px → slimmer */
    box-shadow: none;
    margin-bottom: 0;    /* ensure it doesn't push the next section down */
    padding-bottom: 0;   /* if you have padding, zero it out */
}

/* —— DESKTOP NAV STRIP —— */
@media (min-width: 769px) {        /* 769 px and up */
    nav ul, nav li {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    nav ul {
        display: flex;
        justify-content: center;
    }
    nav li {
        margin: 0 10px;
    }
}

/* links */
nav a{
    display:inline-block;
    color:#333;
    font-weight:600;
    font-size:0.95rem;        /* optional: a hair smaller */
    text-decoration:none;
    padding:6px 14px;         /* was 10 × 15 → sleeker pill */
    border-radius:4px;
    transition:background .2s;
}

nav a:hover{
    background:rgba(21, 36, 170, 0.15); /* light glow on dark strip */
}


/* -------------  Logo ------------- */
.logo{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}
.logo img{
    max-width:320px;      /* a bit smaller */
    height:auto;
    display:block;
    margin:0 auto;
}

/* Body/content area */
main {
  background: #f2f6fa;     /* very light grey/white */
  color: #111;             /* near-black for readability */
  padding: 4rem 2rem;      /* some breathing room */
  box-sizing: border-box;
  width: 100%;
}

/* If you have specific typography rules for headings/paras: */
main h2, main h3 {
  color: #222;
}
main p {
  color: #333;
  line-height: 1.6;
}

/* -------------  Generic hero sections ------------- */
.hero-section,
.contact-hero{
    position:relative;
    width:100%;
    height:70vh;                                       /* was 80vh */
    background:no-repeat center center/contain;        /* scale down */
    display:flex;
    align-items:center;
    justify-content:center;
}

/* individual background paths */
.hero-section       {background-image:url('../images/mori_operator_panel.webp');}
.contact-hero       {background-image:url('../images/loading_image_v2.webp') !important;}

/* shared overlay */
.overlay{
    position:absolute;
    background:var(--overlay-bg);                      /* darker */
    padding:20px;
    border-radius:10px;
    text-align:center;
    opacity:0;
    transition:opacity .5s ease-in-out;
}
.hero-section:hover .overlay,
.contact-hero:hover .overlay{opacity:1;}

/* -------------  Contact page layout ------------- */
.contact-container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    width:90%;
    max-width:1200px;
    margin:30px auto;
}
.social-links{width:40%;text-align:center;}
.social-btn{
    display:block;
    margin:10px auto;
    padding:10px 15px;
    width:200px;
    font-weight:600;
    border-radius:5px;
    text-decoration:none;
    color:#fff;
    transition:background .3s;
}
.facebook{background:#3b5998;} .facebook:hover{background:#2d4373;}
.twitter {background:#1da1f2;} .twitter:hover {background:#0d8ddc;}
.linkedin{background:#0077b5;} .linkedin:hover{background:#005582;}

.map-container{
    width:55%;
    height:300px;
    display:flex;
    justify-content:center;
    align-items:center;
    margin-top:20px;
}

/* -------------  Mori machines hero ------------- */
.mori-hero{
    position:relative;
    width:100%;
    height:70vh;
    background-color:var(--blue);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
/* text card */
.mori-overlay{
    position:absolute;
    left:5%;
    max-width:35%;
    background:var(--overlay-bg);
    padding:20px;
    border-radius:15px;
    backdrop-filter:blur(5px);
    z-index:2;
}
.mori-overlay h1{font-size:2.2rem;margin:0;}
.mori-overlay p {font-size:1.1rem;line-height:1.5;margin:10px 0 0;}

/* ——— PAGE HEADING ——— */
.page-heading {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.page-heading h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}
.page-heading .lead {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
  color: #e0e0e0;
}

/* content container sits above the pseudo-element */
.home-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 5%;
}



/* text styles */
.home-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.home-text p {
  font-size: 1.1rem;
  line-height: 1.5;
}

/* simple fadeInUp */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ─── SOLO HERO ─── */
.solo-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
}

/* make it stack on small screens */
@media (max-width: 768px) {
  .solo-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* image styling */
.solo-hero__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.solo-hero__copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.solo-hero__copy p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
}

/* Pro Tip #3: Whitespace & Visual Focus */
body {
 background: var(--page-bg, #F2F6FA);
}

.solo-hero {
  background-color: var(--hero-bg);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 1200px;
}

/* stack on tablet+mobile */
@media (max-width: 768px) {
  .solo-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ─── FADE-IN-UP ANIMATION ─── */
/* start hidden + down 20px */
.solo-hero__image img,
.solo-hero__copy {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

/* stagger copy a little later */
.solo-hero__copy {
  animation-delay: 0.4s;
}

/* keyframes */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-hero {
  position: relative;
  width: 100%;
  height: 60vh; 
  margin-top: 0px;
  padding: 0;          
  overflow: hidden;          /* crop anything outside */
  display: flex;             /* center content */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 5vw;
  background: #0a3d62;  /* fallback color */
}



.video-hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;  /* Make video unclickable */
}

.video-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));  /* darker gradient overlay */
  z-index: 2;
}

.video-hero__content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  text-align: center;
  color: #fff;
}

.video-hero__title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5em;
  text-shadow: 
    0 0 20px rgba(0,0,0,0.9),
    0 2px 10px rgba(0,0,0,0.8),
    0 4px 20px rgba(0,0,0,0.7);
  line-height: 1.2;
}

.video-hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-family: 'Roboto', sans-serif;
  margin-bottom: 1.5em;
  text-shadow: 
    0 0 15px rgba(0,0,0,0.9),
    0 2px 8px rgba(0,0,0,0.8),
    0 3px 15px rgba(0,0,0,0.6);
}

.video-hero__cta {
  display: inline-block;
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'Source Sans Pro', sans-serif;
  text-decoration: none;
  transition: all .3s;
  border: 2px solid #fff;
  backdrop-filter: blur(5px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.video-hero__cta:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

/* responsive tweaks */
@media (max-width:768px) {
  .video-hero {
    height: 40vh;
    padding: 0;
  }
}

@media (max-width:480px) {
  .video-hero {
    height: 30vh;
    padding: 1rem;
  }
  .video-hero__title { font-size: 1.5rem; }
  .video-hero__subtitle { font-size: 1rem; }
}

/* ───────────────  MOBILE  ( ≤ 768 px )  ─────────────── */
@media (max-width: 768px) {

  /* stack logo & CTA vertically */
  .banner-inner {
    flex-direction: column;
    gap: .75rem;
    padding: 1.5rem .75rem;
  }



  /* ---------- TABLET ( 992 px ► 769 px ) ---------- */
@media (max-width: 992px) {

  /* keep row layout, but let things wrap */
  .banner-inner{
      flex-wrap: wrap;           /* allow 2-row flow            */
      gap:   1rem;               /* breathing-room               */
  }

  /* logo stays left, nothing to change */
  
  /* pill + icons become a centred second row */
  .banner-cta{
      flex: 0 0 100%;            /* full-width row               */
      justify-content: center;   /* centred horizontally         */
      margin-top:   1rem;        /* push away from logo          */
      order:  2;                 /* keep it after the logo       */
  }

  /* tighten the pill a little so it never overflows */
  .btn-primary{
      font-size: 1rem;
      padding: 0.8rem 2rem;
  }

  /* stop the two circle icons from shrinking away */
  .icon-link{ flex: 0 0 auto; }
}

  /* fluid logo – grows with viewport but stays reasonable */
  .banner-logo img {
    /* min 140 px  ·  grows at ~11 vw  ·  max 240 px */
    height: clamp(140px, 11vw, 240px);
    width:  auto;
    margin-bottom: 0;          /* remove leftover gap */
  }

  /* push CTA further away from the logo */
  .banner-cta {
    margin-top: 2.5rem;        /* adjust as you like */
    order: 2;                  /* ensure it sits after the logo */
  }
}

/* ———————————————————— */
/* video hugs nav, zero gap */
/* ———————————————————— */

.video-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ———————————————————————— */
/* special case: when video-hero is first inside main */
/* ———————————————————————— */
main > .video-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ─── MOBILE HAMBURGER ─── */
.legacy-nav-toggle {                        /* clickable icon  */
  position: absolute;                /* hugs left edge  */
  top: 0.75rem; right: 1rem; left: auto;
  width: 44px; height: 44px;         /* thumb-size tap  */
  display: none;                     /* hide on desktop */
  background: transparent;
  border: 0;
  z-index: 999;                      /* above masthead  */
}

.legacy-nav-toggle__bar,                    /* three bars      */
.legacy-nav-toggle__bar::before,
.legacy-nav-toggle__bar::after {
  content: '';
  display: block;
  width: 24px; height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.legacy-nav-toggle__bar::before { transform: translateY(-7px); }
.legacy-nav-toggle__bar::after  { transform: translateY(4px); }

/*  when menu is open ➜ animate into "X"  */
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar {
  background: transparent;
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::before {
  transform: translateY(0) rotate(45deg);
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::after {
  transform: translateY(0) rotate(-45deg);
}

/* slide-in drawer: hidden by default – slides in when .open is added */
.legacy-mobile-nav {
    position:fixed;
    top:0;
    right:0;          /* anchor to right edge */
    left:auto;
    width:220px;      /* drawer width         */
    max-height:100vh;
    background:var(--blue);
    transform:translateX(100%);     /* start off-canvas */
    transition:transform .3s ease;
    padding-top:4rem; /* leave space for toggle icon */
    overflow-y:auto;
    box-shadow:-4px 0 12px rgba(0,0,0,.25);
    z-index:998;
}


.legacy-mobile-nav.open { transform: translateX(0); }

.legacy-mobile-nav ul { 
  display: block;
  list-style: none;
  margin: 0; padding: 0;
}
.legacy-mobile-nav li { margin: 0; }
.legacy-mobile-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-decoration: none;
}
.legacy-mobile-nav a:hover {
  background: rgba(255,255,255,.08);
}

/* keep drawer list vertical */
.legacy-mobile-nav ul {         /* no tag-prefix – just the class */
    display:block !important;
    margin:0; padding:0;
}
.legacy-mobile-nav li { margin:0; }


/* ─────────────── NAV–HERO SPACING RESET ─────────────── */
nav {
  /* win every cascade and strip out any stray bottom margin */
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* force the video-hero to hug the nav with no gap */
nav + .video-hero,
main > .video-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ─── MOBILE-DRAWER VISUAL TWEAKS ────────────────────────── */
/* append this right after your existing .legacy-mobile-nav{…} block */

/* 1 ▸ softer, glassy panel */
.legacy-mobile-nav{
    /* existing values stay; we just add/override ↓ */
    background: rgba(10,61,98,.90);      /* brand-blue @ 90 % opacity  */
    backdrop-filter: blur(3px);          /* subtle glass-blur          */
    border-radius: 0 0 0 16px;           /* round left-bottom corner   */
                                         /* (top-right & bottom-right
                                            stay square so the panel
                                            hugs viewport edges)       */
    box-shadow: -6px 0 14px rgba(0,0,0,.30);   /* a little softer */
}

/* 2 ▸ centre each link & add breathing-room */
.legacy-mobile-nav a{
    text-align: center;          /* horizontal centring           */
    padding: 1.25rem 1rem;       /* little taller, narrower sides */
    font-size: 1.05rem;          /* tiny bump for legibility      */
    letter-spacing: .25px;
}

/* 3 ▸ make the focus/hover glow gentler */
.legacy-mobile-nav a:hover{
    background: rgba(255,255,255,.06);   /* lighter highlight          */
}

/* 4 ▸ optional: smooth motion on open/close */
.legacy-mobile-nav{
    /* if you want the slide to feel silkier */
    transition: transform .35s cubic-bezier(.25,.8,.25,1);
}

/* ✅ Final consolidated stylesheet including all DevTools edits and product hero refinements */

:root {
  --hero-h:     280px;   /* consistent hero card height */
  --circle-1:   210px;   /* hero 1 and 3 image circle size (150%) */
  --circle-2:   280px;   /* hero 2 larger image circle size (200%) */
}

.product-heroes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.25rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.product-heroes-grid .solo-hero {
  position: relative;
  height: var(--hero-h);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background:
    linear-gradient(rgba(10, 61, 98, 0.88), rgba(10, 61, 98, 0.88)),
    url('../images/hero_bg1.png') center / cover no-repeat;
}

/* Default image size (heroes 1 & 3) */
.product-heroes-grid .solo-hero__image {
  flex: 0 0 var(--circle-1);
  margin-right: 1.5rem;
}
.product-heroes-grid .solo-hero__image img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

/* Hero 2 image scaling override */
.product-heroes-grid .solo-hero:nth-child(2) .solo-hero__image {
  flex: 0 0 var(--circle-2);
}
.product-heroes-grid .solo-hero:nth-child(2) .solo-hero__image img {
  width: 100%;
}

/* Text styling */
.product-heroes-grid .solo-hero__copy {
  flex: 1 1 auto;
  color: #fff;
}
.product-heroes-grid .solo-hero__copy h2 {
  margin: 0 0 0.35rem;
  font-family: 'Tomorrow', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
}
.product-heroes-grid .solo-hero__copy p {
  margin: 0;
  font: 1.25rem/1.55 'IBM Plex Sans', sans-serif;
  color: #e2e8f7;
  max-width: 50ch;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.product-heroes-grid .solo-hero__copy .btn {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  :root { --hero-h: auto; }
  .product-heroes-grid { padding: 0 0.5rem; }
  .product-heroes-grid .solo-hero {
    flex-direction: column;
    padding: 1.25rem;
    text-align: center;
  }
  .product-heroes-grid .solo-hero__image {
    margin: 0 0 1rem;
  }
  .product-heroes-grid .solo-hero__copy h2 {
    font-size: 2rem;
  }
  .product-heroes-grid .solo-hero__copy p {
    font-size: 1.05rem;
  }
  
  /* Reduce certification logo size by 50% on mobile for home page */
  .product-heroes-grid .solo-hero:first-child .solo-hero_image {
    flex: 0 0 calc(var(--circle-1) * 0.5);
  }
}

/* ─── HERO TYPOGRAPHY OVERRIDE ─────────────────────────────── */
/*  place at the bottom of style.css  */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600&display=swap');  /* punchy headline */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400&display=swap');   /* crisp body copy */

.product-heroes-grid .solo-hero__copy h2{
  /* headline ─ visually stronger */
  font-family: 'Oswald', sans-serif;      /* NEW font */
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 4rem);    /* a notch larger on all screens */
  color:#ffffff;                          /* pure white */
  letter-spacing: .5px;
  text-shadow: 0 4px 10px rgba(0,0,0,.55);/* stronger glow for contrast */
  margin: 0 0 .65rem;
}

.product-heroes-grid .solo-hero__copy p{
  /* sub-text ─ lighter & subtler */
  font-family: 'Inter', sans-serif;       /* lighter, modern body font */
  font-size: 1.15rem;                     /* keep hierarchy below h2 */
  line-height: 1.65;
  color:#cfd6e8;                          /* soft grey-white below title */
  max-width: 60ch;
  text-shadow: 0 2px 5px rgba(0,0,0,.35); /* gentle readability lift */
}

/* optional: make the copy column nudge right on large screens for better balance */
@media(min-width:992px){
  .product-heroes-grid .solo-hero__copy{
    padding-left: .25rem;
  }
}

/* ─────────── PRODUCT-HERO TYPOGRAPHY (FINAL OVERRIDE) ─────────── */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600&display=swap'); /* punchy title  */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap'); /* crisp body  */

/* headline – any <h2> or <h3> sitting directly inside .solo-hero__copy */
.product-heroes-grid .solo-hero__copy > h2,
.product-heroes-grid .solo-hero__copy > h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 3.6rem);   /* responsive but always larger than body */
  color: #ffffff;                          /* pure white */
  text-shadow: 0 4px 10px rgba(0,0,0,.55); /* punchy contrast on dark BG */
  margin: 0 0 .6rem;
  letter-spacing: 0.3px;
}

/* sub-text paragraph */
.product-heroes-grid .solo-hero__copy > p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.65;
  color: #cfd6e8;                          /* light grey, darker than title */
  max-width: 60ch;
  text-shadow: 0 2px 5px rgba(0,0,0,.35);
}

/* ensure the copy column never shrinks too much on wide screens */
@media (min-width: 992px) {
  .product-heroes-grid .solo-hero__copy {
    padding-left: .25rem;
  }
}

/* ── PRODUCT-HERO  •  FINAL SIZE + WHITE COPY ───────────────────── */

/* 1 ▸ let the card grow vertically with content                */
.product-heroes-grid .solo-hero{
  height: auto;           /* kill fixed 280-px height      */
  padding-top: 0.5rem;    /* a little extra breathing room */
  padding-bottom: 0.5rem;
}

/* 2 ▸ make paragraph text pure-white (same shadow as title)    */
.product-heroes-grid .solo-hero__copy > p{
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}

/* (No other rules touched – circle sizes, layout, fonts stay the same) */

/* ── PRODUCT-HERO • tighten vertical spacing ───────────────────────── */

.product-heroes-grid{
  gap: 0.75rem;          /* ↓ was 1.25rem – cards sit nearer */
}

/* remove any leftover top / bottom margin a card may have picked up */
.product-heroes-grid .solo-hero{
  margin-block: 0;       /* margin-top & margin-bottom → 0   */
}

/* optional: on mobile make them even tighter */
@media (max-width: 768px){
  .product-heroes-grid{ gap: 0.5rem; }
}

/* ── shrink the gap under the video hero ───────────────────────────── */
.video-hero + .product-heroes-grid{ margin-top: .5rem !important; }


/*=================*/
/*  FINAL SPACING  */
/*=================*/

/* A ▸ kill the 4 rem top padding on <main> but keep the side breathing-room */
main {
    padding-top: 1.25rem !important;   /* or 0 if you truly want zero */
}

/* B ▸ pack cards tighter */
.product-heroes-grid { gap: .4rem !important; }   /* ≈6–7 px */

/* C ▸ strip any leftover margin that sneaks in from the old .solo-hero rule */
.product-heroes-grid .solo-hero {
    margin: 0 !important;              /* all four sides */
}

/* (optional) keep things readable on mobile */
@media (max-width: 768px){
    .product-heroes-grid{ gap: .25rem !important; }
    main{ padding-top: .75rem !important; }
}

/* put this directly after—or instead of—the .4rem line */
.product-heroes-grid{
  gap: 1rem !important;      /* ≈16 px – same as the top offset */
}

/* keep the tighter spacing on phones, if you like */
@media (max-width:768px){
  .product-heroes-grid{ gap: .6rem !important; }
}


/* ─────────────────  SERVICES HERO  ───────────────── */
.services-hero{
  position:relative;
  width:100%;
  min-height:60vh;
  padding:4rem 2rem;
  display:flex;
  align-items:center;
  justify-content:center;

  /* brand-blue overlay + photo */
  background:
    linear-gradient(rgba(10,61,98,.90),rgba(10,61,98,.70)),
    url('../images/nuts.jpg') center / cover no-repeat;
}

.services-hero_content{
  position:relative;           /* sits above overlay */
  z-index:1;
  max-width:1200px;
  width:100%;
  text-align:center;
  color:#fff;
}

.services-hero_title{
  font: clamp(2rem,4vw,3rem) 'Oswald',sans-serif;
  margin:0 0 2rem;
  line-height:1.15;
  text-shadow:0 3px 8px rgba(0,0,0,.5);
}

.services-hero_grid{
  display:grid;
  grid-template-columns:repeat(2,1fr); /* two equal cols */
  gap:2rem;
}

.services-hero_col h2{
  font:600 1.5rem/1.2 'Oswald',sans-serif;
  margin:0 0 .75rem;
}

.services-hero_col p{
  font:1.05rem/1.55 'Inter',sans-serif;
  max-width:38ch;
  margin:0 auto;
  color:#eaf3ff;                                /* very-light grey */
  text-shadow:0 2px 5px rgba(0,0,0,.4);
}

/* ----------  Mobile (≤768 px)  ---------- */
@media (max-width:768px){
  .services-hero{ padding:3rem 1.25rem; }

  .services-hero_grid{
    grid-template-columns:1fr;  /* stack */
  }

  .services-hero_col p{ max-width:unset; }
}

/* ─────────  SERVICES HERO  (v2 – matches home cards)  ───────── */
.services-hero{
  /* size & layout */
  width:100%;
  min-height:60vh;
  padding:4rem 2rem;
  display:flex;
  align-items:center;
  justify-content:center;

  /* visual skin – same corner & shadow as product heroes */
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,.25);

  /* blue tint + photo */
  background:
    linear-gradient(rgba(10,61,98,.90),rgba(10,61,98,.70)),
    url('../images/nuts.jpg') center / cover no-repeat;
}

/* inner wrapper keeps text from hugging edges and centres card */
.services-hero_content{
  max-width:1200px;
  width:100%;
  margin-inline:auto;          /* fixes mobile "cut-off" issue   */
  text-align:center;
  color:#fff;
}

/* Logo and Kits Container */
.services-hero_logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Kits Image */
.services-hero_kits {
  display: flex;
  align-items: center;
}

.kits-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
  transition: transform 0.3s ease;
}

.kits-image:hover {
  transform: scale(1.05);
}

/* Services Logo */
.services-hero_logo {
  display: flex;
  align-items: center;
}

.services-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
  transition: transform 0.3s ease;
}

.services-logo:hover {
  transform: scale(1.05);
}

/* headline */
.services-hero_title{
  font: clamp(2.1rem,4.5vw,3.4rem) 'Oswald',sans-serif;
  margin:0 0 2.25rem;
  line-height:1.15;
  text-shadow:0 4px 10px rgba(0,0,0,.55);
}

/* two-column grid */
.services-hero_grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:2rem;
}

/* sub-heads + body copy */
.services-hero_col h2{
  font:600 1.6rem/1.2 'Oswald',sans-serif;
  margin:0 0 .85rem;
  color:#ffffff;
  text-shadow:0 3px 6px rgba(0,0,0,.45);
}
.services-hero_col p{
  font: 1.05rem/1.6 'Inter',sans-serif;
  color:#eaf3ff;
  max-width:40ch;
  margin:0 auto;
  text-shadow:0 2px 5px rgba(0,0,0,.4);
}

/* ———  Mobile  ≤ 768 px ——— */
@media (max-width:768px){
  .services-hero{ padding:3rem 1.25rem; }
  .services-hero_grid{ grid-template-columns:1fr; }
  .services-hero_col p{ max-width:unset; }
  
  /* Mobile logo container */
  .services-hero_logo-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .kits-image {
    max-width: 225px;
  }
  
  .services-logo {
    max-width: 250px;
  }
}

/* ── SERVICES-HERO • keep card inside the viewport & stop RHS clipping ───────── */

/* 1 ▸ be absolutely sure the hero's own padding stays *inside* the 100 % width   */
.services-hero{
    box-sizing: border-box;      /* width now honours its left / right padding  */
    width: 100%;                 /* prevents accidental 101 % width on some OSs */
}

/* 2 ▸ give the inner wrapper a hard max-width that also respects page padding   */
.services-hero_content{
    max-width: calc(100% - 3rem);/* 1.5 rem L/R = same white rail as other cards*/
    margin-inline: auto;         /* true centring, no sneaky overflow           */
}

/* 3 ▸ drop to a single column sooner (tablets sometimes sit at 769-991 px)     */
@media (max-width: 992px){
    .services-hero_grid{ grid-template-columns: 1fr; }
}

/* 4 ▸ final safety-net: never let the card itself overshoot on tiny screens     */
@media (max-width: 480px){
  .services-hero{ padding: 2.5rem 1rem; }
  .services-hero_title{ font-size: 1.9rem; }
  .services-logo {
    max-width: 200px;
  }
  .kits-image {
    max-width: 180px;
  }
}

/* ─── MORI MACHINES HERO  (re-uses global fonts / colours) ─────────────────── */

.mori-hero{
    position: relative;
    width: 100%;
    min-height: 70vh;                 /* same visual weight as other heroes   */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    background:
        linear-gradient(rgba(10,61,98,.88),rgba(10,61,98,.88)),
        url('../images/mori_page_bg.jpg') center/cover no-repeat;
}

/* keeps white rails consistent with other pages */
.mori-hero_content{
    max-width: calc(100% - 3rem); /* mirrors 1.5 rem rails each side */
    margin-inline: auto;
    text-align: center;
    color: #fff;
}

.mori-hero_title{
    font: 700 clamp(2rem,4vw,3rem) 'Oswald', sans-serif;
    margin-bottom: 2rem;
    text-shadow: 0 3px 6px rgba(0,0,0,.45);
}

.mori-hero_points{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 1.75rem 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mori-hero_points h3{
    font: 700 1.4rem 'Oswald', sans-serif;
    margin: 0 0 .35rem;
    text-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.mori-hero_points p{
    font: 1rem/1.55 'Inter', sans-serif;
    margin: 0;
    color: #ecf3ff;                   /* light tint for hierarchy            */
    text-shadow: 0 2px 4px rgba(0,0,0,.3);
}

/* ——— Responsive: stack points on narrow screens ——— */
@media (max-width: 768px){
    .mori-hero{
        padding: 3rem 1rem;
    }
    .mori-hero_points{
        grid-template-columns: 1fr;
    }
}

/* ─── MANUFACTURING HERO  ─────────────────────────────────── */

.manufacturing-hero{
  position:relative;
  width:100%;
  min-height:70vh;
  padding:4rem 2rem;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  margin: 0 auto;
  box-sizing: border-box;

  /* blue overlay + machine photo */
  background:
    linear-gradient(rgba(10,61,98,.88),rgba(10,61,98,.88)),
    url("../images/about2.jpg") center/cover no-repeat;
}

.manufacturing-hero_content{
  max-width:calc(100% - 3rem);   /* leaves 1.5 rem white rails */
  margin: 0 auto;
  text-align:center;
  color:#fff;
  width: 100%;
  box-sizing: border-box;
}

/* Logo and Certification Container */
.manufacturing-hero_logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Manufacturing Logo */
.manufacturing-hero_logo {
  display: flex;
  align-items: center;
}

.manufacturing-logo {
  max-width: 440px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
  transition: transform 0.3s ease;
}

.manufacturing-logo:hover {
  transform: scale(1.05);
}

/* ISO 9001 Certification */
.manufacturing-hero_certification {
  display: flex;
  align-items: center;
}

.certification-logo {
  max-width: 200px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
  transition: transform 0.3s ease;
}

.certification-logo:hover {
  transform: scale(1.05);
}

.manufacturing-hero_title{
  font:700 clamp(2rem,4vw,3rem) "Oswald",sans-serif;
  margin-bottom:2rem;
  text-shadow:0 3px 6px rgba(0,0,0,.45);
  color: #fff;
}

.manufacturing-hero_points{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1.75rem 2.5rem;
  list-style:none;
  margin:0;
  padding:0;
}

.manufacturing-hero_points h3{
  font:700 1.4rem "Oswald",sans-serif;
  margin:0 0 .35rem;
  text-shadow:0 2px 4px rgba(0,0,0,.4);
  color: #fff;
}

.manufacturing-hero_points p{
  font:1rem/1.55 "Inter",sans-serif;
  margin:0;
  color:#fff;
  text-shadow:0 2px 4px rgba(0,0,0,.3);
}

/* stack points on tablets & phones */
@media(max-width:768px){
  .manufacturing-hero{ padding:3rem 1rem; }
  .manufacturing-hero_points{ grid-template-columns:1fr; }
  
  /* Mobile logo container */
  .manufacturing-hero_logo-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .manufacturing-logo {
    max-width: 350px;
  }
  .certification-logo {
    max-width: 150px;
  }
}

/* ─── MORI MACHINES HERO  ─────────────────────────────────── */

.mori-hero{
  position:relative;
  width:100%;
  min-height:70vh;
  padding:4rem 2rem;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);

  /* blue overlay + machine photo */
  background:
    linear-gradient(rgba(10,61,98,.88),rgba(10,61,98,.88)),
    url("../images/mori_page_bg.jpg") center/cover no-repeat;
}

.mori-hero_content{
  max-width:calc(100% - 3rem);   /* leaves 1.5 rem white rails */
  margin-inline:auto;
  text-align:center;
  color:#fff;
}

.mori-hero_title{
  font:700 clamp(2rem,4vw,3rem) "Oswald",sans-serif;
  margin-bottom:2rem;
  text-shadow:0 3px 6px rgba(0,0,0,.45);
}

.mori-hero_points{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1.75rem 2.5rem;
  list-style:none;
  margin:0;
  padding:0;
}

.mori-hero_points h3{
  font:700 1.4rem "Oswald",sans-serif;
  margin:0 0 .35rem;
  text-shadow:0 2px 4px rgba(0,0,0,.4);
}

.mori-hero_points p{
  font:1rem/1.55 "Inter",sans-serif;
  margin:0;
  color:#ecf3ff;
  text-shadow:0 2px 4px rgba(0,0,0,.3);
}

/* stack points on tablets & phones */
@media(max-width:768px){
  .mori-hero{ padding:3rem 1rem; }
  .mori-hero_points{ grid-template-columns:1fr; }
}

/* ─── MORI-HERO  ·  force pure-white copy ───────────────────────────── */

/* headline */
.mori-hero_title{
    color: #ffffff;                               /* ← you were inheriting #000 */
    text-shadow: 0 4px 10px rgba(0,0,0,.55);
}

/* the four "advantage" call-outs */
.mori-hero_points h3{
    color:#ffffff;
    text-shadow:0 3px 6px rgba(0,0,0,.45);
}
.mori-hero_points p{
    color:#eaf3ff;                               /* very-light grey below title */
    text-shadow:0 2px 5px rgba(0,0,0,.35);
}

/* ── MORI HERO  ·  headline punch-up ───────────────────────────────── */
.mori-hero_title{
    font-size: clamp(2.8rem, 6vw, 4.25rem);   /* bigger & fluid      */
    font-style: italic;                       /* subtle angle        */
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 5px 12px rgba(0,0,0,.55);
    margin-bottom: 2.25rem;                   /* breath below title  */
}

/* ── fix RH-side cropping inside white "rails" ─────────────────────── */
main > .mori-hero{                            /* ONLY the top hero   */
    width: calc(100% - 4rem);                 /* 2 rem L  +  2 rem R */
    margin-inline: auto;                      /* centre in the rails */
}

/* same logic for mobile, where <main> uses 0 .5 rem side-padding */
@media(max-width: 768px){
    main > .mori-hero{ width: calc(100% - 1rem); }
}

/* ── Mobile "NLX Super-Hero" fallback  ·  ≤ 640 px ─────────────────── */
@media (max-width: 640px){

  /* 1 ▸ friendlier type-scale */
  .mori-hero_title{
      font-size: clamp(1.8rem, 7vw + .5rem, 3rem);
      line-height: 1.25;
      margin-bottom: 1.5rem;
  }
  .mori-hero_box h3{          /* the four sub-heads    */
      font-size: clamp(1.1rem, 4.5vw, 1.35rem);
      margin-bottom: .35rem;
  }
  .mori-hero_box p{
      font-size: clamp(.9rem, 3.8vw, 1rem);
      line-height: 1.45;
  }

  /* 2 ▸ turn the 2×2 grid into one column */
  .mori-hero_grid{
      grid-template-columns: 1fr;   /* stack               */
      row-gap: 1.5rem;              /* nice breathing room */
      text-align: center;
      max-width: 32rem;             /* keeps copy measure  */
      margin-inline: auto;          /* true centre         */
  }

  /* 3 ▸ let the blue card grow vertically */
  .mori-hero{
      height: auto;                 /* no fixed var height */
      padding: 2.5rem 1.25rem;      /* inward side padding */
  }
}

/* ── MORI-HERO ▸ keep blue card perfectly centred inside the white rails ── */
main{
    /* same white rails on every screen – you already set 2 rem on ≥768 px
       and .5 rem on phones.  We'll read those values and let CSS do the math. */
    padding-inline: clamp(.5rem, 2vw + .25rem, 2rem);
}

main > .mori-hero{
    box-sizing: border-box;          /* honour its own side-padding          */
    width: 100%;                     /* fill the space inside main           */
    margin-inline: 0;                /* no phantom margins                   */
}

/* tighten the *internal* blue card on very small phones so it never feels cramped */
@media (max-width: 480px){
    .mori-hero{
        padding-inline: 1rem;        /* was 1.25 rem – buys you a few pixels */
    }
}

/* ─── MORI-HERO • final mobile / tablet fix ───────────────────────── */

@media (max-width: 768px){

  /* 1 ▸ let the blue card grow to fit its content */
  .mori-hero{
      min-height: auto;        /* kill the 70 vh floor         */
      height: auto;            /* no artificial cap            */
      padding: 2.75rem 1.25rem;/* snug inward rails            */
  }

  /* 2 ▸ keep the four "advantage" boxes nicely spaced */
  .mori-hero_points{
      grid-template-columns: 1fr;   /* already stacked ≤640,        */
      row-gap: 1.25rem;             /* but roomier on 641-768 px     */
  }

  /* 3 ▸ fine-tune headline so it never wraps awkwardly */
  .mori-hero_title{
      font-size: clamp(2.2rem, 6vw, 3.1rem);
      line-height: 1.25;
  }
}

/* ── always centre the card inside the white rails (all widths) ── */
main{
    /* you already set L/R padding with clamp(.5rem … 2rem);      */
    /* box-sizing keeps that padding *inside* the declared width. */
    box-sizing: border-box;
}

main > .mori-hero{
    width: 100%;           /* fill the space inside <main>      */
    margin-inline: 0;      /* true centring – no phantom offset */
}

/* ────────────────────────────────────────────── */
/*    NEW: FONT AWESOME BUTTON / CTA STYLES     */
/* ────────────────────────────────────────────── */

/* 1. The big red pill (Request Free Consultation) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background-color: #d32b2b;    /* Matford's brand red */
  color: #ffffff;               /* white text */
  padding: 0.9rem 2.4rem;        /* vertically/horizontally comfortable */
  border: none;
  border-radius: 4px;           /* slightly rounded corners */
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;           /* a bit larger than body copy */
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary i {
  margin-right: 0.5rem;    /* space between icon and text */
  font-size: 1.2rem;       /* slightly bigger icon */
}

.btn-primary:hover {
  background-color: #b02828;    /* slightly darker on hover */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 2. Circular icon buttons (phone / envelope) */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;                /* square touch/tap area */
  height: 48px;
  border-radius: 50%;         /* circle */
  background-color: #ffffff;  /* white circle */
  color: var(--blue);         /* Matford's brand blue (#0a3d62) */
  text-decoration: none;
  font-size: 1.2rem;          /* Font Awesome icon size: 1.2rem */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  margin-left: 0.75rem;       /* spacing from the pill (and between icons) */
  transition: all 0.25s ease;
}

.icon-link i {
  line-height: 1;             /* ensure perfect vertical centering */
}

.icon-link:hover {
  background-color: var(--blue); /* turn circle blue on hover */
  color: #ffffff;                /* icon turns white */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ─── Consultation Modal Overlay ────────────────────────────────────────────────────── */

.modal-overlay {
  /* Cover entire screen */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #fff; /* or a tinted white like rgba(255,255,255,0.95) */
  border-radius: 8px;
  width: clamp(320px, 90%, 600px);
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--blue); /* or #0a3d62 */
}

/* Form fields inside the modal */
.modal-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--blue);
  text-align: center;
}

.modal-content .form-group {
  margin: 1rem 0;
}

.modal-content label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #333;
}

.modal-content input[type="text"],
.modal-content textarea,
.modal-content input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
}

.modal-content textarea {
  resize: vertical;
}

/* The "Send Request" button (big red pill) inside modal */
.modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* If your .btn-primary is a blue pill, override to red: */
  background: #e63946; /* red */
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-submit:hover {
  background: #d62839;
}

/* "Thank you" message, same modal-content box */
.modal-success {
  text-align: center;
}

.modal-success p {
  margin: 1rem 0;
  font-size: 1rem;
  color: #333;
}

.modal-success .modal-close {
  background: var(--blue);
  color: #fff;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────────────────── */

/* ─── Override on smaller screens if needed ───────────────────────────────────────── */
@media (max-width: 480px) {
  .modal-content {
    padding: 1rem;
    width: 95%;
  }

  .modal-content h2 {
    font-size: 1.25rem;
  }

  .modal-submit {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Consultation Modal Error Styling ───────────────────────────────────────── */

/* Hidden utility (if you don't already have it): */
.hidden {
  display: none !important;
}

/* Style for the error box inside the modal */
.modal-error {
  display: none; /* hidden until we remove .hidden */
  padding: 2rem;
  border-left: 5px solid #d8000c;   /* bold red stripe on the left */
  background-color: #ffd2d2;        /* very light red background */
  color: #333;                       /* dark text for readability */
  margin-top: 1rem;
}

.modal-error h3 {
  margin-top: 0;
  color: #d8000c; /* red heading */
}

.modal-error p {
  margin: 0.5rem 0 1rem 0;
  line-height: 1.4;
}

.modal-error .modal-close {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #d8000c;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal-error .modal-close:hover {
  background-color: #b30000;
}

/* ─── Consultation Modal Overlay & Content — Revised ───────────────── */
.modal-overlay {
  /* fill the viewport and give a little padding so the modal never hugs the edges */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  padding: 1rem;                /* space around the modal */
  box-sizing: border-box;       /* include that padding in the width/height */
  
  background: rgba(0, 0, 0, 0.6); /* darken the page behind */
  
  display: flex;
  justify-content: center;      /* center horizontally */
  align-items: center;          /* center vertically */
  overflow-y: auto;             /* allow scrolling if screen is short */
  z-index: 1000;
}

.modal-content {
  /* brand-blue background, white text */
  background: var(--blue);
  color: #fff;
  
  /* width caps at 600px, but shrinks on small screens */
  width: clamp(320px, 90%, 600px);
  
  /* include padding in that width */
  box-sizing: border-box;
  
  /* inner spacing — note the extra top to clear the logo strip */
  padding: 1.5rem;              
  padding-top: 6rem;
  
  margin: auto;                 /* just in case, keep it centered */
  border-radius: 8px;
  position: relative;           /* for the close "X" */
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.modal-brand {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;

  /* only wrap the image, not the whole modal width */
  width: auto;

  /* height of your logo strip */
  height: 6rem;

  /* just a little side-padding so the logo isn't jammed to the edge */
  padding: 0 .75rem;

  /* subtle tint behind the SVG */
  background: rgba(0,0,0,0.15);

  /* ensure it sits below the close button */
  z-index: 1;
}


.modal-brand img {
  /* blow the SVG up to fill the strip */
  height: 6rem;
  width: auto;
}

.modal-close {
  /* keep that "×" crisp and white */
  color: #fff;
}

.modal-content label {
  color: #fff;
  font-weight: 600;
}

.modal-content input,
.modal-content textarea {
  background: #fefefe;
  color: #111;
  border: 1px solid #fff;
}

.modal-submit {
  background: #e63946; /* Matford red */
  color: #fff;
}

.modal-submit:hover {
  background: #d62839;
}
/* ───────────────────────────────────────────────────────────────── */

.banner-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* The link wrapper */
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 1.4rem;
  transition: opacity .2s;
}
.contact-item:hover {
  opacity: 0.8;
}

/* The little circle background for icons */
.contact-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  font-size: 1.8rem;
}

/* The text next to it */
.contact-text {
  color: var(--white);
}

/* ─── Masthead contact pills ───────────────────────────────── */
.banner-cta{
  display:flex;
  align-items:center;
  gap:1.25rem;                 /* space between the two pills */
}

.contact-item{
  display:inline-flex;
  align-items:center;
  gap:.85rem;                  /* gap between circle & text   */
  text-decoration:none;
  font-size:1.4rem;            /* ← was 0.95rem  (+~50 %)      */
  font-weight:600;
  color:var(--white);          /* use the new token           */
  transition:opacity .25s;
}
.contact-item:hover{opacity:.85;}

.contact-icon{
  flex:0 0 3.25rem;            /* circle size ↑               */
  height:3.25rem;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--white);
  color:var(--blue);
  font-size:1.65rem;           /* bigger FA glyph             */
  box-shadow:0 2px 10px rgba(0,0,0,.25);
  transition:background .25s,color .25s,transform .25s;
}

.contact-item:hover .contact-icon{
  background:#f1f5fa;          /* light tint on hover         */
  transform:scale(1.08);
}

/* ───-- Tweaks: contact pill size & spacing 2025-06-14 --───────────── */
.banner-cta{
  gap:2rem;                 /* was 1.25rem  → adds overall spacing   */
}

.contact-item{
  font-size:1.2rem;         /* text ↑                                   */
  gap:1.1rem;               /* space between circle & text             */
}

.contact-icon{
  width:3.6rem;             /* circle slightly larger (was 3.25)       */
  height:3.6rem;
  font-size:1.85rem;        /* FA glyph keeps the same visual weight   */
}

/* —— Masthead contact pill: final size & spacing override ——————————— */
.contact-text{
  font-size: 1.2rem;      /* matches .contact-item */
  line-height: 1;         /* keeps vertical centring */
  color: var(--white);    /* re-state for safety */
}

/* dial the overall spacing in a touch more */
.banner-cta{
  gap: 2rem;              /* space between the two pills */
}

.contact-item{
  gap: 1.1rem;            /* space between circle & text */
}
.contact-icon{
  width: 3.6rem;          /* circle */
  height: 3.6rem;
  font-size: 1.85rem;     /* Font Awesome glyph */
}

/* —— About page heroes : centre-align heading & body text ———————— */
.solo-hero{
  /* ← you already have the flex container + padding etc. */
  text-align:center;             /* centre the lines themselves */
}

.solo-hero__copy{
  max-width:40rem;               /* keeps long lines readable      */
  margin-inline:auto;            /* centres the copy block itself  */
  display:flex;                  /* vertically centre in the hero  */
  flex-direction:column;
  align-items:center;
}

/* ─── About page: let each card use its own background photo ─── */
.about-heroes-grid .solo-hero {
  /* tint + page-specific photo (falls back to hero_bg1.png if the
     custom --hero-img isn't present for some reason) */
  background:
    linear-gradient(rgba(10,61,98,.88), rgba(10,61,98,.88)),
    var(--hero-img, url('../images/hero_bg1.png'))  /*  fallback  */
      center / cover no-repeat;
}

/* because we've removed the <img> column on the About version,
   make the copy column span the full width on bigger screens */
.about-heroes-grid .solo-hero__copy {
  max-width: 60rem;
  margin-inline: auto;
}

/* ─── About page: lighter overlay tint ─── */
.about-heroes-grid .solo-hero {
  /* 0.88 → 0.70  =  20 % brighter */
  background:
    linear-gradient(
      rgba(10, 61, 98, 0.75),   /* top */
      rgba(10,61,98,0.75)    /* bottom */
    ),
    var(--hero-img, url('../images/hero_bg1.png')) center / cover no-repeat;
}

/* ─── About page heading colours ─── */
.about-heading h1   { 
  color:#111;        /* near-black for strong contrast */
}

.about-heading .lead{
  color:#666;        /* dark grey, still AA-contrast */
}

/* ─── Tweak About-page heading gap ───────────────────────── */
.about-heading{
  /* keep it centred, but pull it 20 % closer to nav & hero  */
  margin-block-start: 0rem;   /* was 4rem → 20 % less     */
  margin-block-end:   0rem;     /* was 5rem → 20 % less     */
}

/* If you ever change the global heading spacing again,
   you only need to adjust the two numbers above.          */

/* ── Contact-page heading tweaks ───────────────────────── */
.contact-heading h1{
  margin-block: 2.5rem 1.5rem; /*  space above / below  */
}

/* ── Responsive map wrapper ────────────────────────────── */
.map-wrapper{
  max-width: 900px;      /* keeps it from getting too wide on 4 K screens */
  aspect-ratio: 16/9;    /* responsive height */
  margin-inline: auto;   /* centre horizontally */
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  border-radius: 0.75rem;
  overflow: hidden;
}
.map-wrapper iframe{
  width: 100%;
  height: 100%;
  border: 0;
}

/* === CONTACT PAGE HERO ============================================= */
.contact-hero{
  position:relative;
  padding:6rem 1rem 4rem;
  text-align:center;
  color:var(--white);
  background:linear-gradient(rgba(10,61,98,.75), rgba(10,61,98,.75)),
             url("../images/hero_bg1.png") center/cover no-repeat;
}
.contact-hero h1{font-size:clamp(2.5rem,6vw,3.5rem); margin:0;}
.contact-hero .strap{font-size:1.1rem; margin-top:.75rem; letter-spacing:.5px}

/* === CONTACT GRID ================================================== */
.contact-grid{
  --gap:2rem;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:var(--gap);
  max-width:1200px;
  margin:var(--gap) auto 4rem;
}
.contact-card{
  background:var(--white);
  padding:2rem 2.5rem;
  border-radius:.75rem;
  box-shadow:0 6px 20px rgba(0,0,0,.12);
}
.contact-card h2{margin-top:0}
.contact-card dl{margin:1rem 0 1.5rem}
.contact-card dt{font-weight:600; margin-top:.75rem}
.contact-card dd{margin:0 0 .25rem}
.contact-card a{color:var(--blue); text-decoration:none}
.contact-card .hours{list-style:none; padding:0; margin:0}
.contact-card .hours li{margin:.25rem 0}
.map-wrap{
  min-height:540px; /* increased from 360px to give the map more presence */
  border-radius:.75rem;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,.12);
}

/* ─── Contact page hero ─────────────────────────────────────────────── */
.hero--contact{
  position:relative;
  isolation:isolate;                /* so overlay doesn't leak */
  min-height:40vh;                  /* ~40 % of viewport height */
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--white);
  padding:4rem 2rem;
  background:
      /* blue overlay tint */
      linear-gradient(
        rgba(10,61,98,.75),
        rgba(10,61,98,.75)
      ),
      /* hero photo */
      url("../images/about2.jpg") center/cover no-repeat;
}
.hero--contact .strap{
  font-size:1.125rem;
  margin-top:.75rem;
  opacity:.9;
}
@media (min-width:48em){           /* upscale heading on desktop */
  .hero--contact h1{font-size:clamp(2.5rem,6vw,4.5rem);}
}

/* ─── Contact hero: match About-page cards ─────────────────────────── */
.hero--contact{
  /* existing rules you pasted earlier stay in place —
     we're only ADDING/OVERWRITING the layout bits */
  max-width:1200px;                /* same width cap as .solo-hero cards   */
  margin:var(--gap) auto;          /* gap above & below, centred           */
  border-radius:.75rem;            /* identical corner radius              */
  overflow:hidden;                 /* keeps image & overlay inside radius  */
  box-shadow:0 6px 20px rgba(0,0,0,.12);  /* same soft shadow              */
}

/* keep heading from hugging the edge on tiny screens */
.hero--contact .hero__inner{
  width:100%;
  padding:4rem 1.5rem;
}

/* ───────────────── Contact hero final tune-up ───────────────── */
/* 1 ► centre the block + bigger side gutters -- matches About */
.hero--contact{
  /* 1200 px is the cap used by .solo-hero on /about            */
  max-width:1200px;              
  /* same vertical gap (top+bottom) but DOUBLE horizontal gap   */
  /*   (2 × var(--gap) ≈ 4 rem on desktop)                      */
  /* centre inside the page rails */
  margin-block: var(--gap);   /* keeps the vertical gap            */
  margin-inline: auto;        /* automatic left + right centring   */
  max-width: 1200px;          /* keep the 1200-px cap              */
  padding-inline: 2rem;       /* same white rails as other cards   */
   
  border-radius:.75rem;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,.12);
}

/* 2 ► halve the visual height                                  */
.hero--contact{          /* previous rule said min-height:40vh   */
  min-height:20vh;       /*   40 vh → 20 vh  (≈ 50 % smaller)    */
}

/* 3 ► keep heading readable on tiny screens                    */
.hero--contact .hero__inner{
  width:100%;
  /* 4 rem side padding on desktop → 2 rem on ≤600 px            */
  padding:4rem 2rem;
}

/* optional: tighten on phones */
@media (max-width:600px){
  .hero--contact{
    margin:var(--gap) var(--gap);  /* revert to default gutter  */
    min-height:24vh;               /* a touch taller for copy   */
  }
}
.map-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;           /* Responsive ratio, fills parent */
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  display: flex;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;                /* Card already handles rounding */
  box-shadow: none;                /* Remove extra shadow on iframe */
  display: block;
}
/* ——— MOBILE DRAWER NAV (Right Side) ——— */
.legacy-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;             /* anchor to right */
    left: auto;
    width: 240px;         /* or your preferred width */
    height: 100vh;
    background: rgba(255,255,255,0.97); /* glassy white */
    backdrop-filter: blur(3px);
    box-shadow: -6px 0 16px rgba(0,0,0,.22);
    border-radius: 16px 0 0 16px;      /* round left corners */
    transform: translateX(100%);       /* start hidden (off-canvas to right) */
    transition: transform .35s cubic-bezier(.25,.8,.25,1);
    z-index: 1100;
    padding-top: 4.5rem;               /* leave space for toggle */
    overflow-y: auto;
}

/* When open, slide in */
.legacy-mobile-nav.open {
    transform: translateX(0);
}

/* Drawer nav links */
.legacy-mobile-nav ul {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
}
.legacy-mobile-nav li { margin: 0; }
.legacy-mobile-nav a {
    display: block;
    padding: 1.25rem 1rem;
    color: #183050;           /* your brand blue, for legibility on white */
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 1.09rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: background .2s;
}
.legacy-mobile-nav a:hover {
    background: rgba(10,61,98,0.08);
}

/* Hamburger button: always on the right */
.legacy-nav-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    left: auto;
    z-index: 1200;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    display: block;
}

/* Hamburger bars: dark for white background */
.legacy-nav-toggle__bar, .legacy-nav-toggle__bar::before, .legacy-nav-toggle__bar::after {
    content: '';
    display: block;
    width: 26px; height: 3.5px;
    background: #1a2b49; /* dark blue/black for visibility */
    margin: 5px 0;
    border-radius: 2px;
    transition: all .3s;
}

/* === Hamburger Button (show only on mobile) === */
.legacy-nav-toggle {
  display: none;
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 1101;
  background: transparent;
  border: none;
  width: 44px; height: 44px;
}
.legacy-nav-toggle__bar, .legacy-nav-toggle__bar::before, .legacy-nav-toggle__bar::after {
  content: '';
  display: block;
  width: 28px; height: 3px;
  background: #0a3d62;
  margin: 0 auto;
  border-radius: 2px;
  transition: .3s;
}
.legacy-nav-toggle__bar::before { transform: translateY(-8px);}
.legacy-nav-toggle__bar::after  { transform: translateY(5px);}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar {
  background: transparent;
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::before {
  transform: rotate(45deg);
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::after {
  transform: rotate(-45deg);
}

/* === Mobile Drawer Nav === */
.legacy-mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: 240px;
  height: 100vh;
  background: rgba(255,255,255,0.97); /* glassy white */
  box-shadow: -8px 0 24px rgba(0,0,0,.20);
  backdrop-filter: blur(5px);
  border-radius: 16px 0 0 16px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding-top: 4rem; /* space for toggle */
}
.legacy-mobile-nav.open {
  transform: translateX(0);
}
.legacy-mobile-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
}
.legacy-mobile-nav li { margin: 0; }
.legacy-mobile-nav a {
  display: block;
  padding: 1.1rem 1.5rem;
  color: #193a56;
  font-weight: 600;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.15rem;
  text-decoration: none;
  border-radius: 16px 0 0 16px;      /* rounded left corners, square right */
  background: rgba(255,255,255,0.97); /* glassy white */
  box-shadow: -8px 0 24px rgba(0,0,0,.20);
  font-family: 'IBM Plex Sans', sans-serif;
  color: #193a56;
  margin: 0.5rem 0;
  transition: background 0.2s, color 0.2s;
}
.legacy-mobile-nav a:hover {
  background: rgba(10,61,98,0.10);
  color: #d02b2b;
}

/* --- Mobile Nav Drawer Styles --- */
.legacy-mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  box-shadow: -8px 0 24px rgba(0,0,0,.18);
  backdrop-filter: blur(7px);
  border-radius: 16px 0 0 16px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding-top: 5.5rem;
  overflow-y: auto;
  /* Start hidden off-canvas */
}

/* Only show nav when .open class is set */
.legacy-mobile-nav.open {
  transform: translateX(0);
}

/* Style nav links inside drawer */
.legacy-mobile-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
}
.legacy-mobile-nav li { margin: 0; }
.legacy-mobile-nav a {
  display: block;
  padding: 1.1rem 1.5rem;
  color: #193a56;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 7px;
  margin: 0.5rem 0;
  transition: background 0.18s, color 0.18s;
}
.legacy-mobile-nav a:hover {
  background: rgba(10,61,98,0.09);
  color: #d02b2b;
}
/* Make hamburger bars white for blue mobile drawer */
.legacy-nav-toggle__bar,
.legacy-nav-toggle__bar::before,
.legacy-nav-toggle__bar::after {
  background: #fff !important;
}
.legacy-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;
    min-height: auto;
    max-height: 85vh;   /* Only fills as much as needed */
    background: rgba(10,61,98,0.98); /* Brand blue */
    color: #fff;
    box-shadow: -6px 0 18px rgba(0,0,0,0.25);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.25,.8,.25,1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 2.8rem 0 1rem 0; /* top space for X, bottom for style */
    border-radius: 0 0 0 24px;
        /* KEY CHANGE: */
    height: auto;
    min-height: 0;
    max-height: 90vh; /* Never fill the whole page */
    overflow-y: auto; /* Just in case */
    align-items: flex-start; /* So links hug the left */
    max-width: 100vw; /* Prevent drawer from overflowing viewport */
    box-sizing: border-box; /* Include padding in width */
}

.legacy-mobile-nav.open {
    transform: translateX(0);
}

.legacy-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.legacy-mobile-nav li {
    margin: 0;
}

.legacy-mobile-nav a {
    color: #fff;
    font-size: 1.12rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-align: left;
    display: block;
    background: none;
    transition: background 0.18s;
}

.legacy-mobile-nav a:hover,
.legacy-mobile-nav a:focus {
    background: rgba(255,255,255,0.10);
}

.legacy-nav-toggle {
    background: none !important; /* or rgba(10,61,98,0.98) */
    color: #fff !important;
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    font-size: 2.1rem;
    border: none;
    outline: none;
    z-index: 1200;
    cursor: pointer;
}


/* Remove background on links */
.legacy-mobile-nav a {
    background: none;
}

/* Limit mobile nav height and enable scroll if needed */
.legacy-mobile-nav {
    overflow-y: auto;
}

@media (max-width: 768px) {
  .banner-cta {
    flex-direction: column !important;
    align-items: flex-start; /* or center if you want */
    gap: 0.5rem; /* Adds a little space between items */
    width: 100%;
    padding-top: 0.7rem; /* Tweak for spacing */
  }
  .banner-cta .contact-item {
    width: 100%;          /* Makes items stretch nicely */
    justify-content: flex-start;
    margin-bottom: 0.2rem;
  }
}

/* --- Stack and Center Contact Items at All Sizes --- */
.banner-cta {
  display: flex;
  flex-direction: column;       /* Always stack vertically */
  align-items: center;          /* Center horizontally */
  justify-content: flex-start;  /* Optional: tweak as needed */
  gap: 0.75rem;                 /* Space between phone/email */
  margin-top: 1.2rem;           /* Space below logo */
}

.banner-cta .contact-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  padding: 0.15em 0.6em;
  border-radius: 1.5em;
  transition: background 0.2s;
}

.banner-cta .contact-item:hover,
.banner-cta .contact-item:focus {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

@media (max-width: 768px) {
  .banner-cta {
    flex-direction: column; /* Stack vertically on smaller screens */
    align-items: center;    /* Center items */
    gap: 1rem;              /* Space between items */
  }
  .banner-cta .contact-item {
    width: 100%;            /* Full width on small screens */
    justify-content: center; /* Center text in each item */
  }
}

/* Always show the nav strip, but... */
.main-nav {
  background: #fff;  /* classic white strip */
  border-bottom: 1px solid #e4e4e4;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;      /* match your design */
}

.main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0; padding: 0;
}

.main-nav li { margin: 0 8px; }

.main-nav a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 1rem;
  transition: background 0.18s, color 0.18s;
}

.main-nav a:hover { background: #f2f6fa; color: #0a3d62; }

.legacy-nav-toggle {
  display: none;
  background: none;
  border: none;
  outline: none;
  margin-left: auto;
  margin-right: 1rem;
  cursor: pointer;
  position: absolute;
  right: 0.5rem; top: 50%; transform: translateY(-50%);
}

.legacy-nav-toggle__bar,
.legacy-nav-toggle__bar::before,
.legacy-nav-toggle__bar::after {
  content: '';
  display: block;
  width: 28px; height: 3.5px;
  background: #0a3d62;
  border-radius: 2px;
  margin: 5px 0;
  transition: all .3s;
}
.legacy-nav-toggle__bar::before { transform: translateY(-9px); }
.legacy-nav-toggle__bar::after  { transform: translateY(6px); }

/* Hamburger to X animation */
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar {
  background: transparent;
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::before {
  transform: translateY(0) rotate(45deg);
}
.legacy-nav-toggle[aria-expanded="true"] .legacy-nav-toggle__bar::after {
  transform: translateY(0) rotate(-45deg);
}

/* --- Hide menu, show hamburger on mobile --- */
@media (max-width: 768px) {
  .legacy-main-nav-ul { display: none; }
  .legacy-nav-toggle { display: block; }
}

/* --- Show menu on desktop --- */
@media (min-width: 769px) {
  .dropdown-nav { display: none !important; }
}

/* --- Mobile dropdown nav --- */
.dropdown-nav {
  display: none;
  background: #fff;
  border-bottom: 1px solid #e4e4e4;
  width: 100%;
  z-index: 5;
  box-shadow: 0 3px 16px rgba(10,61,98,.05);
  position: relative;
}
.dropdown-nav.open {
  display: block;
  animation: dropDownFade .23s cubic-bezier(.33,1.15,.45,1.08);
}
@keyframes dropDownFade {
  from { opacity: 0; transform: translateY(-24px);}
  to   { opacity: 1; transform: translateY(0);}
}
.dropdown-nav ul {
  display: flex;
  flex-direction: column;
  margin: 0; padding: 0;
}
.dropdown-nav li { border-bottom: 1px solid #e4e4e4; }
.dropdown-nav li:last-child { border-bottom: none; }
.dropdown-nav a {
  color: #0a3d62;
  font-weight: 600;
  font-size: 1.13rem;
  padding: 16px 22px;
  display: block;
  text-align: center;
  background: none;
  border-radius: 0;
  transition: background 0.13s, color 0.13s;
}
.dropdown-nav a:hover {
  background: #f2f6fa;
  color: #d02b2b;
}

/* ----- Desktop: ≥ 769px ----- */
@media (min-width: 769px) {
  .main-nav #nav-menu { display: flex; justify-content: center; }
  .main-nav .legacy-nav-toggle { display: none !important; }
  .dropdown-nav { display: none !important; }
}

/* ----- Mobile: ≤ 768px ----- */
@media (max-width: 768px) {
  .main-nav #nav-menu { display: none !important; }
  .main-nav .legacy-nav-toggle { display: block !important; margin-left: auto; margin-right: 1.5rem; }
  .dropdown-nav {
    display: none;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    width: 100%;
    z-index: 999;
    position: relative;  /* stack after nav */
  }
  .dropdown-nav.open { display: block; }
}

/* Hamburger styling (already in your CSS, just ensure visible) */
.legacy-nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  /* ... rest of your hamburger styles ... */
}

/* ===== Hamburger Toggle Visibility ===== */
.legacy-nav-toggle {
  display: none;   /* Hide by default (desktop) */
}

@media (max-width: 768px) {
  .legacy-nav-toggle {
    display: block;          /* Show on mobile */
    position: absolute;      /* or fixed if you want it sticky */
    top: 0.6rem;
    right: 1.2rem;
    z-index: 1201;
    background: none;
    border: none;
    width: 48px;
    height: 48px;
    cursor: pointer;
    padding: 0;
  }
  .legacy-main-nav-ul {
    display: none;           /* Hide the nav links */
  }
}

.legacy-nav-toggle__bar,
.legacy-nav-toggle__bar::before,
.legacy-nav-toggle__bar::after {
  content: '';
  display: block;
  width: 26px;
  height: 3px;
  background: #183050; /* Or #fff if you want white lines */
  margin: 6px 0;
  border-radius: 2px;
  transition: all 0.3s;
  position: relative;
}
.legacy-nav-toggle__bar::before {
  position: absolute;
  top: -8px;
}
.legacy-nav-toggle__bar::after {
  position: absolute;
  top: 8px;
}

@media (max-width: 768px) {
  .main-nav {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #e3e3e3;
    height: 56px; /* set a standard height */
    display: flex;
    align-items: center;
    justify-content: center; /* center children horizontally */
  }
  .legacy-main-nav-ul {
    display: none;  /* Hide links on mobile */
  }
  .legacy-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    width: 48px;
    height: 48px;
    padding: 0;
    z-index: 10;
    cursor: pointer;
  }
  .legacy-nav-toggle__bar,
  .legacy-nav-toggle__bar::before,
  .legacy-nav-toggle__bar::after {
    content: '';
    display: block;
    width: 28px;
    height: 4px;
    background: #183050;    /* Matford blue */
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s;
    position: relative;
  }
  .legacy-nav-toggle__bar::before {
    position: absolute;
    top: -9px;
    left: 0;
  }
  .legacy-nav-toggle__bar::after {
    position: absolute;
    top: 9px;
    left: 0;
  }
}

@media (max-width: 768px) {
  /* Hide nav links, show hamburger */
  .legacy-main-nav-ul {
    display: none;
  }

  .legacy-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute; /* change from fixed for this nav bar */
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 0;
    bottom: 0;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1201;
  }

  .legacy-nav-toggle__bar,
  .legacy-nav-toggle__bar::before,
  .legacy-nav-toggle__bar::after {
    content: '';
    display: block;
    width: 28px;
    height: 4px;
    background: #0a3d62;      /* Matford blue */
    border-radius: 2px;
    margin: 0 auto;
    transition: all .3s;
    position: relative;
  }
  .legacy-nav-toggle__bar::before {
    position: absolute;
    top: -9px;
    left: 0;
  }
  .legacy-nav-toggle__bar::after {
    position: absolute;
    top: 9px;
    left: 0;
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: relative;
    height: 52px; /* or whatever height your bar needs */
  }
}

/* ========================================================
   Mobile Navigation Cleanup
   ======================================================== */
@media (max-width: 768px) {
  .main-nav ul {
    display: none;
  }
  .nav-toggle {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 auto;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    z-index: 1201;
    align-items: center;
    justify-content: center;
  }
  .nav-toggle__bar,
  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    content: '';
    display: block;
    width: 28px;
    height: 4px;
    background: #0a3d62;
    border-radius: 2px;
  }
  .nav-toggle__bar::before {
    position: relative;
    top: -10px;
  }
  .nav-toggle__bar::after {
    position: relative;
    top: 10px;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* ===== ABOUT TITLE HERO ===== */
.about-title-hero {
  position: relative;
  width: calc(100% - 2rem);
  max-width: 1200px;
  margin: 2rem auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    /* blue overlay on top of nuts.jpg */
    linear-gradient(to right, rgba(10,61,98,.9), rgba(10,61,98,.7)),
    var(--hero-img) center / cover no-repeat;
  color: #fff;
  text-align: center;
  border-radius: 12px;
}

.about-title-hero__content {
  width: 100%;
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-title-hero__title-line {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.about-title-hero__text {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  color: #fff;
  line-height: 1.2;
}

.about-title-hero__logo {
  max-width: 300px;
  width: 100%;
}

.about-title-hero__logo img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1); /* Make logo white */
}

@media (max-width: 768px) {
  .about-title-hero {
    width: calc(100% - 1rem);
    margin: 1rem auto;
    min-height: 150px;
  }
  
  .about-title-hero__content {
    padding: 3rem 1.5rem;
  }
  
  .about-title-hero__title-line {
    gap: 1.5rem;
  }
  
  .about-title-hero__logo {
    max-width: 250px;
  }
}

/* Machine list styling */
.machine-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.machine-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.machine-list li:last-child {
  border-bottom: none;
}
