/* ============================================================
   Arpin & Giacalone — Custom Styles (realestate.css)
   ============================================================ */

/* ---- Global typography (Benton body; template --font-2 = Mercury for headings) ---- */
html {
    font-family: var(--font-body, "Benton Sans", sans-serif);
}
body {
    font-family: inherit;
}

/* ---- Hero Video ---- */
.hero__slide:first-child .hero__entry-image--video {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100% !important;
    height: 100%;
    background: #000;
}
.hero__entry-image--video .hero__video-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
}
/* YouTube IFrame API injects iframe inside #realestateHeroYT */
.hero__entry-image--video .hero__video-wrapper #realestateHeroYT {
    position: absolute;
    top: 50%; left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 */
    min-height: 100%;
    min-width: 177.78vh; /* 16:9 */
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}
.hero__entry-image--video .hero__video-wrapper #realestateHeroYT iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    pointer-events: none;
}
/* HD still frame covers YouTube’s blurry startup; fades off once playback is going */
.hero__entry-image--video .hero__video-poster {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.85s ease;
}
.hero__entry-image--video .hero__video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero__entry-image--video .hero__video-poster.hero__video-poster--hidden {
    opacity: 0;
}
.hero__entry-image--video .hero__video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;
    pointer-events: none;
    /* Stronger dim on bright / off-white video frames */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.42) 45%,
        rgba(0, 0, 0, 0.55) 100%
    );
}
.hero__slide:first-child::before { display: none; }

/* ---- Hero Overlay Text ---- */
.hero__overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
    color: #fff !important;
    z-index: 5;
    box-sizing: border-box;
    max-width: min(96vw, 52rem);
}
.hero__overlay-text p {
    color: #fff !important;
}
.hero__name-text {
    margin: 0;
    font-family: var(--font-display, "Premier Display", "Mercury Display", Georgia, serif);
    font-size: 4.5rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.15;
    color: #fff;
    text-shadow:
        0 0.02em 0.06em rgba(0, 0, 0, 0.9),
        0 0.08em 0.25em rgba(0, 0, 0, 0.85),
        0 0 1.5rem rgba(0, 0, 0, 0.55);
}
.hero__ampersand-text {
    margin: 0.2em 0;
    font-family: var(--font-display, "Premier Display", "Mercury Display", Georgia, serif);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    text-shadow:
        0 0.02em 0.06em rgba(0, 0, 0, 0.9),
        0 0.06em 0.2em rgba(0, 0, 0, 0.8);
}
.hero__divider {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.75);
    margin: 1.8rem auto;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

/* ---- Hero Search Link ---- */
.hero__search-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    padding-bottom: 0.5em;
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.96) !important;
    cursor: pointer;
    text-shadow:
        0 0.05em 0.12em rgba(0, 0, 0, 0.85),
        0 0 0.75rem rgba(0, 0, 0, 0.5);
}
.hero__search-link::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.85);
}
.hero__search-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #000;
    transition: width 0.3s ease;
}
.hero__search-link:hover::after {
    width: 100%;
}

/* ---- Header Logo ---- */
.s-header__branding .site-title img {
    max-height: 64px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ---- Header Search Icon ---- */
.s-header__search-trigger { display: none !important; }

/* ---- Hero Content Sizes ---- */
.hero {
    --entry-title-size: 6.25rem;
    --text-multiplier: 1;
}
.hero__entry-title {
    font-size: calc(var(--entry-title-size) * var(--text-multiplier)) !important;
    line-height: 1.2;
}
.hero__entry-desc  { font-size: 1.45rem !important; line-height: 1.5; }
.hero__entry-meta .cat-links a { font-size: 1.15rem !important; }
.hero__more-link   { font-size: 1.25rem !important; }

/* ---- Hero Scroll Down ---- */
.hero__scroll-down {
    color: #fff;
    text-shadow: 0 0.08em 0.2em rgba(0, 0, 0, 0.85), 0 0 0.5rem rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.hero__scroll-down svg path { stroke: #fff; }

/* ---- Hero Pagination ---- */
.hero__slider .swiper-pagination { color: #fff; right: 4rem; left: auto; }
.hero__slider .swiper-pagination .swiper-pagination-bullet { color: #fff; background: transparent; }
.hero__slider .swiper-pagination .swiper-pagination-bullet-active { color: #fff; background: transparent; }
.hero__slider .swiper-pagination .swiper-pagination-bullet-active::after { background-color: #fff; right: -4rem; left: auto; }

/* ---- Agent Image Cards (realestate landing — uniform frames, cover crop, no letterboxing) ---- */
body.page-realestate .img-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem 2rem;
    width: 90%;
    max-width: 1320px;
    margin: 4rem auto;
    align-items: stretch;
}
body.page-realestate .img-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media screen and (max-width: 1100px) {
    body.page-realestate .img-card-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 88%;
    }
}
@media screen and (max-width: 768px) {
    body.page-realestate .img-card-grid {
        grid-template-columns: 1fr;
        width: 90%;
    }
}
body.page-realestate .img-card__image-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 4 / 5;
    text-decoration: none;
    background: #fff;
}
body.page-realestate .img-card__image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
    transition: transform 0.5s ease;
}
body.page-realestate .img-card__image-wrap:hover img { transform: scale(1.02); }

body.page-realestate .img-card__image-wrap .img-card__border-t,
body.page-realestate .img-card__image-wrap .img-card__border-b,
body.page-realestate .img-card__image-wrap .img-card__border-l,
body.page-realestate .img-card__image-wrap .img-card__border-r {
    position: absolute;
    background: #fff;
    z-index: 2;
    transition: transform 0.4s ease;
}
body.page-realestate .img-card__border-t { top: 14px; left: 14px; right: 14px; height: 2px; transform: scaleX(0); transform-origin: left; }
body.page-realestate .img-card__border-b { bottom: 14px; left: 14px; right: 14px; height: 2px; transform: scaleX(0); transform-origin: right; }
body.page-realestate .img-card__border-l { top: 14px; bottom: 14px; left: 14px; width: 2px; transform: scaleY(0); transform-origin: bottom; }
body.page-realestate .img-card__border-r { top: 14px; bottom: 14px; right: 14px; width: 2px; transform: scaleY(0); transform-origin: top; }

body.page-realestate .img-card__image-wrap:hover .img-card__border-t,
body.page-realestate .img-card__image-wrap:hover .img-card__border-b { transform: scaleX(1); }
body.page-realestate .img-card__image-wrap:hover .img-card__border-l,
body.page-realestate .img-card__image-wrap:hover .img-card__border-r { transform: scaleY(1); }

body.page-realestate .img-card__btn {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    background: #fff;
    color: #111;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.65em 1.6em;
    border: none;
    cursor: pointer;
    text-decoration: none;
    z-index: 3;
    transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s;
    white-space: nowrap;
}
body.page-realestate .img-card__image-wrap:hover .img-card__btn { opacity: 1; transform: translateX(-50%) translateY(0); }

body.page-realestate .img-card__desc { margin-top: 1.25rem; }
body.page-realestate .img-card__desc h3 {
    font-family: var(--font-serif, "Mercury Display", Georgia, serif);
    font-size: 1.7rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.4rem;
}
body.page-realestate .img-card__desc p  { font-size: 1.4rem; line-height: 1.7; color: #666; margin: 0; }

/* ---- Significant Sales (desktop spacing fixes) ---- */
body.page-realestate .featured-sale {
    width: 80% !important;
    max-width: 1200px;
    margin: 8rem auto 5rem !important;
    gap: 5.5rem !important;
    align-items: flex-start !important;
}
body.page-realestate .featured-sale > div {
    min-width: 0;
}
body.page-realestate .featured-sale > div:first-child {
    padding-right: 0.75rem;
}
body.page-realestate .featured-sale > div:last-child {
    padding-left: 0.75rem;
}

/* ---- Neighborhoods Grid ---- */
.neighborhoods-section { width: 80%; margin: 5rem auto; }
.neighborhoods-section__header { margin-bottom: 3rem; }
.neighborhoods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.neighborhood-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 420px;
    display: block;
    text-decoration: none;
}
.neighborhood-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.neighborhood-card:hover img { transform: scale(1.1); }
.neighborhood-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}
.neighborhood-card__name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.25rem 1.5rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.35s ease;
}
.neighborhood-card:hover .neighborhood-card__name { transform: translateY(-10px); }
.neighborhood-card__btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    background: #fff;
    color: #111;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.6em 1.4em;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
    z-index: 2;
}
.neighborhood-card:hover .neighborhood-card__btn { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Testimonials ---- */
.testimonials-section { width: 80%; margin: 5rem auto; text-align: center; }
.testimonials-slider-wrap { position: relative; overflow: hidden; margin-top: 3rem; }
.testimonials-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.testimonial-slide { min-width: 100%; box-sizing: border-box; padding: 0 6rem; }
.testimonial-slide blockquote { margin: 0; padding: 0; }
.testimonial-slide__quote {
    font-size: 1.75rem;
    line-height: 1.85;
    color: #444;
    font-style: italic;
    margin-bottom: 2rem;
}
.testimonial-slide__quote::before {
    content: '\201C';
    font-size: 4rem;
    line-height: 0;
    vertical-align: -1.4rem;
    color: #ccc;
    margin-right: 0.2em;
    font-style: normal;
}
.testimonial-slide__author { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #111; }
.testimonial-slide__location { font-size: 1.1rem; color: #999; margin-top: 0.25rem; letter-spacing: 0.08em; text-transform: uppercase; }
.testimonials-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 3rem; }
.testimonials-arrow {
    width: 48px;
    height: 48px;
    border: 2px solid #111;
    background: transparent;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, color 0.25s ease;
    flex-shrink: 0;
    font-size: 1.8rem;
    line-height: 1;
    padding-bottom: 2px;
}
.testimonials-arrow:hover { background: #111; color: #fff; }
.testimonials-dots { display: flex; gap: 0.5rem; }
.testimonials-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease;
}
.testimonials-dot.active { background: #111; }

/* ---- Responsive ---- */
@media screen and (min-width: 1201px) {
    .s-header__navigation .s-header__nav,
    .s-header__navigation .s-header__nav-wrap {
        display: flex;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    .s-header__navigation .s-header__nav a { color: #fff !important; font-size: 1.75rem; }
    .s-header__navigation .s-header__nav li { padding: 0 1.45rem; }
    .s-header__navigation .s-header__nav a:hover { color: rgba(255,255,255,0.85) !important; }
    .s-header__navigation .s-header__nav li.has-children > a::after { border-bottom-color: #fff; border-right-color: #fff; }
    .s-header__navigation .s-header__nav .current-menu-item > a { border-bottom-color: #fff; }
}

/* Medium-wide viewports: keep full label set on one row without clipping */
@media screen and (min-width: 1201px) and (max-width: 1680px) {
    .s-header__navigation .s-header__nav li { padding: 0 0.9rem; }
    .s-header__navigation .s-header__nav a { font-size: 1.62rem !important; }
}

@media screen and (max-width: 1200px) {
    .s-header__menu-toggle { color: #fff; }
    .s-header__menu-toggle span,
    .s-header__menu-toggle span::before,
    .s-header__menu-toggle span::after { background-color: #fff !important; }
    .s-header__menu-toggle.is-clicked span::before,
    .s-header__menu-toggle.is-clicked span::after { background-color: #111 !important; }
    .s-header__search-trigger { display: none !important; }
    .s-header__nav-wrap .s-header__nav { display: block !important; padding: 0 8vw 2rem; }
    .s-header__nav-wrap .s-header__nav > li { display: block !important; padding: 0.8rem 0; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .s-header__nav-wrap .s-header__nav > li:last-child { border-bottom: none; }
    .s-header__nav-wrap .s-header__nav > li > a { color: #111 !important; font-size: 1.5rem; display: block; padding: 0.4rem 0 0.4rem 2.4rem; }
    .s-header__nav-wrap .s-header__nav .sub-menu li a { color: #333 !important; }
    .s-header__nav-wrap .s-header__nav > li > a[href^="tel:"],
    .s-header__nav-wrap .s-header__nav > li:last-child > a { font-size: 1.4rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
}

@media screen and (max-width: 900px) {
    .neighborhoods-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 768px) {
    .hero__entry-title { font-size: 3rem !important; }
    .hero__overlay-text {
        white-space: normal;
        width: 90vw;
        max-width: 92vw;
    }
    .hero__name-text { font-size: 2.2rem; letter-spacing: 0.08em; }
    .hero__ampersand-text { font-size: 0.8rem; letter-spacing: 0.35em; }
    .testimonial-slide { padding: 0 2rem; }

    /* Logo: shrink on mobile so it doesn't cover the hamburger */
    .s-header__branding .site-title img {
        max-height: 36px;
    }

    /* $62M sale: stack vertically on mobile */
    .featured-sale {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    .featured-sale > div {
        flex: unset !important;
        width: 100% !important;
    }
    .featured-sale img {
        height: 260px !important;
    }
    /* Move button below image on mobile */
    .featured-sale__btn-desktop { display: none !important; }
    .featured-sale__btn-mobile { display: inline-block !important; }
}

@media screen and (max-width: 480px) {
    .hero__entry-title { font-size: 2.25rem !important; }
    .hero__name-text { font-size: 1.6rem; letter-spacing: 0.05em; }
    .hero__search-link { font-size: 0.8rem; letter-spacing: 0.18em; }
}

@media screen and (max-width: 600px) {
    .neighborhoods-grid { grid-template-columns: 1fr; }
}

/* ---- Private Market Evaluation Modal ---- */
.pme-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.pme-modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}
.pme-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.pme-modal__box {
    position: relative;
    background: #fff;
    max-width: 460px;
    width: 90%;
    padding: 2.8rem 2.4rem;
    box-sizing: border-box;
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}
.pme-modal[aria-hidden="false"] .pme-modal__box {
    transform: translateY(0);
}
.pme-modal__close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.pme-modal__close:hover { color: #111; }
.pme-modal__eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.5rem;
}
.pme-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 0.8rem;
}
.pme-modal__bar {
    width: 40px;
    height: 3px;
    background: #111;
    margin: 0 auto 1.2rem;
}
.pme-modal__body {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.6rem;
}
.pme-modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
}
.pme-modal__form input {
    width: 100%;
    padding: 0.75em 1em;
    border: 1px solid #ddd;
    font-size: 1rem;
    color: #111;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease;
}
.pme-modal__form input:focus { border-color: #111; }
.pme-modal__submit {
    margin-top: 0.4rem;
    background: #111;
    color: #fff;
    border: none;
    padding: 0.9em 2em;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
    width: 100%;
    text-align: center;
}
.pme-modal__submit:hover { background: #333; }
.pme-modal__thanks {
    text-align: center;
    font-size: 1rem;
    color: #111;
    font-weight: 600;
    padding: 1rem 0;
}
@media screen and (max-width: 600px) {
    .pme-modal__box { padding: 2rem 1.4rem; }
    .pme-modal__title { font-size: 1.3rem; }
}

/* ---- Page hero titles (Insights, Sold, articles): Mercury Display ---- */
.blog-hero__title,
.sold-hero__title,
.post-hero__title {
    font-family: var(--font-serif, "Mercury Display", Georgia, serif);
}
