/* /css/global.css */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container,
.site-shell {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
}

/* Shared Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.985);
  border-bottom: 1px solid #eadcc8;
  box-shadow: 0 4px 14px rgba(24, 56, 74, 0.045);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 205px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #18384a;
  font-size: 0.88rem;
  font-weight: 900;
}

.site-nav > a,
.nav-dropdown-trigger {
  color: #18384a;
}

.site-nav > a:hover,
.nav-dropdown:hover > .nav-dropdown-trigger,
.nav-dropdown:focus-within > .nav-dropdown-trigger {
  color: #47744e;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret,
.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 20;
  min-width: 188px;
  padding: 8px;
  border: 1px solid #eadcc8;
  border-radius: 10px;
  background: #fffdf7;
  box-shadow: 0 14px 30px rgba(24, 56, 74, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: #18384a;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: #fff8ec;
  color: #47744e;
}

.nav-dropdown--account .nav-dropdown-trigger {
  max-width: min(220px, 42vw);
}

.nav-account-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-menu--account {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
  min-width: 168px;
}

.nav-dropdown--account:hover .nav-dropdown-menu--account,
.nav-dropdown--account:focus-within .nav-dropdown-menu--account,
.nav-dropdown--account.is-open .nav-dropdown-menu--account {
  transform: translateX(0) translateY(0);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 10px 15px;
  border-radius: 7px;
  background: #ef7d3c;
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 900;
}

/* Shared Footer */

.site-footer {
  background: #123f5a;
  color: rgba(255, 255, 255, 0.82);
  padding-top: 38px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, minmax(0, 0.7fr));
  gap: 34px;
  padding-bottom: 30px;
}

.footer-brand img {
  max-width: 210px;
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer a:hover {
  color: #f1b646;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding: 16px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal a {
  display: inline;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
}

.footer-legal a:hover {
  color: #f1b646;
}

/* Mobile */

@media (max-width: 860px) {
  .header-inner {
    min-height: auto;
    padding: 10px 0;
    flex-direction: column;
    gap: 9px;
  }

  .brand-mark img {
    width: 220px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 13px;
    font-size: 0.84rem;
  }

  .nav-dropdown-menu {
    left: 50%;
    right: auto;
  }

  .nav-dropdown-menu--account {
    left: auto;
    right: 0;
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container,
  .site-shell {
    width: min(100% - 28px, 1120px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .footer-legal {
    justify-content: center;
  }
}