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

:root {
  --navy: #1E6B8A;
  --orange: #C41E3A;
  --orange-dark: #A01830;
  --medium-blue: #2A7FA3;
  --footer-dark: #0a2540;
}

body.nav-open { overflow: hidden; }

/* ============ 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(27,79,138,.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: 52px; 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), #A01830);
  color: #fff !important; font-weight: 700; padding: 10px 22px;
  border-radius: 10px; font-size: 14px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(196,30,58,.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(196,30,58,.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(27,79,138,.12), 0 0 0 1px rgba(27,79,138,.06);
  z-index: 100; min-width: 280px;
  opacity: 0; transition: opacity .15s, transform .15s;
  transform: translateX(-50%) translateY(4px);
}
.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: 8px; z-index: 1002; flex-direction: column; gap: 5px;
}
.g-hamburger span {
  display: block; width: 24px; height: 2.5px; background: var(--navy);
  border-radius: 2px; transition: all .3s;
}
.g-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.g-hamburger.active span:nth-child(2) { opacity: 0; }
.g-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ MOBILE NAV ============ */
@media (max-width: 960px) {
  .g-hamburger { display: flex; }

  .g-nav {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; z-index: 1001;
    padding: 80px 0 100px; overflow-y: auto;
    height: 100vh; height: 100dvh;
  }
  .g-nav.open { display: flex; align-items: stretch; }

  .g-nav-inner {
    flex-direction: column; align-items: stretch; width: 100%;
    padding: 0 20px;
  }

  .g-nav-item { border-bottom: 1px solid #f1f5f9; }
  .g-nav-btn {
    width: 100%; justify-content: space-between;
    padding: 16px 4px; font-size: 16px; border-radius: 0;
  }
  .g-nav-btn:hover { background: none; }

  .g-mega {
    position: static; transform: none; box-shadow: none; border: none;
    border-radius: 0; padding: 0 0 12px 8px; min-width: 0 !important;
    opacity: 1;
  }
  .g-mega-grid { display: block !important; }
  .g-mega-grid.cols-2, .g-mega-grid.cols-3 { min-width: 0 !important; }
  .g-mega-section { margin-bottom: 8px; }
  .g-mega-link { padding: 8px 4px; }

  .g-nav-item .g-mega { display: none; }
  .g-nav-item.mob-open .g-mega { display: block; }
  .g-nav-item.mob-open .g-chevron { transform: rotate(180deg); }

  .g-header-cta {
    margin: 20px 20px 0; text-align: center; justify-content: center;
    padding: 16px 24px; font-size: 16px;
  }
}

/* ============ 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: var(--orange); }
.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), #A01830);
  color: #fff !important; font-weight: 700; padding: 14px 30px; border-radius: 12px;
  font-size: 16px; text-decoration: none;
  box-shadow: 0 6px 20px rgba(196,30,58,.35); transition: all .3s;
}
.g-nap-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(196,30,58,.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), #8B1528);
  color: #fff !important; font-size: 16px; font-weight: 800;
  padding: 16px 28px; border-radius: 60px; text-decoration: none;
  box-shadow: 0 8px 30px rgba(196,30,58,.45), 0 2px 8px rgba(0,0,0,.15);
  transition: all .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(196,30,58,.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(196,30,58,.45); }
  50% { box-shadow: 0 8px 40px rgba(196,30,58,.65); }
}
@media (max-width: 600px) {
  .g-float-cta { bottom: 20px; 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 */
