/* ==========================================================================
   Contes per a parar el món — Jessica Calvo
   Palette: #81A6C6 | #AACDDC | #F3E3D0 | #D2C4B4
   ========================================================================== */

:root {
  --color-cream: #F3E3D0;
  --color-cream-light: #FAF4ED;
  --color-stone: #D2C4B4;
  --color-stone-light: #E7DED4;
  --color-sky: #AACDDC;
  --color-slate: #81A6C6;
  --color-slate-dark: #587C9E;
  --color-text: #36302B;
  --color-text-muted: #6B625B;
  --color-white: #FFFFFF;
  --color-card-bg: rgba(255, 255, 255, 0.85);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 2px 8px rgba(90, 75, 60, 0.05);
  --shadow-md: 0 8px 24px rgba(90, 75, 60, 0.08);
  --shadow-lg: 0 16px 40px rgba(90, 75, 60, 0.12);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 9999px;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-cream);
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: radial-gradient(circle at 15% 10%, #FBF6EF 0%, var(--color-cream) 45%, #EADBCA 100%);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Background Atmosphere (Calm ambient shapes) */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.55;
}

body::before {
  width: 450px;
  height: 450px;
  background-color: var(--color-sky);
  top: -100px;
  right: -100px;
}

body::after {
  width: 500px;
  height: 500px;
  background-color: #E2CFBA;
  bottom: -150px;
  left: -150px;
}

/* Page Layout */
.page-container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
}

/* Header & Language Switcher (Compact spacing before the hero card) */
.site-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.5rem;
}

main {
  display: flex;
  flex-direction: column;
}

.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-stone);
  border-radius: var(--radius-pill);
  padding: 3px;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  transition: var(--transition);
  outline: none;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  background-color: var(--color-slate);
  color: var(--color-white);
  box-shadow: 0 2px 6px rgba(129, 166, 198, 0.4);
}

/* Hero Section */
.hero-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(210, 196, 180, 0.6);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.profile-avatar-wrapper {
  position: relative;
  width: 155px;
  height: 155px;
  margin: 0 auto 1.5rem;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-white);
  box-shadow: 0 10px 25px rgba(90, 75, 60, 0.15);
  display: block;
  transition: transform 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-avatar {
  transform: scale(1.03);
}

.profile-badge-logo {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 58px;
  height: 58px;
  background: var(--color-white);
  border-radius: 50%;
  padding: 5px;
  border: 2px solid var(--color-stone-light);
  box-shadow: var(--shadow-sm);
  object-fit: contain;
  transition: transform 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-badge-logo {
  transform: scale(1.08) rotate(4deg);
}

.podcast-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.podcast-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-slate-dark);
  margin-bottom: 0.85rem;
}

.tagline-pill {
  display: inline-block;
  background-color: rgba(170, 205, 220, 0.35);
  color: #3B5F7A;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(170, 205, 220, 0.6);
}

.intro-text-block {
  text-align: left;
  background: rgba(250, 244, 237, 0.75);
  border-left: 3px solid var(--color-slate);
  padding: 1.25rem 1.4rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intro-text-block p {
  transition: opacity 0.2s ease;
}

.intro-highlight {
  font-style: italic;
  font-weight: 500;
  color: var(--color-slate-dark);
}

/* Unified Content Cards (Sections) */
.content-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(210, 196, 180, 0.6);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.platforms-section {
  margin-top: 1.25rem;
}

.community-section {
  margin-top: 1.65rem;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(210, 196, 180, 0.9);
}

/* Section Headings */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  text-align: center;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Platform Links (Hub) */
.platforms-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 1.35rem;
  background: rgba(250, 244, 237, 0.85);
  border: 1px solid rgba(210, 196, 180, 0.55);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(90, 75, 60, 0.04);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: var(--transition);
}

.platform-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--color-slate);
}

.platform-card.spotify:hover::before { background-color: #1DB954; }
.platform-card.youtube:hover::before { background-color: #FF0000; }
.platform-card.ivoox:hover::before { background-color: #F68712; }
.platform-card.amazon:hover::before { background-color: #00A8E1; }
.platform-card.instagram:hover::before { background-color: #E1306C; }
.platform-card.email:hover::before { background-color: var(--color-slate); }

.platform-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.platform-card:hover .platform-icon-wrap {
  transform: scale(1.06);
}

.spotify .platform-icon-wrap { background-color: rgba(29, 185, 84, 0.12); color: #1DB954; }
.youtube .platform-icon-wrap { background-color: rgba(255, 0, 0, 0.1); color: #FF0000; }
.ivoox .platform-icon-wrap { background-color: rgba(246, 135, 18, 0.12); color: #F68712; }
.amazon .platform-icon-wrap { background-color: rgba(0, 168, 225, 0.12); color: #00A8E1; }
.instagram .platform-icon-wrap { background-color: rgba(225, 48, 108, 0.12); color: #E1306C; }
.email .platform-icon-wrap { background-color: rgba(129, 166, 198, 0.15); color: var(--color-slate); }

.platform-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.platform-info {
  flex: 1;
}

.platform-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
}

.platform-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

.platform-arrow {
  color: var(--color-stone);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.platform-card:hover .platform-arrow {
  color: var(--color-slate);
  transform: translateX(4px);
}

/* Latest Episode Teaser Section (Option A: Dynamic Spotify Card) */
.latest-episode-section {
  margin-top: 1.25rem;
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(210, 196, 180, 0.6);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 1.65rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.latest-episode-section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 185, 84, 0.45);
}

.episode-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(29, 185, 84, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  width: fit-content;
  border: 1px solid rgba(29, 185, 84, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #1DB954;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 7px rgba(29, 185, 84, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(29, 185, 84, 0);
  }
}

.episode-badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #15833B;
  text-transform: uppercase;
}

.episode-card-body {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.episode-cover-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(90, 75, 60, 0.15);
  border: 2px solid var(--color-white);
}

.episode-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.latest-episode-section:hover .episode-cover {
  transform: scale(1.06);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-overlay svg {
  width: 32px;
  height: 32px;
  color: var(--color-white);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.latest-episode-section:hover .play-overlay {
  opacity: 1;
}

.episode-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.episode-channel-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-slate-dark);
}

.episode-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.episode-snippet {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.episode-actions {
  display: flex;
  margin-top: 0.25rem;
}

.btn-listen-spotify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background-color: #1DB954;
  color: var(--color-white);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(29, 185, 84, 0.35);
  transition: var(--transition);
}

.btn-listen-spotify:hover {
  background-color: #1aa34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.45);
}

@media (max-width: 500px) {
  .episode-card-body {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .episode-badge-wrap {
    margin: 0 auto;
  }
  .episode-cover-wrap {
    width: 120px;
    height: 120px;
  }
}

/* About Jessica Card (Two-column layout with photo on the right) */
.about-card {
  margin-top: 1.65rem;
  background: var(--color-card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(210, 196, 180, 0.6);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 2rem;
  align-items: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.25;
}

.about-card p {
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.75;
}

.about-photo-wrapper {
  position: relative;
  width: 100%;
}

.about-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  border: 3px solid var(--color-white);
  box-shadow: 0 12px 28px rgba(90, 75, 60, 0.16);
  display: block;
  transition: transform 0.3s ease;
}

.about-photo-wrapper:hover .about-photo {
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }

  .about-photo-wrapper {
    order: -1;
    max-width: 200px;
    margin: 0 auto;
  }

  .about-photo {
    height: 220px;
  }
}

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(210, 196, 180, 0.5);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-slate-dark);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Smooth Fade transition for i18n */
[data-i18n] {
  transition: opacity 0.15s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .page-container {
    padding: 1.5rem 1rem 3rem;
    gap: 1.75rem;
  }

  .hero-card {
    padding: 2rem 1.25rem;
  }

  .podcast-title {
    font-size: 1.75rem;
  }

  .profile-avatar-wrapper {
    width: 140px;
    height: 140px;
  }

  .profile-badge-logo {
    width: 50px;
    height: 50px;
  }
}
