/* =========================================================================
   Projects page — card grid
   Data source: Content/projects.json, rendered by projects.aspx
   ========================================================================= */

body.mh-modern-body .mh-projects-page {
    max-width: 1188px;
    margin: 0 auto;
    padding: 36px 22px 64px;
    text-align: left;
    color: var(--mh-navy);
}

body.mh-modern-body .mh-projects-header {
    max-width: 860px;
    margin: 0 0 36px;
}

body.mh-modern-body .mh-projects-title {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
    color: var(--mh-navy);
    letter-spacing: 0.01em;
}

body.mh-modern-body .mh-projects-intro {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--mh-navy-soft);
}

body.mh-modern-body .mh-projects-section {
    margin: 44px 0 0;
}

body.mh-modern-body .mh-projects-section-head {
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mh-line);
}

body.mh-modern-body .mh-projects-section-heading {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mh-navy);
}

body.mh-modern-body .mh-projects-section-heading::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 2px;
    margin-right: 12px;
    background: var(--mh-gold);
    vertical-align: middle;
}

body.mh-modern-body .mh-projects-section-tagline {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--mh-navy-soft);
}

body.mh-modern-body .mh-projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

body.mh-modern-body .mh-projects-grid-textonly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mh-modern-body .mh-project-card {
    position: relative;
    box-sizing: border-box;
    min-height: 520px;
    height: auto;
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--mh-shadow);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card {
    min-height: 0;
    padding: 0;
}

body.mh-modern-body .mh-project-card:nth-child(even) {
    flex-direction: row-reverse;
}

body.mh-modern-body .mh-project-card:hover {
    transform: translateY(-2px);
    border-color: var(--mh-gold);
    box-shadow: 0 18px 40px -22px rgba(23, 36, 80, 0.45),
                0 4px 12px rgba(23, 36, 80, 0.08);
}

body.mh-modern-body .mh-project-card-copy {
    display: flex;
    flex: 0 0 50%;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    min-height: 0;
    padding: 46px 46px 42px;
    box-sizing: border-box;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-copy {
    flex: 1 1 auto;
    padding: 30px 32px;
}

body.mh-modern-body .mh-project-card-media {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 28px;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(236, 217, 169, 0.28), rgba(23, 36, 80, 0.05));
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-media {
    display: none;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-with-image {
    flex-direction: column;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-with-image:nth-child(even) {
    flex-direction: column;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-with-image .mh-project-card-media {
    order: -1;
    display: flex;
    flex: 0 0 auto;
    min-height: 230px;
    padding: 24px 24px 8px;
}

body.mh-modern-body .mh-projects-section-textonly .mh-project-card-with-image .mh-project-card-media img {
    max-width: min(92%, 660px);
    max-height: 270px;
}

body.mh-modern-body .mh-project-card-media img {
    display: block;
    max-width: min(86%, 430px);
    max-height: 455px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(23, 36, 80, 0.22));
}

body.mh-modern-body .mh-project-card-heading {
    margin: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--mh-gold);
}

body.mh-modern-body .mh-project-card-edition {
    margin: 0 0 3px;
    font-size: 22px;
    font-weight: 700;
    color: #8d671b;
    letter-spacing: 0.01em;
    line-height: 1.18;
}

body.mh-modern-body .mh-project-card-title {
    margin: 0;
    font-size: 29px;
    font-weight: 700;
    color: var(--mh-navy);
    letter-spacing: 0.005em;
    line-height: 1.15;
}

body.mh-modern-body .mh-project-card-subtitle {
    margin: 6px auto 0;
    font-size: 20px;
    font-weight: 650;
    color: var(--mh-navy-soft);
    text-align: center;
    line-height: 1.25;
}

body.mh-modern-body .mh-project-card-edition:empty,
body.mh-modern-body .mh-project-card-subtitle:empty {
    display: none;
}

body.mh-modern-body .mh-project-card-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--mh-navy);
    max-height: none;
    overflow: visible;
}

body.mh-modern-body .mh-project-card-body p {
    margin: 0 0 10px;
}

body.mh-modern-body .mh-project-card-body :is(p, ul, ol, li, span, em, strong) {
    font-size: inherit !important;
    line-height: inherit !important;
}

body.mh-modern-body .mh-project-card-body p:last-child {
    margin-bottom: 0;
}

body.mh-modern-body .mh-project-card-body ul {
    margin: 6px 0 10px;
    padding-left: 18px;
}

body.mh-modern-body .mh-project-card-body ul:last-child {
    margin-bottom: 0;
}

body.mh-modern-body .mh-project-card-body li {
    margin-bottom: 6px;
}

body.mh-modern-body .mh-project-card-body li:last-child {
    margin-bottom: 0;
}

body.mh-modern-body .mh-project-card-body strong {
    color: var(--mh-navy);
}

body.mh-modern-body .mh-project-card-body em {
    color: var(--mh-navy-soft);
    font-style: italic;
}

@media (max-width: 720px) {
    body.mh-modern-body .mh-projects-page {
        padding: 24px 16px 48px;
    }
    body.mh-modern-body .mh-projects-title {
        font-size: 26px;
    }
    body.mh-modern-body .mh-projects-grid {
        grid-template-columns: 1fr;
    }
    body.mh-modern-body .mh-projects-grid-textonly {
        grid-template-columns: 1fr;
    }
    body.mh-modern-body .mh-project-card {
        height: auto;
        min-height: 0;
        flex-direction: column !important;
        padding: 18px;
    }
    body.mh-modern-body .mh-project-card-copy {
        flex-basis: auto;
        padding: 0;
    }
    body.mh-modern-body .mh-project-card-media {
        flex-basis: auto;
        order: -1;
        margin: -18px -18px 0;
        padding: 22px;
    }
    body.mh-modern-body .mh-project-card-media img {
        max-height: 190px;
    }
}

