/* =========================================
   VARIABLES Y DISEÑO BASE
   ========================================= */
:root {
  --glass-bg: rgba(30, 30, 35, 0.45);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text-main: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.6);
  --accent: #2563EB; 
  --accent-light: rgba(37, 99, 235, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }

/* AQUÍ ESTÁ LA MAGIA DEL FONDO FIJO Y EL SCROLL */
html, body {
  width: 100%; 
  color: var(--text-main); 
  overflow-x: hidden;
  overflow-y: auto; /* Permite hacer scroll hacia abajo */
  
  background-image: url('img/necochea.webp');
  background-position: center center; 
  background-size: cover;
  background-repeat: no-repeat; 
  background-color: #111;
  background-attachment: fixed; /* Esto "clava" la foto en el fondo */
}

.bg-overlay {
  position: fixed; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
}

/* =========================================
   SISTEMA DE TARJETAS Y GRID 2 COLUMNAS (ARRIBA)
   ========================================= */
.app-container {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(300px, 380px);
  gap: 32px;
  justify-content: center;
  align-content: start; /* Para que empiece arriba */
  padding: 40px 20px 20px 20px;
}

.column { display: flex; flex-direction: column; gap: 24px; }

.glass-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; padding: 24px;
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); display: flex; flex-direction: column; gap: 12px;
}

.card-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}

/* Textos Superiores */
.station-title { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.station-subtitle { font-size: 13px; color: #60A5FA; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; }
.clock-time { font-size: 54px; font-weight: 300; letter-spacing: -2px; line-height: 1; }
.clock-date { font-size: 14px; color: var(--text-muted); }
.weather-info { display: flex; align-items: center; justify-content: space-between; }
.temp-large { font-size: 48px; font-weight: 300; line-height: 1; }
.weather-details { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }

/* Reproductor Enjaulado */
.player-container { padding: 0; overflow: hidden; height: 110px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.player-container iframe { width: 100%; height: 115px; border: none; }

/* Programación Resumida */
.schedule-container { display: flex; flex-direction: column; gap: 14px; }
.schedule-item { padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.2s ease; }
.schedule-item.active { background: var(--accent-light); border-color: var(--accent); box-shadow: inset 0 0 12px rgba(37, 99, 235, 0.2); }
.schedule-time { font-size: 11px; font-weight: 600; color: #60A5FA; margin-bottom: 2px; }
.schedule-name { font-size: 15px; font-weight: 600; color: var(--text-main); }
.schedule-host { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* =========================================
   NUEVA SECCIÓN: DETALLE DE PROGRAMAS
   ========================================= */
.shows-container {
  max-width: 800px;
  margin: 40px auto 100px auto; /* 100px abajo para que no lo tape el globo de PWA en móviles */
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}

.show-card {
  flex-direction: row; /* Imagen a la izquierda, texto a la derecha */
  padding: 24px;
  align-items: center;
  gap: 28px;
}

.show-img {
  width: 299px;
  height: 168px;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.show-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.show-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.show-meta {
  font-size: 12px;
  font-weight: 600;
  color: #60A5FA;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.show-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}

/* =========================================
   GLOBO DE INSTALACIÓN (PWA TOAST)
   ========================================= */
.install-toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(150px);
  display: flex; align-items: center; background: #111827; padding: 10px 14px; border-radius: 50px;
  gap: 12px; transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 9999;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6); width: 90%; max-width: 400px; border: 1px solid rgba(255,255,255,0.1);
}
.install-toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.toast-text { flex: 1; font-size: 14px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-btn { background: var(--accent); color: white; border: none; padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; cursor: pointer; transition: background 0.2s; }
.toast-btn:active { background: #1D4ED8; transform: scale(0.95); }
.toast-close { background: transparent; border: none; color: #9CA3AF; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; }

/* =========================================
   DISEÑO MÓVIL Y ORDEN ESPECÍFICO
   ========================================= */
@media (max-width: 900px) {
  .app-container { display: flex; flex-direction: column; gap: 20px; padding: 30px 20px; }
  .column { display: contents; }
  
  /* Reordenamos la parte de arriba en celular */
  .card-brand { order: 1; }
  .card-player { order: 2; }
  .card-schedule { order: 3; }
  .card-clock { order: 4; }
  .card-weather { order: 5; }

  /* Adaptamos las tarjetas de programas para celular */
  .show-card {
    flex-direction: column; /* Apila la imagen arriba y texto abajo */
    text-align: center;
    padding: 20px;
    gap: 20px;
  }
  
  .show-img {
    width: 100%; /* La imagen se expande a todo el ancho de la tarjeta */
    height: auto;
    aspect-ratio: 16 / 9; /* Mantiene la proporción correcta */
  }
}