/* =====================================================================
   Property detail page (property-detail.php).
   Same look as the homepage sections: --rr-* colours, .rr-eyebrow labels,
   .rr-btn buttons and light bordered panels. Everything is scoped to .pdx.
   ===================================================================== */

.pdx {
    --pdx-line: #d8dbe2;
    --pdx-panel: #fbfcff;
    --pdx-shadow: 0 12px 40px rgba(27, 42, 91, .05);
    background: #fff;
    color: #212529;
}

/* Section heading under an .rr-eyebrow label */
.pdx .pdx-h {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--rr-red);
    margin: .5rem 0 1.25rem;
}

/* Light panel, like the "Our Impact" stats box */
.pdx-panel {
    background: var(--pdx-panel);
    border: 1px solid var(--pdx-line);
    border-radius: 25px;
    box-shadow: var(--pdx-shadow);
    padding: 2rem;
}

/* Icon in a light circle */
.pdx-ico {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--rr-circle);
    color: var(--rr-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.pdx-label {
    display: block;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rr-gray);
    margin-bottom: 2px;
}


/* ---------- Banner ---------- */
.pdx-banner {
    position: relative;
    margin-top: 82px;            /* starts below the fixed 82px navbar */
    background: #15171c;
    overflow: hidden;
}
.pdx-banner img {
    display: block;
    width: 100%;
    height: auto;                /* natural shape: never stretched */
}
.pdx-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .6) 100%);
    pointer-events: none;
}
.pdx-banner-text {
    position: absolute;
    left: 50%;
    bottom: 8%;
    transform: translateX(-50%);
    z-index: 1;
    width: 92%;
    text-align: center;
}
.pdx-banner-text h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}


/* ---------- Location / price bar ---------- */
.pdx-infobar {
    position: relative;
    z-index: 2;
    margin-top: -36px;           /* overlaps the bottom of the banner */
    display: flex;
    background: #fff;
    border: 1px solid var(--pdx-line);
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(27, 42, 91, .1);
}
.pdx-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem 1.5rem;
    min-width: 0;
}
.pdx-info + .pdx-info { border-left: 1px solid var(--rr-divider); }
.pdx-info strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--rr-red);
}
.pdx-info a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--pdx-line); }
.pdx-info a:hover { text-decoration-color: currentColor; }
.pdx-info-price { flex: 0 0 auto; justify-content: flex-end; text-align: right; }
.pdx-info-price .pdx-ico { order: 2; }


/* ---------- Details box ---------- */
.pdx-details {
    background: var(--pdx-panel);
    border: 1px solid var(--pdx-line);
    border-radius: 25px;
    box-shadow: var(--pdx-shadow);
    overflow: hidden;
}
.pdx .pdx-details-head {
    margin: 0;
    padding: 1rem 1.5rem;
    background: var(--rr-red);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}
.pdx-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    padding: .75rem 1.5rem 1rem;
}
.pdx-fact {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--rr-divider);
    min-width: 0;
}
.pdx-fact:nth-last-child(-n+2) { border-bottom: 0; }
.pdx-fact strong {
    display: block;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--rr-red);
    overflow-wrap: anywhere;
}


/* ---------- Call-back form ---------- */
.pdx-form-card {
    top: 100px;                  /* sticky: clears the fixed navbar */
    background: #fff;
    border: 1px solid var(--pdx-line);
    border-radius: 25px;
    box-shadow: 0 14px 40px rgba(27, 42, 91, .08);
    padding: 1.6rem;
}
.pdx-form-card .rr-eyebrow { display: block; margin-bottom: 1.1rem; }
.pdx-field { display: block; font-size: .92rem; font-weight: 600; color: var(--rr-red); margin-bottom: .35rem; }
.pdx-form .form-control {
    min-height: 46px;
    border-radius: 10px;
    border-color: var(--pdx-line);
    font-size: .95rem;
}
.pdx-form .form-control:focus { border-color: var(--rr-navy); box-shadow: 0 0 0 3px rgba(27, 42, 91, .12); }
.pdx-form .iti { width: 100%; }
.pdx-terms {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: .25rem 0 1rem;
    font-size: .9rem;
    color: var(--rr-gray);
    cursor: pointer;
}
.pdx-terms input { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 17px; accent-color: var(--rr-red); }
.pdx-terms a { color: var(--rr-navy); text-decoration: underline; }
.pdx .submit-btn.pdx-submit {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    background: var(--rr-red);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 600;
    transition: background .2s, transform .2s;
}
.pdx .submit-btn.pdx-submit:hover:not(:disabled) { background: #000; transform: translateY(-1px); }
.pdx .submit-btn.pdx-submit:disabled { background: #d9dce3; color: #7b808a; }


/* ---------- Rich text typed in the admin editor ---------- */
.pdx-rich { font-size: 1rem; line-height: 1.75; color: #3a3f47; margin-top: .75rem; }
.pdx-rich span { background-color: transparent !important; color: inherit !important; }
.pdx-rich p { margin: 0 0 1rem; text-align: left; }
.pdx-rich h2, .pdx-rich h3, .pdx-rich h4 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rr-red);
    margin: 1.6rem 0 .75rem;
}
.pdx-rich > :first-child { margin-top: 0; }
.pdx-rich strong, .pdx-rich b { color: var(--rr-red); }
/* Links in the admin text: blue, no underline (also when the link text is bold) */
.pdx .pdx-rich a,
.pdx .pdx-rich a strong,
.pdx .pdx-rich a b,
.pdx .pdx-rich a span { color: #0d6efd !important; text-decoration: none !important; }
.pdx .pdx-rich a:hover,
.pdx .pdx-rich a:hover strong,
.pdx .pdx-rich a:hover b,
.pdx .pdx-rich a:hover span { color: #0a58ca !important; }
.pdx-rich ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.pdx-rich ul li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; }
.pdx-rich ul li::before {
    content: "";
    position: absolute;
    left: .3rem;
    top: .65em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rr-navy);
}
.pdx-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.pdx-rich table { width: 100%; height: auto; display: block; overflow-x: auto; box-shadow: none; }


/* ---------- Brochure + key features ---------- */
.pdx-brochure {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    padding: 0;
    border: 1px solid var(--pdx-line);
    border-radius: 25px;
    overflow: hidden;
    background: #15171c;
    cursor: pointer;
    box-shadow: var(--pdx-shadow);
}
.pdx-brochure img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}
.pdx-brochure:hover img { transform: scale(1.05); }
.pdx-brochure-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(21, 23, 28, .25), rgba(21, 23, 28, .7));
    color: #fff;
}
.pdx-brochure-file { font-size: .9rem; opacity: .9; text-align: center; overflow-wrap: anywhere; }
.pdx-brochure-file i { margin-right: 4px; }
.pdx .pdx-brochure-btn { background: #fff; color: var(--rr-red); pointer-events: none; }
.pdx .pdx-brochure-btn .arrow { background: var(--rr-red); color: #fff; }
.pdx-brochure:hover .pdx-brochure-btn { transform: translateY(-2px); }

.pdx-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem 1rem;
}
/* Key features typed as a list (ul/li) or as separate lines (p): same tick-mark cards */
.pdx-features:has(> p) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.pdx-features > p { margin: 0; }
.pdx-features li,
.pdx-features > p {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100%;
    padding: .7rem .9rem .7rem 2.6rem;
    background: #fff;
    border: 1px solid var(--rr-divider);
    border-radius: 12px;
    font-size: .95rem;
    line-height: 1.4;
}
.pdx-features > p span,
.pdx-features li span { background-color: transparent !important; color: inherit !important; }
.pdx-features > p::before,
.pdx-features li::before {
    content: "\F26E";                /* bootstrap-icons: check2 */
    font-family: "bootstrap-icons";
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rr-circle);
    color: var(--rr-navy);
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---------- Gallery ---------- */
.pdx-carousel,
.pdx-carousel .carousel-inner { border-radius: 25px; overflow: hidden; }
.pdx .pdx-carousel .carousel-item img {
    height: 480px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}
.pdx-side-img {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: var(--pdx-shadow);
}
.pdx-carousel .carousel-control-prev,
.pdx-carousel .carousel-control-next {
    top: 50%;
    bottom: auto;
    width: 44px;
    height: 44px;
    margin: 0 14px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    opacity: 1;
}
.pdx-carousel .carousel-control-prev-icon,
.pdx-carousel .carousel-control-next-icon { filter: invert(1); width: 18px; height: 18px; }
.pdx-carousel .carousel-indicators [data-bs-target] {
    width: 22px;
    height: 4px;
    border-radius: 4px;
    border: 0;
}


/* ---------- Floor plans (slick slider) ---------- */
.pdx-plans .slick-list { padding: 6px 0 4px; }
.pdx-plan {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--pdx-line);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: var(--pdx-shadow);
}
.pdx-plan img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 1131; object-fit: cover; }
.pdx-plan-overlay {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    border-radius: 10px;
    background: var(--rr-red);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform .25s;
}
.pdx-plan:hover .pdx-plan-overlay { transform: translateX(-50%) translateY(-3px); }

/* slick arrows + dots in the site colours */
.pdx .slick-prev,
.pdx .slick-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--pdx-line);
    box-shadow: 0 6px 16px rgba(27, 42, 91, .12);
    z-index: 2;
}
.pdx .slick-prev:hover,
.pdx .slick-next:hover,
.pdx .slick-prev:focus,
.pdx .slick-next:focus { background: var(--rr-red); }
.pdx .slick-prev:before,
.pdx .slick-next:before { color: var(--rr-red); opacity: 1; font-size: 20px; }
.pdx .slick-prev:hover:before,
.pdx .slick-next:hover:before { color: #fff; }
.pdx .slick-prev { left: -6px; }
.pdx .slick-next { right: -6px; }
.pdx .slick-dots li button:before { color: var(--rr-red); font-size: 9px; }


/* ---------- Location ---------- */
.pdx-map {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--pdx-line);
}


/* ---------- CTA ---------- */
.pdx-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: 2rem 2.25rem;
    border-radius: 25px;
    background: var(--rr-red);
    color: #fff;
}
.pdx-cta h3 { margin: 0 0 .4rem; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 700; color: #fff; }
.pdx-cta p { margin: 0; max-width: 620px; color: rgba(255, 255, 255, .75); line-height: 1.6; }
.pdx .pdx-cta-btn { border: 0; background: #fff; color: var(--rr-red); min-height: 46px; cursor: pointer; }
.pdx .pdx-cta-btn:hover { background: #fff; color: var(--rr-red); }
.pdx .pdx-cta-btn .arrow { background: var(--rr-red); color: #fff; }


/* ---------- Explore more cards ---------- */
.pdx-related { background: #f6f7fa; }
.pdx-related .slick-list { padding: 6px 0 16px; }
.pdx-card {
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid var(--pdx-line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--pdx-shadow);
    transition: transform .25s, box-shadow .25s;
}
.pdx-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27, 42, 91, .12); }
.pdx-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rr-circle); }
.pdx-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pdx-card:hover .pdx-card-media img { transform: scale(1.06); }
.pdx-card-rera {
    position: absolute;
    left: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--rr-red);
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdx-card-body { padding: 1.1rem 1.2rem 1.2rem; }
.pdx .pdx-card-title {
    margin: 0 0 .7rem;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rr-red);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdx-card-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 .9rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem .75rem;
    font-size: .85rem;
    color: var(--rr-gray);
}
.pdx-card-facts li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdx-card-facts i { color: var(--rr-navy); margin-right: 4px; }
.pdx-card-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px solid var(--rr-divider);
}
.pdx-card-price span { font-size: .78rem; color: var(--rr-gray); text-transform: uppercase; letter-spacing: .05em; }
.pdx-card-price strong { font-size: 1.05rem; color: var(--rr-red); }


/* ===================== Tablet ===================== */
@media (max-width: 991.98px) {
    .pdx-form-card { position: static; }
    .pdx .pdx-carousel .carousel-item img,
    .pdx-side-img { height: 380px; }
}

/* ===================== Phone ===================== */
@media (max-width: 767.98px) {
    /* Phones: the photo is short, so the name goes in a dark strip under it instead of on top */
    .pdx-banner::after { display: none; }
    .pdx-banner-text {
        position: static;
        transform: none;
        width: auto;
        padding: 1rem 16px 1.15rem;
        background: var(--rr-red);
    }
    .pdx-banner-text h1 { font-size: clamp(1.3rem, 6vw, 1.75rem); text-shadow: none; }

    .pdx-infobar { flex-direction: column; margin-top: 16px; border-radius: 18px; }
    .pdx-info { padding: .85rem 1.1rem; }
    .pdx-info + .pdx-info { border-left: 0; border-top: 1px solid var(--rr-divider); }
    .pdx-info-price { justify-content: flex-start; text-align: left; }
    .pdx-info-price .pdx-ico { order: 0; }
    .pdx-info strong { font-size: 1.05rem; }

    .pdx-panel { padding: 1.4rem 1.2rem; border-radius: 20px; }
    .pdx-details { border-radius: 20px; }
    .pdx .pdx-details-head { padding: .9rem 1.2rem; font-size: 1.05rem; }
    /* 2 compact columns: icon above the text */
    .pdx-facts { column-gap: 1rem; padding: .25rem 1rem .5rem; }
    .pdx-fact { flex-direction: column; align-items: flex-start; gap: .45rem; padding: .85rem 0; }
    .pdx-fact .pdx-label { font-size: .72rem; }
    .pdx-fact strong { font-size: .95rem; }
    .pdx-ico { flex-basis: 40px; width: 40px; height: 40px; font-size: 1rem; }
    .pdx-form-card { padding: 1.3rem; border-radius: 20px; }

    .pdx-brochure { min-height: 220px; border-radius: 20px; }
    .pdx-features ul,
    .pdx-features:has(> p) { grid-template-columns: 1fr; }

    .pdx .pdx-carousel .carousel-item img { height: 260px; }
    .pdx-carousel, .pdx-carousel .carousel-inner { border-radius: 20px; }
    .pdx-carousel .carousel-control-prev,
    .pdx-carousel .carousel-control-next { width: 36px; height: 36px; margin: 0 8px; }

    .pdx .slick-prev { left: 4px; }
    .pdx .slick-next { right: 4px; }

    .pdx-cta { padding: 1.5rem 1.3rem; border-radius: 20px; }
    .pdx .pdx-cta-btn { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .pdx * { transition: none !important; }
}

/* Phones: "Read more" on long texts (button added by the script in property-detail.php) */
@media (max-width: 767.98px) {
    .pdx-more-wrap.is-clamped:not(.is-open) .pdx-rich {
        max-height: 420px;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
        mask-image: linear-gradient(180deg, #000 70%, transparent);
    }
    .pdx-more-btn {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        margin-top: .75rem;
        padding: .55rem 1.1rem;
        border: 1px solid var(--rr-red);
        border-radius: 10px;
        background: #fff;
        color: var(--rr-red);
        font-weight: 600;
        font-size: .95rem;
    }
}
