/* =========================
   CSS Variables – sdílená paleta a radius
   ========================= */
:root {
  --font-size: 14px;

  /* Paleta (stejná jako main) */
  --warm-brown: #A97E3F;
  --light-beige: #EAE2CF;
  --golden-yellow: #D4AF37;
  --deep-blue: #2D2F6E;
  --almost-black: #1B1B1B;
  --light-grey: #F5F5F5;

  --background: #ffffff;
  --foreground: var(--almost-black);
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;
}

/* =========================
   Reset a základ
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {                /* plynulé skrolování pro kotvy */
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* Užitečný default pro obrázky (nepřetečou) */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   Typografie – nadpisy + odstavce
   ========================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
}

h1 { font-size: 4rem; line-height: 1.1; }
h2 { font-size: 2.25rem; line-height: 1.3; }
h3 { font-size: 1.875rem; line-height: 1.4; }
h4 { font-size: 1.5rem; line-height: 1.4; }
h5 { font-size: 1.25rem; line-height: 1.5; }
h6 { font-size: 1.125rem; line-height: 1.5; }

p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
}

/* =========================
   Layout utility – kontejner a hlavičky sekcí
   ========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  color: var(--almost-black);
}

.section-header p {
  font-size: 1.125rem;
  opacity: 0.8;
  max-width: 48rem;
  margin: 0 auto;
  color: var(--almost-black);
}

/* =========================
   Navigace – fixní nahoře, světlé pozadí
   ========================= */
.navigation {
  position: fixed;
  inset: 0 0 auto 0; /* top/left/right srozumitelněji */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--almost-black);
  text-decoration: none;
}

.nav-brand i {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--golden-yellow);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

/* Odkazy: hover + aktivní stav (podpora jak .active, tak aria-current) */
.nav-links a {
  color: var(--almost-black);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--warm-brown);
}

.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--warm-brown);
}

/* =========================
   Hero – gradient, noty na pozadí a karta skladatele
   ========================= */
.composer-hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #111827 0%, #475569 50%, #111827 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 80px; /* fixní navigace */
}

/* Dekor – noty + linky osnovy (jen vizuální) */
.musical-background {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.music-note { position: absolute; color: var(--golden-yellow); }
.note-1 { top: 15%; left: 10%; transform: rotate(12deg); font-size: 3rem; }
.note-2 { top: 25%; right: 15%; transform: rotate(-12deg); font-size: 2.5rem; }
.note-3 { bottom: 20%; left: 20%; transform: rotate(45deg); font-size: 4rem; }

.staff-lines {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0.2;
}

.staff-line {
  width: 100%;
  height: 2px;
  background-color: var(--light-beige);
}

/* Obsah hera – grid: portrét + info */
.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content { grid-template-columns: 1fr 1fr; }
}

/* Portrét skladatele (grayscale -> color on hover) */
.composer-portrait {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.portrait-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(100%);
  transition: filter 0.5s ease;
  border: 3px solid var(--warm-brown);
}

.composer-portrait:hover .portrait-image { filter: grayscale(0%); }

.portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  border-radius: var(--radius);
}

/* Textová část vizitky */
.composer-info {
  text-align: center;
  color: var(--light-grey);
}

@media (min-width: 1024px) { .composer-info { text-align: left; } }

.composer-info h1 { margin-bottom: 0.5rem; font-size: 3.5rem; }
.composer-years { font-size: 1.25rem; color: var(--golden-yellow); margin-bottom: 0.5rem; }
.composer-subtitle { font-size: 1.5rem; color: var(--warm-brown); margin-bottom: 1.5rem; font-style: italic; }

.composer-description {
  font-size: 1.125rem;
  color: var(--light-beige);
  max-width: 32rem;
  margin: 0 auto;
}

@media (min-width: 1024px) { .composer-description { margin: 0; } }
@media (min-width: 768px) { .composer-info h1 { font-size: 4.5rem; } }

/* =========================
   Životopis – text + timeline
   ========================= */
.biography-section {
  padding: 5rem 0;
  background-color: white;
}

.biography-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .biography-content { grid-template-columns: 2fr 1fr; }
}

.bio-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--almost-black);
}

/* Timeline „čipy“ s rokem + popis události */
.timeline {
  background: var(--light-beige);
  padding: 2rem;
  border-radius: var(--radius);
}

.timeline h3 { margin-bottom: 1.5rem; color: var(--almost-black); }

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.timeline-year {
  background: var(--warm-brown);
  color: var(--light-grey);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.timeline-event {
  color: var(--almost-black);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =========================
   Díla – karty s ikonou
   ========================= */
.works-section {
  padding: 5rem 0;
  background-color: var(--light-beige);
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px)  { .works-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .works-grid { grid-template-columns: 1fr 1fr 1fr; } }

.work-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(169, 126, 63, 0.2);
  /* transition sjednocen níže v „Loading and hover states“ */
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.work-icon {
  width: 3rem;
  height: 3rem;
  background: var(--warm-brown);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.work-icon i {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--light-grey);
}

.work-content h3 {
  margin-bottom: 0.5rem;
  color: var(--almost-black);
  font-size: 1.375rem;
}

.work-type {
  color: var(--warm-brown);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.work-description {
  color: var(--almost-black);
  line-height: 1.6;
}

/* =========================
   Multimedia – Spotify karta + „průvodce“
   ========================= */
.multimedia-section {
  padding: 5rem 0;
  background-color: white;
}

.multimedia-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .multimedia-content { grid-template-columns: 1fr 1fr; }
}

.playlist-card {
  background-color: var(--deep-blue);
  color: var(--light-grey);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.playlist-card .card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-with-icon i { width: 1.5rem; height: 1.5rem; }
.header-with-icon h3 { color: var(--light-grey); font-size: 1.25rem; }

/* Spotify embed */
.spotify-embed {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: 0.75rem;
}

.spotify-embed iframe {
  width: 100%;
  border-radius: 0.75rem;
}

/* Průvodce poslechem */
.listening-guide h3 { margin-bottom: 1.5rem; color: var(--almost-black); }

.guide-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-item {
  background: var(--light-beige);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.guide-item h4 { margin-bottom: 0.75rem; color: var(--almost-black); font-size: 1.125rem; }
.guide-item p  { color: var(--almost-black); opacity: 0.8; }

/* =========================
   Odkaz – text + „statistiky“
   ========================= */
.legacy-section {
  padding: 5rem 0;
  background-color: var(--light-beige);
}

.legacy-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .legacy-content { grid-template-columns: 2fr 1fr; }
}

.legacy-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--almost-black);
}

.legacy-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: white;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(169, 126, 63, 0.2);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--warm-brown);
  font-family: 'Crimson Text', serif;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--almost-black);
  opacity: 0.8;
  font-weight: 500;
}

/* =========================
   Související skladatelé – 3 dlaždice
   ========================= */
.related-section {
  padding: 5rem 0;
  background-color: white;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .related-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.related-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--warm-brown);
  transition: all 0.3s ease; /* společný feel s .work-card */
  text-decoration: none;
  color: inherit;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.related-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.related-card:hover img { filter: grayscale(0%); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.card-info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  color: white;
}

.card-info h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.card-info p  { font-size: 0.875rem; opacity: 0.9; }

/* =========================
   Footer – stejný vzhled jako main
   ========================= */
.footer {
  background-color: var(--almost-black);
  color: var(--light-grey);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo i { width: 1.5rem; height: 1.5rem; color: var(--golden-yellow); }

.brand-logo h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-grey);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--light-grey);
  opacity: 0.8;
  line-height: 1.5;
}

.footer-links h4 {
  font-weight: 600;
  color: var(--light-grey);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--light-grey);
  opacity: 0.8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--golden-yellow); }

.footer-bottom {
  border-top: 1px solid rgba(245, 245, 245, 0.2);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

.footer-bottom p { font-size: 0.875rem; color: var(--light-grey); opacity: 0.6; }

.footer-love {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--light-grey);
  opacity: 0.6;
}

.footer-love i { width: 1rem; height: 1rem; color: var(--golden-yellow); }

/* =========================
   Responsive – drobnosti pro mobily
   ========================= */
@media (max-width: 767px) {
  .composer-info h1 { font-size: 2.5rem; }
  .composer-subtitle { font-size: 1.25rem; }

  .nav-links { gap: 1rem; font-size: 0.875rem; }

  .timeline, .legacy-stats { margin-top: 2rem; }

  .biography-content,
  .multimedia-content,
  .legacy-content {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Animace a interakce
   ========================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease-out; }

/* Přístupnost – focus ring pro klikatelná místa */
button:focus,
a:focus {
  outline: 2px solid var(--golden-yellow);
  outline-offset: 2px;
}

/* Jednotný transition pro interaktivní karty/prvky */
.work-card,
.related-card,
.timeline-item,
.guide-item {
  transition: all 0.3s ease;
}

/* Respekt k preferencím sníženého pohybu */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================
   Tisk – skryj vizuální „show“ části
   ========================= */
@media print {
  .navigation,
  .related-section,
  .footer,
  .multimedia-section {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
  }

  .composer-hero,
  .biography-section,
  .works-section,
  .legacy-section {
    background: white !important;
    color: black !important;
  }
}
