/* ===========================
   Overseas Page Styles (overseas.css)
   =========================== */

/* ---- Theme Tokens ---- */
:root {
  --brand: #a51c36;
  --brand-dark: #841731;
  --ink: #333;
  --ink-2: #555;
  --bg: #fff;
  --bg-soft: #f8f9fa;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, .15);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .18);
  --radius: 16px;
}

/* ===== General ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.5;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ===== Hero Banner ===== */
.hero-banner {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem 0 1.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: none;
}

.hero-banner::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(rgba(165, 29, 58, .1), transparent);
  top: -150px;
  right: 10%;
  z-index: 0;
}

.overseas-title {
  color: var(--brand);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin-bottom: .6rem;
  position: relative;
  z-index: 1;
}

.overseas-title::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 230px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

.overseas-subtitle {
  font-size: 1.7rem;
  font-weight: 600;
  color: #333;
  margin-bottom: .8rem;
  z-index: 1;
  position: relative;
}

.overseas-text {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 98%;
  z-index: 1;
  position: relative;
  margin-bottom: 0;
}

/* Listing Counter */
.listing-counter-box {
  background: linear-gradient(145deg, #fff, #f5f5f5);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, .8);
  position: relative;
  overflow: hidden;
  transition: all .4s cubic-bezier(.175, .885, .32, 1.275);
}

.listing-counter-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(165, 29, 58, .05) 0%, transparent 50%);
  z-index: 0;
}

.listing-counter-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.mascot-img {
  max-width: 180px;
  height: auto;
  margin-right: .75rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .15));
}




.counter-text p {
  margin-bottom: .3rem;
  font-size: .9rem;
  letter-spacing: .2px;
}

.counter-value {
  font-size: 3.75rem;
  font-weight: 800;
  color: var(--brand);
  margin: .15rem 0;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, .1);
  position: relative;
  display: inline-block;
}

.counter-value::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 8px;
  background: rgba(165, 29, 58, .15);
  border-radius: 4px;
  z-index: -1;
}

.counter-text {
  text-align: left;
  /* aligns counter and text to the left */
  position: relative;
  z-index: 2;
}

.counter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.counter-tagline {
  font-size: .95rem;
  line-height: 1.3;
  color: #0056b3;
  margin-top: .3rem;
  background: linear-gradient(to right, #0056b3, #2a7ad2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-highlight {
  color: var(--brand);
  font-weight: 800;
  -webkit-text-fill-color: var(--brand);
}

/* ===== Countries Section ===== */
.countries-section {
  padding: 2rem 0 4rem;
  background: var(--bg-soft);
}

.country-row {
  margin-bottom: 1rem;
}

/* Card */
.country-card {
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s, box-shadow .3s;
  height: 100%;
  background: #fff;
}

.country-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* Image */
.country-image-container {
  position: relative;
  /* for flag positioning */
  width: 100%;
  overflow: hidden;
  /* crop overflow if needed */
  border-radius: 8px;
  /* optional rounded corners */
}

.country-image-container .country-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ensures image fills container and keeps aspect ratio */
  display: block;
}


/* Flag overlay */
.country-flag {
  position: absolute;
  bottom: .75rem;
  left: .75rem;
  padding: .35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(0, 0, 0, .08);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}

.flag-icon-overseas {
  width: 32px;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* Content */

.country-info {
  /* alias for backwards compat */
  padding: 1.5rem;
}

.country-content {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 0.5rem;

}

.country-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: .5rem;
}

.country-description {
  font-size: .98rem;
  color: #666;
  margin-bottom: .9rem;
}

/* CTA button for countries */
.btn-country {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  border: none;
  box-shadow: 0 4px 8px rgba(165, 29, 58, .3);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn-country:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(165, 29, 58, .4);
}

.btn-country:focus-visible {
  outline: 2px solid rgba(165, 29, 58, .6);
  outline-offset: 2px;
}

/* ===== Magic Door (More Countries) ===== */
.magic-door-card .country-image-container {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.magic-link {
  display: block;
  position: relative;
  overflow: hidden;
  transition: transform .3s;
}

.magic-link:hover {
  transform: translateY(-5px);
}

.magic-link:focus-visible {
  outline: 2px solid rgba(165, 29, 58, .6);
  outline-offset: 4px;
  border-radius: var(--radius);
}

/* Cinematic overlay */
.mystery-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 80% 20%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .45) 60%),
    linear-gradient(to top, rgba(12, 22, 28, .55), rgba(12, 22, 28, .1));
  mix-blend-mode: multiply;
}

/* Caption */
.magic-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.15rem 1.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.badge-glass {
  display: inline-block;
  margin-bottom: .35rem;
  padding: .35rem .65rem;
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ===== Back to Top ===== */
.btn-back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  border: none;
  opacity: .9;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
  transition: all .3s ease;
}

.btn-back-to-top:hover {
  background: var(--brand-dark);
  color: #fff;
  opacity: 1;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
}

.individual-property-count-overseas {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.individual-property-count-overseas-num {
  color: var(--brand);
  padding: 0.5rem;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1.2rem;
  position: relative;
}

.individual-property-count-overseas-num::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 4px;
  background: rgba(165, 29, 58, .15);
  border-radius: 4px;
  z-index: -1;
}

/* ===== Accessibility / Motion ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .country-image-container {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    padding: 1.5rem 0 1rem;
  }

  .overseas-title {
    font-size: 2.5rem;
  }

  .overseas-title::after {
    width: 50px;
    height: 3px;
  }

  .overseas-subtitle {
    font-size: 1.4rem;
    margin-bottom: .6rem;
  }

  .counter-value {
    font-size: 2.8rem;
  }

  .counter-value::after {
    height: 5px;
    bottom: 5px;
  }

  .listing-counter-box {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .counter-text {
    text-align: center;
  }

  .mascot-img {
    margin-right: 0;
    margin-bottom: .75rem;
    max-width: 160px;
  }

  .country-image-container {
    height: 150px;
  }

  .country-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .overseas-title {
    font-size: 2.2rem;
  }

  .overseas-text {
    max-width: 100%;
  }

  .country-content,
  .country-info {
    padding: 1rem;
  }

  .country-name {
    font-size: 1.3rem;
  }

  .country-description {
    font-size: .9rem;
  }
}