/* Shared header — all themes */

:root {
  --header-h: 4.35rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.94) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 30px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 12px 32px rgba(15, 23, 42, 0.08);
}

.site-header__inner {
  width: min(1180px, 94vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: nowrap;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.tam-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  padding: 0.2rem 0;
}

.tam-logo__img {
  flex-shrink: 0;
  height: clamp(2rem, 4.2vw, 2.45rem);
  width: auto;
  max-width: min(42vw, 168px);
  object-fit: contain;
  display: block;
}

.site-nav {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  flex-shrink: 1;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.site-nav > a,
.site-products__btn {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border-bottom: none;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.site-nav > a:hover,
.site-products__btn:hover,
.site-products[open] > .site-products__btn,
.site-products:hover > .site-products__btn {
  color: #0b4fd4;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(11, 79, 212, 0.1);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-country {
  position: relative;
  display: inline-block;
  margin: 0;
  z-index: 3;
}

.site-country > summary.site-country__btn {
  list-style: none;
}

.site-country > summary.site-country__btn::-webkit-details-marker {
  display: none;
}

.site-country__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  min-height: 2.05rem;
  padding: 0.2rem 0.5rem 0.2rem 0.3rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  font: inherit;
  cursor: pointer;
  line-height: 1.1;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 14px rgba(15, 23, 42, 0.06);
}

/* Trigger: country name only (ISO code in aria-label only) */
.site-country__label--trigger {
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.site-country__label--trigger .site-country__name {
  max-width: 8rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-country__btn:hover,
.site-country[open] .site-country__btn {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 6px 20px rgba(15, 23, 42, 0.08);
}

.site-country[open] .site-country__btn {
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 6px 20px rgba(15, 23, 42, 0.08);
}

.site-country__btn:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

.site-country__flag-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.78rem;
  height: 1.78rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff 0%, #eef2ff 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.site-country__btn .site-country__flag {
  font-size: 1.02rem;
  line-height: 1;
  flex-shrink: 0;
}

.site-country .site-country__menu .site-country__flag {
  font-size: 1.25rem;
}

.site-country__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06rem;
  min-width: 0;
  text-align: left;
}

.site-country__kicker {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1;
}

.site-country__name {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-country__trail {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.1rem;
  flex-shrink: 0;
}

.site-country__chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.site-country[open] .site-country__chevron {
  transform: rotate(225deg) translateY(-1px);
}

.site-country:not([open]) > .site-country__dropdown {
  display: none;
}

.site-country__dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  left: auto;
  z-index: 10001;
  width: min(19rem, calc(100vw - 1.5rem));
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.site-country__menu-title {
  margin: 0;
  padding: 0.55rem 0.85rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.site-country__menu {
  max-height: min(20rem, 65vh);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0.45rem 0.5rem;
  list-style: none;
  scrollbar-gutter: stable;
}

.site-country__option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.6rem 0.6rem 0.65rem;
  border-radius: 11px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.site-country__option:hover,
.site-country__option:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.site-country__option.is-active {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.site-country__option.is-active::after {
  content: "";
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-country__option-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.site-country__option-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.site-country__option-meta {
  font-size: 0.66rem;
  font-weight: 600;
  color: #64748b;
}

.site-phone {
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  color: #0c4a8c;
  white-space: nowrap;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.site-phone:hover {
  background: #e2e8f0;
  color: #0c4a8c;
}

.site-header .btn--primary {
  background: linear-gradient(145deg, #34d399, #16a34a) !important;
  color: #fff !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35) !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
}

.site-header .btn--primary:hover {
  filter: brightness(1.03);
}

/* Hero clearance below fixed header */
main > .hero {
  padding-top: calc(var(--header-h) + 2.75rem) !important;
}

/* In-page nav: land below fixed header */
main [id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

@media (min-width: 900px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.25rem;
  }

  .tam-logo {
    grid-column: 1;
  }

  .site-nav {
    display: flex;
    justify-content: center;
    grid-column: 2;
    max-width: 42rem;
    margin-inline: auto;
  }

  .site-header__actions {
    grid-column: 3;
    margin-left: 0;
  }
}

.btn-label-short {
  display: none;
}

@media (max-width: 720px) {
  .site-phone {
    display: none;
  }

  .site-country__dropdown {
    right: -0.25rem;
  }
}

/* Products dropdown (suite links) */
.site-products {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-products__btn {
  list-style: none;
  cursor: pointer;
  line-height: 1.25;
}

.site-products__btn::-webkit-details-marker {
  display: none;
}

.site-products__menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 15rem;
  margin: 0;
  padding: calc(0.4rem + 0.35rem) 0.4rem 0.4rem;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.65rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 40;
}

.site-products__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0.35rem;
}

.site-products:not([open]) > .site-products__menu {
  display: none;
}

.site-products__menu a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  text-decoration: none;
  color: #0f172a;
}

.site-products__menu a:hover {
  background: rgba(37, 99, 235, 0.08);
}

.site-products__label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
}

.site-products__desc {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}

@media (max-width: 520px) {
  .site-header .btn--primary {
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
  }

  .btn-label-full {
    display: none;
  }

  .btn-label-short {
    display: inline;
  }

  :root {
    --header-h: 4.25rem;
  }
}
