/* assets/pages/rhythms/rhythms-base.css */

.rhythms-hero {
  padding: 44px 3% 26px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}

.rhythms-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.15;
  font-weight: 900;
  color: var(--text);
}

.rhythms-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 1% 90px;
}

.rhythms-layout {
  display: block;
  width: 100%;
  max-width: none;
}

.rhythms-sidebar {
  position: static;
  width: 100%;
  max-width: none;
  margin-bottom: 22px;
}

.rhythms-filters {
  display: grid;
  grid-template-columns: minmax(320px, 300px) minmax(240px, 360px);
  gap: 14px;
  align-items: end;
  justify-content: start;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}

.filter-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rhythms-search-bar,
.filter-select {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  background: #09090b;
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 12px 16px;
  transition: all 0.24s var(--ease);
}

.rhythms-search-bar:focus-within,
.filter-select:focus-within {
  border-color: rgba(200,164,90,0.42);
  box-shadow: 0 0 0 3px rgba(200,164,90,0.08);
}

.rhythms-search-bar svg {
  flex-shrink: 0;
  color: var(--gold);
}

.rhythms-search-bar input,
.filter-select select {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--gold-light);
  font-family: inherit;
  font-size: 1rem;
}

.rhythms-search-bar input::placeholder {
  color: var(--gold);
}

.filter-select select {
  appearance: none;
  cursor: pointer;
  color-scheme: dark;
}

.filter-select select option,
.filter-select select optgroup {
  background: #09090b;
  color: var(--gold-light);
}

.rhythms-main {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
}

#rhythms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: none;
  align-items: stretch;
}

.rhythm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px;
  transition: all 0.28s var(--ease);
}

.rhythm-card-link {
  color: inherit;
  text-decoration: none;
}

.rhythm-card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.34);
  border-color: rgba(200,164,90,0.26);
}

body[dir="rtl"] .rhythm-card-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

body[dir="rtl"] .rhythm-card .time-sig {
  justify-self: start;
}

body[dir="rtl"] .rhythm-card-title-wrap {
  text-align: right;
}

body[dir="ltr"] .rhythm-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

body[dir="ltr"] .rhythm-card .time-sig {
  justify-self: end;
}

body[dir="ltr"] .rhythm-card-title-wrap {
  text-align: left;
}

.rhythm-card-title-wrap {
  min-width: 0;
}

.rhythm-card h3 {
  margin: 0;
  color: var(--gold-light);
  font-size: 1.06rem;
  line-height: 1.18;
  font-weight: 900;
}

.rhythm-card .time-sig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  direction: ltr;
}

.rhythm-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.012) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px;
}

.rhythm-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.rhythm-image-fallback-empty {
  width: 100%;
  min-height: 100px;
}

.rhythm-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border2);
}

.rhythm-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 900;
}

.rhythm-card-cta svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}

.rhythm-card-link:hover .rhythm-card-cta {
  color: var(--text);
}

body[dir="rtl"] .rhythm-card-cta svg {
  transform: rotate(180deg);
}

body[dir="rtl"] .rhythm-card-link:hover .rhythm-card-cta svg {
  transform: rotate(180deg) translateX(-2px);
}

body[dir="ltr"] .rhythm-card-link:hover .rhythm-card-cta svg {
  transform: translateX(2px);
}

.empty-state {
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.02);
  padding: 34px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg {
  color: var(--gold);
  margin-bottom: 12px;
}

.empty-state p {
  margin: 0;
  line-height: 1.8;
}

@media (min-width: 1400px) {
  .rhythms-content {
    padding-left: 0.75%;
    padding-right: 0.75%;
  }

  #rhythms-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1180px) {
  #rhythms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .rhythms-content {
    padding: 22px 3% 70px;
  }

  .rhythms-filters {
    grid-template-columns: 1fr;
  }

  #rhythms-grid {
    grid-template-columns: 1fr;
  }
}
