/* /css/extras/countries-page.css */
/* ======================================
   COUNTRIES PAGE – FINAL & MOBILE OPTIMIZED
   Density matched with Genres
====================================== */

/* =========================
   PAGE WRAPPER
========================= */

.page.page-countries,
.page.page-genres {
  padding: 16px;
}

/* =========================
   HERO
========================= */

.page-hero {
  margin-bottom: 14px;
}

.page-hero h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  line-height: 1.1;
}

.page-subtitle {
  margin: 0;
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.4;
}

/* =========================
   TOOLBAR / SEARCH
========================= */

.countries-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px 0;
}

.countries-search {
  flex: 1;
  min-width: 220px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: inherit;
  outline: none;
}

.countries-search::placeholder {
  opacity: 0.65;
}

.countries-search:focus {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
}

.countries-meta {
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  opacity: 0.9;
  font-size: 13px;
}

/* =========================
   GRID
========================= */

.countries-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* =========================
   CARD
========================= */

.country-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.country-card:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.18);
}

/* =========================
   FLAG
========================= */

.country-flag-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  flex: 0 0 auto;
}

.country-flag {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

/* =========================
   INFO
========================= */

.country-info {
  min-width: 0;
  flex: 1;
}

.country-name {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-sub {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  font-size: 13px;
}

.country-code {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.country-dot {
  opacity: 0.6;
}

/* =========================
   CTA (DESKTOP / TABLET)
========================= */

.country-cta {
  flex: 0 0 auto;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  opacity: 0.95;
}

/* =========================
   SEO BOXES – BOTTOM (NEW)
   ONLY affects the 3 SEO boxes
========================= */

.page.page-countries .seo-content {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.page.page-countries .seo-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
  text-align: center;
  color: #fff;
}

.page.page-countries .seo-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.page.page-countries .seo-box {
  background: linear-gradient(180deg, #141822, #0f1218);
  border-radius: 16px;
  padding: 22px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}

.page.page-countries .seo-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}

.page.page-countries .seo-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.page.page-countries .seo-box p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

.page.page-countries .seo-box a {
  color: #ff4d6d;
  font-weight: 600;
  text-decoration: none;
}

.page.page-countries .seo-box a:hover {
  text-decoration: underline;
}

/* =========================
   RESPONSIVE – TABLET
========================= */

@media (max-width: 1100px) {
  .countries-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page.page-countries .seo-boxes {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   RESPONSIVE – MOBILE (FINAL)
========================= */

@media (max-width: 640px) {

  /* Page */
  .page.page-countries,
  .page.page-genres {
    padding: 12px;
  }

  /* Toolbar */
  .countries-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .countries-search {
    width: 100%;
    height: auto;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.2;
    border-radius: 14px;
  }

  .countries-meta {
    width: 100%;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  /* SEO boxes mobile */
  .page.page-countries .seo-content {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .page.page-countries .seo-boxes {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page.page-countries .seo-box {
    padding: 18px 16px;
  }

  /* ===== MOBILE – COUNTRIES = GENRES DENSITY ===== */

  .countries-grid {
    gap: 6px;
  }

  .country-card {
    padding: 6px 10px;
    gap: 8px;
    border-radius: 12px;
  }

  .country-flag-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
  }

  .country-flag {
    width: 18px;
    height: 18px;
  }

  .country-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
  }

  .country-sub {
    margin-top: 1px;
    font-size: 11px;
    opacity: 0.75;
    gap: 5px;
  }

  .country-cta {
    display: none;
  }
}
/* ==========================================
   SEO BOXES – ALIGN FIX (COUNTRIES ONLY)
========================================== */

/* limiteaza latimea si centreaza ca la limbi */
.page.page-countries .seo-content {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* pastreaza aer pe ecrane foarte mari */
@media (min-width: 1400px) {
  .page.page-countries .seo-content {
    max-width: 1200px;
  }
}
/* ==========================================
   SEO BOXES – WIDTH FIX (COUNTRIES)
   Real fix: override container constraint
========================================== */

/* scoatem constrangerea de container */
.page.page-countries .seo-content.container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* controlam latimea reala a casetelor */
.page.page-countries .seo-boxes {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* aer pe ecrane mari */
@media (min-width: 1400px) {
  .page.page-countries .seo-boxes {
    max-width: 1200px;
  }
}
