/* ============================================
   GLOBAL CSS v2 — Primecrest Porta Potty Rental Chicago
   Header (Mega Menu) + Footer + Float CTA
   ============================================ */

:root {
  --navy: #1a3d7c;
  --orange: #c0392b;
  --orange-dark: #962d22;
  --medium-blue: #2563a8;
  --footer-dark: #0f2850;
  /* Type scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 36px;
  --text-3xl: 48px;
}

body.nav-open { overflow: hidden; }

/* Skip Link */
.g-skip-link{position:absolute;top:-40px;left:0;background:#1a3d7c;color:#fff;padding:8px 16px;z-index:10000;font-size:14px;font-weight:600;transition:top .2s}
.g-skip-link:focus{top:0}

/* ============ HEADER ============ */
.g-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(26,61,124,.05);
}
.g-container {
  max-width: 1260px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

/* Logo */
.g-logo {
  text-decoration: none; display: flex; align-items: center;
  flex-shrink: 0;
}
.g-logo-img { height: 72px; width: auto; display: block; }

/* Nav Container */
.g-nav {
  display: flex; align-items: center; gap: 2px; flex: 1; justify-content: flex-end;
}
.g-nav-inner {
  display: flex; align-items: center; gap: 0;
}

/* Nav Items */
.g-nav-item { position: relative; }
.g-nav-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px; font-size: 13px; font-weight: 600; color: #334155;
  text-decoration: none; background: none; border: none; cursor: pointer;
  font-family: inherit; border-radius: 8px; transition: all .2s;
  white-space: nowrap;
}
.g-nav-btn:hover { background: #f1f5f9; color: var(--navy); }
.g-nav-item.active .g-nav-btn { color: var(--orange); }
.g-chevron { transition: transform .2s; flex-shrink: 0; }

/* Header CTA Button */
.g-header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--orange), #962d22);
  color: #fff !important; font-weight: 700; padding: 10px 22px;
  border-radius: 10px; font-size: 14px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(192,57,43,.3);
  transition: all .25s; margin-left: 8px; white-space: nowrap;
  flex-shrink: 0; font-size: 13px; padding: 9px 18px;
}
.g-header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192,57,43,.4);
}

/* ============ MEGA DROPDOWN ============ */
.g-mega {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 20px 60px rgba(26,61,124,.12), 0 0 0 1px rgba(26,61,124,.06);
  z-index: 100; min-width: 280px;
  opacity: 0; transition: opacity .15s, transform .15s;
  transform: translateX(-50%) translateY(4px);
}
@media (min-width: 961px) {
  .g-nav-item:hover > .g-mega {
    display: block; opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .g-nav-item:hover > .g-nav-btn .g-chevron { transform: rotate(180deg); }
}

/* Mega Grid */
.g-mega-grid { display: grid; gap: 0; }
.g-mega-grid.cols-2 { grid-template-columns: 1fr 1fr; gap: 24px; min-width: 520px; }
.g-mega-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; gap: 20px; min-width: 640px; }

.g-mega-heading {
  font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid #eef2f7;
}
.g-mega-section a:not(.g-mega-link):not(.g-mega-viewall) {
  display: block; padding: 5px 0; font-size: 13.5px; font-weight: 500;
  color: #475569; text-decoration: none; transition: all .15s;
}
.g-mega-section a:not(.g-mega-link):not(.g-mega-viewall):hover {
  color: var(--orange); padding-left: 4px;
}

/* Mega Link Card Style */
.g-mega-link {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  transition: background .15s;
}
.g-mega-link:hover { background: #f8fafc; }
.g-mega-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.g-mega-link strong { display: block; font-size: 13.5px; color: #1e293b; font-weight: 600; }
.g-mega-link small { display: block; font-size: 12px; color: #94a3b8; margin-top: 2px; line-height: 1.4; }
.g-mega-link:hover strong { color: var(--orange); }

.g-mega-viewall {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--orange) !important; text-decoration: none; padding: 4px 0;
}
.g-mega-viewall:hover { color: var(--orange-dark) !important; }

/* Hamburger */
.g-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 10px; z-index: 1002; flex-direction: column; gap: 6px;
  border-radius: 10px; transition: background .2s;
}
.g-hamburger:active { background: rgba(26,61,124,.06); }
.g-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--navy);
  border-radius: 2px; transition: all .35s cubic-bezier(.4,.2,.2,1);
  transform-origin: center;
}
.g-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.g-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.g-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ MOBILE NAV (separate DOM) ============ */
@media (max-width: 960px) {
  .g-hamburger { display: flex; }
  .g-nav { display: none !important; }
}

/* Mobile drawer */
.mob-backdrop {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(15,40,80,.45);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mob-backdrop.open { opacity: 1; visibility: visible; }

.mob-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; max-width: 100vw;
  z-index: 1051; background: #fff;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: -4px 0 30px rgba(0,0,0,.12);
}
.mob-drawer.open { transform: translateX(0); }

/* Drawer header */
.mob-drawer-head {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 16px; border-bottom: 1px solid #f1f5f9;
  position: sticky; top: 0; background: #fff; z-index: 2;
  min-height: 0;
}
.mob-drawer-head img { display: none; }
.mob-close {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; font-size: 22px; transition: background .2s;
}
.mob-close:active { background: #f1f5f9; }

/* Nav list */
.mob-list { list-style: none; margin: 0; padding: 8px 12px 20px; }
.mob-list li { margin-bottom: 1px; }

/* Top-level link / button */
.mob-link {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 14px;
  font-size: 15px; font-weight: 600; color: #1e293b;
  text-decoration: none; background: none; border: none;
  border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.mob-link:active, .mob-link:hover { background: #f1f5f9; }
.mob-link svg {
  width: 18px; height: 18px; color: #94a3b8;
  transition: transform .25s; flex-shrink: 0;
}
.mob-link.open svg { transform: rotate(180deg); }

/* Dropdown panel */
.mob-sub {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease-in-out;
  background: #f8fafc; border-radius: 10px; margin: 0 4px 4px;
}
.mob-sub.open { max-height: 1200px !important; overflow-y: auto !important; }
body.nav-open { overflow: hidden !important; }
body.nav-open .g-float-cta { display: none !important; }
.mob-sub-inner { padding: 8px; overflow: hidden; }

/* Sub heading */
.mob-sub-heading {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #94a3b8; padding: 6px 10px 4px;
  margin-top: 4px;
}
.mob-sub-heading:first-child { margin-top: 0; }

/* Sub link */
.mob-sub a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; text-decoration: none;
  transition: background .15s; color: #334155; font-size: 14px;
  overflow: hidden; word-break: break-word;
}
.mob-sub a:active { background: #e2e8f0; }
.mob-sub a .mob-emoji { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }
.mob-sub a .mob-label { font-weight: 500; }
.mob-sub a .mob-desc { font-size: 11.5px; color: #94a3b8; display: block; margin-top: 1px; }

/* View all link inside sub */
.mob-sub .mob-viewall {
  display: block; text-align: center; margin-top: 6px;
  padding: 10px; border-radius: 8px; font-size: 13px;
  font-weight: 700; color: var(--orange); text-decoration: none;
  background: rgba(192,57,43,.05); transition: background .15s;
}
.mob-sub .mob-viewall:active { background: rgba(192,57,43,.1); }

/* Drawer CTA */
.mob-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 8px 12px 20px; padding: 14px;
  background: linear-gradient(135deg, var(--orange), #962d22);
  color: #fff; font-weight: 700; font-size: 15px;
  border-radius: 12px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(192,57,43,.3);
  transition: transform .2s;
}
.mob-cta:active { transform: scale(.98); }
.mob-cta svg { flex-shrink: 0; }

/* ============ FOOTER ============ */
.g-footer { background: var(--footer-dark); color: rgba(255,255,255,.8); }
.g-footer a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
.g-footer a:hover { color: var(--orange); }

.g-footer-top {
  max-width: 1260px; margin: 0 auto; padding: 60px 24px 40px;
}
.g-footer-cols {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 36px;
}
.g-footer-col h4 {
  color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: .5px;
}
.g-footer-col a { display: block; font-size: 13.5px; padding: 4px 0; }
.g-footer-brand {
  font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 14px;
}
.g-footer-brand span { color: #fff; }
.g-footer-tagline { font-size: 13.5px; line-height: 1.7; margin-bottom: 16px; }
.g-footer-phone-badge {
  display: inline-block; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: #fff !important; transition: background .2s;
}
.g-footer-phone-badge:hover { background: rgba(255,255,255,.14); }
.g-footer-viewall {
  display: inline-block; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: var(--orange) !important; font-weight: 700; font-size: 13px;
}

/* NAP + Map */
.g-footer-nap {
  max-width: 1260px; margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start;
  border-top: 1px solid rgba(255,255,255,.08);
}
.g-nap-info h4 { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.g-nap-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; font-size: 15px;
}
.g-nap-row svg { flex-shrink: 0; }
.g-nap-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px; background: linear-gradient(135deg, var(--orange), #962d22);
  color: #fff !important; font-weight: 700; padding: 14px 30px; border-radius: 12px;
  font-size: 16px; text-decoration: none;
  box-shadow: 0 6px 20px rgba(192,57,43,.35); transition: all .3s;
}
.g-nap-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(192,57,43,.45);
  color: #fff !important;
}

/* Copyright */
.g-footer-copy {
  max-width: 1260px; margin: 0 auto;
  text-align: center; padding: 20px 24px; font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.35);
}

@media (max-width: 900px) {
  .g-footer-cols { grid-template-columns: 1fr 1fr; }
  .g-footer-nap { grid-template-columns: 1fr; }
  .brand-col { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .g-footer-cols { grid-template-columns: 1fr; }
}

/* ============ FLOAT CTA ============ */
.g-float-cta {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--orange), #962d22);
  color: #fff !important; font-size: 16px; font-weight: 800;
  padding: 16px 28px; border-radius: 60px; text-decoration: none;
  box-shadow: 0 8px 30px rgba(192,57,43,.45), 0 2px 8px rgba(0,0,0,.15);
  transition: opacity .3s, transform .3s, box-shadow .3s;
  animation: gFloatPulse 2s ease-in-out infinite;
}
.g-float-cta:hover {
  transform: translateY(-3px) scale(1.03); color: #fff !important;
  box-shadow: 0 12px 40px rgba(192,57,43,.55);
}
.g-float-cta svg { flex-shrink: 0; }
.g-float-cta .cta-full { display: inline; }
.g-float-cta .cta-short { display: none; }
@keyframes gFloatPulse {
  0%,100% { box-shadow: 0 8px 30px rgba(192,57,43,.45); }
  50% { box-shadow: 0 8px 36px rgba(192,57,43,.55); }
}
@media (max-width: 600px) {
  .g-float-cta { bottom: 80px; right: 20px; padding: 14px 20px; font-size: 14px; }
  .g-float-cta .cta-full { display: none; }
  .g-float-cta .cta-short { display: inline; }
}

/* ============ MANDATORY FIXES ============ */
/* NAP link color override on buttons */
.g-nap a.btn, .nap a.btn { color: #fff !important; }
/* Hero background specificity — pages must still use !important on .hero/.svc-hero */
