/* ============================================================
   RAS Real Estate — Community Detail Page
   Premium UAE luxury aesthetic. Consistent with site design system.
   ============================================================ */


/* ── Active nav item ────────────────────────────────────────── */
.nav__item--active > a {
    color: var(--white) !important;
    border-bottom: 1.5px solid rgba(255,255,255,0.55);
    padding-bottom: 2px;
}
.nav.scrolled .nav__item--active > a {
    color: var(--green) !important;
    border-bottom-color: var(--green);
}


/* ══════════════════════════════════════════════════
   1. HERO
══════════════════════════════════════════════════ */
.cd-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.cd-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    transform: scale(1.08);
    transition: transform 9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.cd-hero__bg.loaded { transform: scale(1); }

.cd-hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        175deg,
        rgba(8,8,8,0.65) 0%,
        rgba(8,8,8,0.30) 45%,
        rgba(8,8,8,0.72) 100%
    );
}

.cd-hero__breadcrumb {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}
.cd-hero__breadcrumb a {
    color: rgba(255,255,255,0.45);
    transition: color 0.2s;
}
.cd-hero__breadcrumb a:hover { color: rgba(255,255,255,0.85); }
.cd-hero__breadcrumb-sep { color: rgba(255,255,255,0.25); }

.cd-hero__body {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 0 24px;
}

.cd-hero__label {
    display: block;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
    margin-bottom: 28px;
}

.cd-hero__title {
    font-family: var(--display);
    font-size: clamp(64px, 9vw, 120px);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 20px;
}

.cd-hero__tagline {
    font-family: var(--display);
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 300;
    font-style: italic;
    color: rgba(255,255,255,0.65);
    margin-bottom: 44px;
    line-height: 1.5;
}

.cd-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Stats bar */
.cd-hero__stats {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(8,8,8,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 3px;
    padding: 18px 40px;
    white-space: nowrap;
}

.cd-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 32px;
}
.cd-hero__stat:first-child { padding-left: 0; }
.cd-hero__stat:last-child  { padding-right: 0; }

.cd-hero__stat-num {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 500;
    color: var(--white);
    line-height: 1;
}

.cd-hero__stat-label {
    font-family: var(--body);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

.cd-hero__stat-div {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.14);
    flex-shrink: 0;
}

/* Scroll indicator */
.cd-hero__scroll {
    position: absolute;
    bottom: 0;
    right: 56px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
}
.cd-hero__scroll-line {
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.50));
    animation: scrollPulse 2.2s ease-in-out infinite;
}
.cd-hero__scroll span {
    font-family: var(--body);
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    writing-mode: vertical-rl;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 1; }
}


/* ══════════════════════════════════════════════════
   2. OVERVIEW
══════════════════════════════════════════════════ */
.cd-overview__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 88px;
    align-items: center;
}

.cd-overview__left { }

.cd-overview__left .sec-title em {
    font-style: italic;
    font-weight: 300;
    color: var(--green);
}

.cd-overview__desc {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.cd-overview__desc p {
    font-family: var(--body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.80;
    color: #444444;
}

.cd-overview__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--green);
    border-bottom: 1px solid rgba(44,110,78,0.35);
    padding-bottom: 3px;
    transition: gap 0.25s, border-color 0.25s;
}
.cd-overview__link:hover { gap: 12px; border-color: var(--green); }

.cd-overview__right { }

.cd-overview__img-wrap {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
}

.cd-overview__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cd-overview__img-wrap:hover .cd-overview__img { transform: scale(1.04); }

.cd-overview__img-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px 24px;
    background: linear-gradient(to top, rgba(8,8,8,0.75) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cd-overview__badge-name {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 500;
    color: var(--white);
    line-height: 1.1;
}
.cd-overview__badge-sub {
    font-family: var(--body);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}


/* ══════════════════════════════════════════════════
   3. HIGHLIGHTS
══════════════════════════════════════════════════ */
.cd-highlights__head {
    margin-bottom: 60px;
}

.cd-highlights__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.cd-highlight {
    background: var(--white);
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: background 0.25s, transform 0.25s;
    position: relative;
}
.cd-highlight:hover {
    background: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.07);
    z-index: 1;
}

.cd-highlight__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dim);
    border-radius: 50%;
    color: var(--green);
    flex-shrink: 0;
}

.cd-highlight__title {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.2;
}

.cd-highlight__desc {
    font-family: var(--body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.70;
    color: #666666;
}


/* ══════════════════════════════════════════════════
   4. PROPERTIES
══════════════════════════════════════════════════ */
.cd-props__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 52px;
}
.cd-props__head .sec-title { margin-bottom: 0; }
.cd-props__head .sec-title em {
    font-style: italic;
    font-weight: 400;
}

/* Property cards grid */
.cd-props__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cd-prop-card {
    border-radius: 2px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s, transform 0.3s;
}
.cd-prop-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.11);
    transform: translateY(-4px);
}

.cd-prop-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cd-prop-card__img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.cd-prop-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cd-prop-card:hover .cd-prop-card__img { transform: scale(1.06); }

.cd-prop-card__img--placeholder {
    background: var(--cream);
}

.cd-prop-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,8,8,0.45) 0%, transparent 55%);
    pointer-events: none;
}

.cd-prop-card__type {
    position: absolute;
    bottom: 14px;
    left: 14px;
    font-family: var(--body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.42);
    padding: 4px 10px;
    border-radius: 2px;
}

.cd-prop-card__listing {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: var(--body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
}
.cd-prop-card__listing--buy  { background: var(--green); color: var(--white); }
.cd-prop-card__listing--rent { background: #1A3A5C; color: var(--white); }

.cd-prop-card__body {
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cd-prop-card__title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-prop-card__location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--body);
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.cd-prop-card__meta {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 2px;
}
.cd-prop-card__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--body);
    font-size: 12px;
    font-weight: 400;
    color: #555555;
}

.cd-prop-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.cd-prop-card__price {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    line-height: 1;
}

.cd-prop-card__cta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--green);
    transition: gap 0.2s;
}
.cd-prop-card:hover .cd-prop-card__cta { gap: 8px; }

/* More button */
.cd-props__more {
    display: flex;
    justify-content: center;
    margin-top: 56px;
}

/* Empty state */
.cd-props__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    gap: 16px;
    max-width: 440px;
    margin: 0 auto;
}
.cd-props__empty-icon { color: #CCCCCC; }
.cd-props__empty h3 {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    color: var(--black);
}
.cd-props__empty p {
    font-family: var(--body);
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
}


/* ══════════════════════════════════════════════════
   5. INVEST SECTION
══════════════════════════════════════════════════ */
.cd-invest {
    background: var(--black);
}
.cd-invest__inner {
    display: flex;
    flex-direction: column;
    gap: 64px;
}
.cd-invest__head { }
.cd-invest__head .sec-title em {
    font-style: italic;
    font-weight: 300;
    color: rgba(255,255,255,0.60);
}

.cd-invest__pillars {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.cd-invest__pillar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 48px 0 0;
}
.cd-invest__pillar:last-child { padding-right: 0; padding-left: 48px; }
.cd-invest__pillar:nth-child(3) { padding-left: 48px; }

.cd-invest__num {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 300;
    color: var(--green);
    letter-spacing: 0.14em;
}

.cd-invest__pillar-title {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

.cd-invest__pillar-desc {
    font-family: var(--body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255,255,255,0.55);
}

.cd-invest__rule {
    width: 1px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
    align-self: stretch;
}

.cd-invest__action {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
}


/* ══════════════════════════════════════════════════
   6. FAQ
══════════════════════════════════════════════════ */
.cd-faq__inner {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 96px;
    align-items: start;
}

.cd-faq__head { }
.cd-faq__head .sec-title { position: sticky; top: 100px; }

.cd-faq__list {
    display: flex;
    flex-direction: column;
}

.cd-faq__item {
    border-top: 1px solid var(--border);
}
.cd-faq__item:last-child { border-bottom: 1px solid var(--border); }

.cd-faq__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 4px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 500;
    color: var(--black);
    line-height: 1.35;
    transition: color 0.2s;
}
.cd-faq__q:hover { color: var(--green); }
.cd-faq__item.open .cd-faq__q { color: var(--green); }

.cd-faq__icon {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
    line-height: 0;
}
.cd-faq__item.open .cd-faq__icon {
    transform: rotate(180deg);
    color: var(--green);
}

.cd-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-faq__a p {
    font-family: var(--body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.80;
    color: #555555;
    padding: 0 4px 28px;
}


/* ══════════════════════════════════════════════════
   7. OTHER COMMUNITIES
══════════════════════════════════════════════════ */
.cd-other__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
}
.cd-other__head .sec-title { margin-bottom: 0; }

.cd-other__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cd-other-card {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
}

.cd-other-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cd-other-card:hover .cd-other-card__img { transform: scale(1.06); }

.cd-other-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(8,8,8,0.78) 0%,
        rgba(8,8,8,0.10) 60%,
        transparent 100%
    );
    transition: background 0.3s;
}
.cd-other-card:hover .cd-other-card__veil {
    background: linear-gradient(
        to top,
        rgba(8,8,8,0.85) 0%,
        rgba(8,8,8,0.25) 60%,
        rgba(8,8,8,0.05) 100%
    );
}

.cd-other-card__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.cd-other-card__tag {
    font-family: var(--body);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

.cd-other-card__name {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
    line-height: 1.15;
}

.cd-other-card__cta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.40);
    margin-top: 4px;
    transition: color 0.2s, gap 0.2s;
}
.cd-other-card:hover .cd-other-card__cta { color: var(--white); gap: 8px; }

.cd-other-card__link {
    position: absolute;
    inset: 0;
    z-index: 3;
}


/* ══════════════════════════════════════════════════
   8. CTA SECTION
══════════════════════════════════════════════════ */
.cd-cta {
    position: relative;
    padding: 140px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.cd-cta__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.45);
}

.cd-cta__veil {
    position: absolute;
    inset: 0;
    background: rgba(8,8,8,0.42);
}

.cd-cta__body {
    position: relative;
    z-index: 2;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cd-cta__eyebrow {
    display: block;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    color: var(--green);
}

.cd-cta__title {
    font-family: var(--display);
    font-size: clamp(36px, 4.5vw, 60px);
    font-weight: 300;
    line-height: 1.12;
    color: var(--white);
    letter-spacing: -0.01em;
}
.cd-cta__title em {
    font-style: italic;
    color: rgba(255,255,255,0.70);
}

.cd-cta__sub {
    font-family: var(--body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.72;
    color: rgba(255,255,255,0.62);
    max-width: 560px;
}

.cd-cta__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}


/* ══════════════════════════════════════════════════
   RESPONSIVE — Tablet
══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .cd-overview__inner {
        grid-template-columns: 1fr 1fr;
        gap: 52px;
    }

    .cd-highlights__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cd-props__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cd-invest__pillars {
        flex-direction: column;
        gap: 40px;
    }
    .cd-invest__pillar { padding: 0 !important; }
    .cd-invest__rule {
        width: 100%;
        height: 1px;
    }

    .cd-faq__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .cd-faq__head .sec-title { position: static; }

    .cd-other__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile
══════════════════════════════════════════════════ */
@media (max-width: 720px) {
    /* Hero */
    .cd-hero__stats {
        display: none;
    }
    .cd-hero__scroll { display: none; }
    .cd-hero__breadcrumb { top: 96px; }
    .cd-hero__title {
        font-size: clamp(46px, 12vw, 72px);
    }
    .cd-hero__actions {
        flex-direction: column;
        gap: 12px;
    }
    .cd-hero__actions .btn { width: 100%; text-align: center; }

    /* Overview */
    .cd-overview__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .cd-overview__right { order: -1; }
    .cd-overview__img-wrap { aspect-ratio: 16 / 9; }

    /* Highlights */
    .cd-highlights__grid {
        grid-template-columns: 1fr;
    }
    .cd-highlight { padding: 30px 24px; }

    /* Properties */
    .cd-props__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cd-props__grid {
        grid-template-columns: 1fr;
    }

    /* Invest */
    .cd-invest__action {
        flex-direction: column;
        gap: 12px;
    }
    .cd-invest__action .btn { width: 100%; text-align: center; }

    /* FAQ */
    .cd-faq__inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .cd-faq__q { font-size: 16px; padding: 20px 0; }

    /* Other communities */
    .cd-other__grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .cd-other-card { aspect-ratio: 2 / 3; }
    .cd-other__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* CTA */
    .cd-cta { padding: 96px 24px; }
    .cd-cta__actions {
        flex-direction: column;
        width: 100%;
    }
    .cd-cta__actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .cd-other__grid {
        grid-template-columns: 1fr;
    }
    .cd-other-card { aspect-ratio: 3 / 2; }
}


/* ══════════════════════════════════════════════════
   COMMUNITY GALLERY  (shown only when gallery images exist)
══════════════════════════════════════════════════ */
.cd-gallery { background: var(--cream, #f8f5f0); }

.cd-gallery__head {
    margin-bottom: 40px;
}

.cd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* First image spans 2 columns for visual interest */
.cd-gallery__item:first-child {
    grid-column: span 2;
}

.cd-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin: 0;
    aspect-ratio: 4 / 3;
}

.cd-gallery__item:first-child {
    aspect-ratio: 16 / 9;
}

.cd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.cd-gallery__item:hover img { transform: scale(1.04); }

.cd-gallery__item figcaption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
    color: rgba(255,255,255,.85);
    font-size: 12px;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .cd-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cd-gallery__item:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .cd-gallery__grid {
        grid-template-columns: 1fr;
    }
    .cd-gallery__item:first-child {
        grid-column: span 1;
    }
}
