:root {
  --navbar-height: 7.35rem;
}

/* Prevent layout shift when scrollbar appears */
html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.65;
  background-color: #0a1628;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.logo a,
.nav-links li a {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

input,
textarea,
button {
  font-family: inherit;
}

.btn,
.cta-btn,
button,
input[type='submit'],
input[type='button'],
input[type='reset'] {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Testimonials — quote text site-wide (inherits Lora from body) */
.testimonial-quote {
  font-size: 0.95rem;
  font-weight: 400;
  font-style: normal;
  color: #555;
  line-height: 1.65;
}

/* ── Navigation Bar ──────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* needed so absolute mobile menu offsets correctly */
}

.navbar {
  /* Solid bar — no backdrop blur (blur is expensive while scrolling) */
  background: linear-gradient(
    180deg,
    rgba(22, 30, 44, 0.97) 0%,
    rgba(16, 22, 36, 0.95) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 6, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  padding: 0.45rem 0;
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header.nav-compact .navbar {
  padding: 0.35rem 0;
  box-shadow:
    0 4px 20px rgba(0, 6, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  transition: font-size 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  transition: font-size 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease;
}

.logo a:hover {
  color: #b8c2d4;
}

.logo a:has(.logo-img) {
  display: inline-flex;
  align-items: flex-end;
  line-height: 0;
}

.logo-img {
  display: block;
  height: auto;
  max-height: 6.4rem;
  width: auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(0.2rem);
  transition: opacity 0.2s ease, max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo a:hover .logo-img {
  opacity: 0.9;
}

header.nav-compact .logo-img {
  max-height: 5rem;
  transform: translateY(0.12rem);
}

header.nav-compact .logo,
header.nav-compact .logo a {
  font-size: 1.3rem;
}

/* ── Nav Links (desktop) ─────────────────────────────────── */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  transition: gap 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header.nav-compact .nav-links {
  gap: 1.2rem;
}

.nav-links li a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease,
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links li a:not(.active):not(.contact-btn) {
  border-radius: 999px;
}

header.nav-compact .nav-links li a {
  padding: 0.4rem 0.85rem;
}

.nav-links li a:not(.active):not(.contact-btn):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22),
              0 4px 14px rgba(0, 12, 40, 0.2);
}

.nav-links a.active {
  font-weight: bold;
  border-bottom: 2px solid #3d74b8;
  color: #fff;
  border-radius: 0;
}

.contact-btn {
  background: linear-gradient(135deg, #0052a3, #0066cc);
  color: #fff !important;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.4);
  transition: background 0.25s ease,
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.25s ease;
}

header.nav-compact .contact-btn {
  padding: 0.52rem 1.3rem;
}

.contact-btn:hover {
  background: linear-gradient(135deg, #1385eb, #4db0ff);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 120, 230, 0.48);
  filter: brightness(1.06);
}

.contact-btn.current-page {
  background: linear-gradient(135deg, #0052a3, #0066cc);
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.4);
  transform: translateY(0);
}

.contact-btn.current-page:hover {
  background: linear-gradient(135deg, #1385eb, #4db0ff);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 120, 230, 0.48);
  filter: brightness(1.06);
}

/* Tighter hover glow when navbar is compact */
header.nav-compact .contact-btn:hover,
header.nav-compact .contact-btn.current-page:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 3px 10px rgba(0, 120, 230, 0.4);
}

/* ── Hamburger Button ────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: 8px;
  z-index: 1001;
  transition: background 0.2s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Navigation (≤ 768px) ────────────────────────── */
@media (max-width: 768px) {
  :root {
    --navbar-height: 5rem;
  }

  .hamburger {
    display: flex;
  }

  .logo-img {
    max-height: 4rem;
  }

  header.nav-compact .logo-img {
    max-height: 3.5rem;
  }

  /* Drop backdrop blur on phone — expensive while scrolling */
  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(22, 30, 44, 0.96);
  }

  /* Override desktop flex layout — hide by default on mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(14, 20, 34, 0.99);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 1rem 1.5rem 1.75rem;
    gap: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    padding: 0.85rem 1rem;
    display: block;
    border-radius: 8px;
    font-size: 1rem;
  }

  .nav-links li a.active {
    border-bottom: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
  }

  .contact-btn {
    margin-top: 0.5rem;
    text-align: center;
    display: block;
    border-radius: 10px !important;
    padding: 0.58rem 1.2rem !important;
    font-size: 0.9rem;
  }
}

/* ── Container padding reduction on very small screens ───── */
@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
}


/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background-color: #293952;
  color: #fff;
  padding: 3rem 2rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
  padding-left: 2.2rem;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column:first-child {
  max-width: 310px;
  padding-left: 0.2rem;
}

.footer-column:first-child .footer-socials {
  justify-content: center;
  padding-right: 2rem;
  margin-top: -1rem;
}

.footer h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Contact column heading → full details on Contact page (clear tap/click affordance) */
a.footer-contact-link {
  cursor: pointer;
  display: block;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}

a.footer-contact-link h3 {
  display: inline;
  margin: 0;
  padding-right: 0.2em;
  text-decoration: underline;
  text-decoration-color: rgba(130, 200, 255, 0.95);
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a.footer-contact-link::after {
  content: ' \2192';
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.95em;
  font-weight: 700;
  color: #9ed0ff;
  text-decoration: none;
}

a.footer-contact-link:hover h3,
a.footer-contact-link:focus-visible h3 {
  color: #ffffff;
  text-decoration-color: #d4ebff;
}

a.footer-contact-link:hover::after,
a.footer-contact-link:focus-visible::after {
  color: #e8f4ff;
}

a.footer-contact-link:focus-visible {
  outline: 2px solid rgba(160, 210, 255, 0.95);
  outline-offset: 3px;
}

.footer p {
  margin-bottom: 0.6rem;
  font-weight: 300;
  line-height: 1.8;
}

.footer p.footer-left-paragraph {
  line-height: 2 !important;
  margin-bottom: 1.25rem !important;
}

.footer-column:nth-child(2) {
  margin-left: 2rem;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-socials img {
  width: 50px;
  height: 80px;
  transition: transform 0.3s ease;
}

.footer-socials img:hover {
  transform: scale(1.1);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 300;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-links a:hover {
  color: #cccccc;
  text-decoration: underline;
}

/* Bottom Bar */
.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
}

.footer-bottom hr {
  border: none;
  border-top: 1.5px solid rgba(255, 255, 255, 0.5);
  width: 100%;
  margin: 0 auto 1rem auto;
}

.footer-bottom p {
  font-size: 0.9rem;
  font-weight: 300;
  margin: 0 auto;
  max-width: none;
}


/* ── Footer Responsive — compact layout (less vertical scroll) ── */
@media (max-width: 768px) {
  .footer {
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    padding-left: 0;
    align-items: start;
  }

  .footer-column {
    min-width: 0;
    width: auto;
  }

  /* Brand block: full width, logo + socials on one row */
  .footer-column:first-child {
    grid-column: 1 / -1;
    max-width: 100%;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.5rem;
  }

  .footer-column:first-child .footer-logo {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    font-size: clamp(1.05rem, 3.8vw, 1.2rem);
    line-height: 1.25;
    order: 1;
  }

  .footer-column:first-child .footer-socials {
    order: 2;
    flex: 0 0 auto;
    margin-top: 0.35rem;
    padding-right: 0;
    justify-content: flex-end;
    gap: 0.75rem;
  }

  .footer-column:first-child .footer-left-paragraph {
    order: 3;
    flex: 1 0 100%;
    line-height: 1.5 !important;
    margin-bottom: 0.35rem !important;
    font-size: 0.86rem;
  }

  .footer-column:first-child > p:not(.footer-left-paragraph) {
    order: 4;
    flex: 1 0 100%;
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    opacity: 0.92;
  }

  /* Quick links hidden — same destinations are in the header / hamburger menu */
  .footer-column:nth-child(3) {
    display: none;
  }

  .footer-column:nth-child(2) {
    grid-column: 1;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(1.1rem, 5vw, 2rem);
    row-gap: 0.5rem;
    align-items: start;
  }

  .footer-column:nth-child(2) > .footer-contact-link {
    grid-column: 1 / -1;
    margin-bottom: 0.45rem;
  }

  .footer-column:nth-child(2) > .footer-contact-link h3 {
    margin-bottom: 0;
  }

  /* Left: hours + fax | Right: office + address (stacked) */
  .footer-column:nth-child(2) p:nth-of-type(1) {
    grid-column: 1;
    grid-row: 2;
    margin-bottom: 0;
  }

  .footer-column:nth-child(2) p:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin-bottom: 0;
  }

  .footer-column:nth-child(2) p:nth-of-type(3) {
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 0;
  }

  .footer-column:nth-child(2) p:nth-of-type(4) {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    margin-bottom: 0.15rem;
  }

  .footer-column:nth-child(2) p:nth-of-type(5) {
    grid-column: 2;
    grid-row: 4;
    align-self: start;
    margin-bottom: 0;
  }

  .footer h3:not(.footer-logo) {
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.88;
  }

  .footer-column:nth-child(2) p {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  /* Override iOS/Android auto-detected phone number link color in footer */
  .footer p a {
    color: #fff !important;
    text-decoration: underline !important;
  }

  .footer-bottom {
    margin-top: 0.85rem;
  }

  .footer-bottom hr {
    margin-bottom: 0.65rem;
  }

  .footer-bottom p {
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 0 0.25rem;
  }

  .footer-socials img {
    width: 48px;
    height: auto;
    max-height: 68px;
    object-fit: contain;
  }
}

/* Phones — larger social icons, slightly roomier contact grid */
@media (max-width: 480px) {
  .footer-column:nth-child(2) {
    column-gap: clamp(1.25rem, 6vw, 2.25rem);
  }

  .footer-column:nth-child(2) p {
    font-size: 0.9rem;
    line-height: 1.48;
  }

  .footer-socials img {
    width: 58px;
    height: auto;
    max-height: 90px;
    object-fit: contain;
  }

  .footer-column:first-child .footer-socials {
    gap: 1.1rem;
    margin-top: 0.45rem;
  }
}

@media (max-width: 380px) {
  .footer-container {
    gap: 0.85rem;
  }

  .footer-column:nth-child(2) {
    column-gap: 1rem;
  }

  .footer-column:nth-child(2) p {
    font-size: 0.84rem;
  }

  .footer h3:not(.footer-logo) {
    font-size: 0.78rem;
  }
}
