/**
 * Selector de País - Lorena Pestana (Perú e Internacional / México)
 * Estética de lujo minimalista: Cormorant Garamond + Jost.
 */

/* Importar fuentes tipográficas necesarias si no están en el tema */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* Bloqueo de scroll cuando el selector está abierto */
html.lp-cs-scroll-locked,
body.lp-cs-scroll-locked {
  overflow: hidden !important;
  touch-action: none !important;
}

/* Contenedor Overlay Modal */
.lp-country-selector-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F7F4EE;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  box-sizing: border-box;
  padding: 48px 24px;
}

.lp-country-selector-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modo Landing Page dedicada (template completo) */
.lp-country-selector-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F7F4EE;
  box-sizing: border-box;
  padding: 64px 24px;
}

.lp-cs-modal-container {
  width: 100%;
  max-width: 1140px;
  margin: auto;
  position: relative;
}

.lp-cs-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1A1814;
}

/* Barra superior: Cerrar y Switch de Idioma */
.lp-cs-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.lp-cs-btn-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #1A1814;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
  border-radius: 4px;
}

.lp-cs-btn-close:hover {
  color: #9A7B4F;
  transform: rotate(90deg);
}

.lp-cs-btn-close:focus-visible {
  outline: 2px solid #B89968;
  outline-offset: 2px;
}

.lp-cs-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.lp-cs-lang-btn {
  background: none;
  border: none;
  padding: 8px 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: #8A847A;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.lp-cs-lang-btn:hover {
  color: #1A1814;
}

.lp-cs-lang-btn.is-active {
  color: #1A1814;
  border-bottom-color: #1A1814;
}

.lp-cs-lang-sep {
  color: #B89968;
  font-size: 13px;
}

/* Encabezado y Marca */
.lp-cs-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 680px;
}

.lp-cs-logo-wrap {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.lp-cs-logo-img {
  height: 44px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

.lp-cs-logo-fallback {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #1A1814;
  font-weight: 400;
}

.lp-cs-divider {
  width: 1px;
  height: 40px;
  background-color: #B89968;
  margin: 28px auto 24px;
}

.lp-cs-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 46px;
  line-height: 1.15;
  font-weight: 400;
  color: #1A1814;
}

.lp-cs-subtitle {
  margin: 0;
  text-align: center;
  font-size: 16.5px;
  line-height: 1.6;
  font-weight: 300;
  color: #4A453E;
  max-width: 580px;
  text-wrap: pretty;
}

/* Tarjetas de Selección de País */
.lp-cs-cards-grid {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  margin-top: 44px;
}

.lp-cs-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #1A1814;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease;
  position: relative;
  outline: none;
}

.lp-cs-card:hover {
  color: #9A7B4F;
  text-decoration: none;
}

.lp-cs-card:focus-visible {
  outline: 2px solid #B89968;
  outline-offset: 4px;
}

.lp-cs-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #ECE6DB;
  overflow: hidden;
  position: relative;
}

.lp-cs-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lp-cs-card:hover .lp-cs-card-img {
  transform: scale(1.035);
}

.lp-cs-card-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid #1A1814;
  padding-bottom: 14px;
  transition: border-color 0.25s ease;
}

.lp-cs-card:hover .lp-cs-card-bar {
  border-bottom-color: #9A7B4F;
}

.lp-cs-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lp-cs-card-label {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6B655C;
  font-weight: 400;
  transition: color 0.25s ease;
}

.lp-cs-card:hover .lp-cs-card-label {
  color: #9A7B4F;
}

.lp-cs-card-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 52px;
  line-height: 1;
  font-weight: 400;
  color: inherit;
}

.lp-cs-card-arrow {
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lp-cs-card:hover .lp-cs-card-arrow {
  transform: translateX(6px);
}

/* ---------------------------------------------------- Responsive Mobile */
@media (max-width: 860px) {
  .lp-country-selector-overlay {
    padding: 36px 18px 24px;
    align-items: flex-start;
  }

  .lp-cs-topbar {
    margin-bottom: 16px;
  }

  .lp-cs-logo-wrap {
    height: 32px;
  }

  .lp-cs-logo-img {
    height: 32px;
  }

  .lp-cs-logo-fallback {
    font-size: 22px;
  }

  .lp-cs-divider {
    height: 28px;
    margin: 20px auto 18px;
  }

  .lp-cs-title {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .lp-cs-subtitle {
    font-size: 15px;
    line-height: 1.5;
    padding: 0 8px;
  }

  .lp-cs-cards-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 28px;
    max-width: 440px;
  }

  .lp-cs-card {
    gap: 12px;
  }

  .lp-cs-card-img-wrap {
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }

  .lp-cs-card-name {
    font-size: 34px;
  }

  .lp-cs-card-label {
    font-size: 10.5px;
    letter-spacing: 0.18em;
  }

  .lp-cs-card-arrow {
    font-size: 20px;
  }
}

/* ---------------------------------------------------- Botón Footer Switcher */
.footer-country-switch {
  display: inline-flex;
  align-items: center;
}

.btn-cambiar-pais {
  background: transparent;
  border: 1px solid rgba(107, 101, 92, 0.35);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555048;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-cambiar-pais:hover {
  background-color: rgba(26, 24, 20, 0.04);
  border-color: #1A1814;
  color: #1A1814;
}

.btn-cambiar-pais:focus-visible {
  outline: 2px solid #B89968;
  outline-offset: 2px;
}

.btn-cambiar-pais .icon-globe {
  display: inline-flex;
  align-items: center;
  color: #B89968;
}

.btn-cambiar-pais .separador-cambiar {
  color: #B89968;
  margin: 0 1px;
}

.btn-cambiar-pais .texto-cambiar {
  text-decoration: underline;
  text-underline-offset: 2px;
}
