/* =========================================================
   THEMAGRE TRANSPORT CORP. — Professional polish layer
   Loaded after styles.css so existing functionality remains intact.
   ========================================================= */

:root{
  --pro-navy:#0b3c5d;
  --pro-navy-deep:#082d46;
  --pro-teal:#287f7c;
  --pro-gold:#f0b84a;
  --pro-ink:#102332;
  --pro-muted:#5f6f7b;
  --pro-line:#dce5ea;
  --pro-soft:#f5f8fa;
  --pro-white:#ffffff;
  --pro-shadow:0 14px 34px rgba(8,45,70,.10);
  --pro-shadow-lg:0 24px 60px rgba(8,45,70,.16);
}

html{scroll-behavior:smooth}
body{
  color:var(--pro-ink);
  background:#fff;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.container{width:min(1180px,92vw)}
img{max-width:100%}

/* ---------- Header ---------- */
header.topbar,
.topbar.header-flex{
  position:sticky;
  top:0;
  z-index:1000;
  padding:0 !important;
  background:rgba(8,45,70,.97) !important;
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.12);
  box-shadow:0 7px 22px rgba(4,24,38,.16);
  backdrop-filter:blur(12px);
}
.topbar__inner{
  min-height:76px;
  padding:7px 0 !important;
  gap:22px;
}
.brand{
  min-width:0;
  gap:10px;
  color:#fff !important;
  flex:0 1 auto;
}
.topbar .brand > img,
header.topbar img[alt*="Themagre" i],
header.topbar img[alt*="logo" i]{
  width:64px !important;
  height:60px !important;
  max-height:60px !important;
  object-fit:contain;
  flex:0 0 auto;
}
.brand__words{min-width:0}
.brand__name{
  margin:0;
  color:#fff !important;
  font-family:"TeX Gyre Pagella","Palatino Linotype",Palatino,serif !important;
  font-style:italic;
  font-size:1.22rem !important;
  font-weight:700;
  line-height:1.05;
  white-space:nowrap;
}
.brand__tag{
  color:rgba(255,255,255,.72) !important;
  font-size:.72rem;
  letter-spacing:.035em;
  margin-top:3px;
}
.nav{
  margin-left:auto;
  gap:5px !important;
  flex-wrap:nowrap;
}
.nav a{
  position:relative;
  color:rgba(255,255,255,.88) !important;
  padding:10px 9px;
  border-radius:9px;
  font-size:.88rem !important;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.nav a:hover,
.nav a[aria-current="page"]{
  color:#fff !important;
  background:rgba(255,255,255,.09);
}
.nav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:4px;
  height:2px;
  border-radius:2px;
  background:#77c9c5;
}
.nav .btn{
  margin-left:7px;
  padding:10px 14px;
  background:linear-gradient(135deg,#f5c361,#e9ad39) !important;
  color:#152331 !important;
  border:0 !important;
  box-shadow:0 7px 18px rgba(0,0,0,.14);
}
.nav .btn:hover{transform:translateY(-1px);color:#152331 !important;background:linear-gradient(135deg,#f7cb73,#efb64b) !important}
.nav .btn[aria-current="page"]::after{display:none}
.menu{border-radius:10px;padding:9px !important}
.menu:hover{background:rgba(255,255,255,.08)}
.menu span{background:#fff !important;width:25px;height:2px;border-radius:3px}

/* ---------- Core typography / utility gaps from legacy CSS ---------- */
h1,h2,h3,h4{color:var(--pro-ink);text-wrap:balance}
h1,h2{letter-spacing:-.025em}
p{line-height:1.65}
.small{font-size:.9rem;color:var(--pro-muted)}
.grid{display:grid}
.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.list{padding-left:1.15rem}
.badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  background:#e7f3f3;
  color:#176663;
  font-size:.74rem;
  font-weight:800;
  letter-spacing:.075em;
  text-transform:uppercase;
}
.btn{
  min-height:42px;
  border-radius:10px;
  padding:10px 16px;
  font-weight:750;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary,
.btn--primary{
  background:var(--pro-navy-deep);
  border-color:var(--pro-navy-deep);
  color:#fff;
  box-shadow:0 8px 18px rgba(8,45,70,.16);
}
.btn.primary:hover,
.btn--primary:hover{background:#0c4367;border-color:#0c4367;color:#fff}
.btn--secondary{border-color:#cbd8df}

/* ---------- Homepage ---------- */
.hero{background:#0a304a}
.hero__media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(4,24,38,.34),rgba(4,24,38,.04) 56%,rgba(4,24,38,.10));
  pointer-events:none;
}
.hero__media img{height:min(66vh,620px);min-height:470px}
.hero__box{
  width:min(650px,92vw);
  margin-bottom:34px;
  padding:24px 25px 21px;
  border:1px solid rgba(255,255,255,.62);
  border-left:5px solid var(--pro-teal);
  border-radius:18px;
  background:rgba(255,255,255,.95);
  box-shadow:var(--pro-shadow-lg);
}
.hero h1{font-size:clamp(2rem,3.1vw,2.75rem)}
.hero__cta .btn:nth-child(2){background:#fff;color:var(--pro-navy-deep);border:1px solid #bfcfd8;box-shadow:none}
.hero__cta .btn:nth-child(2):hover{background:#f6fafb}
.kicker{color:#506672;letter-spacing:.08em}
.trust{gap:14px}
.trust__item{padding-right:8px}

.phase1-wrap .card{height:100%}
.phase1-wrap .grid{align-items:stretch}
.cap-item{background:#fbfdfe;border-color:#e3eaee}
.cap-ico{background:#e9f3f5}

.section{padding:76px 0}
.section--alt{background:#f6f9fb}
.head{margin-bottom:26px}
.head h2{font-size:clamp(1.65rem,2.25vw,2.15rem)}
.card{
  border:1px solid var(--pro-line);
  border-radius:18px;
  box-shadow:0 8px 24px rgba(8,45,70,.06);
}
.cards{gap:18px}
.cards .card{padding:20px}
.cards .card:hover{box-shadow:var(--pro-shadow);transform:translateY(-2px)}
.cards .card{transition:transform .18s ease,box-shadow .18s ease}
.note{border-color:var(--pro-line);border-radius:16px}
.areas span{border-color:#d4e0e6;color:#38515f;background:#fff}

.gallery{gap:18px}
.shot{border-radius:18px;border-color:var(--pro-line);box-shadow:0 8px 24px rgba(8,45,70,.07)}
.shot img{height:255px;transition:transform .35s ease}
.shot:hover img{transform:scale(1.018)}

/* ---------- Standard subpage hero ---------- */
.page-hero{
  position:relative;
  overflow:hidden;
  padding:58px 0 52px;
  background:linear-gradient(135deg,#082d46 0%,#0b476e 66%,#176d79 130%);
  color:#fff;
}
.page-hero::after{
  content:"";
  position:absolute;
  width:420px;height:420px;border-radius:50%;
  right:-190px;bottom:-290px;
  background:rgba(255,255,255,.045);
}
.page-hero .container{position:relative;z-index:1}
.page-hero h1{color:#fff;margin:9px 0 10px;font-size:clamp(2rem,4vw,3rem)}
.page-hero p{max-width:760px;margin:0;color:rgba(255,255,255,.82);font-size:1rem}
.page-hero .badge{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);color:#cce9e7}
.page-hero__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.page-hero__actions .btn{background:#fff;color:var(--pro-navy-deep);border-color:#fff}
.page-hero__actions .btn.primary{background:linear-gradient(135deg,#f5c361,#e9ad39);color:#142432;border:0}
.page-intro{padding:58px 0}
.about-values{margin-top:20px}
.about-values .card{padding:22px}
.about-values h3{margin-top:0}

/* Keep existing image hero pages polished without altering their content. */
.services-hero,.service-areas-hero{padding:62px 0 54px !important;background-position:center 42% !important}
.services-hero::before,.service-areas-hero::before{background:linear-gradient(90deg,rgba(5,29,46,.88),rgba(8,45,70,.68),rgba(8,45,70,.48)) !important}
.services-hero h1,.service-areas-hero h1{font-size:clamp(2rem,4vw,3rem);margin:9px 0 10px !important}
.services-hero p,.service-areas-hero p{font-size:1rem;line-height:1.65}
.services-hero .badge,.service-areas-hero .badge{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.16);color:#d9f0ee}

/* ---------- Forms ---------- */
.form,.pro-form{width:100%}
.input,
input,
textarea,
select{
  width:100%;
  min-height:46px;
  border:1px solid #cfdbe1;
  border-radius:10px;
  background:#fff;
  color:var(--pro-ink);
  padding:11px 12px;
  font:inherit;
  transition:border-color .16s ease,box-shadow .16s ease;
}
textarea{min-height:112px;resize:vertical}
.input:focus,input:focus,textarea:focus,select:focus{
  outline:none;
  border-color:#4c9693;
  box-shadow:0 0 0 3px rgba(40,127,124,.14);
}
.pro-form .form-label{color:#506672;font-weight:800}
.blue-form-wrap{
  padding:30px !important;
  border-radius:20px !important;
  background:linear-gradient(145deg,#082f4a,#0c5375) !important;
  box-shadow:var(--pro-shadow-lg) !important;
}
.blue-form-wrap .form-label{color:rgba(255,255,255,.86)}
.blue-form-wrap .btn.primary{background:linear-gradient(135deg,#f5c361,#e9ad39);color:#142432}

.quote-hero{padding:64px 0 48px;background:linear-gradient(135deg,#082d46 0%,#0d4f72 100%)}
.quote-hero__wrap{gap:34px}
.quote-hero h1{font-size:clamp(2.2rem,4.4vw,3.45rem);margin:10px 0 12px}
.quote-hero__card{padding:24px;border:1px solid rgba(255,255,255,.25);box-shadow:0 24px 60px rgba(0,0,0,.22)}
.quote-card__title{font-size:1.1rem}

/* ---------- Contact ---------- */
.contact-layout{padding:58px 0}
.contact-card{padding:24px}
.contact-card h1{font-size:clamp(1.9rem,3vw,2.5rem);margin:0 0 10px}
.contact-details{display:grid;gap:8px;margin-top:18px;line-height:1.55}
.contact-details a{color:#0b5b80;font-weight:650}
.contact-map{margin-top:20px}
.contact-map iframe{display:block;border:0;border-radius:16px;width:100%;box-shadow:0 8px 24px rgba(8,45,70,.08)}

/* ---------- Trust / footer ---------- */
.trust-strip{background:#f3f7f9;border-top:1px solid #dfe8ed}
.trust-inner{gap:8px 24px;padding:15px 0;color:#405762;font-size:.83rem;font-weight:650}
.footer-pro{margin-top:0;background:#081f30}
.footer-pro__grid{padding:48px 0 42px;gap:44px}
.footer-pro__logo{font-size:1.15rem !important;color:#fff}
.footer-pro h4{color:#fff;margin:0 0 14px}
.footer-pro__links ul{gap:9px}
.footer-pro__links a,.footer-pro__contact a{transition:color .16s ease}
.footer-pro__cta .btn{background:transparent;color:#fff;border-color:rgba(255,255,255,.22);box-shadow:none}
.footer-pro__cta .btn.primary{background:linear-gradient(135deg,#f5c361,#e9ad39);color:#152331;border:0}
.footer-pro__bottom{background:#061824}

/* ---------- Accessibility ---------- */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:3px solid rgba(240,184,74,.65);
  outline-offset:2px;
}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
  .topbar__inner{gap:12px}
  .brand__name{font-size:1.08rem !important}
  .nav a{padding:9px 7px;font-size:.82rem !important}
  .nav .btn{padding:9px 11px}
}

@media(max-width:980px){
  .cols-2,.cols-3{grid-template-columns:1fr}
  .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .topbar__inner{min-height:72px}
  .topbar .brand > img,
  header.topbar img[alt*="Themagre" i],
  header.topbar img[alt*="logo" i]{width:56px !important;height:54px !important;max-height:54px !important}
  .brand__name{font-size:1rem !important}
  .nav{display:none !important}
  .menu{display:block !important;margin-left:auto}
  .topbar.is-open .nav{
    display:flex !important;
    position:absolute;
    left:0;right:0;top:100%;
    padding:12px 4vw 18px !important;
    background:#082d46 !important;
    border-top:1px solid rgba(255,255,255,.10);
    border-bottom:1px solid rgba(255,255,255,.12);
    box-shadow:0 18px 32px rgba(4,24,38,.20);
    flex-direction:column;
    align-items:stretch;
    gap:3px !important;
  }
  .topbar.is-open .nav a{display:block;padding:12px 10px !important;border-radius:8px}
  .topbar.is-open .nav .btn{margin:7px 0 0;text-align:center}
  .topbar.is-open .nav a[aria-current="page"]::after{display:none}
  .hero__media img{min-height:410px;height:58vh}
  .hero__box{margin:18px auto 26px;width:min(760px,92vw)}
  .two{grid-template-columns:1fr}
  .footer-pro__grid{grid-template-columns:1fr 1fr}
  .footer-pro__brand{grid-column:1/-1}
}

@media(max-width:640px){
  .container{width:min(92vw,560px)}
  .brand__words{max-width:185px}
  .brand__name{font-size:.96rem !important}
  .brand__tag{font-size:.67rem}
  .section{padding:56px 0}
  .hero__media img{height:310px;min-height:310px}
  .hero__content{position:static !important;padding:0 !important}
  .hero__box{margin:0 auto;padding:21px 18px 19px;border-radius:0 0 16px 16px;width:92vw;box-shadow:0 13px 30px rgba(8,45,70,.12)}
  .hero h1{font-size:1.85rem}
  .trust{grid-template-columns:1fr;gap:8px}
  .cards,.gallery{grid-template-columns:1fr !important}
  .shot img{height:235px}
  .pro-form .form-row{grid-template-columns:1fr}
  .page-hero,.services-hero,.service-areas-hero{padding:48px 0 42px !important}
  .page-hero__actions,.hero-actions{display:grid !important;grid-template-columns:1fr}
  .page-hero__actions .btn,.hero-actions .btn{width:100%}
  .quote-hero{padding:48px 0 34px}
  .quote-hero__wrap{grid-template-columns:1fr}
  .blue-form-wrap{padding:22px 18px !important}
  .footer-pro__grid{grid-template-columns:1fr;gap:28px;padding:38px 0}
  .footer-pro__brand{grid-column:auto}
  .footer-pro__bottomInner{display:grid;gap:7px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{scroll-behavior:auto !important;transition:none !important}
}

/* =========================================================
   V10 — Homepage mobile refinement
   Keeps desktop/tablet presentation intact and only improves
   the welcome/home page experience on small screens.
   ========================================================= */
@media (max-width:640px){
  body{overflow-x:hidden}

  /* Cleaner, shorter mobile header */
  .topbar__inner{min-height:64px;padding:5px 0 !important}
  .topbar .brand > img,
  header.topbar img[alt*="Themagre" i],
  header.topbar img[alt*="logo" i]{width:48px !important;height:46px !important;max-height:46px !important}
  .brand{gap:8px;max-width:calc(100% - 48px)}
  .brand__words{max-width:205px}
  .brand__name{font-size:.92rem !important;line-height:1.08;white-space:normal}
  .brand__tag{font-size:.64rem;line-height:1.15;margin-top:2px}
  .menu{padding:7px !important}

  /* Hero becomes a clean image + content presentation instead of a bulky card. */
  .hero{border-bottom:0;background:#fff}
  .hero__media{overflow:hidden;background:#082d46}
  .hero__media::after{background:linear-gradient(180deg,rgba(4,24,38,.03),rgba(4,24,38,.17))}
  .hero__media img{height:230px !important;min-height:230px !important;object-position:center 46%}
  .hero__content{position:static !important;width:100%;padding:0 !important;background:#fff}
  .hero__content.container{width:100%;max-width:none}
  .hero__box{
    width:100% !important;
    margin:0 !important;
    padding:22px 4vw 21px !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:#fff !important;
  }
  .kicker{font-size:.69rem;line-height:1.45;letter-spacing:.055em;color:#55707e}
  .hero h1{font-size:1.72rem !important;line-height:1.12;margin:8px 0 9px;letter-spacing:-.035em}
  .hero p{font-size:.94rem;line-height:1.58;margin-bottom:16px}
  .hero__cta{display:grid;grid-template-columns:1fr;gap:9px;margin:0 0 17px}
  .hero__cta .btn{width:100%;min-height:46px;border-radius:11px}
  .hero__cta .btn:nth-child(2){background:#f7fafb}

  /* Compact trust points rather than three tall blocks. */
  .trust{grid-template-columns:1fr;gap:0;padding-top:4px;border-top:1px solid #e2eaee}
  .trust__item{position:relative;padding:10px 4px 10px 25px;border-bottom:1px solid #edf2f4}
  .trust__item:last-child{border-bottom:0;padding-bottom:2px}
  .trust__item::before{content:"✓";position:absolute;left:2px;top:10px;color:#287f7c;font-weight:900}
  .trust__item strong{display:inline;font-size:.86rem}
  .trust__item strong::after{content:" — ";font-weight:500;color:#83939c}
  .trust__item span{display:inline;font-size:.82rem;margin:0;color:#687b86}

  /* First-page information is tighter and easier to scan with a thumb. */
  .phase1-wrap{width:92vw !important;padding-top:13px !important;padding-bottom:4px !important}
  .phase1-wrap + .phase1-wrap{padding-top:6px !important;padding-bottom:20px !important}
  .phase1-wrap .grid{gap:12px !important}
  .phase1-wrap .card{padding:16px;border-radius:14px}
  .phase1-wrap h2{font-size:1.34rem;line-height:1.2;margin-bottom:8px}
  .phase1-wrap h3{font-size:1.08rem;line-height:1.25}
  .phase1-ctas{display:grid !important;grid-template-columns:1fr;gap:8px !important}
  .phase1-ctas .btn{width:100%;min-height:44px}
  .phase1-mini{display:grid;gap:4px;line-height:1.45 !important;overflow-wrap:anywhere}
  .phase1-mini strong{display:inline}
  .cap-grid{gap:9px}
  .cap-item{padding:10px 11px;border-radius:11px}

  /* Make the remaining home sections feel less endless on a phone. */
  #services.section,#fleet.section,#areas.section,#contact.section{padding:44px 0}
  .head{margin-bottom:16px}
  .head h2{font-size:1.48rem}
  .head p{font-size:.91rem;line-height:1.55}
  .cards{gap:11px}
  .cards .card{padding:16px;border-radius:14px}
  .gallery{gap:10px}
  .shot{border-radius:13px}
  .shot img{height:215px}
  .areas{gap:7px;margin:10px 0 13px}
  .areas span{padding:7px 9px;font-size:.84rem}
  .note{padding:13px}
  .blue-form-wrap{padding:18px 15px !important;border-radius:15px !important}
  .footercta{display:grid;grid-template-columns:1fr;gap:14px}
  .footercta .btn{width:100%}
  .trusted-by{width:92vw}
  .trusted-by-inner{padding-top:34px;padding-bottom:34px}
}

@media (max-width:390px){
  .brand__words{max-width:175px}
  .brand__name{font-size:.86rem !important}
  .hero__media img{height:210px !important;min-height:210px !important}
  .hero__box{padding-left:18px !important;padding-right:18px !important}
  .hero h1{font-size:1.58rem !important}
}
