/*
Theme Name: Wonderlodge
Theme URI: 
Author: Voyager Marketing
Author URI: 
Description: A custom block theme for Wonderlodge.
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wonderlodge
Tags: 

*/

footer {
  margin-top: 0 !important;
}

h1,h2,h3,h4,h5,h6,a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 5px !important;
}

.z-0 {
  z-index: 0;
}
.z-10 {
  position: relative;
  z-index: 10;
}

.wp-block-separator {
    min-width: 100%;
    min-height: 0.25px;
    border-top: 0 solid transparent !important;
    /* background-color: var(--wp--preset--color--custom-secondary) !important; */
}

.half-fluid {
  width: clamp(300px, 100%, 638px);
}

/* Project - Review Quote Block */ 

.wl-review-quote {
  margin: 8rem auto;
  max-width: var(--wp--style--content-size, 70ch);
  max-width: 600px;;
}

.wl-review-quote blockquote {
  font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem);
  line-height: 1.5;
  font-style: italic;
  /* border-left: 3px solid currentColor;
  padding-left: 1rem; */
  margin: 0;
}



/* Scope to our style variation */
.wp-block-cover.is-style-hover-reveal {
  position: relative;
  overflow: hidden;
}

/* Beat core's .has-background-dim-* opacity with higher specificity */
.wp-block-cover.is-style-hover-reveal .wp-block-cover__background {
  opacity: 0;               /* start hidden; override any -40/-60/-100 preset */
  transition: opacity .35s ease;
  z-index: 1;
}

/* Reveal overlay on hover/focus */
.wp-block-cover.is-style-hover-reveal:hover .wp-block-cover__background,
.wp-block-cover.is-style-hover-reveal:focus-within .wp-block-cover__background {
  opacity: 0.7 !important;  /* customize with CSS var if you like */
}

/* Content (text) starts hidden and fades/slides in */
.wp-block-cover.is-style-hover-reveal  .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;                 /* above overlay */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;       /* avoid trapping hover before reveal */
}

/* Reveal content on hover/focus */
.wp-block-cover.is-style-hover-reveal:hover .wp-block-cover__inner-container,
.wp-block-cover.is-style-hover-reveal:focus-within .wp-block-cover__inner-container {
  opacity: 1 !important;
  transform: translateY(0);
  pointer-events: auto;
}


/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wp-block-cover.is-style-hover-reveal * {
    transition: none !important;
    transform: none !important;
  }
}


/* --- Gallery masonry --- */
.wl-project-gallery {
  overflow: hidden;                 /* never create horizontal scroll */
  max-width: 100%;                    /* respect container width */
}

/* Masonry specific styles */
.wl-project-gallery--masonry {
  margin: 0 auto;
}

/* Column classes from ACF (for responsive behavior) */
@media (min-width: 768px) {
  .wl-project-gallery.columns-2 .wl-project-gallery__item { width: calc(50% - 8px); }
  .wl-project-gallery.columns-3 .wl-project-gallery__item { width: calc(33.333% - 11px); }
  .wl-project-gallery.columns-4 .wl-project-gallery__item { width: calc(25% - 12px); }
  .wl-project-gallery.columns-5 .wl-project-gallery__item { width: calc(20% - 13px); }
  .wl-project-gallery.columns-6 .wl-project-gallery__item { width: calc(16.666% - 14px); }
}

@media (max-width: 767px) {
  .wl-project-gallery .wl-project-gallery__item { width: calc(50% - 8px); }
}

@media (max-width: 640px) {
  .wl-project-gallery .wl-project-gallery__item { width: 100%; }
}

.wl-project-gallery__item { 
  margin: 0 0 16px 0;               /* bottom margin for masonry spacing */
  break-inside: avoid;              /* prevent breaking in columns */
  page-break-inside: avoid;         /* older browser support */
}
.wl-project-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;                   /* prevent overflow from big images */
  border-radius: 4px;                /* optional: rounded corners */
}
.wl-project-gallery__open {
  border: 0;
  padding: 0;
  background: transparent;
  display: block;
  width: 100%;
  cursor: zoom-in;
}
.wl-project-gallery__item figcaption {
  font-size: .875rem;
  opacity: .8;
  margin-top: .35rem;
}

/* Masonry layout transitions */
.wl-project-gallery--masonry .wl-project-gallery__item {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.wl-project-gallery--masonry .wl-project-gallery__item:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Ensure masonry container has proper positioning */
.wl-project-gallery--masonry {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}

/* Masonry item positioning */
.wl-project-gallery--masonry .wl-project-gallery__item {
  float: left;
  margin-bottom: 16px;
  cursor: pointer;
}



/* Ensure images maintain aspect ratio in masonry */
.wl-project-gallery--masonry .wl-project-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Loading state for masonry */
.wl-project-gallery--masonry.is-loading {
  opacity: 0.7;
  transition: opacity 0.3s ease-out;
}

/* Responsive masonry adjustments */
@media (max-width: 1024px) {
  .wl-project-gallery--masonry .wl-project-gallery__item {
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .wl-project-gallery--masonry .wl-project-gallery__item {
    margin-bottom: 10px;
  }
}

/* Masonry layout improvements */
.wl-project-gallery--masonry {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.wl-project-gallery--masonry.is-loaded {
  opacity: 1;
}

/* Smooth transitions for randomized layout */
.wl-project-gallery--masonry .wl-project-gallery__item {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Subtle entrance animation for randomized items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger the animation for a nice cascading effect */
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(1) { animation-delay: 0.1s; }
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(2) { animation-delay: 0.2s; }
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(3) { animation-delay: 0.3s; }
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(4) { animation-delay: 0.4s; }
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(5) { animation-delay: 0.5s; }
.wl-project-gallery--masonry.is-loaded .wl-project-gallery__item:nth-child(6) { animation-delay: 0.6s; }

/* --- Native lightbox (<dialog>) --- */
.wl-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  width: min(96vw, 1200px);
  max-width: 96vw;
  max-height: 96vh;
}

/* backdrop (supported in modern browsers) */
.wl-lightbox::backdrop { 
  background: rgba(0,0,0,.85); 
  backdrop-filter: blur(2px); /* Add subtle blur effect */
}

.wl-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 96vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  object-fit: contain; /* Ensure image fits properly in lightbox */
}

.wl-lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .wl-lightbox[open]::backdrop { animation: wlFade .3s ease-out; }
  .wl-lightbox[open] img { animation: wlZoom .3s ease-out; }
}
@keyframes wlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wlZoom { from { transform: scale(.95); opacity:.7; } to { transform: scale(1); opacity:1; } }

/* Lightbox loading state */
.wl-lightbox img {
  transition: opacity 0.2s ease-out;
}

.wl-lightbox img:not([src]) {
  opacity: 0;
}

.wl-ownerrez-embed {
  max-width: 800px;
  overflow-x: auto; /* safety if OwnerRez iframe is wide */
}


/* Base state: hidden until observed */
.is-style-fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

/* When revealed by JS */
.is-style-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Make sure nested content fades as one unit (images etc.) */
.is-style-fade-in img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .is-style-fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Only this Media & Text block */
.mt-hero .wp-block-media-text__media { 
  position: relative; 
  min-height: clamp(520px, 62vh, 820px);  /* pick your height */
}
.mt-hero .wp-block-media-text__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}


.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.gallery img {
  width: calc((90% - 40px) / 3);
  margin: 10px;
  height: auto;
  cursor: pointer;
}



.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 100% !important;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  /* Increase from 80% to 90% */
  max-width: 900px;
  /* Increase from 700px to 900px */
}

#caption {
  margin: auto;
  display: block;
  width: 90%;
  /* Increase from 80% to 90% */
  max-width: 900px;
  /* Increase from 700px to 900px */
  text-align: center;
  color: white;
  font-size: 18px;
  padding-top: 10px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover, .close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Property Metadata Block */
.wl-property-metadata {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--wp--preset--color--custom-primary, #333);
}

.wl-property-metadata__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .wl-property-metadata {
    font-size: 0.9rem;
    gap: 0.75rem;
  }
  
  .wl-property-metadata__separator {
    display: none;
  }
  
  .wl-property-metadata__item {
    padding: 0;
    justify-content: center;
  }
  
  .wl-property-metadata__item:last-child {
    border-bottom: none;
  }
}


.is-style-h100-min400 { height: 100% !important; min-height: 400px !important; }
