/**
 * Mar Solis Artworks Gallery - Additional Styles
 * The main styles come from the Webflow CSS file
 * This file only contains additional custom styles
 */

/* Highlight for search results */
.highlight {
  background-color: var(--background-color--background-alternate, #000);
  color: var(--text-color--text-white, #fff);
}

.obras_cms-link.is-active {
  opacity: 1;
  font-weight: 600;
}

#component[data-popup-open] .obras_cover-cms {
    display: none !important;
}

.obras_category-title.is-active {
  opacity: 1;
  font-weight: 700;
}

/* Ensure cover images are positioned correctly */
.obras_cover-cms {
  position: fixed;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.obras_cover-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.obras_cover-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Category title hover effect */
.obras_category-title:hover .obras_category-title-cta {
    display: block;
}

/* Ensure obras_contents doesn't constrain popup positioning */
.obras_contents {
  position: relative;
}

/* Ensure popups are full screen overlay and hidden by default */
.obras_category-popup,
.obras_artwork-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  background-color: #fff;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
}

/* Popup fixed title */
.obras_fixed-title {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  padding: 2rem;
  box-sizing: border-box;
}

/* Popup content wrapper */
.obras_category-popup .obras_cms-details-wrapper,
.obras_artwork-popup .obras_cms-details-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

/* Prevent body scroll when popup is open */
body:has(#component[data-popup-open]),
html:has(#component[data-popup-open]) {
  overflow: hidden;
}

/* Alternative for browsers that don't support :has() */
body.popup-open {
  overflow: hidden !important;
}

/* Category items hidden by default */
.obras_cms-details-item[data-category] {
  display: none;
}

/* Artwork items hidden by default */
.obras_cms-details-item[data-artwork] {
  display: none;
}

/* Hide cover on mobile */
@media screen and (max-width: 991px) {
  .obras_cover-cms {
    display: none !important;
  }
}
