/*
  Estilos generales para la landing de selección de país.
  Se dejó todo pensado para que funcione bien en desktop y mobile.
*/

:root {
  --bg-main: radial-gradient(circle at top center, rgba(85, 92, 233, 0.46) 0%, #1b1d33 40%, #020206 75%);
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.18);
  --box-bg: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --btn-bg: #555ce9;
  --btn-text: #ffffff;
  --btn-hover: #555ce9;
  --shadow-main: 0 1.2em 3em rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Lexend", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

/* Contenedor principal centrado */
.country-selector {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em 1.2em;
}

/* Tarjeta central */
.selector-card {
  width: 100%;
  max-width: 70em;
  background: var(--card-bg);
  border: 0.08em solid var(--card-border);
  border-radius: 1.8em;
  backdrop-filter: blur(0.8em);
  -webkit-backdrop-filter: blur(0.8em);
  box-shadow: var(--shadow-main);
  padding: 3em 2em;
  text-align: center;
}

/* Texto superior pequeño */
.selector-tag {
  margin: 0 0 0.8em;
  font-size: 0.95em;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* Título principal */
.selector-title {
  margin: 0;
  font-size: 2.2em;
  line-height: 1.2;
  font-weight: 700;
}

/* Bajada */
.selector-text {
  max-width: 38em;
  margin: 1em auto 0;
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-soft);
}

/* Grid de países */
.country-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5em;
  margin-top: 2.5em;
}

/* Cada bloque de país */
.country-box {
  background: var(--box-bg);
  border: 0.08em solid rgba(255, 255, 255, 0.12);
  border-radius: 1.4em;
  padding: 2em 1.4em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.country-box:hover {
  transform: translateY(-0.25em);
  box-shadow: 0 1em 2.2em rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

/* Contenedor de bandera */
.flag-wrap {
  width: 100%;
  max-width: 16em;
  margin: 0 auto 1.4em;
  aspect-ratio: 16 / 10;
  border-radius: 1em;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Imagen de bandera */
.flag-image {
  width: 100%;
  max-width: 14em;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Nombre del país */
.country-box h2 {
  margin: 0 0 1em;
  font-size: 1.5em;
  font-weight: 600;
}

/* Botón */
.country-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 16em;
  min-height: 3.2em;
  padding: 0.9em 1.2em;
  border-radius: 999em;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  transition: background 0.25s ease, transform 0.25s ease;
}

.country-button:hover {
  background: var(--btn-hover);
  transform: scale(1.02);
}

/* Ajustes tablet */
@media (max-width: 768px) {
  .selector-card {
    padding: 2.4em 1.4em;
  }

  .selector-title {
    font-size: 1.8em;
  }

  .country-options {
    gap: 1.2em;
  }

  .country-box {
    padding: 1.6em 1.1em;
  }
}

@media (max-width: 640px) {
  .country-options {
    grid-template-columns: 1fr;
  }

  .selector-title {
    font-size: 1.55em;
  }

  .selector-text {
    font-size: 0.95em;
  }

  .country-box h2 {
    font-size: 1.3em;
  }

  .country-button {
    max-width: 100%;
    font-size: 0.95em;
  }

  .flag-wrap {
    max-width: 13em;
  }

  .flag-image {
    max-width: 11.5em;
  }
}
