/* ═══════════════════════════════════════════════════════════════════
   APOSENTO RADIO — style.css
   Todo cabe en una sola card sin scroll: min(500px, 90vw/90vh)
   Paleta: #292939 · #344760 · #507793 · #ECE2D9 · #C4C0BF · #9496A0
   Tipografía: Raleway (títulos) · Inter (cuerpo / UI)
═══════════════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img { max-width: 100%; display: block; }

/* ── Base ─────────────────────────────────────────────────────────── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  color: #ECE2D9;
  background: #1a1b29; /* fallback si la imagen no carga */
}

/* ══════════════════════════════════════════════════════════════════
   FONDO — img fixed + overlay (ruta controlada desde el HTML)
══════════════════════════════════════════════════════════════════ */

/* La imagen cubre toda la pantalla siempre */
.bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  z-index: 0;
}

/* Gradiente oscuro encima de la imagen */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(15, 20, 35, .15), rgba(39, 62, 129, 0.25));
  background-color: rgba(15, 18, 30, .25);
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════
   CONTENEDOR
══════════════════════════════════════════════════════════════════ */
.contenedor {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  z-index: 2; /* encima del fondo y el overlay */
}

/* ══════════════════════════════════════════════════════════════════
   CARD PRINCIPAL  (tu contenedor-radio)
══════════════════════════════════════════════════════════════════ */
.contenedor-radio {
  position: relative;
  width:  min(500px, 90vw);
  height: min(500px, 90vh);
  border-radius: 26px;

  background: rgba(62, 67, 86, 0.42);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .35),
    0 10px 25px rgba(0, 0, 0, .20),
    inset 0  1px 0 rgba(255, 255, 255, .08),
    inset 0 -1px 0 rgba(0, 0, 0, .15);

  overflow: hidden;

  /* Layout interno en columna */
  display: flex;
  flex-direction: column;
}

/* Brillo superior */
.contenedor-radio::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .05)  0%,
    rgba(255, 255, 255, .015) 30%,
    rgba(0, 0, 0, .05)        100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Glow central */
.contenedor-radio::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  filter: blur(90px);
  pointer-events: none;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════
   STATUS BAR
══════════════════════════════════════════════════════════════════ */
.status-bar {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  background: rgba(20, 22, 38, 0.35);
  border-bottom: 1px solid rgba(148, 150, 160, 0.10);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 150, 160, 0.35);
  transition: background 0.3s;
}

.status-dot.active {
  background: #507793;
  animation: pulse-dot 1.3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}

.status-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9496A0;
  transition: color 0.3s;
}

.status-label.active { color: #C4C0BF; }

/* ══════════════════════════════════════════════════════════════════
   BODY DE LA CARD  (ocupa todo el espacio restante)
══════════════════════════════════════════════════════════════════ */
.player-body {
  position: relative;
  z-index: 2;
  flex: 1;                    /* llena el alto disponible */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;  /* distribuye el espacio sin scroll */
  padding: 12px 24px 14px;
  gap: 0;                     /* gap lo maneja space-evenly */
}

/* ── Logo ─────────────────────────────────────────────────────────── */
.logo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(52, 71, 96, 0.8) 0%, rgba(41, 41, 57, 0.95) 100%);
  border: 1px solid rgba(196, 192, 191, 0.13);
  box-shadow: 0 6px 24px rgba(20, 20, 35, 0.5);
  transition: box-shadow 0.4s ease;
}

.logo-wrap.playing {
  animation: logo-pulse 2.8s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(80,119,147,0.15), 0 0 0 11px rgba(80,119,147,0.07); }
  50%       { box-shadow: 0 0 0 8px rgba(80,119,147,0.2),  0 0 0 18px rgba(80,119,147,0.04); }
}

.logo-img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

/* ── Nombre ───────────────────────────────────────────────────────── */
.station-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.station-name h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ECE2D9;
  line-height: 1;
}

.station-sub {
  font-size: 10.5px;
  color: #9496A0;
  letter-spacing: 0.1em;
}

/* ── Ecualizador ──────────────────────────────────────────────────── */
.eq-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 34px;
  width: 100%;
}

.bar {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 9999px;
}

.bar:nth-child(3n+1) { background: rgba(196, 192, 191, 0.85); }
.bar:nth-child(3n+2) { background: rgba(80, 119, 147, 0.9); }
.bar:nth-child(3n)   { background: rgba(148, 150, 160, 0.6); }

/* JS: anima con animationDelay / animationDuration por barra */
.eq-bars.playing .bar {
  animation: eq-bounce 0.6s ease-in-out infinite alternate;
}

@keyframes eq-bounce {
  from { height: 4px; }
  to   { height: 28px; }
}

/* ── Botón Play ───────────────────────────────────────────────────── */
.play-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(236, 226, 217, 0.28);
  background: linear-gradient(145deg, #507793 0%, #344760 100%);
  box-shadow:
    0 6px 26px rgba(80, 119, 147, 0.45),
    0 2px 7px  rgba(20, 20, 35, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ECE2D9;
  transition: background 0.35s, box-shadow 0.35s, border-color 0.35s, transform 0.15s;
}

.play-btn:hover  { transform: scale(1.06); }
.play-btn:active { transform: scale(0.94); }

.play-btn.playing {
  background: linear-gradient(145deg, #292939 0%, #344760 100%);
  border-color: rgba(148, 150, 160, 0.22);
  box-shadow: 0 5px 20px rgba(20, 20, 35, 0.55);
}

.play-label {
  font-size: 9.5px;
  color: #9496A0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(196, 192, 191, 0.25);
  border-top-color: #ECE2D9;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divisor ──────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: rgba(148, 150, 160, 0.13);
}

/* ── Volumen ──────────────────────────────────────────────────────── */
.volume-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mute-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #C4C0BF;
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.mute-btn.muted { opacity: 0.4; color: #9496A0; }

.volume-track {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 18px;
  touch-action: none;
}

.volume-bg,
.volume-fill {
  position: absolute;
  height: 3px;
  border-radius: 9999px;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  pointer-events: none;
}

.volume-bg    { right: 0; background: rgba(148, 150, 160, 0.18); }
.volume-fill  { width: 80%; background: linear-gradient(90deg, #344760, #507793); transition: width 0.05s; }

.volume-range {
  position: relative;
  width: 100%;
  height: 18px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}

.volume-range:focus { outline: none; }

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ECE2D9;
  border: 2px solid #507793;
  box-shadow: 0 1px 5px rgba(20, 20, 35, 0.55);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.volume-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(80, 119, 147, 0.22);
}

.volume-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ECE2D9;
  border: 2px solid #507793;
  cursor: pointer;
}

.volume-pct {
  font-size: 10px;
  color: #9496A0;
  min-width: 28px;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════════
   BOTONES DE ACCIÓN
══════════════════════════════════════════════════════════════════ */
.action-row {
  width: 100%;
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(196, 192, 191, 0.14);
  background: rgba(52, 71, 96, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #C4C0BF;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(20, 20, 35, 0.28);
  transition: transform 0.15s, opacity 0.15s;
}

.action-btn:hover  { transform: translateY(-1px); opacity: 0.9; }
.action-btn:active { transform: scale(0.96); }

.action-btn--whatsapp {
  background: rgba(37, 99, 60, 0.45);
  border-color: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

/* ══════════════════════════════════════════════════════════════════
   REDES SOCIALES
══════════════════════════════════════════════════════════════════ */
.social-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(41, 41, 57, 0.45);
  border: 1px solid rgba(196, 192, 191, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.social-label {
  font-size: 9px;
  color: rgba(148, 150, 160, 0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 2px;
}

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 71, 96, 0.55);
  border: 1px solid rgba(196, 192, 191, 0.14);
  color: #C4C0BF;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(20, 20, 35, 0.3);
  transition: transform 0.15s;
}

.social-btn:hover  { transform: scale(1.12) translateY(-2px); }
.social-btn:active { transform: scale(0.93); }

.social-btn--fb { color: #93b4d4; }
.social-btn--ig { color: #e4a8c0; }
.social-btn--yt { color: #f87171; }
.social-btn--tt { color: #C4C0BF; }
.social-btn--wa { color: #4ade80; }

/* ══════════════════════════════════════════════════════════════════
   MODAL "ACERCA DE"
══════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 35, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  width: min(400px, 88vw);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(41, 41, 57, 0.90);
  border: 1px solid rgba(196, 192, 191, 0.16);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 36px 72px rgba(10, 10, 20, 0.7);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  opacity: 0;
}

.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(148, 150, 160, 0.11);
}

.modal-title {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ECE2D9;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #9496A0;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.modal-close:hover { opacity: 0.7; }

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
}

.modal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-logo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(52, 71, 96, 0.9), rgba(41, 41, 57, 1));
  border: 1px solid rgba(196, 192, 191, 0.11);
}

.modal-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.modal-brand-name {
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ECE2D9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.modal-brand-sub {
  font-size: 11px;
  color: #9496A0;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.modal-desc {
  font-size: 12.5px;
  color: #C4C0BF;
  line-height: 1.72;
}

.modal-contact {
  border-radius: 13px;
  padding: 10px 14px;
  background: rgba(80, 119, 147, 0.12);
  border: 1px solid rgba(80, 119, 147, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-contact-label {
  font-size: 10px;
  color: #9496A0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-wa-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #4ade80;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.modal-wa-link:hover { opacity: 0.8; }

.modal-close-btn {
  width: 100%;
  padding: 11px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #507793, #344760);
  color: #ECE2D9;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.modal-close-btn:hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — móvil muy pequeño (< 380px)
══════════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .contenedor-radio {
    width:  92vw;
    height: 88vh;
  }

  .logo-wrap  { width: 78px; height: 78px; }
  .logo-img   { width: 60px; height: 60px; }

  .station-name h1 { font-size: 18px; }

  .play-btn   { width: 52px; height: 52px; }

  .social-btn { width: 30px; height: 30px; }
  .social-btn svg { width: 14px; height: 14px; }

  .eq-bars    { height: 28px; }
}

/* ══════════════════════════════════════════════════════════════════   RESPONSIVE — tabletas y móviles
══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .contenedor-radio {
    width: min(90vw, 420px);
    height: min(90vh, 620px);
  }

  .player-body {
    padding: 12px 18px 14px;
    justify-content: space-between;
  }

  .logo-wrap {
    width: 86px;
    height: 86px;
  }

  .logo-img {
    width: 66px;
    height: 66px;
  }

  .station-name h1 {
    font-size: 20px;
  }

  .station-sub {
    font-size: 10px;
  }

  .eq-bars {
    height: 30px;
    gap: 2px;
  }

  .play-btn {
    width: 56px;
    height: 56px;
  }

  .volume-row {
    gap: 8px;
  }

  .action-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .action-btn {
    font-size: 10px;
    padding: 8px 10px;
  }

  .social-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
}

@media (min-width: 541px) and (max-width: 768px) {
  .action-row {
    flex-direction: row;
  }

  .action-btn {
    width: auto;
    min-width: 120px;
  }
}

@media (max-width: 540px) {
  .contenedor-radio {
    width: 94vw;
    height: 92vh;
    border-radius: 22px;
  }

  .player-body {
    padding: 10px 14px 12px;
  }

  .status-bar {
    padding: 8px 14px;
  }

  .logo-wrap {
    width: 72px;
    height: 72px;
  }

  .logo-img {
    width: 56px;
    height: 56px;
  }

  .station-name h1 {
    font-size: 17px;
  }

  .station-sub {
    font-size: 9px;
  }

  .eq-bars {
    height: 26px;
  }

  .play-btn {
    width: 52px;
    height: 52px;
  }

  .play-label {
    font-size: 9px;
  }

  .volume-row {
    flex-direction: column;
    align-items: stretch;
  }

  .volume-track {
    height: 16px;
  }

  .volume-range {
    height: 16px;
  }

  .volume-pct {
    font-size: 9px;
  }

  .action-row {
    flex-direction: column;
    gap: 7px;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  .social-bar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .social-label {
    width: auto;
    text-align: center;
  }
}

/* ══════════════════════════════════════════════════════════════════   ACCESIBILIDAD — reduced motion
══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .status-dot.active,
  .logo-wrap.playing,
  .eq-bars.playing .bar,
  .spinner {
    animation: none;
  }
  .eq-bars.playing .bar { height: 16px; }
}
