/* ===================================
   Rahaya Realty — Community Detail Page
   Theme: White / Black / Gold
=================================== */

/* ---------- Hero ---------- */
.community-hero {
    position: relative;
    height: 45vh;
    min-height: 340px;
    overflow: hidden;
    background-color: var(--color-black);
}

.community-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.community-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.community-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.community-hero-content-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.community-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.community-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.community-hero-breadcrumb a:hover {
    color: var(--color-gold);
}

.community-hero-breadcrumb .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.community-hero-breadcrumb .breadcrumb-current {
    color: var(--color-gold);
}

.community-hero-heading {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 12px;
}

.community-hero-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 14px;
    margin: 0;
}

.community-hero-subtext i {
    color: var(--color-gold);
    margin-right: 6px;
}

@media (min-width: 769px) {
    .community-hero-heading {
        font-size: 56px;
    }
}

/* ---------- Description ---------- */
.community-description {
    background-color: var(--color-white);
    padding: 80px 24px;
}

.community-description-inner {
    max-width: 760px;
    margin: 0 auto;
}

.community-description-inner p {
    color: var(--color-gray);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.85;
    margin: 0 0 20px;
}

.community-description-inner p:last-child {
    margin-bottom: 0;
}

/* ---------- Gallery (tiles reuse .project-lightbox from the project detail page's pattern) ---------- */
.community-gallery {
    background-color: #faf9f7;
    padding: 0 24px 80px;
}

.community-gallery-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.community-gallery-heading {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 28px;
    margin: 0 0 28px;
}

.community-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.community-gallery-tile {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: hidden;
}

.community-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.community-gallery-tile:hover img {
    transform: scale(1.06);
}

@media (max-width: 768px) {
    .community-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Lightbox — shared visual pattern with the project detail gallery */
.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.92);
}

.project-lightbox.is-open {
    display: flex;
}

.project-lightbox-image {
    max-width: 88vw;
    max-height: 84vh;
    object-fit: contain;
}

.project-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.project-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.project-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.project-lightbox-prev {
    left: 20px;
}

.project-lightbox-next {
    right: 20px;
}

.project-lightbox-count {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 13px;
}

/* ---------- Related projects (reuses .project-listing-card from projects/listing.css) ---------- */
.community-projects {
    background-color: var(--color-white);
    padding: 0 24px 90px;
}

.community-projects-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.community-projects-heading {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 28px;
    margin: 0 0 28px;
}

.community-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 991px) {
    .community-projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .community-projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Not found ---------- */
.community-not-found {
    background-color: var(--color-white);
    padding: 120px 24px;
    text-align: center;
}

.community-not-found-inner h1 {
    color: var(--color-black);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 34px;
    margin: 0 0 14px;
}

.community-not-found-inner p {
    color: var(--color-gray);
    font-family: var(--font-body);
    font-size: 15px;
    margin: 0 0 28px;
}

.community-not-found-btn {
    display: inline-block;
    background-color: var(--color-black);
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 14px 30px;
    transition: background-color 0.2s ease;
}

.community-not-found-btn:hover {
    background-color: var(--color-gold-dark);
}

/* ===================================
   Mobile
=================================== */
@media (max-width: 640px) {
    .community-description,
    .community-gallery,
    .community-projects {
        padding-left: 20px;
        padding-right: 20px;
    }
}
