/* ============================================================
   Home detail — CENTER content only
   Top hero + footer shared with Our Homes (inner-page.css)
   Typography/cards reuse our-homes.css (oh-* classes)
   ============================================================ */

.page-home-detail .section-wrapper > .ip-page-subnav { padding: 0; margin: 0; }

/* Container width matches all inner pages (1320px via inner-page.css) */

/* --- Section spacing (page-specific middle sections) --- */
.page-home-detail .section-wrapper > .section.hd-amenities {
    padding: 80px 0;
    background: #FAFAF8;
    border-top: 1px solid #EEF0F2;
}
.page-home-detail .section-wrapper > .section.hd-services {
    padding: 80px 0;
    background: #fff;
}
.page-home-detail .section-wrapper > .section.hd-gallery {
    padding: clamp(72px, 8vw, 100px) 0;
    background: #fff;
    border-top: 1px solid rgba(0, 43, 73, 0.06);
}
.page-home-detail .section-wrapper > .section.hd-why-choose {
    padding: clamp(72px, 8vw, 100px) 0;
    background:
        radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.08), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(230, 138, 0, 0.12), transparent 28%),
        #002B49;
    color: #fff;
}

/* Intro split uses inner-standard.css (.ip-intro) — enhanced for residence detail */
.page-home-detail .section-wrapper > .ip-intro {
    padding: clamp(70px, 8vw, 104px) 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(91, 173, 211, 0.1), transparent 28%),
        #fff;
}
.page-home-detail .ip-intro .hp-about-grid {
    gap: clamp(42px, 6vw, 84px);
}
.page-home-detail .ip-intro .hp-about-content {
    padding: clamp(4px, 1vw, 12px) 0;
}
.page-home-detail .ip-intro .oh-section-title {
    max-width: 650px;
    font-size: clamp(2.1rem, 3.8vw, 3.15rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
}
.page-home-detail .ip-intro .hp-about-text {
    max-width: 64ch;
    font-size: 1.05rem;
    line-height: 1.78;
}
.page-home-detail .ip-intro .hp-why-features {
    gap: 8px 24px;
    margin-top: 22px;
}
.page-home-detail .ip-intro .hp-why-features li {
    padding: 12px 14px;
    border-radius: 14px;
    background: #F7FAFB;
    border: 1px solid rgba(0, 43, 73, 0.07);
}
.page-home-detail .ip-intro .hp-about-photos {
    position: relative;
    padding: 14px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 43, 73, 0.11);
}
.page-home-detail .ip-intro .hp-about-photo--feature {
    aspect-ratio: 16 / 10.5;
    border-radius: 22px;
}
.page-home-detail .ip-intro .hp-about-photo--sm {
    aspect-ratio: 16 / 10;
    border-radius: 18px;
}

.hd-section-header { text-align: center; margin-bottom: 40px; }
.hd-section-title-center { text-align: center; margin-bottom: 36px; }

/* Home detail — address line below features (spacing in inner-standard.css) */
.hd-overview-address { color: var(--color-text-light); }
.hd-overview-loc { display: inline; }
.hd-overview-loc .oh-home-meta-sep { margin: 0 8px; }
.hd-about-tags { margin-bottom: 28px !important; }
.page-home-detail .ip-intro .oh-btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hd-spotlight-icon { color: var(--color-secondary); flex-shrink: 0; margin-top: 2px; }

/* --- Resident experience cards (feature_grid on home detail pages) --- */
.page-home-detail .section-wrapper > .sd-coverage {
    position: relative;
    padding: clamp(70px, 8vw, 96px) 0;
    background: #FAFAF8;
    border-top: 1px solid rgba(0, 43, 73, 0.06);
    overflow: hidden;
}
.page-home-detail .section-wrapper > .sd-coverage::before {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(91, 173, 211, 0.08));
    pointer-events: none;
}
.page-home-detail .sd-coverage .container {
    position: relative;
    z-index: 1;
}
.page-home-detail .sd-section-head {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}
.page-home-detail .sd-section-head .oh-section-title {
    margin: 8px auto 14px;
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.page-home-detail .sd-section-lead {
    max-width: 650px;
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: 1.04rem;
    line-height: 1.75;
}
.page-home-detail .sd-coverage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.page-home-detail .sd-coverage-card {
    position: relative;
    min-height: 205px;
    padding: 28px 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(0, 43, 73, 0.08);
    box-shadow: 0 14px 38px rgba(0, 43, 73, 0.06);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.page-home-detail .sd-coverage-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary), #5BADD3);
    opacity: 0.85;
}
.page-home-detail .sd-coverage-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 173, 211, 0.32);
    box-shadow: 0 22px 52px rgba(0, 43, 73, 0.1);
}
.page-home-detail .sd-coverage-icon {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--color-primary);
    background: linear-gradient(145deg, rgba(91, 173, 211, 0.18), rgba(230, 138, 0, 0.12));
}
.page-home-detail .sd-coverage-icon svg {
    stroke: currentColor;
}
.page-home-detail .sd-coverage-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.22rem;
    line-height: 1.22;
}
.page-home-detail .sd-coverage-card p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 14.5px;
    line-height: 1.68;
}

/* --- Amenities (4×2 grid) --- */
.page-home-detail .hd-amenities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 100%;
}
.page-home-detail .hd-amenity-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    background: #fff !important;
    border: 1px solid #EEF0F2 !important;
    border-radius: 12px;
    padding: 20px !important;
    box-shadow: 0 2px 12px rgba(0,43,73,0.04) !important;
    transform: none !important;
}
.page-home-detail .hd-amenity-card:hover {
    box-shadow: 0 4px 20px rgba(0,43,73,0.08) !important;
    transform: none !important;
}
.page-home-detail .hd-amenity-card .card-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin: 0;
    background: #E8F4FC;
    color: var(--color-secondary);
    border-radius: 50%;
    font-size: 18px;
}
.page-home-detail .hd-amenity-card h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-primary);
    margin: 0;
    padding-top: 8px;
}

/* --- Services --- */
.page-home-detail .hd-care-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}
.hd-care-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    background: #FAFAF8;
    border: 1px solid #EEF0F2;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hd-care-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 4px 20px rgba(0,43,73,0.06);
}
.hd-care-card h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 6px;
}
.hd-care-card p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.55;
    margin: 0;
}
.hd-care-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E8F4FC;
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hd-services-footer {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

/* --- Gallery (6 photos, 3×2 grid) --- */
.hd-gallery-header {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: end;
    margin-bottom: 38px;
}
.hd-gallery-intro {
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text-light);
    margin: 0;
    text-align: right;
}
.page-home-detail .hd-gallery-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-height: 520px;
    padding: 14px;
    border-radius: 28px;
    background: #FAFAF8;
    border: 1px solid rgba(0, 43, 73, 0.07);
    box-shadow: 0 24px 70px rgba(0, 43, 73, 0.08);
}
.page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}
.page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}
.page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}
.page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
}
.page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}
.page-home-detail .hd-gallery-item {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    background-color: #E8DDD0;
    box-shadow: 0 8px 24px rgba(0, 43, 73, 0.08);
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-home-detail .hd-gallery-item:hover {
    transform: scale(1.015);
    box-shadow: 0 16px 36px rgba(0, 43, 73, 0.16);
}
.page-home-detail .hd-gallery-item:hover .hd-gallery-zoom {
    opacity: 1;
}
.hd-gallery-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 37, 73, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

/* --- Why Choose (icon card grid) --- */
.hd-why-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 48px;
}
.hd-why-eyebrow { color: var(--color-accent); }
.hd-why-title {
    color: #fff;
    margin: 0 0 12px;
}
.hd-why-lead {
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    margin: 0;
}
.hd-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.hd-why-card {
    min-height: 220px;
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px;
    padding: 30px 26px;
    box-shadow: 0 18px 42px rgba(0, 20, 34, 0.14);
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hd-why-card:hover {
    background: rgba(255,255,255,0.115);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-4px);
    box-shadow: 0 24px 54px rgba(0, 20, 34, 0.22);
}
.hd-why-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: rgba(230,138,0,0.16);
    border: 1px solid rgba(230,138,0,0.28);
    color: #F0A030;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.hd-why-icon svg { stroke: #F0A030; }
.hd-why-card-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.3;
}
.hd-why-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255,255,255,0.78);
    margin: 0;
}

/* --- Gallery lightbox --- */
body.hd-lightbox-open { overflow: hidden; }
.hd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.hd-lightbox[hidden] { display: none !important; }
.hd-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 40, 0.88);
}
.hd-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hd-lightbox-figure {
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hd-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    object-fit: contain;
}
.hd-lightbox-close {
    position: absolute;
    top: -8px;
    right: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.hd-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.hd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.hd-lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.hd-lightbox-prev { left: -56px; }
.hd-lightbox-next { right: -56px; }
.hd-lightbox-counter {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .page-home-detail .hd-care-grid,
    .hd-gallery-header { grid-template-columns: 1fr; }
    .hd-gallery-intro { text-align: left; }
    .page-home-detail .hd-amenities-grid { grid-template-columns: repeat(2, 1fr); }
    .page-home-detail .sd-coverage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-home-detail .hd-why-grid { grid-template-columns: repeat(2, 1fr); }
    .page-home-detail .section-wrapper > .section.hd-amenities,
    .page-home-detail .section-wrapper > .section.hd-services,
    .page-home-detail .section-wrapper > .section.hd-gallery,
    .page-home-detail .section-wrapper > .section.hd-why-choose,
    .page-home-detail .section-wrapper > .sd-coverage { padding: 56px 0; }
}

@media (max-width: 768px) {
    .page-home-detail main { padding-bottom: 72px; }
    .page-home-detail .container { padding: 0 20px; }

    .page-home-detail .section-wrapper > .section.hd-amenities,
    .page-home-detail .section-wrapper > .section.hd-services,
    .page-home-detail .section-wrapper > .section.hd-gallery,
    .page-home-detail .section-wrapper > .section.hd-why-choose,
    .page-home-detail .section-wrapper > .sd-coverage,
    .page-home-detail .section-wrapper > .ip-intro { padding: 44px 0; }

    .page-home-detail .oh-section-title { font-size: clamp(1.5rem, 6vw, 2rem); }
    .hd-spotlight-box { max-width: 100%; }
    .page-home-detail .ip-intro .hp-about-photos {
        padding: 10px;
        border-radius: 22px;
    }
    .page-home-detail .sd-coverage-grid { grid-template-columns: 1fr; }
    .page-home-detail .sd-coverage-card {
        min-height: 0;
        padding: 22px 20px;
        border-radius: 18px;
    }

    .page-home-detail .hd-gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        min-height: 0;
        gap: 10px;
    }
    .page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        min-height: 180px;
    }
    .page-home-detail .hd-gallery-grid .hd-gallery-item:nth-child(1) {
        grid-column: 1 / -1;
        min-height: 240px;
    }

    .hd-lightbox-prev { left: 8px; }
    .hd-lightbox-next { right: 8px; }
    .hd-lightbox-close { top: 8px; right: 8px; }

    .hd-section-header { margin-bottom: 28px; }
    .hd-section-title-center { margin-bottom: 24px; }
    .page-home-detail .hd-amenities-grid { grid-template-columns: 1fr; }
    .page-home-detail .hd-care-grid { grid-template-columns: 1fr; }
    .hd-care-card { padding: 22px 20px; }
    .hd-services-footer { margin-top: 24px; }
    .hd-services-footer .btn { width: 100%; justify-content: center; }

    .page-home-detail .hp-testimonial-card { padding: 28px 22px; }

    .page-home-detail .hd-why-grid { grid-template-columns: 1fr; }
    .hd-why-header { margin-bottom: 24px; }
    .hd-why-lead { font-size: 15px; }
    .hd-why-card { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .page-home-detail .container { padding: 0 16px; }
    .page-home-detail .section-wrapper > .section.hd-amenities,
    .page-home-detail .section-wrapper > .section.hd-services,
    .page-home-detail .section-wrapper > .section.hd-gallery,
    .page-home-detail .section-wrapper > .section.hd-why-choose,
    .page-home-detail .section-wrapper > .sd-coverage,
    .page-home-detail .section-wrapper > .ip-intro { padding: 36px 0; }
    .page-home-detail .hd-amenity-card { padding: 16px !important; }
    .page-home-detail .hd-amenity-card h3 { font-size: 13px; }
}
