/* ========================================================================== 
   MALABAR — PROJECTS CATALOG
   Full-viewport project hero + intro + 3-column project grid.
   ========================================================================== */

body.malabar-projects-catalog-page {
    background: var(--malabar-cream);
    color: var(--malabar-blue);
}

/* The shortcode may live inside the normal page/WPBakery container. Break the
 * whole catalog out to the viewport so the hero and grid control their own
 * margins and can start directly underneath the fixed transparent header. */
.malabar-projects-catalog {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    overflow: clip;
    background: var(--malabar-cream);
    color: var(--malabar-blue);
}

.malabar-projects-catalog__hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 640px;
    margin: 0;
    overflow: hidden;
    background: #243238;
}

.malabar-projects-catalog__hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.malabar-projects-catalog__hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .02) 44%, rgba(0, 0, 0, .34) 100%),
        rgba(0, 0, 0, .07);
    pointer-events: none;
}

.malabar-projects-catalog__hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: flex;
    width: min(980px, calc(100% - (2 * var(--page-margin))));
    align-items: center;
    flex-direction: column;
    transform: translate(-50%, -43%);
    color: #fff;
    text-align: center;
}

.malabar-projects-catalog__eyebrow,
.malabar-projects-catalog__hero-description {
    margin: 0;
    color: #fff;
}

.malabar-projects-catalog__eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.malabar-projects-catalog__hero-description {
    max-width: 640px;
    margin-top: 12px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    line-height: 20px;
}

.malabar-projects-catalog__hero-title {
    display: flex;
    margin: 14px 0 0;
    align-items: center;
    flex-direction: column;
    color: #fff;
    font-family: var(--font-primary);
    font-size: clamp(40px, 5.15vw, 78px);
    font-weight: 600;
    line-height: .94;
    letter-spacing: -.04em;
}

.malabar-projects-catalog__hero-title span {
    display: block;
}

.malabar-projects-catalog__hero-cta {
    display: inline-flex;
    min-width: 158px;
    height: 48px;
    margin-top: 30px;
    padding: 0 28px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    background: var(--malabar-blue);
    color: #fff !important;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: .10em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: transform 160ms ease, opacity 160ms ease;
}

.malabar-projects-catalog__hero-cta img {
    display: block;
    width: 13px;
    height: 13px;
    object-fit: contain;
}

.malabar-projects-catalog__hero-cta:hover,
.malabar-projects-catalog__hero-cta:focus-visible {
    transform: translateY(-1px);
    opacity: .9;
}

.malabar-projects-catalog__content {
    padding: clamp(54px, 5.3vw, 94px) var(--page-margin) clamp(86px, 7vw, 130px);
    background: var(--malabar-cream);
}

.malabar-projects-catalog__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .98fr);
    gap: clamp(42px, 8vw, 160px);
    margin-bottom: clamp(54px, 5vw, 92px);
    align-items: start;
}

.malabar-projects-catalog__heading {
    margin: 0;
    color: var(--malabar-blue);
    font-family: var(--font-primary);
    font-size: clamp(38px, 4.2vw, 64px);
    font-weight: 600;
    line-height: .98;
    letter-spacing: -.04em;
}

.malabar-projects-catalog__intro-copy {
    width: min(100%, 610px);
    justify-self: end;
    color: var(--malabar-blue);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
}

.malabar-projects-catalog__intro-copy p {
    margin: 0;
    color: inherit;
    font: inherit;
}

.malabar-projects-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(54px, 5vw, 92px) clamp(12px, 1.1vw, 22px);
}

.malabar-project-card {
    min-width: 0;
    margin: 0;
}

.malabar-project-card__link {
    display: block;
    color: var(--malabar-blue) !important;
    text-decoration: none !important;
}

.malabar-project-card__media {
    position: relative;
    width: 100%;
    margin: 0;
    aspect-ratio: 1.52 / 1;
    overflow: hidden;
    background: #e8e4c9;
}

.malabar-project-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(.2, .65, .25, 1);
}

.malabar-project-card__link:hover .malabar-project-card__image,
.malabar-project-card__link:focus-visible .malabar-project-card__image {
    transform: scale(1.025);
}

.malabar-project-card__content {
    padding-top: 12px;
}

.malabar-project-card__short,
.malabar-project-card__title,
.malabar-project-card__location,
.malabar-project-card__explore {
    margin: 0;
    color: var(--malabar-blue);
}

.malabar-project-card__short {
    margin-bottom: 3px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

.malabar-project-card__title,
.malabar-project-card__location {
    font-family: var(--font-primary);
    font-size: 15px;
    line-height: 20px;
}

.malabar-project-card__title {
    font-weight: 600;
}

.malabar-project-card__location {
    font-weight: 500;
}

.malabar-project-card__explore {
    display: inline-flex;
    margin-top: 8px;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 15px;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.malabar-project-card__explore-icon {
    display: block;
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    object-fit: contain;
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
}

@media (hover: hover) and (pointer: fine) {
    .malabar-project-card__media {
        transition:
            transform 360ms cubic-bezier(.22, 1, .36, 1),
            box-shadow 360ms cubic-bezier(.22, 1, .36, 1);
    }

    .malabar-project-card__link:hover .malabar-project-card__media,
    .malabar-project-card__link:focus-visible .malabar-project-card__media {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(19, 82, 137, .08);
    }

    .malabar-project-card__link:hover .malabar-project-card__explore-icon,
    .malabar-project-card__link:focus-visible .malabar-project-card__explore-icon {
        transform: translate(2px, -2px);
    }
}

@media (max-width: 980px) {
    .malabar-projects-catalog__intro {
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
        gap: 48px;
    }

    .malabar-projects-catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .malabar-projects-catalog__hero {
        min-height: 600px;
    }

    .malabar-projects-catalog__hero-content {
        transform: translate(-50%, -38%);
    }

  .malabar-projects-catalog__hero-title {
    font-size: clamp(26px, 9vw, 48px);
    line-height: .98;
}

    .malabar-projects-catalog__hero-description {
        font-size: 14px;
        line-height: 19px;
    }

    .malabar-projects-catalog__intro {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .malabar-projects-catalog__intro-copy {
        justify-self: start;
    }

    .malabar-projects-catalog__grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* ========================================================================== 
   MOBILE — FIGMA PROJECTS CATALOG
   Keep the desktop catalogue untouched; on phones the reference uses a
   shorter hero and a compact two-column project grid.
   ========================================================================== */
@media (max-width: 700px) {
    .malabar-projects-catalog__hero {
        height: 68svh;
        min-height: 520px;
        max-height: 600px;
    }

    .malabar-projects-catalog__hero-content {
        top: 50%;
        width: calc(100% - 36px);
        transform: translate(-50%, -44%);
    }

    /* The mobile Figma only shows the project name/location and CTA. */
    .malabar-projects-catalog__eyebrow,
    .malabar-projects-catalog__hero-description {
        display: none;
    }

    .malabar-projects-catalog__hero-title {
        max-width: 330px;
        margin-top: 0;
        font-size: clamp(28px, 8.8vw, 36px);
        line-height: .96;
        letter-spacing: -.045em;
    }

.malabar-projects-catalog__hero-cta {
    min-width: 158px;
    height: 44px;
    margin-top: 24px;
    padding: 0 22px;
    font-size: 12px;
    line-height: 14px;
}

    .malabar-projects-catalog__content {
        padding: 44px 9px 68px;
    }

    .malabar-projects-catalog__intro {
        display: block;
        margin-bottom: 42px;
    }

    .malabar-projects-catalog__heading {
        margin: 0 0 16px;
        font-size: 21px;
        line-height: 1;
        letter-spacing: -.025em;
    }

    .malabar-projects-catalog__intro-copy {
        width: 100%;
        max-width: 340px;
        font-size: 14px;
        line-height: 17px;
    }

    .malabar-projects-catalog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
        row-gap: 24px;
    }

    .malabar-project-card__media {
        aspect-ratio: 1 / 1;
    }

    .malabar-project-card__content {
        padding-top: 6px;
    }

    .malabar-project-card__short {
        margin-bottom: 1px;
        font-size: 9px;
        line-height: 11px;
    }

.malabar-project-card__title, .malabar-project-card__location {
    font-size: 14px;
    line-height: 16px;
}

.malabar-project-card__explore {
    margin-top: 15px;
    gap: 4px;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: .09em;
}

    .malabar-project-card__explore-icon {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 360px) {
    .malabar-projects-catalog__content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .malabar-projects-catalog__grid {
        column-gap: 7px;
    }

    .malabar-project-card__title,
    .malabar-project-card__location {
        font-size: 10px;
        line-height: 11px;
    }
}
