/* Home Page Styles */

body {
  margin: 0;
  padding: 0;
  font-family: "MNKY Banana Grotesk", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #2D1E1E;
  line-height: 1.6;
  background-color: #FFFFFF;
}

/* Hero Header Adjustments */
.hero-header {
  position: static !important;
  background-color: #FFFFFF;
}

.hero-header .logo,
.hero-header .menu-link {
  color: #2D1E1E !important;
}

/* Archive Section (Filter Area) */
.archive-section {
  padding: 40px 50px;
  background-color: #FFFFFF;
  padding-bottom: 0;
}

.archive-header-filters {
  display: flex;
  justify-content: center;
  margin-bottom: 58px;
}

.filter-capsules {
  display: flex;
  gap: 1vw;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-capsule {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 492.5px;
  border: 1.5px solid #EDEDED;
  background: #FFFFFF;
  color: #2D1E1E;
  font-family: "MNKY Banana Grotesk", sans-serif;
  font-weight: 500;
  font-size: min(1.2vw, 20px);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.filter-capsule:hover {
  border-color: #BDBDBD;
}

.filter-capsule.active {
  background: #EDEDED !important;
  border-color: #EDEDED !important;
}

/* Artist Grid Layout */
/* Virtualization Styles */
.artist-card {
  min-height: 580px; /* Preserve height when virtualized */
  content-visibility: auto; /* Browser-level rendering optimization */

}

@media (max-width: 768px) {
  .artist-card {
    min-height: 300px;
    contain-intrinsic-size: 100% 300px;
  }
}

/* Spinner Styles */
.artist-image-wrapper {
  position: relative;
}

.image-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #2D1E1E;
  border-radius: 50%;
  margin-top: -15px;
  margin-left: -15px;
  animation: spin 0.8s linear infinite;
  z-index: 1;
}

.artist-grid-image {
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  position: relative;
}

.artist-grid-image.loaded {
  opacity: 1;
}

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

/* Skeleton Loading Styles */
.artist-card.is-loading .artist-image-wrapper {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 100%;
  position: relative;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: placeholderShimmer;
  animation-timing-function: linear;
}

.artist-card.is-loading .artist-year,
.artist-card.is-loading .artist-name {
  height: 20px;
  background: #f6f7f8;
  margin-bottom: 5px;
  border-radius: 4px;
  width: 60%;
  animation: placeholderShimmer 1s infinite linear;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 100%;
}

.artist-card.is-loading .artist-name {
  width: 80%;
}

@keyframes placeholderShimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.lazy-footer {
  height: 200px;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.artist-grid-section {
  padding: 0 50px 100px;
  background-color: #fafafa;
      margin-top: 7.56vh;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 20px;
  justify-content: center;
      max-width: 1928px;
    margin: auto;

}
.artist-name, .artist-year {
    background: none !important;
}


.artist-card-link {
  text-decoration: none;
  display: block;
}

.artist-image-wrapper {
  height: 497px;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 15px;
  background-color: #F0F0F0;
}

.artist-grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artist-card:hover .artist-grid-image {
  transform: scale(1.03);
}

.artist-grid-image-placeholder {
  width: 100%;
  height: 100%;
  background: #eee;
}

.artist-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.artist-year {
  font-family: "MNKY Banana Grotesk", sans-serif;
  font-weight: 500;
  font-size: 25px;
  line-height: 35px;
  letter-spacing: -0.01em;
  color: #BDBDBD;
}

.artist-name {
  font-family: "MNKY Banana Grotesk", sans-serif;
  font-weight: 500;
  font-size: 25px;
  line-height: 33.6px;
  letter-spacing: -0.01em;
  color: #2D1E1E;
}

/* Combined Filter Overlay Styles */
.combined-filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.combined-filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

.combined-filter-container {
  background: #fff;
  width: 90%;
  max-width: 600px;
  border-radius: 12px;
  padding: 30px;
  max-height: 90vh;
  overflow-y: auto;
}

.combined-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}

.combined-filter-header h3 {
  margin: 0;
  font-size: 20px;
  color: #2D1E1E;
}

.close-filter {
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #BDBDBD;
}

.filter-section {
  margin-bottom: 15px;
}

.filter-section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #BDBDBD;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.filter-search-input,
.filter-year-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #EDEDED;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background-color: #fff;
}

.filter-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 10px;
}

.sort-options, .genre-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.sort-option-label, .genre-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: #2D1E1E;
  padding: 5px 0;
  transition: opacity 0.2s ease;
}

.sort-option-label:hover, .genre-checkbox-label:hover {
  opacity: 0.7;
}

.sort-option-label input, .genre-checkbox-label input {
  display: none;
}

.radio-custom, .checkbox-custom {
  width: 20px;
  height: 20px;
  border: 1.5px solid #EDEDED;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}

.radio-custom {
  border-radius: 50%;
}

.checkbox-custom {
  border-radius: 4px;
}

.sort-option-label input:checked + .radio-custom {
  border-color: #2D1E1E;
  background-color: #2D1E1E;
}

.sort-option-label input:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.genre-checkbox-label input:checked + .checkbox-custom {
  border-color: #2D1E1E;
  background-color: #2D1E1E;
}

.genre-checkbox-label input:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.year-range-display {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 15px;
  text-align: center;
}

.year-slider-wrapper {
     position: relative;
    height: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.year-slider-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: #EDEDED;
  transform: translateY(-50%);
  border-radius: 2px;
}

.year-slider-track {
  position: absolute;
  top: 50%;
  height: 4px;
  background: #2D1E1E;
  transform: translateY(-50%);
  left: var(--slider-left, 0%);
  right: var(--slider-right, 0%);
  z-index: 1;
  border-radius: 2px;
}

.year-slider {
  position: absolute;
  width: 100%;
  pointer-events: none;
  appearance: none;
  height: 100%;
  background: none;
  outline: none;
  margin: 0;
  z-index: 2;
  top: 0;
}

.year-slider::-webkit-slider-thumb {
  pointer-events: auto;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #2D1E1E;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.year-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.year-slider::-moz-range-thumb {
  pointer-events: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #2D1E1E;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.btn-reset {
  text-decoration: none;
  color: #BDBDBD;
  font-weight: 500;
}

.btn-apply {
  background: #2D1E1E;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-apply:hover {
  background: #000;
}

/* Responsive adjustments */
@media (max-width: 1200px) and (min-width: 768px) {
  .artist-grid {
    grid-template-columns: repeat(3, 1fr); /* Keep 4 columns for tablet */
    gap: 20px 15px; /* Slightly tighter gap for tablet */
  }
  .artist-card, .artist-image-wrapper {
    width: 100%;
    height: auto;
  }
  .mobile-only {
    display: none !important;
}
  .artist-image-wrapper {
    aspect-ratio: 392 / 497;
  }
   .artist-card {
    min-height: 335px;
    content-visibility: auto;
}
  
  .artist-year, .artist-name {
    font-size: 20px; /* Scale down text slightly for tablet */
  }
  .home-header.large-state {
    background-color: transparent;
    border-bottom: none;
    height: 266px;
}
    body.home .site {
        padding-top: calc(210px + 60px) !important;
    }
}

/* Mobile Small View adjustments */
@media (max-width: 768px) {
  .archive-section {
    display: none; /* Hide standard filters on mobile */
  }

  .homepage-mobile-hero {
    width: 100%;
    margin-top: -110px; /* Offset fixed header */
    position: relative;
  }

  .mobile-hero-image-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
  }

  .mobile-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-hero-content {
    position: absolute;
    bottom: 50vh;
    left: 0;
    width: 100%;
    padding: 0 26px;
    text-align: center;
  }

  .mobile-hero-text {
    font-family: "MNKY Banana Grotesk", sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 1.2;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }

  .artist-grid-section {
    padding: 40px 26px 100px;
    margin-top: 0;
  }

  .artist-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 14px;
    position: relative; /* For pseudo-element border */
  }

  .artist-archive-header::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: -26px;
        right: -26px;
        height: 0.5px;
        background-color: #2D1E1E;
  }

  .mobile-archive-title {
    font-family: "MNKY Banana Grotesk", sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 1;
    color: #2D1E1E;
    margin: 0;
  }

  .mobile-filters-btn {
           font-family: "MNKY Banana Grotesk", sans-serif;
        font-weight: 500;
        font-size: 12.5px;
        color: #2D1E1E;
        text-decoration: none;
        padding: 5px 15px;
        border: 1.5px solid #EDEDED;
        border-radius: 50px;
  }

  .artist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 10px; /* 10px horizontal gap requested */
  }

  .artist-card, .artist-image-wrapper {
    width: 100%;
  }

  .artist-image-wrapper {
    height: auto;
    aspect-ratio: 1 / 1; /* Square images for mobile grid? Screenshot looks slightly portrait but let's go with portrait-ish */
    aspect-ratio: 180 / 230;
    border-radius: 4px;
    margin-bottom: 10px;
  }

  .artist-year {
    font-size: 14px;
    line-height: 1.4;
    color: #BDBDBD;
  }

  .artist-name {
    font-size: 16px;
    line-height: 1.2;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .mobile-only {
    display: flex;
  }
  .home-header.large-state {
    background-color: transparent;
    border-bottom: none;
    height: unset;
    margin-top: 30px;
    padding: 0;
}
}
