/*
 * site.css — .NET port additions on top of legacy style.css + overrides.css.
 * Lives after overrides.css in _Layout.cshtml so it can fine-tune body
 * typography and page-shell structure without modifying the legacy CSS.
 *
 * Why this file exists: the legacy core_www site inline-styled most body
 * paragraphs as `style="text-align:left;font-size:10pt"` and wrapped its
 * page bodies in `<div class="pagebody headerOffset">` to give content a
 * white "card" with a drop shadow. Recreating those defaults here means
 * Razor pages can just emit clean <p>/<ul>/<h3> without per-element style
 * attributes and still match the legacy look.
 */

/* ---------- Page-shell defaults ----------------------------------------- */

/* Mirror frame.cfm's body wrapper: white card, drop shadow, header offset,
   and a comfortable inner padding for narrative content sections. */
.pagebody {
    min-height: 400px;
    background: white;
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

.pagebody > .container {
    padding-top: 30px;
    padding-bottom: 32px;
}

/* Sections that come BEFORE .pagebody (hero video, bigMessage) sit flush
   against the fixed header — kill the spacer div in the old layout. */
.pagebody-spacer {
    height: 0;
}

/* ---------- Body text — match legacy 10pt content paragraphs ------------ */

/* The legacy site set body font-size to 15px globally, then inline-styled
   each content-page paragraph as 10pt (~13.3px) with text-align:left.
   Recreate that automatically for any <p>/<li> living inside a content
   section, while leaving form labels / button text untouched. */
.pagebody section p,
.pagebody section li,
.pagebody > .container > p,
.pagebody > .container > ul li,
.pagebody > .container > ol li {
    text-align: left;
    font-size: 10pt;
    line-height: 1.6;
}

/* Headings inside content sections follow the legacy palette (#4a4786 h3
   underline, semi-bold h4). style.css already covers this, but enforce the
   bottom margin so adjacent paragraphs breathe. */
.pagebody h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.pagebody h4 {
    margin-top: 18px;
    margin-bottom: 10px;
}

/* ---------- bigMessage hero banner -------------------------------------- */

/* Ported verbatim out of frame.cfm's inline <style> block so every page
   gets the same blurry-BG slogan band below the header. */
.bigMessage {
    padding: 0;
    background: url('/images/blurryBG1.jpg');
    background-size: 100% 100%;
    border-bottom: 5px solid #DD0000;
}
.bigMessage .innerBG {
    padding: 20px 0;
    transition: padding 0.5s, transform 0.5s;
}
.bigMessage.bigger .innerBG {
    padding: 35px 0;
}
.bigMessage .innerBG h1 {
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    margin: 0;
    transition: font-size 0.5s, transform 0.5s;
}
.bigMessage.bigger .innerBG h1 {
    font-size: 30px;
}

@media screen and (max-width: 480px) {
    .bigMessage.bigger .innerBG h1 {
        font-size: 24px;
    }
}

/* ---------- Seller promo banner (sits below bigMessage) ----------------- */

/* Ported from frame.cfm's `<a href="/sellersignup.cfm"><img …banner1.jpg>`.
   1920×416 source image — let it fill the viewport width and scale down. */
.sellerBanner {
    display: block;
    line-height: 0;
}
.sellerBanner a {
    display: block;
}
.sellerBanner img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* ---------- Video container (home + seller pages) ----------------------- */

/* Used by the YouTube iframe slot on seller-signup; replicates
   .sellerSignUpVideo from legacy overrides.css with a 16:9 aspect ratio. */
.sellerSignUpVideo {
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: black;
    border: 1px solid black;
}
.sellerSignUpVideo iframe,
.sellerSignUpVideo object,
.sellerSignUpVideo embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* The legacy home-page responsive 2-col table (.responsiveTBL) collapses
   to stacked blocks under 767px — overrides.css already handles that. We
   just need a small width-100 reset for the video so it tracks its column. */
.mainVideo,
.sellerVideo {
    width: 100%;
    display: block;
}

/* ---------- Footer Flip Wars promo block -------------------------------- */

/* Ported from frame.cfm's footerVideo section — a 16:9 responsive
   YouTube embed below the About/Contact row inside the existing <footer>
   container. */
.footerVideoRow {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footerVideoTitle {
    color: white;
    font-weight: 600;
    margin: 0 0 14px 0;
    line-height: 1.4;
}
.footerVideoTitle .btn {
    margin-left: 10px;
    vertical-align: baseline;
}
/* `aspect-ratio` over the classic padding-bottom hack: padding-% is sized
   from the CONTAINING block's width, but .footerVideo has its own
   max-width:720px while it sits in a col-sm-12 (~1140px wide). The %
   padding therefore computed off 1140 → a 720×641 box for a 16:9 source,
   cropping the YouTube player vertically. aspect-ratio:16/9 sizes the
   element itself, no parent-width coupling, no crop. Supported in every
   evergreen browser since 2021. */
.footerVideo {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 720px;
    overflow: hidden;
    margin: 0 0 18px 0;
    background: black;
    border-radius: 4px;
}
.footerVideo iframe,
.footerVideo object,
.footerVideo embed {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------- Property cards (home featured + search results) ------------- */

/* Bootstrap 3 columns are floats, which lets each card take its natural
   height and leaves "stair-step" gaps when titles wrap differently. We
   override .row on the property grids to become a flex container so every
   card column stretches to the tallest card in its row, then make the
   inner card a flex column whose lower body grows to fill the remaining
   space. Net effect: a tidy grid where prices and meta lines align
   across the row regardless of how long the headline or address is. */
.propertyGrid {
    display: flex;
    flex-wrap: wrap;
}
.propertyGrid > [class*="col-"] {
    display: flex;
    margin-bottom: 20px;
}

.propertyCard {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.propertyCard:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Image: fixed aspect ratio so every photo slot is the same height. */
.propertyCard .propertyCardImage {
    display: block;
    position: relative;
    overflow: hidden;
}
.propertyCard .propertyCardImage img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Status pill (top-left) + photo count badge (bottom-right; .photoCount
   comes from style.css). */
.propertyCard .propertyCardStatus {
    position: absolute;
    left: 6px;
    top: 6px;
    background: rgba(89, 204, 255, 0.92);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Body: flex column so the price+meta row can be pinned to the bottom via
   margin-top:auto on the meta block. Padding mirrors the legacy propCell. */
.propertyCard .propertyCardBody {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 12px 14px 14px;
}

/* Headline: clamp to two lines so a wordy title can't push the card taller
   than its siblings. min-height reserves the second line so a single-line
   title still aligns visually with two-line neighbors. */
.propertyCard .propertyCardTitle {
    margin: 0 0 6px 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.propertyCard .propertyCardTitle a {
    color: #222;
    text-decoration: none;
}
.propertyCard .propertyCardTitle a:hover {
    color: #1d8eff;
}

/* Address: single line, ellipsis on overflow. */
.propertyCard .propertyCardAddress {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 12.5px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price + meta row pinned to bottom of card body. */
.propertyCard .propertyCardFooter {
    margin-top: auto;
}
.propertyCard .propertyCardPrice {
    color: #1d8eff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.propertyCard .propertyCardMeta {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #777;
    min-height: 1.2em; /* reserve space so cards without meta align */
}
.propertyCard .propertyCardMeta li {
    display: inline-block;
    margin-right: 12px;
}
.propertyCard .propertyCardMeta li:last-child {
    margin-right: 0;
}
.propertyCard .propertyCardMeta i {
    margin-right: 3px;
    color: #999;
}

/* ---------- Property detail page (gallery + lightbox + map + body) ----- */

/* Hero / thumbnails / prev-next arrows for /listings/{id}. Pairs with the
   ~80-line vanilla-JS controller at the bottom of Detail.cshtml. Goal: a
   clean, fast image viewer that doesn't need an extra JS library. */
.propertyGallery {
    margin-bottom: 18px;
}
.propertyGalleryHero {
    position: relative;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}
.propertyGalleryHero img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    background: #000;
}
.propertyGalleryNav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}
.propertyGalleryNav.prev { left: 12px; }
.propertyGalleryNav.next { right: 12px; }
.propertyGalleryNav:hover { background: rgba(0, 0, 0, 0.7); }
.propertyGalleryCounter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* Thumbnail strip — horizontal scroll on narrow viewports so a long
   gallery doesn't push the page wider than its column. */
.propertyGalleryThumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.propertyGalleryThumb {
    flex: 0 0 90px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #f1f1f1;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.7;
}
.propertyGalleryThumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.propertyGalleryThumb:hover { opacity: 1; }
.propertyGalleryThumb.is-active {
    border-color: #1d8eff;
    opacity: 1;
}

/* Full-screen image overlay. The [hidden] attribute does the show/hide;
   when visible it covers the viewport above the rest of the page. */
.propertyLightbox[hidden] { display: none !important; }
.propertyLightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.propertyLightbox figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    text-align: center;
}
.propertyLightbox img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}
.propertyLightbox figcaption {
    color: white;
    font-size: 14px;
    margin-top: 12px;
    opacity: 0.85;
}
.propertyLightboxClose {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    color: white;
    border: 0;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}
.propertyLightboxNav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s;
}
.propertyLightboxNav.prev { left: 20px; }
.propertyLightboxNav.next { right: 20px; }
.propertyLightboxNav:hover { background: rgba(255, 255, 255, 0.3); }

/* Google Map block on the detail page. Fixed height keeps the layout
   from jumping when the maps script finally resolves. */
.propertyMap {
    width: 100%;
    height: 350px;
    border-radius: 6px;
    background: #eef0f3;
    border: 1px solid #e1e1e1;
}

/* Body copy for the description block. Descriptions come out of the
   legacy CRM with raw HTML (<BR>, <B>, <UL>, etc.) so we need a
   container that gives those tags sensible defaults without inheriting
   the cramped 10pt typography from .pagebody section p. */
.propertyDescription {
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}
.propertyDescription p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.55;
    text-align: left;
}
.propertyDescription br + br {
    display: block;
    content: "";
    margin-top: 8px;
}
.propertyDescription b,
.propertyDescription strong {
    color: #222;
    font-weight: 600;
}
.propertyDescription ul,
.propertyDescription ol {
    padding-left: 22px;
    margin: 0 0 12px 0;
}
.propertyDescription li {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.55;
}
.propertyDescription a {
    color: #1d8eff;
    text-decoration: underline;
}
.propertyDescription img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}
