/* ===============================
   BASE
   =============================== */

body {
  font-family: 'Forum';
  background: #f8f9ff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:root {
  --player-safe-space: 120px;
}

/* Wrapper per footer aderente */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===============================
   HEADER
   =============================== */

.brani-header {
  margin-top: 3.9rem;
  padding: 3.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 25px rgba(118, 75, 162, 0.3);
}

.brani-header h1 {
  font-size: 2.6rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffd14d;
}

/* ===============================
   MAIN
   =============================== */

.brani-main {
  flex: 1;
  padding: 3rem 1.5rem calc(3rem + var(--player-safe-space));
  max-width: 1400px;            /* più respiro desktop */
  margin: 0 auto;
}

/* ===============================
   PODCAST – GOOGLE DRIVE
   =============================== */

.podcast-section {
  margin: 0 auto 3rem;
  text-align: center;
}

/* FIX DEFINITIVO LARGHEZZA DRIVE */
.podcast-section iframe {
  display: block;
  width: 100%;
  max-width: 1200px;            /* desktop largo */
  min-width: 960px;             /* evita colonna stretta */
  margin: 0 auto;
  height: 720px;
  border: none;
  border-radius: 18px;
  box-shadow: 0 0 35px rgba(118, 75, 162, 0.5);
  animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
  from { box-shadow: 0 0 25px rgba(118, 75, 162, 0.5); }
  to   { box-shadow: 0 0 50px rgba(102, 126, 234, 0.7); }
}

/* ===============================
   LISTA VECCHI BRANI (SE PRESENTE)
   =============================== */

.track-list-wrapper {
  max-height: 440px;
  max-width: 1200px;            /* coerente con iframe */
  width: 100%;
  margin: 0 auto 3rem;
  overflow-y: auto;
  border-radius: 16px;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid rgba(118, 75, 162, 0.15);
  box-shadow: 0 0 35px rgba(118, 75, 162, 0.5);
}

.track-list-wrapper::-webkit-scrollbar {
  width: 10px;
}

.track-list-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(#667eea, #764ba2);
  border-radius: 6px;
}

.track-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.track-list li {
  background: #fff;
  padding: 1.2rem 1.6rem;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-weight: 600;
  transition: all 0.35s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.track-list li:hover {
  background: #f5f0ff;
  transform: translateY(-3px);
}

/* ===============================
   PLAYER – OVERRIDE SOLO PODCAST
   =============================== */



/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 1024px) {
  .podcast-section iframe {
    min-width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .brani-header h1 {
    font-size: 2.2rem;
  }

  .podcast-section iframe {
    height: 600px;
  }

  .track-list-wrapper {
    max-height: 360px;
  }
}

@media (max-width: 480px) {

  body.page-podcast {
    --player-safe-space: 140px;
  }

  body.page-podcast .brani-main {
    padding-bottom: calc(3rem + var(--player-safe-space));
  }

  body.page-podcast .podcast-section iframe {
    height: 480px;
    min-width: 100%;
  }

  /* MOBILE: player fisso */
  body.page-podcast .player-wrapper {
    position: fixed !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999;
  }
}