/* ============================================================
   DEVELOPMENTS GRID — CLEAN, GLOBAL-COMPATIBLE
============================================================ */

.developments-grid {
    width: 100%;
}

/* Heading follows global H2 (already styled globally) */
.developments-grid__heading {
    margin-bottom: var(--space-sm);
    text-align: center;
}

/* Description text */
.developments-grid__description {
    max-width: var(--container-narrow);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 900;
}

/* ============================================================
   GRID LAYOUT — 2 COLUMNS ON DESKTOP, 1 ON TABLET/MOBILE
============================================================ */

.developments-grid__wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    width: 100%;
}

/* Collapse to single column at tablet */
@media (max-width: 1024px) {
    .developments-grid__wrapper {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Full width on mobile */
@media (max-width: 768px) {
    .developments-grid__wrapper {
        max-width: 100%;
        gap: var(--space-md);
    }
}

/* ============================================================
   CARD — STRUCTURE
============================================================ */

.developments-grid__card {
    background: #fff;
    border: 1px solid var(--color-grey-mid);
    box-shadow: 0px 3px 6px #00000022;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   IMAGE — CONSISTENT HEIGHT
============================================================ */

.developments-grid__image {
    width: 100%;
    height: 320px;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .developments-grid__image {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .developments-grid__image {
        height: 240px;
    }
}

.developments-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   CONTENT AREA
============================================================ */

.developments-grid__content {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* STATUS LABEL */
.developments-grid__content .progress-bar {
    font-family: var(--font-heading);
    font-size: var(--font-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-gold);
    margin-bottom: var(--space-xs);
    display: block;
}

/* Title (H3 is global purple) */
.developments-grid__content h3 {
    margin-bottom: var(--space-xs);
}

/* Body text */
.developments-grid__content p {
    flex-grow: 1; /* pushes CTA to the bottom */
    margin-bottom: var(--space-sm);
}

/* CTA button – inherits global button rules */
.developments-grid__content .btn {
    align-self: flex-start;
}

/* ============================================================
   GLOBAL BUTTON SYSTEM
============================================================ */

.button,
.cta-button,
a.button,
a.cta-button,
button,
input[type="button"],
input[type="submit"],
.contact-us__button,
.features__button,
.developments-grid__content .btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-white);
    border: 2px solid var(--color-gold);
    color: var(--color-purple);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.button:hover,
.cta-button:hover,
a.button:hover,
a.cta-button:hover,
button:hover,
input[type="submit"]:hover,
.contact-us__button:hover,
.features__button:hover,
.developments-grid__content .btn:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-white);
}

/* FORCE CARD + IMAGE + CONTENT TO BE EXACT SAME HEIGHT */
.developments-grid__card {
    height: auto !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* IMAGE TAKES TOP HALF */
.developments-grid__image {
    height: 50% !important;
    flex-shrink: 0;
}

.developments-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* CONTENT TAKES LOWER HALF */
.developments-grid__content {
    height: 60% !important;
    padding: 30px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* OPTIONAL — tighten spacing inside */
.developments-grid__content h3,
.developments-grid__content p,
.developments-grid__content .progress-bar {
    margin: 0 0 10px 0 !important;
}

.developments-grid__content .btn {
    margin-top: auto !important;
}

.developments-grid__content .btn {
    all: unset;
    display: inline-block;

    /* GLOBAL BUTTON STYLES */
    padding: var(--space-xs) var(--space-md);
    background: var(--color-white);
    border: 2px solid var(--color-gold);
    color: var(--color-purple);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;

    /* ALIGNMENT + SPACING */
    align-self: flex-start;
    margin-top: var(--space-sm); /* subtle spacing below the paragraph */
}

.developments-grid__content .btn {
    margin-top: var(--space-sm) !important;
}

.developments-grid .developments-grid__heading {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    color: var(--color-purple);
}

.developments-grid.section-padding {
    padding-left: var(--section-padding-x) !important;
    padding-right: var(--section-padding-x) !important;
}

/* ============================================================
   FIX: REMOVE BROKEN FORCED HEIGHTS
   (This is why your bottom cards exploded)
============================================================ */

.developments-grid__image,
.developments-grid__content,
.developments-grid__card {
    height: auto !important;
}

/* Keep the image a consistent visual height */
.developments-grid__image {
    height: 320px !important;
}

@media (max-width: 1024px) {
    .developments-grid__image {
        height: 280px !important;
    }
}

@media (max-width: 768px) {
    .developments-grid__image {
        height: 240px !important;
    }
}

/* ============================================================
   CLEAN + TIGHT SPACING (keeps your good top-row spacing)
============================================================ */

.developments-grid__content {
    padding: 28px !important;
}

.developments-grid__content .progress-bar {
    margin-bottom: 6px !important;
}

.developments-grid__content h3 {
    margin-bottom: 8px !important;
}

.developments-grid__content p {
    margin-bottom: 14px !important;
}

.developments-grid__content .btn {
    margin-top: 12px !important;
}

/* ============================================================
   DEVELOPMENTS GRID — UPDATED HEADING + DESCRIPTION SPACING
============================================================ */

/* Match global purple h2 styling */
.developments-grid__heading {
    font-family: var(--font-heading);
    font-size: var(--font-h3);
    font-weight: 700;
    line-height: var(--lh-tight);
    color: var(--color-purple) !important;
    text-align: center !important;
    margin-bottom: var(--space-md) !important;
    max-width: 820px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Wider description + more bottom spacing */
.developments-grid__description {
    max-width: 820px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: var(--space-md) !important; 
    text-align: center !important;
}

/* ============================================================
   DESKTOP-ONLY: Fix CTA alignment and equal card heights
============================================================ */
@media (min-width: 1025px) {

    /* Make the overall card stretch evenly */
    .developments-grid__card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Make the content area flexible */
    .developments-grid__content {
        display: flex;
        flex-direction: column;
        flex-grow: 1;      /* fills remaining space */
    }

    /* Push CTA button to the bottom */
    .developments-grid__content .btn {
        margin-top: auto !important;
    }
}
