/*!
 * UI Design & Front-End Architecture by Woomark Studio
 * Exclusive theme developed for synergyo2.com
 * countries.html — country / region selector page (replaces the modal). Loaded after styles.css.
 */

/* ============ HERO ============ */
.cty-hero {
  position: relative;
  overflow: hidden;
  background: var(--mist);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
/* Soft globe lines, decorative */
.cty-hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: 50%;
  width: 520px;
  height: 520px;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 59%, rgba(31, 111, 214, 0.1) 59.4%, transparent 60%),
    repeating-radial-gradient(ellipse 22% 50% at 50% 50%, transparent 0 98%, rgba(31, 111, 214, 0.08) 98% 100%),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(31, 111, 214, 0.07) 63px 64px);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 60.5%);
  mask: radial-gradient(circle, #000 60%, transparent 60.5%);
  pointer-events: none;
}
.cty-hero .wrap {
  position: relative;
}
.cty-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font: 700 0.75rem var(--head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cty-back:hover {
  color: var(--navy);
}
.cty-title {
  font: 700 clamp(2.4rem, 4.6vw, 3.9rem) / 1.04 var(--head);
  letter-spacing: -0.05em;
  color: var(--navy);
  margin: 16px 0 14px;
  max-width: 760px;
}
.cty-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--blue2);
}
.cty-lead {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 30px;
}
.cty-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.cty-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 40px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}
.cty-current strong {
  color: var(--navy);
  font-family: var(--head);
}
.cty-current .flag {
  width: 24px;
  height: 18px;
}
.cty-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 420px;
}
.cty-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.cty-search input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 46px;
  border-radius: 40px;
  border: 1.5px solid #cfdcea;
  background: #fff;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.cty-search input:focus {
  border-color: var(--blue2);
  box-shadow: 0 0 0 4px rgba(31, 111, 214, 0.14);
}
.cty-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.cty-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font: 600 0.8rem var(--head);
  color: var(--navy);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.cty-jump a:hover {
  background: #fff;
  border-color: #b9d8f4;
}
.cty-jump a span {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ============ LIST ============ */
.cty-list {
  padding: 48px 0 96px;
  background: #fff;
}
.cty-region {
  scroll-margin-top: 110px;
}
.cty-region + .cty-region {
  margin-top: 48px;
}
.cty-region-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.cty-region-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--blue2);
}
.cty-region-head h2 {
  font: 700 1.35rem var(--head);
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0;
}
.cty-count {
  margin-left: auto;
  min-width: 34px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--mist);
  text-align: center;
  font: 700 0.75rem var(--head);
  color: var(--muted);
}
/* Country buttons (markup rendered by main.js → renderCountries) */
.cty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.cty-grid .country {
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: 600 0.95rem var(--head);
  color: var(--navy);
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.25s,
    transform 0.25s var(--ease);
}
.cty-grid .country:hover {
  border-color: #b9d8f4;
  background: #f7fbff;
  box-shadow: 0 10px 24px -14px rgba(6, 23, 51, 0.35);
  transform: translateY(-2px);
}
.cty-grid .country.selected {
  border-color: var(--blue2);
  background: #f2f8ff;
  box-shadow: 0 0 0 3px rgba(31, 111, 214, 0.12);
  color: var(--navy);
}
.cty-grid .country[hidden] {
  display: none;
}
.cty-grid .flag {
  width: 36px;
  height: 27px;
  border-radius: 5px;
}
.cty-grid .country small {
  font-size: 0.72rem;
  font-family: var(--body);
  letter-spacing: 0.02em;
}
.cty-grid .country .check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue2);
  color: #fff;
  font-size: 0.7rem;
}
.cty-empty {
  padding: 32px;
  border-radius: 16px;
  background: var(--mist);
  text-align: center;
  color: var(--muted);
}
.cty-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 48px 0 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--ice);
  color: var(--navy);
  font-size: 0.9rem;
}
.cty-note i {
  color: var(--blue2);
  margin-top: 4px;
}
.cty-note a {
  color: var(--blue2);
  font-weight: 600;
  text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 620px) {
  .cty-hero {
    padding: 32px 0 30px;
  }
  .cty-hero::before {
    display: none;
  }
  .cty-back {
    margin-bottom: 18px;
  }
  .cty-search {
    flex-basis: 100%;
    max-width: none;
  }
  .cty-list {
    padding: 32px 0 64px;
  }
  .cty-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .cty-grid .country {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    padding: 14px;
    position: relative;
    font-size: 0.9rem;
  }
  .cty-grid .country .check {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}
@media (max-width: 360px) {
  .cty-grid {
    grid-template-columns: 1fr;
  }
  .cty-grid .country {
    flex-direction: row;
    align-items: center;
  }
}
