/* eHomeinCyprus Slider Styles - v1.1.1 */

/* --- General Wrapper & Instance --- */
.ehc-gallery-wrapper {
    margin: 2em 0; /* Default margin */
    position: relative; /* Useful for absolute positioning inside if needed */
    clear: both;
}

/* --- Default Mode Styles (Main + Thumbs) --- */
.ehc-gallery-mode-default .ehc-gallery-slider {
    /* Styles for the main slider in default mode */
    /* Example: might have a max-width or specific margins */
}

.ehc-gallery-mode-default .ehc-gallery-thumbs {
    margin-top: 10px;
    padding: 0 40px; /* Add padding if using navigation buttons inside thumbs */
    box-sizing: border-box;
    position: relative; /* For potential thumb nav buttons */
}

.ehc-gallery-mode-default .ehc-gallery-thumbs .swiper-slide {
    width: 25%; /* Adjust number of visible thumbs */
    height: auto;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.ehc-gallery-mode-default .ehc-gallery-thumbs .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover; /* Crop thumbnails nicely */
    max-height: 80px; /* Example max height */
}

.ehc-gallery-mode-default .ehc-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #0056b3; /* Highlight active thumb */
}

/* Main slider image styles */
.ehc-gallery-slider .swiper-slide {
    text-align: center; /* Center images */
    display: flex; /* Helps vertical centering if needed */
    justify-content: center;
    align-items: center;
    background: #f8f8f8; /* Optional background for slides */
    /* Ensure slides adapt height */
    height: auto;
}

.ehc-gallery-slider .swiper-slide img {
    display: block;
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 60vh; /* Example: Limit max height in default view */
    object-fit: contain; /* Ensure whole image is visible */
}

/* Style the lightbox link */
.ehc-gallery-mode-default .ehc-gallery-slider .ehc-gallery-lightbox-link {
    display: block; /* Make link wrap the image */
    cursor: zoom-in;
}


/* --- Hero Mode Styles --- */
.ehc-gallery-mode-hero {
    /* Make the wrapper full-width */
    /* This often requires breaking out of the theme's content container */
    /* Method 1: Negative margins (if parent allows overflow or is body) */
     width: 100vw;
     max-width: 100vw; /* Override theme max-widths */
     margin-left: 50%;
     transform: translateX(-50%);

    /* Method 2: If your theme has a specific full-width class, you might need JS to add it to a parent */

    /* Ensure no default margins interfere */
    margin-top: 0;
    margin-bottom: 0;
}

.ehc-gallery-mode-hero .ehc-gallery-slider {
    /* Slider takes full height of its container */
}

.ehc-gallery-mode-hero .ehc-gallery-slider .swiper-slide {
    /* Slides in hero should likely fill the height */
    height: 70vh; /* Example: Make slides taller */
    background: #000; /* Dark background often looks good */
}

.ehc-gallery-mode-hero .ehc-gallery-slider .swiper-slide img {
    /* Image fills the slide container */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover ensures it fills, might crop */
    /* object-fit: contain; */ /* Use contain if you must see the whole image */
    max-height: none; /* Remove max-height from default mode */
}

/* --- Swiper Navigation/Pagination --- */
/* Adjust default Swiper nav button styles if needed */
.ehc-gallery-slider .swiper-button-next,
.ehc-gallery-slider .swiper-button-prev {
    /* color: #fff; Example: white arrows for hero */
}

.ehc-gallery-mode-hero .swiper-button-next,
.ehc-gallery-mode-hero .swiper-button-prev {
     color: #ffffff; /* White arrows on dark hero */
}

/* Style pagination if you add it */
.ehc-gallery-slider .swiper-pagination-bullet {
    background: #0056b3;
}
.ehc-gallery-slider .swiper-pagination-bullet-active {
    background: #003f8a;
}

/* --- Captions --- */
.wp-caption-text.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px;
    font-size: 0.9em;
    text-align: center;
    box-sizing: border-box;
    z-index: 10; /* Ensure it's above the image if needed */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease;
}

/* Show caption on hover of the slide or slider */
.ehc-gallery-slider:hover .wp-caption-text.gallery-caption {
     opacity: 1;
}

/* Hide captions in hero mode by default unless specifically enabled */
.ehc-gallery-mode-hero .wp-caption-text.gallery-caption {
    /* display: none; */ /* Uncomment if you never want captions in hero */
}

/* --- Fancybox Overrides (Optional) --- */
/* You can add custom styles for Fancybox here if needed */
.fancybox__caption {
    /* Example: Style the caption inside Fancybox */
    text-align: center;
}


/* Container for the background image */
.propertyimg {
  position: relative; 
  width: 100%;
  height: auto;
  max-height: 100vh; 
  background-size: cover; 
  background-position: center center; 
  background-repeat: no-repeat;
  background-color: #333;
  overflow: hidden; 
}

/* The overlay div */
.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /*background: linear-gradient(0deg,rgba(0, 33, 55, 1) 0%, rgba(0, 33, 55, 0.41) 32%, rgba(0, 33, 55, 0) 50%, rgba(0, 33, 55, 0) 100%);*/
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
}

/* Styling for the title within the overlay */
.item-overlay .single-title {
  position: relative;
  max-width: 1200px;
  z-index: 2;
  color: #ffffff; 
  margin: 0; 
  font-size: 2.3em;
  line-height: 1.0em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); 
}
.ehc-hero-zoom-trigger {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  z-index: 99;
}
.ehc-hero-zoom-trigger:hover {
  background: rgba(0, 0, 0, 0.8);
}
.swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}
/* --- Floor Plan Icon --- (Ensure this is correctly positioned) */
.ehc-hero-floorplan-trigger {
    position: absolute;
    bottom: 15px;
    /* Adjust 'right' based on zoom icon's final position and width */
    right: 75px; /* Example: 15px (edge) + 48px (zoom icon width) + 12px (gap) */
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ehc-hero-floorplan-trigger:hover {
    background: rgba(0, 0, 0, 0.8);
}
.ehc-hero-floorplan-trigger svg {
    display: block;
}

/* --- Styling for Swiper inside the Floor Plan Modal (Combined View) --- */
.ehc-floorplan-swiper-container {
    position: relative;
    margin-bottom: 25px; /* Space before HR and PDF list */
}

.ehc-floorplan-modal-swiper { /* The main Swiper container */
    width: 100%;
    height: 450px; /* Adjust as needed for your floor plan images */
    background-color: #e9e9e9; /* Light background for slides area */
    border-radius: 4px; /* Optional rounded corners */
}

.ehc-floorplan-modal-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-align: center; /* For figure/figcaption */
}

.ehc-floorplan-modal-swiper .swiper-slide figure {
    margin: 0;
    padding: 0;
    max-width: 100%;
    max-height: 100%;
}

.ehc-floorplan-modal-swiper .swiper-slide img {
    display: block;
    max-width: 100%;
    max-height: calc(450px - 30px); /* Adjust if caption takes space */
    object-fit: contain;
    margin: 0 auto; /* Center image if figure is wider */
}

.ehc-floorplan-modal-swiper .ehc-swiper-fp-caption {
    font-size: 0.9em;
    color: #555;
    padding-top: 5px;
    text-align: center;
    min-height: 20px; /* Ensure space even if caption is empty */
}


/* Swiper Navigation Buttons for Modal Swiper */
.ehc-floorplan-modal-swiper .ehc-fp-swiper-next,
.ehc-floorplan-modal-swiper .ehc-fp-swiper-prev {
    color: #0073aa; /* WordPress blue or your theme color */
    width: 30px; /* Adjust size */
    height: 30px;
    margin-top: -15px; /* Half of height */
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent background */
    border-radius: 50%;
}
.ehc-floorplan-modal-swiper .ehc-fp-swiper-next::after,
.ehc-floorplan-modal-swiper .ehc-fp-swiper-prev::after {
    font-size: 16px; /* Adjust arrow size */
    font-weight: bold;
}

.ehc-floorplan-modal-swiper .ehc-fp-swiper-next { right: 5px; }
.ehc-floorplan-modal-swiper .ehc-fp-swiper-prev { left: 5px; }

/* Swiper Pagination for Modal Swiper */
.ehc-floorplan-swiper-container .ehc-fp-swiper-pagination {
    position: relative; /* Or static if you want it below the swiper div */
    bottom: auto; /* Reset if it was absolute */
    margin-top: 10px;
}
.ehc-floorplan-modal-swiper .ehc-fp-swiper-pagination .swiper-pagination-bullet {
    background: #0073aa;
    opacity: 0.5;
}
.ehc-floorplan-modal-swiper .ehc-fp-swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

/* PDF Link List Styling (if not already sufficiently styled) */
.ehc-pdf-plans-list {
    /* ... styles from previous response ... */
}
.ehc-pdf-plans-list li a {
    /* ... styles from previous response ... */
}


/* Overall Fancybox modal for floor plans */
.ehc-floor-plans-fancybox-container .fancybox__content {
    /* color: #333; */ /* Set text color if needed */
}
.ehc-floor-plans-fancybox-container.ehc-floor-plans-combined-view .fancybox__content {
    max-width: 800px; /* Example: allow combined view to be wider */
    width: 90%;
}
.ehc-floor-plans-modal-content {
    padding: 20px;
    color: #333;
    max-height: 85vh;
    overflow-y: auto;
}
.ehc-floor-plans-modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px; /* Reduced margin */
    font-size: 1.4em;
    color: #222;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}
.ehc-floor-plans-modal-content hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #e0e0e0;
}
@media only screen and (max-width: 780px){
    
    .item-overlay {
       width: 100%;
    }
    .item-overlay .single-title {
        font-size: 1.3em;
    }
}