/* Modal cards viaje - ¿A dónde querés viajar? — mobile / tablet / desktop */

:root {
  --cv-hero-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(29, 78, 216, 0.97) 50%, rgba(30, 64, 175, 1) 100%);
  --cv-hero-border: rgba(96, 165, 250, 0.5);
  --cv-hero-text: #ffffff;
  --cv-hero-text-soft: rgba(219, 234, 254, 0.95);
}

.cv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cv-modal-overlay[hidden] {
  display: none !important;
}

.cv-modal {
  width: 100%;
  max-width: min(100%, 22rem);
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
  margin: auto;
  max-height: min(calc(100vh - 1.5rem), calc(100dvh - 1.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 480px) {
  .cv-modal {
    max-width: min(100%, 26rem);
    border-radius: 1.1rem;
  }
}

@media (min-width: 640px) {
  .cv-modal {
    max-width: min(100%, 36rem);
    border-radius: 1.2rem;
  }
}

@media (min-width: 768px) {
  .cv-modal {
    max-width: min(100%, 42rem);
  }
}

@media (min-width: 1024px) {
  .cv-modal {
    max-width: 52rem;
    border-radius: 1.25rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  }
}

.cv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--cv-hero-border);
  background: var(--cv-hero-bg);
  box-shadow: 0 2px 12px rgba(29, 78, 216, 0.2);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .cv-modal-header {
    padding: 1rem 1.25rem;
  }
}

.cv-modal-header-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--cv-hero-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25;
  min-width: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .cv-modal-header-title {
    font-size: 1rem;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
  }
}

.cv-modal-close {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .cv-modal-close {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
  }
}

.cv-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.cv-modal-body {
  padding: 0.85rem 1rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 640px) {
  .cv-modal-body {
    padding: 1rem 1.25rem 1.25rem;
  }
}

.cv-modal-card-header {
  padding: 0.75rem 0.85rem;
  background: var(--cv-hero-bg);
  border: 1px solid var(--cv-hero-border);
  border-radius: 0.65rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.15);
}

@media (min-width: 640px) {
  .cv-modal-card-header {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
  }
}

.cv-modal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.cv-modal-title-row strong {
  font-size: clamp(1rem, 4vw, 1.35rem);
  text-transform: uppercase;
  color: var(--cv-hero-text);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cv-modal-temporada {
  font-size: clamp(0.75rem, 3vw, 0.9rem);
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cv-modal-subtitle {
  margin-top: 0.35rem;
  font-size: clamp(0.8rem, 2.8vw, 0.9rem);
  color: #ffffff;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Layout: stacked mobile → side-by-side tablet+ */
.cv-modal-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .cv-modal-split {
    grid-template-columns: minmax(9.5rem, 11rem) 1fr;
    gap: 1rem;
    align-items: start;
  }
}

@media (min-width: 768px) {
  .cv-modal-split {
    grid-template-columns: minmax(10.5rem, 12rem) 1fr;
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .cv-modal-split {
    grid-template-columns: 12.5rem 1fr;
    gap: 1.5rem;
  }
}

.cv-meses-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cv-meses-wrap {
  border: 1px solid var(--cv-hero-border);
  border-radius: 0.65rem;
  overflow: hidden;
  background: var(--cv-hero-bg);
  box-shadow: 0 2px 10px rgba(29, 78, 216, 0.12);
}

@media (min-width: 640px) {
  .cv-meses-wrap {
    border-radius: 0.75rem;
    position: sticky;
    top: 0;
  }
}

.cv-meses-label {
  padding: 0.55rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cv-hero-text);
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid var(--cv-hero-border);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
  .cv-meses-label {
    padding: 0.65rem 0.85rem;
    font-size: 0.7rem;
  }
}

.cv-meses-hint {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.65rem;
  line-height: 1.45;
  text-align: center;
  color: #0a0a0a;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #f8fafc;
  border-radius: 0.45rem;
  border: 1px solid #e2e8f0;
}

@media (min-width: 480px) {
  .cv-meses-hint {
    font-size: 0.68rem;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.6rem;
  }
}

@media (min-width: 640px) {
  .cv-meses-hint {
    font-size: 0.72rem;
    margin-bottom: 0.65rem;
  }
}

.cv-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  margin-right: 0.15rem;
  vertical-align: middle;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .cv-dot {
    width: 0.5rem;
    height: 0.5rem;
  }
}

.cv-dot--ok { background: #22c55e; }
.cv-dot--empty { background: #ef4444; }

/* Mobile: meses en 2 columnas compactas; tablet+: lista vertical */
.cv-meses-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-height: 9.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 480px) {
  .cv-meses-list {
    max-height: 10.5rem;
  }
}

@media (min-width: 640px) {
  .cv-meses-list {
    display: flex;
    flex-direction: column;
    grid-template-columns: unset;
    max-height: min(16rem, 42vh);
  }
}

@media (min-width: 1024px) {
  .cv-meses-list {
    max-height: min(18rem, 48vh);
  }
}

.cv-mes-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cv-hero-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .cv-mes-item {
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    border-right: none;
  }
}

.cv-mes-item:nth-child(2n) {
  border-right: none;
}

@media (min-width: 640px) {
  .cv-mes-item:nth-child(2n) {
    border-right: none;
  }
}

.cv-mes-item:last-child,
.cv-mes-item:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

@media (min-width: 640px) {
  .cv-mes-item:last-child {
    border-bottom: none;
  }
}

.cv-mes-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .cv-mes-item span:last-child {
    white-space: normal;
  }
}

.cv-mes-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cv-mes-item.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.cv-imagen-panel {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.75rem;
  background: #fff;
  min-width: 0;
}

@media (min-width: 640px) {
  .cv-imagen-panel {
    padding: 1rem;
    border-radius: 0.75rem;
  }
}

.cv-imagen-panel-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .cv-imagen-panel-label {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
}

.cv-imagenes-galeria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-height: min(24rem, 54vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 400px) {
  .cv-imagenes-galeria {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(28rem, 58vh);
  }
}

@media (min-width: 640px) {
  .cv-imagenes-galeria {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 0.85rem;
    max-height: min(32rem, 62vh);
  }
}

@media (min-width: 768px) {
  .cv-imagenes-galeria {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    max-height: min(34rem, 64vh);
  }
}

@media (min-width: 1024px) {
  .cv-imagenes-galeria {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 36rem;
  }
}

/* 1–2 imágenes: cards más grandes, imagen completa visible */
.cv-imagenes-galeria--few {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  max-height: min(34rem, 66vh);
}

@media (min-width: 640px) {
  .cv-imagenes-galeria--few {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-height: min(38rem, 70vh);
  }
}

.cv-imagenes-galeria--single {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-height: min(40rem, 72vh);
}

@media (min-width: 640px) {
  .cv-imagenes-galeria--single {
    grid-template-columns: minmax(0, 340px);
  }
}

.cv-imagen-galeria-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.cv-imagen-galeria-item img,
.cv-imagen-galeria-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  display: block;
  background: #fff;
}

.cv-imagen-galeria-img-wrap {
  position: relative;
  min-height: 120px;
  background: #f1f5f9;
  flex: 1 1 auto;
  cursor: zoom-in;
}

.cv-imagen-galeria-img.is-loading {
  opacity: 0;
  min-height: 120px;
}

.cv-imagen-galeria-img:not(.is-loading) {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.cv-imagen-galeria-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: cv-img-shimmer 1.1s ease-in-out infinite;
}

.cv-imagen-galeria-loader::after {
  content: '';
  width: 1.75rem;
  height: 1.75rem;
  border: 3px solid #cbd5e1;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: cv-img-spin 0.65s linear infinite;
}

@keyframes cv-img-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes cv-img-spin {
  to { transform: rotate(360deg); }
}

.cv-imagen-galeria-fecha {
  font-size: 0.65rem;
  padding: 0.45rem 0.5rem;
  color: #0a0a0a;
  font-weight: 800;
  text-align: center;
  background: #fff;
  line-height: 1.3;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.cv-imagen-galeria-fecha i {
  color: #0a0a0a;
}

@media (min-width: 640px) {
  .cv-imagen-galeria-fecha {
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem;
  }
}

.cv-imagen-galeria-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.65rem;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: filter 0.15s ease, transform 0.15s ease;
}

@media (min-width: 640px) {
  .cv-imagen-galeria-wa {
    font-size: 0.78rem;
    min-height: 2.85rem;
  }
}

.cv-imagen-galeria-wa:hover {
  filter: brightness(1.05);
}

.cv-imagen-galeria-wa:active {
  transform: scale(0.98);
}

.cv-imagen-galeria-wa i {
  font-size: 1.1rem;
}

.cv-imagenes-galeria--few .cv-imagen-galeria-img-wrap,
.cv-imagenes-galeria--single .cv-imagen-galeria-img-wrap {
  min-height: 160px;
}

@media (min-width: 640px) {
  .cv-imagenes-galeria--few .cv-imagen-galeria-img-wrap,
  .cv-imagenes-galeria--single .cv-imagen-galeria-img-wrap {
    min-height: 200px;
  }
}

.cv-imagenes-galeria--few .cv-imagen-galeria-img:not(.is-loading),
.cv-imagenes-galeria--single .cv-imagen-galeria-img:not(.is-loading) {
  max-height: min(340px, 50vh);
}

.cv-imagen-empty {
  text-align: center;
  color: #94a3b8;
  padding: 1rem 0.75rem;
  font-size: 0.8rem;
  background: #f1f5f9;
  border-radius: 0.55rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .cv-imagen-empty {
    padding: 1.25rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.65rem;
  }
}

/* Zoom de imagen del mes (inicio) */
.cv-img-zoom {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.cv-img-zoom.is-open {
  display: flex;
}

.cv-img-zoom[hidden] {
  display: none !important;
}

.cv-img-zoom-inner {
  position: relative;
  width: min(96vw, 1280px);
  height: min(92vh, 920px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.cv-img-zoom-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.cv-img-zoom.is-open .cv-img-zoom-inner img {
  transform: scale(1);
  opacity: 1;
}

.cv-img-zoom-close {
  position: absolute;
  top: -0.65rem;
  right: -0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 9999px;
  background: #fff;
  color: #0f172a;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.cv-img-zoom-close:hover {
  background: #f1f5f9;
}
