/* ============================================================
   KPM Addresses Page  –  /link/
   ============================================================ */

/* ---------- Reset ---------- */
.addr-page *,
.addr-page *::before,
.addr-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Global overrides ---------- */
body,
#wrapwrap {
  background: #080808 !important;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#wrapwrap > header,
#wrapwrap > footer,
.o_main_navbar {
  display: none !important;
}

/* ---------- Page shell ---------- */
.addr-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  color: #ffffff;
  background:
    radial-gradient(ellipse 70% 50% at 50% -5%,
      rgba(177, 151, 77, 0.09) 0%,
      transparent 70%),
    #080808;
}

/* ---------- Header ---------- */
.addr-header {
  width: 100%;
  max-width: 1160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
}

.addr-header__logo {
  height: 64px;
  width: auto;
}

.addr-header__divider {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B1974D, transparent);
  margin-top: 18px;
}

/* ---------- Hero ---------- */
.addr-hero {
  width: 100%;
  max-width: 1160px;
  text-align: center;
  padding: 18px 0 28px;
}

.addr-hero__eyebrow {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #B1974D;
  opacity: 0.65;
  margin-bottom: 10px;
}

.addr-hero__title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1;
}

.addr-hero__title span {
  color: #C9AA72;
}

/* ---------- Grid ---------- */
.addr-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  width: 100%;
  max-width: 1160px;
  align-items: stretch;
}

/* ---------- Card ---------- */
.addr-country {
  height: 100%;                /* fills the grid cell → equal height per row */
  min-height: 190px;           /* consistent floor across all breakpoints */
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(177, 151, 77, 0.15);
  border-radius: 16px;
  padding: 24px 24px 20px;
  opacity: 0;
  animation: addrIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: border-color 0.3s ease, box-shadow 0.3s ease,
              transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.addr-country:hover {
  border-color: rgba(177, 151, 77, 0.42);
  box-shadow: 0 0 0 1px rgba(177, 151, 77, 0.08),
              0 12px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Explicit placement + stagger — combined per child to avoid split-rule issues */
.addr-country:nth-child(1) { grid-column: 1 / 3; grid-row: 1; animation-delay: 0.06s; }
.addr-country:nth-child(2) { grid-column: 3 / 5; grid-row: 1; animation-delay: 0.14s; }
.addr-country:nth-child(3) { grid-column: 5 / 7; grid-row: 1; animation-delay: 0.22s; }
.addr-country:nth-child(4) { grid-column: 2 / 4; grid-row: 2; animation-delay: 0.30s; } /* centred */
.addr-country:nth-child(5) { grid-column: 4 / 6; grid-row: 2; animation-delay: 0.38s; } /* centred */

@keyframes addrIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     }
}

/* ---------- Card header ---------- */
.addr-country__header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(177, 151, 77, 0.1);
  flex-shrink: 0;
}

.addr-country__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: rgba(177, 151, 77, 0.1);
  border: 1px solid rgba(177, 151, 77, 0.24);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #C9AA72;
  letter-spacing: 0.5px;
}

.addr-country__name {
  font-size: 12px;
  font-weight: 700;
  color: #C9AA72;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* ---------- Location rows ---------- */
.addr-locations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: flex-start;
}

.addr-location {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(177, 151, 77, 0.03);
  border: 1px solid rgba(177, 151, 77, 0.07);
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: background 0.22s ease, border-color 0.22s ease;
}

.addr-location:hover,
.addr-location:focus {
  background: rgba(177, 151, 77, 0.08);
  border-color: rgba(177, 151, 77, 0.28);
  text-decoration: none;
  color: inherit;
  outline: none;
}

.addr-location__pin {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: #B1974D;
  opacity: 0.8;
}

.addr-location__text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

/* ---------- Footer ---------- */
.addr-footer {
  width: 100%;
  max-width: 1160px;
  padding: 26px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.addr-footer__line {
  width: 32px;
  height: 1px;
  background: rgba(177, 151, 77, 0.2);
}

.addr-footer__text {
  color: rgba(255, 255, 255, 0.15);
  font-size: 10.5px;
  letter-spacing: 0.5px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* ---------- Medium desktop (≤ 1100px) ---------- */
@media (max-width: 1100px) {
  .addr-page    { padding: 36px 24px; }
  .addr-country { padding: 20px 20px 18px; }
  .addr-location__text { font-size: 12.5px; }
}

/* ---------- Tablet: 2 columns (≤ 960px) ---------- */
@media (max-width: 960px) {
  .addr-page        { padding: 32px 20px; justify-content: flex-start; }
  .addr-hero__title { font-size: 28px; }

  .addr-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: unset;
    gap: 12px;
    align-items: stretch;        /* keep equal height per row */
  }

  /* reset all explicit desktop placements — one rule each */
  .addr-country:nth-child(1) { grid-column: span 1; grid-row: auto; animation-delay: 0.06s; }
  .addr-country:nth-child(2) { grid-column: span 1; grid-row: auto; animation-delay: 0.14s; }
  .addr-country:nth-child(3) { grid-column: span 1; grid-row: auto; animation-delay: 0.22s; }
  .addr-country:nth-child(4) { grid-column: span 1; grid-row: auto; animation-delay: 0.30s; width: auto; margin: 0; }

  /* 5th card alone → span full row, shrink to 50% width, centre */
  .addr-country:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: auto;
    animation-delay: 0.38s;
    width: calc(50% - 6px);
    margin-left: auto;
    margin-right: auto;
    min-height: 190px;
  }
}

/* ---------- Mobile (≤ 520px) ---------- */
@media (max-width: 520px) {
  .addr-page          { padding: 28px 14px 28px; }
  .addr-header__logo  { height: 50px; }
  .addr-hero          { padding: 14px 0 20px; }
  .addr-hero__title   { font-size: 24px; }

  .addr-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .addr-country:nth-child(1),
  .addr-country:nth-child(2),
  .addr-country:nth-child(3),
  .addr-country:nth-child(4) {
    grid-column: span 1;
    grid-row: auto;
    width: 100%;
    margin: 0;
    min-height: 140px;       /* lighter floor on single column */
    height: auto;
  }

  .addr-country:nth-child(5) {
    grid-column: span 1;
    grid-row: auto;
    width: 100%;
    margin: 0;
    min-height: 140px;
  }

  .addr-location       { padding: 11px 12px; }
  .addr-location__text { font-size: 13px; }
}
