/* ================================================
   Responsive Breakpoint Guide (common devices)
   ------------------------------------------------
   Desktop / Large screens      ≥ 1100px
   Small laptops / large tablets 841–1099px
   Tablets (portrait)           641–840px
   Phones                       ≤ 640px

   Reference devices:
   - iPhone 14/15 Pro Max: 430px CSS width
   - iPhone 14/15:        390px CSS width
   - Pixel 7/8:           ~412px CSS width
   - iPad Pro 11":        834px CSS width (portrait)
   - iPad 9th/10th gen:   810px CSS width (portrait)
   - iPad Mini:           768px CSS width (portrait)
   - Small Chromebook:    1024px CSS width
   - Typical desktop:     1280+ px

   We use:
     Desktop ≥1100
     Tablet  840–641
     Mobile ≤640
================================================ */

/* ===========================
   HEADER — base (desktop first)
   (≥ 841px applies by default)
=========================== */

.site-header {
  background-color: #1b263b;
  padding: 10px 24px;
}

/* 3-column grid: logo | links | CTA */
.site-header .nav-container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) max-content; /* allow middle to shrink */
  grid-template-areas: 'brand menu cta';
  align-items: center;
  column-gap: 24px;
}

/* Brand */
.nav-brand {
  grid-area: brand;
}
.logo {
  height: 60px;
  width: auto;
  display: block;
}

/* Nav (center column) */
.nav-menu {
  grid-area: menu;
  display: flex;
  align-items: center;
  justify-content: center; /* ⬅ center the link group */
  gap: 32px;
  flex-wrap: nowrap; /* keep a single row on desktop */
  min-width: 0; /* allow shrink without pushing CTA */
}
.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a:focus {
  color: #ffb347;
  text-decoration: underline;
}

/* CTA (right column) */
.nav-cta {
  grid-area: cta;
  justify-self: end; /* ⬅ keep on the far right */
  display: block; /* reset any mobile flex */
  width: auto; /* reset any mobile width:100% */
}
.btn.cta-orange {
  background-color: #fb5924;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, transform 0.06s ease;
}
.btn.cta-orange:hover,
.btn.cta-orange:focus {
  background-color: #e34f1f;
}
.btn.cta-orange:active {
  transform: translateY(1px);
}

/* Slight tighten before tablet */
@media (max-width: 900px) {
  .nav-menu {
    gap: 20px;
  }
  .logo {
    height: 52px;
  }
}

/* ===========================
   TABLET (1100–641px): centered stack
   brand (top) / menu (full width) / cta (bottom)
=========================== */
@media (max-width: 1100px) and (min-width: 641px) {
  .site-header .nav-container {
    display: grid;
    grid-template-columns: 1fr; /* single column */
    grid-template-areas:
      'brand'
      'menu'
      'cta';
    justify-items: center; /* center all three rows */
    row-gap: 12px;
    padding: 8px 16px;
  }

  .nav-brand {
    grid-area: brand;
  }

  /* Full-width, centered links that wrap nicely */
  .nav-menu {
    grid-area: menu;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
  }
  .nav-menu a {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Center CTA on its own row */
  .nav-cta {
    grid-area: cta;
    justify-self: center;
    display: block; /* reset any mobile flex */
    width: auto; /* avoid 100% carry-over */
  }
  .nav-cta .btn {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
  }
}

/* ===========================
   MOBILE (≤640px): single column
=========================== */
@media (max-width: 640px) {
  .site-header .nav-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      'brand'
      'menu'
      'cta';
    justify-items: center;
    row-gap: 12px;
    padding: 8px 12px;
  }

  .nav-brand {
    grid-area: brand;
    justify-self: center;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .nav-brand a {
    display: inline-block;
  }
  .logo {
    height: 70px;
    margin: 0 auto;
  }

  .nav-menu {
    grid-area: menu;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
  }
  .nav-menu a {
    display: block;
    text-align: center;
    font-weight: 400;
    line-height: 1; /* tighter */
    font-size: 1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    white-space: normal;
  }

  .nav-cta {
    grid-area: cta;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
  }
  .nav-cta .btn {
    width: min(50%, 200px);
    font-size: 1rem;
    padding: 0.55rem 0.8rem;
    line-height: 1.1;
    border-radius: 14px;
  }
}
