/* frontend/css/pages/repertoire/repertoire.css */

:root {
  --repertoire-primary: #2c3e50;
  --repertoire-secondary: #34495e;
  --repertoire-accent: #3498db;
  --repertoire-gold: #d4af37;
  --repertoire-text: #2c3e50;
  --repertoire-text-light: #7f8c8d;
  --repertoire-bg: #ffffff;
  --repertoire-bg-alt: #f8f9fa;
  --repertoire-border: #e0e0e0;
  --repertoire-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --repertoire-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --repertoire-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layout Grid */
.repertoire-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 200px);
}

/* Hero Column */
.repertoire-hero-col {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.repertoire-hero-figure {
  width: 100%;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--repertoire-shadow);
}

.repertoire-hero-img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--repertoire-transition);
}

.repertoire-hero-img:hover {
  transform: scale(1.05);
}

/* Main Column */
.repertoire-main-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.repertoire-header {
  text-align: center;
  margin-bottom: 1rem;
}

.repertoire-header h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--repertoire-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.claim-text {
  font-size: 1.25rem;
  color: var(--repertoire-text-light);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

/* Tabs Navigation */
.repertoire-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--repertoire-border);
}

.repertoire-tabs .tab {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--repertoire-border);
  border-radius: 50px;
  background: var(--repertoire-bg);
  color: var(--repertoire-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--repertoire-transition);
  text-transform: capitalize;
}

.repertoire-tabs .tab:hover {
  border-color: var(--repertoire-accent);
  color: var(--repertoire-accent);
  transform: translateY(-2px);
  box-shadow: var(--repertoire-shadow);
}

.repertoire-tabs .tab.is-active {
  background: var(--repertoire-accent);
  border-color: var(--repertoire-accent);
  color: var(--repertoire-bg);
  box-shadow: var(--repertoire-shadow);
}

/* Composer Pills */
.composer-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  justify-content: center;
}

.composer-pill {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--repertoire-border);
  border-radius: 20px;
  background: var(--repertoire-bg);
  color: var(--repertoire-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--repertoire-transition);
}

.composer-pill:hover {
  border-color: var(--repertoire-gold);
  color: var(--repertoire-gold);
  transform: translateY(-1px);
}

.composer-pill.is-active {
  background: var(--repertoire-gold);
  border-color: var(--repertoire-gold);
  color: var(--repertoire-bg);
}

/* Repertoire List */
.repertoire-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.repertoire-category {
  display: none;
  animation: fadeIn 0.5s ease;
}

.repertoire-category[aria-hidden="false"] {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

/* Work Card */
.work-card {
  background: var(--repertoire-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--repertoire-shadow);
  transition: var(--repertoire-transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 2px solid transparent;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--repertoire-shadow-hover);
  border-color: var(--repertoire-accent);
}

.work-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.work-composer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--repertoire-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.work-composer-years {
  font-size: 0.75rem;
  opacity: 0.8;
}

.work-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-executions {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
}

.badge-movements {
  background: rgba(52, 152, 219, 0.15);
  color: var(--repertoire-accent);
}

.work-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--repertoire-primary);
  line-height: 1.4;
  margin: 0;
}

.work-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--repertoire-text-light);
}

.work-catalogue {
  font-weight: 600;
  color: var(--repertoire-accent);
}

.work-key {
  font-style: italic;
}

.work-year {
  opacity: 0.8;
}

.work-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--repertoire-text);
}

.work-category i {
  color: var(--repertoire-accent);
}

/* Movements Section */
.work-movements {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--repertoire-border);
}

.movements-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--repertoire-bg-alt);
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--repertoire-text);
  cursor: pointer;
  transition: var(--repertoire-transition);
}

.movements-toggle:hover {
  background: #e8eaed;
}

.movements-toggle.active i {
  transform: rotate(180deg);
}

.movements-toggle i {
  transition: transform 0.3s;
}

.movements-list {
  margin-top: 0.75rem;
  display: none;
}

.movements-list.is-visible {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.movement {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--repertoire-bg-alt);
  border-radius: 8px;
  border-left: 3px solid var(--repertoire-accent);
}

.movement:last-child {
  margin-bottom: 0;
}

.movement-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--repertoire-accent);
  color: var(--repertoire-bg);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.movement-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.movement-info strong {
  color: var(--repertoire-primary);
  font-size: 0.95rem;
}

.movement-info em {
  color: var(--repertoire-text-light);
  font-size: 0.85rem;
  font-style: italic;
}

.movement-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--repertoire-text-light);
}

/* Media Links */
.work-media {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--repertoire-border);
}

.media-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--repertoire-bg-alt);
  color: var(--repertoire-text);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--repertoire-transition);
}

.media-link:hover {
  background: var(--repertoire-accent);
  color: var(--repertoire-bg);
  transform: translateY(-2px);
}

.media-link i {
  font-size: 1.1rem;
}

/* Empty State */
#repertoire_empty_msg {
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.25rem;
  color: var(--repertoire-text-light);
}

/* Loading State */
.repertoire-loading {
  text-align: center;
  padding: 4rem 2rem;
}

.repertoire-loading i {
  font-size: 3rem;
  color: var(--repertoire-accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .repertoire-layout {
    grid-template-columns: 250px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  .repertoire-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .repertoire-hero-col {
    position: relative;
    top: 0;
  }
  
  .repertoire-hero-figure {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .repertoire-header h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .repertoire-layout {
    padding: 2rem 1rem;
  }
  
  .repertoire-header h1 {
    font-size: 2rem;
  }
  
  .claim-text {
    font-size: 1.1rem;
  }
  
  .repertoire-tabs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .repertoire-tabs .tab {
    text-align: center;
  }
  
  .works-grid {
    grid-template-columns: 1fr;
  }
  
  .composer-pills {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .repertoire-header h1 {
    font-size: 1.75rem;
  }
  
  .work-title {
    font-size: 1.2rem;
  }
  
  .movement {
    flex-direction: column;
  }
  
  .movement-number {
    align-self: flex-start;
  }
}