.navbar .nav-link {
  color: rgba(255, 255, 255, 0.6) !important;
  transition: color 0.2s ease;
}

.navbar .nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
}

.navbar .nav-link:hover {
  color: rgba(255, 255, 255, 0.85) !important;
}

.search-card {
  max-width: 1050px;
}

#results .card,
#favoritesGrid .card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

#results .card:hover,
#favoritesGrid .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.skeleton-card {
  background: linear-gradient(90deg, #e9ecef 25%, #f0f3f7 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.375rem;
  height: 310px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

#skeletonLoader.d-none,
#results.d-none,
#resultsSection.d-none {
  display: none !important;
}

#resultsSection {
  margin: 0;
  padding: 0;
}

.art-card-img {
  height: 250px;
  object-fit: cover;
}

.tab-btn {
  position: relative;
  padding-bottom: 0.5rem !important;
  border-bottom: 3px solid transparent;
  border-radius: 0 !important;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: #0d6efd !important;
  border-bottom-color: #0d6efd;
}

.tab-btn:hover {
  color: #0d6efd !important;
}

#detailView {
  background-color: #f8f9fa;
  padding: 0;
  border-radius: 0;
  margin: 0;
  min-height: 100vh;
}

.detail-back-btn {
  margin-left: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.detail-inner {
  margin: 0;
  padding: 1.5rem;
}

.detail-image-box {
  background-color: white;
  border-radius: 0.375rem;
  padding: 0;
}

#detailImage {
  max-width: 100%;
  height: auto;
  border: 5px solid black;
}

.fav-btn {
  height: 50px;
  font-size: 1rem;
}

.tab-content {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.biography-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

#relatedWorksGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

#relatedWorksGrid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#relatedWorksGrid img:hover {
  transform: scale(1.05);
}

#mapContainer {
  width: 100%;
  height: 400px;
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.leaflet-marker-icon {
  filter: hue-rotate(200deg);
}

.custom-map-popup .leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.custom-map-popup .leaflet-popup-content {
  margin: 12px 38px 12px 16px;
  width: auto !important;
}

.custom-map-popup .leaflet-popup-close-button {
  top: 8px !important;
  right: 10px !important;
  width: 22px !important;
  height: 22px !important;
  font-size: 20px !important;
  line-height: 20px !important;
  color: #6c757d !important;
  background: transparent !important;
  text-align: center;
}

.custom-map-popup .leaflet-popup-close-button:hover {
  color: #000 !important;
}

.custom-map-popup .leaflet-popup-tip {
  background: white;
}

.map-popup {
  min-width: 340px;
  max-width: 400px;
  white-space: normal;
  line-height: 1.35;
  font-family: inherit;
  text-align: left;
}

.map-popup-title {
  font-weight: 700;
  font-size: 1rem;
  color: #212529;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-popup-address {
  font-size: 0.9rem;
  color: #6c757d;
  white-space: normal;
}

#mainContent.no-padding {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.favorite-card {
  position: relative;
}

.favorite-card-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0;
}

.favorite-card:hover .favorite-card-remove-btn {
  opacity: 1;
}

.favorite-card-remove-btn:hover {
  background-color: #c82333;
  transform: scale(1.1);
}

.empty-results {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-paint-icon {
  font-size: 2.5rem;
  display: block;
}

.empty-results p {
  font-size: 1.4rem;
  color: #888;
  font-weight: 500;
  text-align: center;
}

/* Detail View Loading Indicator */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background-color: #f8f9fa;
}

.detail-loading .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #0d6efd;
}

.detail-loading p {
  font-size: 1.1rem;
  color: #6c757d;
}

.favorites-page {
  background-color: #f8f9fa;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  padding: 2rem 1.5rem;
}

.no-favorites-box {
  height: 55vh;
}

@media (max-width: 767.98px) {
  body {
    background-color: #e9f2e4;
  }

  .navbar {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .navbar-brand {
    font-size: 1.1rem !important;
  }

  .navbar-nav {
    padding-top: 0.5rem;
    font-size: 1rem !important;
  }

  #mainContent {
    padding: 1rem 0.75rem !important;
  }

  .search-card {
    max-width: 100%;
  }

  .search-card .card-body {
    padding: 1rem !important;
  }

  #resultsSection {
    margin-top: 1.25rem !important;
  }

  .art-card-img {
    height: 145px;
  }

  #results .card-title,
  #favoritesGrid .card-title {
    font-size: 0.92rem !important;
    line-height: 1.25;
  }

  #results .card-body,
  #favoritesGrid .card-body {
    padding: 0.85rem;
  }

  #results .text-muted.small,
  #favoritesGrid .text-muted.small {
    font-size: 0.78rem;
  }

  #detailView {
    padding: 0;
  }

  .detail-back-btn {
    margin-left: 0.75rem;
    margin-top: 1rem;
  }

  .detail-inner {
    padding: 0.75rem;
  }

  .detail-image-box {
    padding: 0;
    text-align: center;
  }

  #detailImage {
    max-height: 360px;
    width: auto !important;
    object-fit: contain;
  }

  #detailTitle {
    font-size: 1.45rem;
    margin-top: 0.5rem;
  }

  .tab-btn {
    font-size: 0.86rem;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
  }

  .tab-content {
    padding: 1rem;
    font-size: 0.92rem;
  }

  #relatedWorksGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  #relatedWorksGrid img {
    height: 130px;
  }

  #mapContainer {
    height: 320px;
  }

  .map-popup {
    min-width: 220px;
    max-width: 260px;
  }

  .favorites-page {
    min-height: calc(100vh - 60px);
    padding: 1.25rem 1rem;
  }

  .favorites-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem !important;
  }

  .no-favorites-box {
    height: 48vh;
  }

  .no-favorites-box p {
    max-width: 300px;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .search-card {
    max-width: 650px;
  }

  .art-card-img {
    height: 220px;
  }

  #mainContent {
    max-width: 760px;
  }

  .detail-inner {
    padding: 1.5rem 2rem;
  }

  #detailImage {
    max-height: 520px;
    object-fit: contain;
  }

  .favorites-page {
    min-height: calc(100vh - 72px);
    padding: 2rem 2.5rem;
  }
}
