:root {
    --eden-oak-blue: #182651;
    --eden-oak-orange: #E3672B;
    --eden-oak-grey: #97999C;
}

/* ==================== NEW ================================================================================================================== */
/* Styles for the project filter buttons (used on the inventory
   listing page) and the fade-in-up animation applied to cards
   when a filter is clicked. */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 20px;
  margin-left: 1em;
  margin-right: 1em;
}

.project-filter {
  padding: 0.6em 1em 0.5em;
  color: #e3672b;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #e3672b;
  background: white;
  display: inline-block;
  font-size: 1em;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.project-filter.active {
  background: #e3672b;
  color: white;
  border-color: white;
}

@media screen and (max-width: 768px) {
  .project-filters {
    margin-left: 0em;
    margin-right: 0em;
  }
}

/* Fade-in-up animation for cards when the filter changes */
@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card.fade-in {
    animation: cardFadeInUp 0.45s ease forwards;
}
/* ============================================================================================================================================= */

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body main {
    flex-grow: 1;
}

.nobr {
    white-space: nowrap;
}

header.white-logo #logo img,
header.sticky #logo img {
    -webkit-filter: brightness(0) invert(1);
    filter: brightness(0) invert(1);
}

header.sticky {
    position: sticky;
    top: 0;
    background: var(--eden-oak-blue);
}

/* Inventory Page */

.inventory .hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 550px;
    position: relative;
}

@media screen and (max-width: 768px) {
    .inventory .hero {
        min-height: 45vh;
    }
}

.inventory .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--eden-oak-blue);
    opacity: 0.5;
}

.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero h1 {
    text-transform: uppercase;
    color: white;
    z-index: 1;
    text-align: center;
}

.content {
    padding: 4em 2em;
}

.content > p {
    font-size: 2em;
    text-align: center;
}

.list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    
}

.card {
    background: white;
    border-radius: 10px;
    width: calc(33.33% - 2em);
    min-width: min(350px, 100%);
    overflow: hidden;
    display: block;
    text-decoration: none;
    transition: all 0.3s;
    margin: 1em;
}

.card:hover, .card:focus {
    transform: translateY(-10px);
    box-shadow: 0 0 2em 0 rgba(151, 153, 156, 0.8);
}

.card__price {
    background-color: var(--eden-oak-blue);
    font-size: 1.2em;
    font-weight: 200;
    color: white;
    padding: 0.8em 0;
    text-align: center;
}

.card__image-container {
    position: relative;
    aspect-ratio: 4 / 3;
}

.card__image {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.card__image.contain {
    object-fit: contain;
    object-position: center;
}

.card__sold-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
}

.card__image.contain img {
    object-fit: contain;
    object-position: center;
}

.card__content {
    padding: 1em;
    font-size: 1.2em;
}

.card__address {
    font-size: 1.5em;
    font-weight: 600;
    margin: 1em 0 0.35em;
    color: var(--eden-oak-blue);
}

.card__sqft {
    color: var(--eden-oak-orange);
    font-weight: 300;
    font-size: 1em;
    margin-bottom: 0.5em;
}

.card__description {
    color: var(--eden-oak-grey);
}

/* Single Inventory Page */
main.single-inventory {
    margin: 4rem 2rem 2rem;
    position: relative;
}

.single-inventory__back {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--eden-oak-blue);
    font-size: 2em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 4em;
}

@media screen and (max-width: 1200px) {
    main.single-inventory {
        margin: 2rem;
        position: relative;
    }

    .single-inventory__back {
        margin-bottom: 5rem;
    }
}

.single-inventory__back img {
    width: 50px;
    height: auto;
}

.single-inventory__back span {
    line-height: 1;
    padding-top: 2px;
}

.single-inventory__row {
    display: flex;
}

.single-inventory__info {
    margin: 0 2rem 2rem;
    width: 30%;
}

.single-inventory__address {
    color: var(--eden-oak-blue);
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 0.3em;
}

body .single-inventory__address h1 {
    font-size: inherit;
    font-weight: inherit;
}

body .single-inventory__address h1,
.single-inventory__address p {
    line-height: 1.1;
}

.single-inventory__sqft {
    color: var(--eden-oak-orange);
    font-size: 1.5em;
    line-height: 1.5;
}

.single-inventory__card-description {
    color: var(--eden-oak-grey);
    font-size: 1.5em;
    line-height: 1.5;
}

.single-inventory__price {
    color: var(--eden-oak-orange);
    font-size: 2em;
    font-weight: 600;
    margin-top: 3rem;
}

.single-inventory__gallery {
    width: 70%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gallery {
    overflow: hidden;
    width: 100%;
}

.gallery img {
    height: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: pointer;
}

.single-inventory__gallery.contain img {
    object-fit: contain;
    object-position: center;
}

.gallery__thumbnails {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1em;
    width: 100%;
    padding: 2rem 0 !important;
}

.gallery__thumbnails .gallery__thumbnail {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery__thumbnail .overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery__thumbnail .overlay-3 {
    display: none;
}

@media screen and (max-width: 768px) {
    .single-inventory__row {
        flex-direction: column;
    }

    .single-inventory__back {
        display: none;
    }

    .single-inventory__info {
        width: 100%;
        margin: 2rem 0 2rem;
    }

    .single-inventory__gallery {
        width: 100%;
    }

    .gallery__thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery__thumbnail:nth-child(4),
    .gallery__thumbnail:nth-child(5) {
        display: none;
    }

    .gallery__thumbnail .overlay {
        font-size: 2rem;
    }

    .gallery__thumbnail .overlay-3 {
        display: flex;
    }
}

.single-inventory__description {
    background-color: var(--eden-oak-blue);
    padding: 4rem 6rem;
    color: white;
    font-size: 1.3em;
}

.single-inventory__description p:not(:last-of-type) {
    margin-bottom: 1rem;
}

@media screen and (max-width: 768px) {
    .single-inventory__description {
        background-color: var(--eden-oak-blue);
        padding: 2rem;
    }
}

.single-inventory__links {
    display: grid;
    flex-wrap: wrap;
    gap: 2rem;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 3rem 0;
}

.single-inventory__link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--eden-oak-blue);
    border: 1px solid var(--eden-oak-blue);
    padding: 1.5rem 2rem;
    text-align: center;
    font-weight: 400;
    font-size: 1.25em;
}

@media screen and (max-width: 768px) {
    .single-inventory__links {
        display: grid;
        flex-wrap: wrap;
        gap: 2rem;
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }
}

.single-inventory__map {
    height: 500px;
    margin: 3rem 0;
}

.single-inventory__map iframe {
    height: 100%;
    width: 100%;
}



/* Gallery on the single inventory page */
.single-inventory__gallery .gallery {
    overflow: hidden;
    width: 100%;
    cursor: pointer;
}

.single-inventory__gallery .gallery img {
    height: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.single-inventory__gallery .gallery:hover img {
    opacity: 0.9;
}

/* Lightbox (opened when the image is clicked) */
.custom-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 40px;
    cursor: zoom-out;
}

.custom-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}

.custom-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 10px;
}