/*
 Theme Name:     Grow My Business Divi Child
 Theme URI:      https://www.growmybusiness.co.nz
 Description:    Divi Child Theme for Grow My Business
 Author:         Ben Elwood
 Author URI:     https://www.growmybusiness.co.nz
 Template:       Divi
 Version:        1.0.0
*/
 
 
/* Theme customization starts here
------------------------------------------------------- */

body.et-fb .splide {
    visibility: visible;
}

.carousel-thumbnails {
	padding-top: 12px;
}

/* Splide Navigation */
.splide__track--nav > .splide__list > .splide__slide {
	opacity: 0.7;
	transition: opacity 200ms ease-in-out;
}

.splide__track--nav > .splide__list > .splide__slide.is-active {
	opacity: 1;
	border: 2px solid rgba(33, 33, 33, 0.3);
	transform: none;
}

.content-block.image-carousel .carousel .carousel-main .splide__track,
.splide__track--nav > .splide__list > .splide__slide {
	border: 2px solid rgba(33, 33, 33, 0.1);
	border-radius: 2px;
}

.splide__track--nav > .splide__list > .splide__slide img {
	height: 100%;
	width: 100%;
	object-fit: cover;
}

.splide__arrows {
    position: absolute;
    top: calc(100% + 30px);
    
    display: flex;
    grid-gap: 12px;
}

.splide__arrow {
    position: static;
    background: transparent;
    opacity: 1;

    width: 40px;
    height: 40px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1000px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 200ms ease-in-out;
}

.splide__arrow:hover {
    background-color: #00adef;
}

.splide__arrow svg {
    fill: #fff;
}

.splide__arrow:hover {
    opacity: 0.7;
}

/* Listings */
.listings-container {
    container-type: inline-size;
}

.listings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 40px;
}

@container (min-width: 1250px) {
    .listings {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.listing {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 2px solid rgba(33, 33, 33, 0.2);
    border-radius: 4px;
    color: #212121;
    height: 100%;
    position: relative;
    transition: opacity 200ms ease-in-out;
}

.listing:hover {
    opacity: 0.7;
}

.listing.is-slide {
/*     max-width: 500px; */
}

.listing .listing-card-content {
    flex: 1;
    padding: 30px;
}

.listing h3 {
    font-size: 24px;
    line-height: 1.4em;
}

.listing p {
    font-size: 16px;
    line-height: 1.8em;
}

.listing .featured-image {
    max-height: 280px;
    overflow: hidden;
    border-bottom: 2px solid rgba(33, 33, 33, 0.2);
    background: #fff;
}

.listing .featured-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.details {
    background: #EEEEEE;
    padding: 8px 12px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-top: 2px solid rgba(33, 33, 33, 0.2);
    font-size: 16px;
}

.details.standalone {
    background: transparent;
    border: 1px solid rgba(33, 33, 33, 0.1);
    width: fit-content;
    white-space: nowrap;
    grid-gap: 24px;
}

.details.standalone .separator {
    background: rgba(33, 33, 33, 0.1);
}

/* .details.standalone .detail {
    filter: invert(1);
} */

.details > div:not(.separator) {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details .detail {
    position: relative;
    padding: 4px 0 0 26px;
}

.details .detail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain !important;
}

.details .bedrooms::before {
    background-image: url('/wp-content/uploads/2023/11/bed-david-ding.svg');
}

.details .bathrooms::before {
    background: url('/wp-content/uploads/2023/11/bath-1-david-ding.svg');
}

.details .parking::before {
    background: url('/wp-content/uploads/2023/11/car-sideview-david-ding.svg');
}

.details .car-ports::before {
    background: url('/wp-content/uploads/2023/11/car-port.svg');
}

.details .garages::before {
    background: url('/wp-content/uploads/2023/11/garages.svg');
}

.details .lounges::before {
	width: 22px;
	height: 22px;
    background: url('/wp-content/uploads/2023/11/couch.svg');
}


.details .separator {
    width: 1px;
    background: rgba(33, 33, 33, 0.2);
}

.sold-badge::before {
    content: "SOLD";
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 38px;
    font-weight: 700;
    line-height: 1em;
    padding: 10px 16px 3px 16px;
    border-radius: 2px;
    background: #00aeef;
}

body #page-container .mobile-menu-btn {
    display: none;
    background: #00aeef;
    text-align: center;
    color: #fff;
    padding-top: 2px;
}

body #page-container .mobile-menu-btn a {
    color: #fff !important;
    font-size: 17px !important;
}

@media screen and (max-width: 980px) {
    body #page-container .mobile-menu-btn {
        display: block;
    }

    .listings {
        grid-template-columns: 1fr;
        grid-gap: 30px;
    }
}

@media screen and (max-width: 600px) {
    .listing {
        max-width: 85vw;
    }
    
    .listing .listing-card-content {
        padding: 20px;
    }
    
    .listing h3 {
        font-size: 20px;
    }
    
    .listing p {
        font-size: 15px;
    }
    
    .details {
        font-size: 14px;
    }
    
    .details .detail::before {
        width: 17px;
        height: 17px;
    }
    
    .details .detail {
        padding: 4px 0 0 22px;
    }

    .details.standalone {
        width: 100%;
        grid-gap: 12px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .details .separator {
        display: none;
    }
}

/* BK P Spotlight Code */
/* Spotlight Overlay */
#spotlight_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 26, 38, 0.75);
    z-index: 999;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

#spotlight_overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Spotlight Container */
#spotlight_container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: auto;
	max-width: 90vw;
    max-height: 80vh;
    z-index: 999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

#spotlight_container.active {
    opacity: 1;
    pointer-events: auto;
}

#spotlight_container .spotlight_wrapper {
    display: none;
}

#spotlight_container .spotlight_wrapper.active {
    display: block;
}

.title-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 999;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.title-overlay::before {
    content: '';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 300px;
    height: 150px;
    z-index: -1;
    background: linear-gradient(205deg, #071a26, transparent 50%);
}