/*
 Theme Name: Twenty Twenty-Five Child
 Author: Nick White
 Template: twentytwentyfive
 */

/* Default for Desktop */
:root {
  --header-offset: 85px;
}

/* Update for Tablets and Mobile */
@media (max-width: 768px) {
  :root {
    --header-offset: 22px;
  }
}

footer.wp-block-template-part {
  margin-block-start: 0 !important;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */

/* Header Layering & Cover Images */

.sq-grey-header {
  /* checked */
  z-index: 99;
}

/* This pulls the content up by the offset to meet the header */
.sq-cover {
  margin-top: calc(-1 * var(--header-offset)) !important;
}

/* Logo & Title Styling */
.sq-desktop-grey-header-site-logo-col {
  /* checked */
  margin-right: 15px !important;
}

.sq-desktop-grey-header-site-logo img {
  /* checked */
  width: 130px !important;
  height: auto !important;
}

.sq-desktop-grey-header-site-title-standard {
  /* checked */
  padding-bottom: 0px !important;
}

.sq-desktop-grey-header-site-title-standard a,/* checked */
.sq-desktop-grey-footer-site-title-standard a {
  /* checked */
  font-family: "berthold-baskerville-pro", sans-serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.1px !important;
  font-size: 1.6rem;
  text-decoration: none;
}

/* Small Title & Subtitle */
.sq-desktop-grey-header-site-title-small {
  /* checked */
  display: none !important;
}

.grey-header-central-title-text {
  /* checked */
  font-style: normal;
  font-weight: 100;
  letter-spacing: -0.1px !important;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  position: relative;
  top: 6px;
}

/* Menu Piped Dividers */
.sq-main-menu > li:not(:last-child):after {
  content: "|";
  padding: 0 10px;
}

.sq-woo-menu-cart-icon {
  /* checked */
  margin-bottom: -9px !important;
  /* display: none !important; */
}

/* Mobile Menu Trigger Sizing */
.rmp-menu-title-link span {
  font-size: 1.2rem;
}

/* ==========================================================================
   3. CLASSES SHORTCODE & WOOCOMMERCE
   ========================================================================== */

/* Container for the product grid */
.classes-shortcode ul.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

/* Individual product item styling */
.classes-shortcode ul.products li {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  border: 1px solid #ddd;
  overflow: hidden;
  background-color: #fff;
  transition: background-color 1s ease;
  flex: 0 0 calc(25% - 15px); /* Desktop: 4 columns */
}

.classes-shortcode ul.products li:hover {
  background-color: #d2d3d6;
}

/* Product Title & Links */
.classes-shortcode ul.products li > a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.classes-shortcode ul.products li > a.woocommerce-LoopProduct-link h2 {
  color: #333;
  transition:
    transform 0.3s ease,
    font-weight 0.3s ease;
}

.classes-shortcode ul.products li > a.woocommerce-LoopProduct-link:hover h2 {
  transform: none;
  font-weight: 300;
  color: #588157;
  /* text-decoration: underline; */
}

.classes-shortcode .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 5px;
}

/* Date & "More Info" */
.classes-shortcode .event-date,
.classes-shortcode .more-info-link {
  font-size: 0.9rem;
  font-weight: 300;
  color: #555;
  margin-top: 0;
  margin-bottom: 10px;
}

.classes-shortcode .more-info-link {
  text-decoration: none;
  border: 1px solid #999999;
  padding: 3px 8px;
  border-radius: 5px;
}

/* Price Styling */
.classes-shortcode ul.products li > a.woocommerce-LoopProduct-link span.price {
  margin-top: auto;
}

.classes-shortcode .price {
  margin-bottom: 15px;
  display: none; /* Currently hidden as per user preference */
}

.classes-shortcode .woocommerce-Price-amount {
  font-size: 1rem;
  font-weight: 500;
  color: #588157;
}

/* Buttons */
.classes-shortcode .button {
  background-color: #7b7979;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.1rem;
  border: 1px solid #7b7979;
  border-radius: 3px;
  padding: 4px 20px;
  text-transform: uppercase;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.classes-shortcode .button:hover {
  background-color: #ffffff;
  color: #2e2e2e;
  border-color: #2e2e2e;
}

/* Image Handling */
.classes-shortcode img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  display: block;
  width: 100%;
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 15px;
}

/* General WooCommerce Tweaks */
.sq-woo-product-details {
  font-size: 1rem;
}
.classes-pagination {
  margin-bottom: 2rem !important;
}
.sq-product-summary-bottom-margin {
  margin-bottom: 3em !important;
}
.sq-product-summary-bottom-margin .wp-block-columns {
  margin-bottom: 1em !important;
  display: block !important;
}

/* ==========================================================================
   4. FOOTER STYLING
   ========================================================================== */

.sq-grey-footer-top-row {
  display: flex;
  justify-content: space-between;
  padding: 30px 40px !important;
}

.sq-grey-footer-left-col,
.sq-grey-footer-middle-col {
  border: none;
}

/* Accordion Menu in Footer */
.wpb_wmca_accordion_wrapper_theme_transparent ul li a {
  font-size: 14px !important;
  padding: 4px 0 4px 10px !important;
  border-radius: 1px !important;
  border-left: 2px solid transparent !important;
}

.wpb_wmca_accordion_wrapper_theme_transparent ul li a:hover,
.wpb_wmca_accordion_wrapper_theme_transparent li.current-menu-item > a,
.wpb_wmca_accordion_wrapper_theme_transparent li.current_page_item > a {
  background-color: #bfbfbf !important;
  border-color: #474747 !important;
}

/* ==========================================================================
   5. SPECIFIC PAGE LAYOUTS & FORMS
   ========================================================================== */

/* General 2 col page layout */
.page-right-col {
  background-color: #f3f3f3;
}

/* Artist Page */
.artist-works .artist-work a img {
  border: 1px solid rgb(207, 207, 207);
}
.artist-works {
  margin-bottom: 50px !important;
}

/* Posts Grid - Equal Height */
.posts-grid li.wp-block-post {
  display: flex;
}

/* Home page */
.homepage-section-1-col-2 {
  /* background-color: #f3f3f3; */
  display: flex;
  justify-content: center;
  gap: 40px;
}

.homepage-section-1-col-2 img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 10px solid #fbfbfb;
}

.homepage-section-1-col-2 figcaption {
  font-style: italic;
  font-size: small;
  color: #ababab;
}

.whats-on {
  color: #fffefd;
  background-color: #4a4c4f;
}

/* Homepage Manifesto */
.sq-manifesto-white-on-black-group {
  display: flex;
  align-items: center;
}
.sq-mission-statement-white-on-black {
  text-align: justify;
}

/* Visit Us page */
.visit-sub-heading {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 20px;
}

/* Newsletter Form (Sendinblue/Sib) */
#sib_signup_form_2,
.newsletter-form-browser {
  font-size: 1rem;
  max-width: 1350px;
  display: flex;
  flex-direction: column;
}

.newsletter-name {
  display: flex;
  gap: 1rem;
}

.newsletter-label {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.newsletter-label .input-container,
.newsletter-label input {
  background-color: #e0e0e0;
  width: 100%;
  box-sizing: border-box;
}

.newsletter-label input {
  border: none;
  line-height: 2rem;
}

/* Exhibition index page */

.exhibitions-index-cols {
  max-width: 1000px;
  margin-bottom: 30px !important;
}

.exhibitions-index-left-col {
  padding: 30px;
  background-color: #f3f3f3;
}
/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablet & Large Desktop Adjustments */
@media (max-width: 1280px) {
  .sq-desktop-grey-header-site-title-standard {
    /* checked */
    padding-right: 12px;
    text-align: right;
  }
}

/* Mid-Range (Mobile Menu Breakpoint) */
@media (max-width: 991px) {
  .classes-shortcode ul.products li {
    flex: 0 0 calc(33.333% - 13.4px); /* 3 Columns */
  }
}

@media (max-width: 860px) {
  .sq-desktop-grey-footer-site-title-standard a {
    font-size: 1.2rem !important;
  }

  .sq-main-menu {
    /* checked */
    display: none !important;
  }

  .sq-grey-header-title-and-menu-and-cart {
    /* checked */
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
  }

  .sq-desktop-grey-header-site-title-standard {
    /* checked */
    padding-right: 0px;
    padding-bottom: 34px !important;
    text-align: left;
  }

  .sq-desktop-grey-header-menu-row {
    /* checked */
    padding-bottom: 35px !important;
  }

  #rmp_menu_trigger-1086 {
    margin-right: 55px;
    margin-top: 33px;
  }
}

/* Small Tablet / Large Mobile */
@media (max-width: 781px) {
  .sq-footer-credits-cols p {
    /* checked */
    text-align: left;
  }
  .wpb_category_n_menu_accordion {
    /* checked */
    display: none !important;
  }
}

@media (max-width: 768px) {
  .sq-desktop-grey-header-site-title-standard {
    /* checked */
    padding-bottom: 24px !important;
  }

  .sq-desktop-grey-header-site-title-standard a {
    /* checked */
    font-size: 1.2rem;
  }

  .sq-desktop-grey-header-site-logo,/* checked */
  .sq-desktop-grey-header-site-logo-col {
    /* checked */
    flex-basis: 100px !important;
    height: auto !important;
  }

  .sq-desktop-grey-header-site-logo img {
    /* checked */
    width: 100px !important;
    height: auto !important; /* This keeps the image proportional */
  }

  .sq-desktop-grey-header-menu-row {
    /* checked */
    padding-bottom: 26px !important;
  }

  #rmp_menu_trigger-1086 {
    /* checked */
    margin-top: 9px;
  }
}

/* Mobile Columns & Sizing */
@media (max-width: 600px) {
  .grey-header-initial {
    padding-left: 25px !important;
  }

  .sq-desktop-grey-header-site-title-small {
    display: block !important;
    font-family: "berthold-baskerville-pro", sans-serif;
    font-style: normal;
    font-weight: 400;
    letter-spacing: -0.1px !important;
    font-size: 1.2rem;
    text-decoration: none;
    padding-right: 0px;
    padding-bottom: 4px !important;
    text-align: left;
  }

  .sq-desktop-grey-header-site-title-standard {
    display: none;
  }

  .sq-grey-header-title-and-menu-and-cart {
    padding-right: 10px !important;
  }

  .sq-desktop-grey-header-site-logo,
  .sq-desktop-grey-header-site-logo-col {
    flex-basis: 60px !important;
    height: auto !important;
  }

  .sq-desktop-grey-header-site-logo-col {
    margin-right: 6px !important;
  }

  .sq-desktop-grey-header-site-logo img {
    width: 60px !important;
    height: auto !important; /* This keeps the image proportional */
  }

  #rmp_menu_trigger-1086 {
    position: absolute;
    top: 54px !important;
    margin-top: 0px;
  }

  .classes-shortcode ul.products li {
    flex: 0 0 calc(50% - 10px); /* 2 Columns */
  }

  .sq-grey-footer-logo-and-address {
    /* checked */
    flex-direction: column !important;
  }
  .sq-grey-footer-left-col {
    /* checked */
    width: 130px !important;
  }
}

/* Ultra-Small Screens */
@media (max-width: 428px) {
  .rmp-menu-title-link span {
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .classes-shortcode ul.products li {
    flex: 0 0 100%; /* 1 Column */
  }
}

/* ==========================================================================
   7. WOOCOMMERCE BLOCKS - 5 COLUMNS & GAP FILL FIX
   ========================================================================== */

/* 1. Row Container */
.single-product .wc-block-product-template.is-flex-container {
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 20px !important; /* Standardized gap */
  width: 100% !important;
}

/* 2. Desktop: 5 Columns */
.single-product .wc-block-product {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: #fff !important;
  border: 1px solid #ddd !important;
  padding: 15px !important;
  /* flex-grow: 1 allows them to fill the padding on the right */
  flex: 1 1 calc((100% - (20px * 4)) / 5) !important;
  max-width: calc((100% - (20px * 4)) / 5) !important;
}

/* 3. Image, Title, & Price Alignment */
.single-product .wc-block-components-product-image img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  width: 100% !important;
}

.single-product .wc-block-product .wp-block-post-title {
  flex-grow: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: 0.95rem !important;
  min-height: 3.5em !important;
  margin: 10px 0 !important;
}

/* 4. RESPONSIVE BREAKPOINTS (Fixes the right-side gap) */

/* Tablet: 3 Columns */
@media (max-width: 1024px) {
  .single-product .wc-block-product {
    flex: 1 1 calc((100% - (20px * 2)) / 3) !important;
    max-width: calc((100% - (20px * 2)) / 3) !important;
  }
}

/* Mobile: 2 Columns */
@media (max-width: 600px) {
  .single-product .wc-block-product {
    flex: 1 1 calc((100% - 20px) / 2) !important;
    max-width: calc((100% - 20px) / 2) !important;
  }
}

/* Tiny Mobile: 1 Column */
@media (max-width: 400px) {
  .single-product .wc-block-product {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
}

/* 5. Footer Separation */
.single-product .wc-block-product-template.is-flex-container {
  margin-bottom: 80px !important; /* Adjust this value to match your page flow */
}

/* ==========================================================================
   PRODUCT TOP SECTION - GALLERY ALIGNMENT (PARENT LEVEL)
   ========================================================================== */

/* Target the Gutenberg Column containing the image gallery */
.wp-block-column:has(.woocommerce-product-gallery) {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important; /* This pushes the gallery within the column to the right */
  justify-content: flex-start !important;
}

/* Ensure the gallery container doesn't force its own centering or left-alignment */
.woocommerce-product-gallery {
  margin-left: auto !important;
  margin-right: 0 !important;
  width: 100% !important; /* Let the parent column define the width */
  max-width: 500px !important; /* Keep it from becoming too massive */
}

/* 3. Ensure the summary (text) takes up the remaining space */
.summary.entry-summary {
  flex: 1 !important;
  text-align: left !important;
}

/* 4. Responsive Reset: Stack them normally on mobile */
@media (max-width: 768px) {
  div.product {
    flex-direction: column !important;
  }
  .woocommerce-product-gallery {
    width: 100% !important;
    margin: 0 auto 20px auto !important;
  }
}

/* ==========================================================================
   STYLING THE "PRODUCT IMAGE GALLERY" BLOCK
   ========================================================================== */

/* 1. Spacing between Main Image and Thumbnails */
.wc-block-components-product-image-gallery {
  display: flex !important;
  flex-direction: column !important;
}

/* 2. The Inset Frame (Classic engine classes) */
.flex-control-nav.flex-control-thumbs li {
  box-sizing: border-box !important;
  padding: 8px !important; /* The white space from your mockup */
  border: 1px solid #ddd !important;
  background-color: #fff !important;
  width: 80px !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 20px !important; /* Gap from the main image */
  margin-right: 10px !important;
}

/* 3. The Image inside */
.flex-control-nav.flex-control-thumbs img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  opacity: 0.6;
}

/* 4. Active Highlight */
.flex-control-nav.flex-control-thumbs img.flex-active {
  opacity: 1 !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE FIX FOR PRODUCT THUMBNAILS
   ========================================================================== */

@media (max-width: 768px) {
  /* 1. Reset the container to align with the left edge of the image */
  .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* Back to left-aligned */
    width: 100% !important;
    padding: 0 !important;
    margin: 15px 0 !important; /* Vertical gap only */
    gap: 10px !important; /* Consistent spacing between all frames */
  }

  /* 2. Style the inset frames */
  .flex-control-nav.flex-control-thumbs li {
    float: none !important;
    margin: 0 !important; /* Let 'gap' handle it */
    flex: 0 0 calc(33.33% - 10px) !important; /* Fits exactly 3 per row */
    max-width: 80px !important; /* Keeps them from getting too big */
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
  }

  /* 3. Ensure the parent column doesn't force-center the block */
  .wp-block-column:has(.woocommerce-product-gallery) {
    align-items: flex-start !important;
  }
}

/* Target the container ONLY on exhibition pages */
.exhibition-specific-grid .products {
  grid-template-columns: repeat(
    3,
    1fr
  ) !important; /* Forces 3 columns instead of 4 */
  gap: 30px !important;
}

/* Target the individual artwork cards ONLY on exhibition pages */
.exhibition-post-item {
  background-color: #f9f9f9 !important; /* Light background for art cards */
  padding: 15px !important;
}

/* Hide the "More Info" button on exhibition pages if they are in the physical gallery */
.exhibition-specific-grid .sq-more-info-button {
  display: none !important;
}

/* ==========================================================================
   NEW CUSTOM ACF SLIDER 
   ========================================================================== */

.exhibition-slider-wrapper.sq-cover {
  width: 100%;
  /* 16:7 Aspect Ratio ensures a consistent landscape shape */
  aspect-ratio: 16 / 7;
  margin-top: 0 !important;
  position: relative;
  overflow: hidden;
  background-color: #f9f9f9;
}

/* Height Cap: Prevents the slider from pushing content too far down on large screens */
@media (min-width: 1400px) {
  .exhibition-slider-wrapper.sq-cover {
    height: 612px !important;
    aspect-ratio: auto;
  }
}

.custom-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.custom-slide.active {
  opacity: 1;
  z-index: 2;
}

.custom-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crops images perfectly to fill our 16:7 box */
  display: block;
}

/* Navigation Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  padding: 20px 15px;
  cursor: pointer;
  font-size: 30px;
  transition: background 0.3s;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}
.arrow-prev {
  left: 0;
}
.arrow-next {
  right: 0;
}

/* Exhibitions formatting: Single pages (Restored & Video Ready) */
.dynamic-hero {
  height: calc(100vh - var(--header-offset)) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  position: relative !important;
  color: #ffffff !important;
  overflow: hidden !important; /* Forces images and videos to clip to box edges */
}

/* Video specific rules (Sitting behind the text) */
.hero-background-video {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  width: auto !important;
  height: auto !important;
  transform: translate(-50%, -50%) !important;
  object-fit: cover !important;
  z-index: 1 !important;
}

/* Fallback image (Sitting behind the text) */
.hero-background-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important; /* Forces image to stretch to fill the area */
  background-position: center !important; /* Keeps focus in the center */
  background-repeat: no-repeat !important; /* Prevents tiling */
  z-index: 1 !important;
}

.hero-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.2) !important; /* Subtle dark overlay */
  z-index: 2 !important;
}

.hero-content {
  position: relative !important;
  z-index: 3 !important; /* Sits above the video and overlay */
  text-align: center !important;
}

/* Forces the text color inside the hero to stay white and perfectly tracked */
.sq-cover .hero-content h1,
.sq-cover .hero-content p {
  color: #ffffff !important;
  font-weight: 200 !important;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.2rem !important;
}

.sq-cover .hero-content h1 {
  font-size: 4rem !important;
  margin: 10px 0 !important;
}

.sq-cover .hero-content .hero-subheading {
  font-size: 1.7rem !important;
  text-transform: uppercase !important;
  margin-bottom: 10px !important;
}

.sq-cover .hero-content .hero-subtitle {
  font-size: 1.4rem !important;
}

.exhibition-details-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr; /* Gives the description more room than logistics */
  gap: 60px;
  max-width: 1200px;
  margin: 60px auto; /* Centers it and gives it vertical space */
  padding: 0 20px; /* Prevents edge-touching on mobile */
}

/* Column 1 Styling */
.exhibition-logistics-col h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: #888;
  margin-bottom: 5px;
}

.exhibition-logistics-col .logistics-item {
  margin-bottom: 30px;
}

/* Column 2 Styling */
.exhibition-story-col .story-title {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.exhibition-story-col .story-subheading {
  font-size: 1.2rem;
  font-weight: 300;
  color: #555;
  margin-bottom: 30px;
}

.exhibition-story-col .story-artist-bio {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eaeaea;
}

.exhibition-full-six-grid {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.exhibition-gallery-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-item-6 img {
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border: 1px solid #aaa !important;
  border-radius: 0px;
  box-sizing: border-box;
}

.story-artist-bio .bio-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start; /* Keeps the image at the top of the bio text */
  margin-top: 20px;
}

.story-artist-bio .bio-portrait img {
  width: 150px; /* Controls the size of the small portrait */
  height: 150px;
  object-fit: cover; /* Crops it into a clean square if it's not perfectly square */
}

.story-artist-bio .bio-text {
  flex: 1; /* Allows the text to fill the remaining space */
}

/* "About the Artist" Heading Style */
.story-artist-bio .artist-bio-heading {
  font-size: 1.4rem;
  font-weight: 700 !important;
  color: #4a4a4a !important; /* Elegant dark grey */
  font-variant: small-caps !important; /* Caps are taller than the rest! */
  letter-spacing: 0.05rem;
  margin-bottom: 20px;
}

/* Portrait Sitting Above the Bio */
.story-artist-bio .bio-portrait-top {
  margin-bottom: 20px;
}

.story-artist-bio .bio-portrait-top img {
  width: 200px; /* Adjust size of stacked portrait here */
  height: auto;
  border-radius: 4px; /* Softens the square edges slightly */
  display: block;
}

.story-artist-bio .bio-text {
  line-height: 1.6;
}

/* Logistics Column Tweaks */
.exhibition-logistics-col h3 {
  font-size: 0.85rem !important; /* Smaller, subtler heading */
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.15rem !important; /* Extra spacing for that catalog feel */
  color: #888 !important; /* Lighter grey than the main text */
  margin-bottom: 3px !important;
}

.exhibition-logistics-col p {
  font-size: 0.95rem !important; /* Differentiates from standard text size */
  color: #4a4a4a;
  line-height: 1.4 !important;
}

.exhibition-logistics-col .logistics-item {
  margin-bottom: 25px; /* Pulls the blocks a bit closer together */
}

/* Multi-Artist Profile Layout Tweaks */

/* Spacing between separate artist profiles */
.single-artist-profile {
  margin-bottom: 40px !important;
  padding-bottom: 20px;
}

/* Adds a subtle separation line between artists, except the last one */
.single-artist-profile:not(:last-child) {
  border-bottom: 1px solid #eaeaea;
}

/* Style for the artist name headings */
.artist-name-subheading {
  font-family:
    "berthold-baskerville-pro", sans-serif !important; /* Matches your header font style */
  font-size: 1.4rem !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0.05rem !important;
  color: #333333 !important;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  text-transform: none !important;
}

/* Ensure the portraits scale appropriately and don't blow up too large */
.bio-portrait-top img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin-bottom: 15px !important;
}

/* Keep the spacing under the big "About the Artists" heading clean */
.artist-bio-heading {
  margin-bottom: 30px !important;
}

/* ==========================================================================
   EXHIBITIONS: RESPONSIVE BREAKPOINTS (Zero-Gap Version)
   ========================================================================== */

/* --- TABLETS & SMALL SCREENS (Up to 768px) --- */
@media (max-width: 768px) {
  /* 1. Tighten the space between the 6-image grid and columns */
  .exhibition-full-six-grid {
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
  }

  /* 2. Target and completely hide any empty paragraphs inside or around the grid */
  .exhibition-full-six-grid p:empty,
  .exhibition-gallery-grid-6 p:empty,
  .exhibition-full-six-grid + p,
  .exhibition-full-six-grid + p + p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
  }

  /* 3. Collapse the 6-image grid to 2 columns and minimize bottom gap */
  .exhibition-gallery-grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 5px !important; /* Shaved off another 5px */
  }

  /* 4. Flip columns: Story on top, Logistics on bottom, pull gap tighter */
  .exhibition-details-grid {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 15px !important; /* Dropped from 20px to pull details up closer */
    margin-top: 5px !important; /* Dropped from 10px to minimize spacing */
  }

  /* 5. Align logistics text to the right and add a separator */
  .exhibition-logistics-col {
    text-align: right !important;
    margin-top: 15px !important;
    border-top: 1px solid #eaeaea !important;
    padding-top: 20px !important;
  }

  .exhibition-logistics-col .logistics-item {
    margin-bottom: 15px !important;
  }

  /* Ensure the story text above stays left-aligned */
  .exhibition-story-col {
    text-align: left !important;
  }
}

/* --- MOBILE LANDSCAPE (Up to 600px) --- */
@media (max-width: 600px) {
  /* Stack the artist image above the text if you ever revert to side-by-side */
  .story-artist-bio .bio-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
}

/* --- MOBILE PORTRAIT / SMALL PHONES (Up to 480px) --- */
@media (max-width: 480px) {
  /* Force the 6-image grid down to a single column */
  .exhibition-gallery-grid-6 {
    grid-template-columns: 1fr !important;
  }
}

.related-events-container {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.related-events-heading {
  font-size: 1.8rem;
  font-variant: small-caps;
  color: #4a4a4a;
  letter-spacing: 0.05rem;
  margin-bottom: 30px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.event-card {
  border: 1px solid #eaeaea;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.event-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.event-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.event-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card-title {
  font-size: 1.2rem;
  margin: 0;
  color: #2c2c2c;
}

.event-card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.9rem;
  color: #777;
}

.price-wrapper {
  margin-top: 10px;
  font-weight: 600;
}

.free-booking-text {
  color: #d9534f; /* A subtle red/accent color to draw attention to the booking requirement */
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-card-price .woocommerce-Price-amount {
  color: #333;
  font-size: 1.1rem;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Fix for stacked artist biographies */
@media (max-width: 767px) {
  /* Removes the separator on the absolute last artist on mobile */
  .single-artist-profile:last-of-type {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Gives breathing room above the stacked bio section */
  .story-artist-bio {
    margin-top: 40px !important;
  }
}

/* Style for the Read More button on Event Cards */
.event-read-more {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #333; /* Match your site's theme */
  color: #fff !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.3s ease;
}

.event-card:hover .event-read-more {
  background-color: #000; /* Darken on hover */
}

/* Ensure the card layout handles the button well */
.event-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* --- Exhibition Grid Container --- */
.exhibition-listing-grid {
  display: grid;
  /* Responsive columns: 1 column on mobile, 2 on tablets, 3 on desktop */
  grid-template-columns: repeat(1, 1fr);
  gap: 30px;
  padding: 20px 0;
}

@media (min-width: 768px) {
  .exhibition-listing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .exhibition-listing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Card Styles --- */
/* Remove focus outline on all listing cards and buttons */
.exhibition-card-link,
.exhibition-card-link:focus,
.exhibition-read-more,
.exhibition-read-more:focus {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent; /* Removes the blue flash on mobile */
}

.exhibition-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.exhibition-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Maintain a consistent 4:5 aspect ratio for images */
.exhibition-card-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 20px;
  transition: opacity 0.3s ease;
}

.exhibition-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Pushes the button to the bottom if titles vary in length */
}

.exhibition-card-subheading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  margin: 0 0 8px 0;
}

.exhibition-card-title {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 10px 0;
  font-weight: 400;
  color: #000;
}

.exhibition-card-dates {
  font-size: 1rem;
  font-style: italic;
  color: #555;
  margin: 0 0 20px 0;
}

/* --- Button Styling --- */
.exhibition-read-more {
  align-self: flex-start; /* Keeps button from stretching full width */
  padding: 10px 22px;
  border: 1px solid #000;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  margin-top: auto; /* Aligns buttons across the row */
}

.exhibition-card:hover .exhibition-read-more {
  background: #000;
  color: #fff !important;
}

/* Optional: If you want to remove it from all buttons globally */
button:focus,
a:focus {
  outline: none !important;
}

/* --- Archive Specific Tweak --- */
.past-exhibition .exhibition-card-image {
  filter: grayscale(40%);
  opacity: 0.85;
}

.past-exhibition:hover .exhibition-card-image {
  filter: grayscale(0%);
  opacity: 1;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .exhibition-card-title {
    font-size: 1.4rem;
  }
  .exhibition-card-image {
    aspect-ratio: 1 / 1; /* Squares look better on very small phones */
  }
}

/* Target the list items within your custom template class */
.sq-catalogue-product-template li {
  display: flex !important;
  flex-direction: column !important;
  padding: 10px !important;
  background: #fff !important; /* Replacing chocolate */
  transition: box-shadow 0.3s ease;
  height: 95%;
  border: 1px solid #eee;
  margin-bottom: 20px !important;
}

/* Hover Shadow effect */
.sq-catalogue-product-template li:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Target the anchor tag inside the featured image figure */
.sq-catalogue-product-template .wc-block-components-product-image a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1; /* Forces the square shape */
  width: 100%;
  background-color: #fcfcfc; /* The subtle background for the 'box' */
  margin-bottom: 15px;
  overflow: hidden;
  padding: 15px; /* Creates the uniform 'padding' around your art */
  box-sizing: border-box;
}

/* Ensure the image itself doesn't stretch or break the square */
.sq-catalogue-product-template .wc-block-components-product-image a img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important; /* Vital for different art orientations */
  display: block;
}

/* Ensure the title block has a consistent behavior */
.sq-catalogue-product-template li .wp-block-post-title {
  margin-bottom: 15px !important;
  min-height: 3em; /* Optional: ensures at least two lines of space for titles */
}

/* Target the price as the spacer to push buttons to the bottom */
.sq-catalogue-product-template li .wc-block-components-product-price {
  margin-top: auto !important; /* Pushes itself and everything below it to the bottom */
  margin-bottom: 20px !important;
}

/* Unified Buttons */
.sq-catalogue-product-template li .wc-block-components-product-button {
  margin-top: 0 !important;
}

/* Exhibition videos */
.exhibition-videos-section {
  max-width: 900px;
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  gap: 40px; /* Space between the three videos */
}

.sq-video-wrapper {
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.sq-video-wrapper video {
  width: 100%;
  height: auto;
  /* This prevents portrait videos from being taller than the viewer's screen */
  max-height: 75vh;
  display: block;
}

.sq-video-caption {
  padding: 12px;
  font-style: italic;
  font-size: 0.9rem;
  color: #555;
  text-align: left;
  line-height: 1.4;
}

/* Styling for the first card */
/* Remove underlining from the entire card link */
.venue-hire-link,
.venue-hire-link:hover,
.venue-hire-link:active,
.venue-hire-link:focus {
  text-decoration: none !important;
  outline: none !important;
  border-bottom: none !important; /* Some themes use border-bottom instead of text-decoration */
}

/* Specifically target the heading and paragraph inside the link to be safe */
.venue-hire-link h3,
.venue-hire-link p {
  text-decoration: none !important;
}

.venue-hire-card {
  background-color: #eaeaf5 !important; /* Very subtle off-white */
  border: 1px solid #2d2d2d !important;
  transition: all 0.3s ease;
}

.venue-hire-card:hover {
  background-color: #d1d1e6 !important;
  border-color: #3b3e63 !important;
}

.venue-hire-content {
  padding: 20px 15px;
  text-align: center;
}

.venue-hire-content h3 {
  font-size: 1rem;
  margin-top: 0px;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: none; /* Change to uppercase if your theme uses it */
}

.venue-hire-content p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 15px;
  color: #666;
  text-decoration: none !important; /* Ensures the text doesn't get underlined if it's a link */
}

/* Matching your theme's button style */
.venue-hire-button {
  display: inline-block;
  padding: 10px 24px;
  background-color: #000; /* Adjust to your brand's primary color */
  color: #fff !important;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 0;
}

.venue-hire-image-wrapper img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Keeps it square like your product images */
  object-fit: cover;
  display: block;
}
