/* =========================================================
   ELAINE DING PROPERTY
   PAGE 03 — SECTION 08
   RELATED PROPERTIES
========================================================= */

.ed-related-properties,
.ed-related-properties * {
    box-sizing: border-box;
}

.ed-related-properties {
    --ed-white: #ffffff;
    --ed-bg: #faf8f5;
    --ed-dark: #1c1c1c;
    --ed-text: #625e58;
    --ed-muted: #958d83;
    --ed-line: #ddd6cc;
    --ed-accent: #957d62;

    width: 100%;

    padding: 110px 0;

    background: #ffffff;

    color: var(--ed-dark);

    font-family: "Manrope", sans-serif;
}


/* =========================================================
   CONTAINER
========================================================= */

.ed-related-properties__container {
    width: min(1580px, calc(100% - 90px));

    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.ed-related-properties__header {
    display: grid;

    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(300px, .5fr);

    gap: 80px;

    align-items: end;

    margin-bottom: 50px;
}

.ed-related-properties__eyebrow {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 20px;

    color: #81796f;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .15em;

    text-transform: uppercase;
}

.ed-related-properties__eyebrow span {
    color: var(--ed-dark);
}

.ed-related-properties__eyebrow i {
    width: 45px;
    height: 1px;

    background: #aaa095;
}

.ed-related-properties__header h2 {
    margin: 0;

    font-family: "DM Serif Display", serif;

    font-size: clamp(56px, 5vw, 86px);

    line-height: .96;

    font-weight: 400;

    letter-spacing: -.045em;
}

.ed-related-properties__header h2 em {
    display: block;

    color: var(--ed-accent);

    font-weight: 400;
}

.ed-related-properties__intro p {
    margin: 0;

    color: var(--ed-text);

    font-size: 13px;

    line-height: 1.8;
}

.ed-related-properties__intro > a {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    margin-top: 22px;

    padding-bottom: 5px;

    color: var(--ed-dark);

    border-bottom: 1px solid #aaa095;

    text-decoration: none;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;
}


/* =========================================================
   GRID
========================================================= */

.ed-related-properties__grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}


/* =========================================================
   CARD
========================================================= */

.ed-related-properties__card {
    min-width: 0;

    border: 1px solid var(--ed-line);

    background: var(--ed-white);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.ed-related-properties__card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 24px 55px rgba(58,49,40,.08);
}


/* =========================================================
   MEDIA
========================================================= */

.ed-related-properties__media {
    position: relative;

    height: 330px;

    overflow: hidden;

    background: #ddd;
}

.ed-related-properties__media > a {
    display: block;

    width: 100%;
    height: 100%;
}

.ed-related-properties__media img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .65s ease;
}

.ed-related-properties__card:hover
.ed-related-properties__media img {
    transform: scale(1.035);
}


/* =========================================================
   BADGES
========================================================= */

.ed-related-properties__badges {
    position: absolute;

    z-index: 3;

    top: 16px;
    left: 16px;

    display: flex;

    gap: 7px;
}

.ed-related-properties__badge {
    padding: 8px 11px;

    background: rgba(255,255,255,.94);

    color: var(--ed-dark);

    font-size: 7px;

    font-weight: 800;

    letter-spacing: .1em;

    text-transform: uppercase;
}

.ed-related-properties__badge--dark {
    background: var(--ed-dark);

    color: #ffffff;
}


/* =========================================================
   VIDEO BUTTON
========================================================= */

.ed-related-properties__video {
    position: absolute;

    z-index: 4;

    right: 16px;
    bottom: 16px;

    width: 44px;
    height: 44px;

    border: 0;

    border-radius: 50%;

    background: rgba(255,255,255,.96);

    color: var(--ed-dark);

    cursor: pointer;

    display: grid;

    place-items: center;

    box-shadow:
        0 10px 25px rgba(0,0,0,.15);

    transition: transform .25s ease;
}

.ed-related-properties__video:hover {
    transform: scale(1.07);
}

.ed-related-properties__video span {
    margin-left: 2px;

    font-size: 9px;
}


/* =========================================================
   BODY
========================================================= */

.ed-related-properties__body {
    padding: 24px 22px;
}

.ed-related-properties__location {
    display: block;

    margin-bottom: 10px;

    color: var(--ed-muted);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: .11em;

    text-transform: uppercase;
}

.ed-related-properties__body h3 {
    min-height: 59px;

    margin: 0;

    font-family: "DM Serif Display", serif;

    font-size: 28px;

    line-height: 1.06;

    font-weight: 400;
}

.ed-related-properties__body h3 a {
    color: var(--ed-dark);

    text-decoration: none;
}

.ed-related-properties__price {
    margin-top: 17px;

    font-size: 18px;

    font-weight: 800;
}


/* =========================================================
   SPECS
========================================================= */

.ed-related-properties__specs {
    margin-top: 22px;

    padding: 17px 0;

    border-top: 1px solid var(--ed-line);
    border-bottom: 1px solid var(--ed-line);

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 11px;
}

.ed-related-properties__specs span {
    color: var(--ed-text);

    font-size: 8px;

    font-weight: 700;
}

.ed-related-properties__specs i {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: #a79d91;
}


/* =========================================================
   FOOTER
========================================================= */

.ed-related-properties__footer {
    margin-top: 21px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;
}

.ed-related-properties__view {
    min-height: 43px;

    padding: 0 16px;

    display: inline-flex;

    align-items: center;

    gap: 11px;

    background: var(--ed-dark);

    color: #ffffff;

    text-decoration: none;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.ed-related-properties__footer > a:last-child {
    color: var(--ed-dark);

    text-decoration: none;

    padding-bottom: 4px;

    border-bottom: 1px solid #aaa095;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: .06em;

    text-transform: uppercase;
}


/* =========================================================
   VIDEO MODAL
========================================================= */

body.ed-related-video-open {
    overflow: hidden;
}

.ed-related-video-modal {
    position: fixed;

    z-index: 999999;

    inset: 0;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.ed-related-video-modal.active {
    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}

.ed-related-video-modal__backdrop {
    position: absolute;

    inset: 0;

    background: rgba(10,10,10,.9);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ed-related-video-modal__dialog {
    position: absolute;

    top: 50%;
    left: 50%;

    width: min(1180px, calc(100% - 60px));

    transform:
        translate(-50%, -47%)
        scale(.97);

    transition: transform .3s ease;
}

.ed-related-video-modal.active
.ed-related-video-modal__dialog {
    transform:
        translate(-50%, -50%)
        scale(1);
}

.ed-related-video-modal__player {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    background: #000;
}

.ed-related-video-modal__player iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}

.ed-related-video-modal__close {
    position: absolute;

    z-index: 5;

    top: -52px;
    right: 0;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(255,255,255,.35);

    background: transparent;

    color: #ffffff;

    cursor: pointer;

    font-size: 27px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .ed-related-properties__container {
        width: min(100% - 50px, 1100px);
    }

    .ed-related-properties__grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    .ed-related-properties {
        padding: 80px 0;
    }

    .ed-related-properties__container {
        width: calc(100% - 36px);
    }

    .ed-related-properties__header {
        display: block;
    }

    .ed-related-properties__intro {
        margin-top: 25px;
    }

    .ed-related-properties__grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 520px) {

    .ed-related-properties__header h2 {
        font-size: clamp(48px, 14vw, 64px);
    }

    .ed-related-properties__media {
        height: 290px;
    }

    .ed-related-properties__body h3 {
        min-height: auto;
    }

    .ed-related-properties__footer {
        align-items: flex-start;

        flex-direction: column;
    }

    .ed-related-properties__view {
        width: 100%;

        justify-content: space-between;
    }

    .ed-related-video-modal__dialog {
        width: calc(100% - 24px);
    }

}