:root {
  --border: #e5e7eb;
  --muted: #6b7280;
  --text: #111827;
  --bg: #fff;
  --container: 1100px
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--container);
  margin-block: 24px;
}

.contact-channel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-channel h2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.5;
}

.contact-channel-icon { flex: 0 0 24px; width: 24px; height: 24px; color: #6366f1; }
.contact-channel a { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.contact-channel address { margin: 0; font-style: normal; line-height: 1.65; overflow-wrap: anywhere; }

@media (max-width: 900px) { .contact-channels { grid-template-columns: minmax(0, 1fr); } }

.contact-compose {
  max-width: 680px;
  margin-block: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-compose[hidden] { display: none; }
.contact-compose label { display: block; margin-block: 16px 6px; font-weight: 600; }
.contact-compose input,
.contact-compose textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.contact-compose textarea { resize: vertical; }
.contact-compose :is(input, textarea, button):focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.contact-compose button { cursor: pointer; font: inherit; }
.contact-compose [role="status"]:empty { display: none; }

@media (max-width: 480px) { .contact-compose { padding: 16px; } }

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
  height: 100%
}

html {
  overflow-x: hidden
}

body {
  overflow-x: clip
}

img,
svg,
video,
iframe {
  max-width: 100%
}

h1,
h2,
h3,
p,
li,
dd,
a {
  overflow-wrap: anywhere
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

main {
  flex: 1
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px;
  min-width: 0
}

.lite-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: #fff
}

.lite-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: relative
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px
}

.language-menu {
  display: flex;
  align-items: center
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0
}

.brand img {
  display: block;
  width: 200px;
  height: auto
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111827
}

.nav-lite {
  display: flex;
  align-items: center;
  gap: 14px
}

.nav-lite a {
  color: var(--muted);
  text-decoration: none
}

.dropdown {
  position: relative
}

.dropdown-toggle {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px
}

.dropdown-toggle:hover {
  color: #111827
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  min-width: 200px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  padding: 8px 0
}

.dropdown:hover .dropdown-menu {
  display: flex
}

.dropdown.open .dropdown-menu {
  display: flex
}

.dropdown.open .arrow {
  transform: rotate(180deg)
}

.dropdown-menu a {
  padding: 8px 16px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px
}

.dropdown-menu a:hover {
  background: #f9fafb;
  color: #111827
}

.arrow {
  font-size: 10px;
  transition: transform .2s
}

.dropdown:hover .arrow {
  transform: rotate(180deg)
}

.hero-lite {
  margin: 24px 0
}

.seo,
.hero-lite,
.countries,
.numbers,
.related-blocks {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto
}

.number-hero-lite {
  margin: 16px auto 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px
}

.number-hero-lite h1 {
  text-align: center;
  margin: 0
}

.number-meta-line {
  display: flex;
  gap: 8px;
  justify-content: center;
  color: var(--muted);
  margin-top: 4px;
  flex-wrap: wrap
}

.number-meta-line span {
  color: var(--muted)
}

.number-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap
}

.btn:hover {
  opacity: .9
}

.country-hero-lite {
  margin: 12px 0 8px
}

.country-guide {
  margin: 32px 0;
  color: var(--text)
}

.country-guide__header,
.country-guide__section {
  margin-top: 24px
}

.country-guide__header {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc)
}

.country-guide__header h2,
.country-guide__section h2 {
  margin: 0 0 10px
}

.country-guide__header p:last-child,
.country-guide__section > p:last-child,
.country-warning p {
  margin-bottom: 0
}

.country-guide__eyebrow {
  margin: 0 0 8px;
  color: #1d4ed8;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase
}

.country-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px
}

.country-fact {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff
}

.country-fact__label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase
}

.country-fact strong {
  display: block;
  margin: 6px 0;
  font-size: 1.35rem
}

.country-fact > span:last-child {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.4
}

.country-guide__section {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff
}

.country-network-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0
}

.country-network-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f4f6
}

.country-network-row span:last-child {
  color: var(--muted);
  text-align: right
}

.country-example,
.country-warning {
  padding: 16px;
  border-radius: 12px
}

.country-example {
  background: #f8fafc
}

.country-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0
}

.country-example {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px
}

.country-example span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .85rem
}

.country-example code,
.country-guide__section code {
  overflow-wrap: normal;
  white-space: nowrap
}

.country-steps {
  padding-left: 1.4rem
}

.country-steps li + li {
  margin-top: 10px
}

.country-warning {
  margin-top: 18px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  color: #78350f
}

.country-warning p {
  margin-top: 6px
}

.country-faq details {
  border-top: 1px solid var(--border)
}

.country-faq details:last-child {
  border-bottom: 1px solid var(--border)
}

.country-faq summary {
  padding: 16px 4px;
  cursor: pointer;
  font-weight: 700
}

.country-faq details p {
  margin: 0;
  padding: 0 4px 16px;
  color: #374151
}

.grid {
  display: grid;
  gap: 16px
}

/* Country grid — min 140px per card, fills available space */
.grid-countries {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr))
}

/* Number grid — min 150px per card, fills available space */
.grid-numbers {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr))
}

.numbers h2 {
  margin: 8px 0 10px
}

.numbers .grid-numbers {
  gap: 14px
}

@media (max-width:768px) {
  .country-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .country-network-list {
    grid-template-columns: 1fr
  }

  .country-examples {
    grid-template-columns: 1fr
  }

  .lite-header .container {
    gap: 8px;
    min-height: 64px
  }

  .brand img {
    width: 150px
  }

  .hamburger {
    display: inline-flex
  }

  .header-right {
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: flex-end
  }

  .nav-lite {
    position: absolute;
    right: 12px;
    left: 12px;
    top: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    z-index: 1000
  }

  .nav-lite.open {
    display: flex
  }

  .nav-lite > a,
  .nav-lite > .dropdown,
  .nav-lite .dropdown-toggle {
    width: 100%
  }

  .nav-lite .dropdown-menu {
    position: static;
    width: 100%;
    max-height: 45vh;
    overflow-y: auto;
    box-shadow: none;
    margin-top: 8px
  }

  .language-menu {
    display: flex;
    align-items: center;
    position: static;
    z-index: 1001
  }

  .language-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    transform: none;
    min-width: 180px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 80px);
    overflow-y: auto
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: box-shadow .2s ease, transform .2s ease;
  overflow: hidden;
  min-width: 0
}

.country-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  aspect-ratio: 1/1;
  min-height: auto;
  position: relative;
  color: var(--text);
  text-decoration: none;
  width: 100%;
  box-sizing: border-box
}

.country-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  transform: translateY(-2px)
}

.country-flag {
  width: 96px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.country-flag img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  aspect-ratio: 3/2;
  border-radius: 8px
}

.country-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  flex-wrap: wrap
}

.country-name {
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  color: #111827;
  text-align: center;
  max-width: 100%
}

.country-dial {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600
}

.dot {
  color: var(--muted)
}

.country-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center
}

.badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .25);
  flex-shrink: 0
}

.number-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  aspect-ratio: auto;
  position: relative;
  color: var(--text);
  text-decoration: none;
  width: 100%;
  box-sizing: border-box
}

.number-card .number-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
  width: 100%
}

.number-status {
  position: static;
  display: flex;
  justify-content: center;
  margin-top: 6px
}

.e164 {
  font-weight: 700;
  font-size: 15px;
  word-break: break-all;
  text-align: center
}

.provider {
  color: var(--muted);
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  max-width: 100%;
  font-size: 13px
}

.sms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.sms-list.fixed .sms-item {
  min-height: 72px
}

.sms-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between
}

.sms-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  color: var(--muted)
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.btn {
  background: #111827;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer
}

.lite-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  background: #fff
}

.lite-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  color: var(--muted);
  font-size: 14px
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px
}

.footer-left>a {
  display: inline-flex;
  align-items: center;
  background: transparent
}

.footer-left img {
  display: block;
  width: 160px;
  max-width: 100%;
  height: auto;
  background: transparent
}

.footer-nav {
  display: flex;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted)
}

.footer-nav a:hover {
  color: #111827
}

@media (max-width:768px) {
  .lite-footer .container {
    align-items: center
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px
  }
}

/* ─── PHONE: ≤480px ─── */
@media (max-width:480px) {
  .container {
    padding: 12px
  }

  .country-guide {
    margin: 24px 0
  }

  .country-guide__header,
  .country-guide__section {
    padding: 16px;
    border-radius: 14px
  }

  .country-facts {
    grid-template-columns: 1fr;
    gap: 8px
  }

  .country-fact {
    padding: 12px
  }

  .country-fact strong {
    font-size: 1.1rem
  }

  .country-network-row {
    align-items: flex-start;
    font-size: .88rem
  }

  .country-examples {
    grid-template-columns: 1fr
  }

  .lite-header .container {
    padding: 10px 12px
  }

  .brand img {
    width: 138px
  }

  .header-right {
    flex: 0 0 auto;
    gap: 6px
  }

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

  .language-menu .dropdown-toggle img {
    margin-right: 0 !important
  }

  /* Force exactly 2 columns on all phones */
  .grid-countries,
  .grid-numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
  }

  .numbers .grid-numbers {
    gap: 10px
  }

  /* Smaller country cards */
  .country-card {
    gap: 6px;
    padding: 10px
  }

  .country-flag {
    width: 56px;
    height: 37px
  }

  .country-flag img {
    width: 56px;
    height: 37px
  }

  .country-name {
    font-size: 12px
  }

  .country-dial {
    font-size: 12px
  }

  /* Smaller number cards */
  .card {
    padding: 10px
  }

  .number-card {
    gap: 5px
  }

  .e164 {
    font-size: 12px
  }

  .provider {
    font-size: 11px
  }

  .badge {
    font-size: 11px;
    padding: 3px 7px;
    gap: 4px
  }

  .country-status {
    left: 6px;
    right: 6px;
    bottom: 8px
  }

  .number-hero-lite h1 {
    font-size: 1.45rem !important
  }

  .related-countries .grid,
  .related-numbers .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px
  }
}

/* ─── TABLET: 481px – 768px ─── */
@media (min-width:481px) and (max-width:768px) {
  .grid-countries,
  .grid-numbers {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
  }

  .country-flag {
    width: 64px;
    height: 42px
  }

  .country-flag img {
    width: 64px;
    height: 42px
  }

  .country-name {
    font-size: 13px
  }

  .e164 {
    font-size: 13px
  }

  .badge {
    font-size: 12px;
    padding: 3px 8px
  }
}

/* 404 Error Page Styles */
.error-hero {
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto
}

.error-content h1 {
  font-size: 120px;
  font-weight: 900;
  color: #e5e7eb;
  margin: 0;
  line-height: 1
}

.error-content h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 16px
}

.error-content p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap
}

.btn-secondary {
  background: var(--muted);
  color: #fff
}

.btn-secondary:hover {
  opacity: .9
}

.help-section {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px
}

.help-section h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text)
}

.help-section ul {
  list-style: none;
  padding: 0;
  margin: 0
}

.help-section li {
  padding: 8px 0;
  color: var(--muted);
  font-size: 16px
}

.help-section a {
  color: #111827;
  text-decoration: none;
  font-weight: 500
}

.help-section a:hover {
  text-decoration: underline
}

@media (max-width:768px) {
  .error-content h1 {
    font-size: 80px
  }

  .error-content h2 {
    font-size: 24px
  }

  .error-content p {
    font-size: 16px
  }

  .error-actions {
    flex-direction: column;
    align-items: center
  }

  .error-actions .btn {
    width: 200px
  }
}
