.psm-hero {
    margin-top: 52px;
    background: #f8f9fa;
}

.psm-hero__pleca {
    height: 577px;
    color: #fff;
    background: url('/PSM/img/psm-banner-institucional.svg') center / 100% 100% no-repeat;
}

.psm-hero__contenido {
    position: relative;
    display: flex;
    width: min(1180px, calc(100% - 48px));
    min-height: 577px;
    margin: auto;
    align-items: center;
    justify-content: space-between;
}

.psm-hero__texto {
    position: relative;
    z-index: 1;
    max-width: 650px;
    padding-bottom: 48px;
    font-size: 16px;
}

.psm-hero__texto h1 {
    margin: 0;
    color: #fff;
    font-size: 3.5em;
    font-weight: 700;
    line-height: normal;
}

.psm-hero__texto p {
    margin: 24px 0 0;
    color: #fff;
    font-size: 2em;
    font-weight: 500;
    line-height: 1.25;
    text-shadow: 0 4px 4px rgba(0, 0, 0, .25);
}

.psm-hero__bandera {
    position: absolute;
    right: 0;
    bottom: 48px;
    width: min(48vw, 560px);
    height: auto;
}

.psm-home {
    padding-top: 32px;
    padding-bottom: 64px;
    color: #2f2f2f;
}

.psm-home__heading {
    max-width: 760px;
    margin-bottom: 32px;
    font-size: 16px;
    animation: psm-reveal .5s ease-out both;
}

.psm-home__eyebrow,
.psm-service-card__eyebrow {
    color: #8a6b20;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.psm-home__heading h2 {
    margin: 8px 0 12px;
    color: #3b3b3b;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.psm-home__heading p {
    margin: 0;
    color: #5f5f5f;
    font-size: 18px;
    line-height: 1.6;
}

.psm-notice {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid #e5d1d8;
    border-left: 5px solid #9b2247;
    border-radius: 4px;
    background: #fbf7f8;
    animation: psm-reveal .5s .08s ease-out both;
}

.psm-notice__mark {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #9b2247;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.psm-notice h3 {
    margin: 0 0 8px;
    color: #611232;
    font-size: 20px;
    font-weight: 700;
}

.psm-notice p {
    margin: 0;
    color: #4b4b4b;
    font-size: 16px;
    line-height: 1.6;
}

.psm-home__messages:empty {
    display: none;
}

.psm-services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.psm-service-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .07);
    animation: psm-reveal .5s ease-out both;
}

.psm-service-card:nth-child(1) { animation-delay: .12s; }
.psm-service-card:nth-child(2) { animation-delay: .18s; }
.psm-service-card:nth-child(3) { animation-delay: .24s; }
.psm-service-card:nth-child(4) { animation-delay: .30s; }

.psm-service-card__image {
    display: block;
    width: 100%;
    height: 176px;
    object-fit: cover;
}

.psm-service-card__body {
    display: flex;
    min-height: 250px;
    padding: 24px;
    flex: 1;
    flex-direction: column;
}

.psm-service-card h3 {
    margin: 8px 0 12px;
    color: #3b3b3b;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.psm-service-card p {
    margin: 0 0 24px;
    color: #626262;
    font-size: 16px;
    line-height: 1.5;
}

.psm-service-card__form {
    margin-top: auto;
}

.psm-service-card .btn.psm-service-card__action {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 48px;
    margin-top: auto;
    padding: 12px 8px;
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.psm-service-card__action:focus-visible {
    outline: 3px solid #d4c19c;
    outline-offset: 3px;
}

.psm-support {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding: 32px;
    align-items: center;
    justify-content: space-between;
    border-top: 4px solid #bc955c;
    border-radius: 4px;
    background: #f7f4ef;
    animation: psm-reveal .5s .36s ease-out both;
}

.psm-support > div:first-child {
    max-width: 650px;
}

.psm-support h2 {
    margin: 8px 0 10px;
    color: #3b3b3b;
    font-size: 28px;
    font-weight: 700;
}

.psm-support p {
    margin: 0;
    color: #5f5f5f;
    font-size: 16px;
    line-height: 1.5;
}

.psm-support__contact {
    display: flex;
    min-width: 320px;
    flex-direction: column;
    text-align: right;
}

.psm-support__contact a {
    color: #611232;
    font-size: 17px;
    font-weight: 700;
    text-decoration: underline;
}

.psm-support__contact span {
    margin-top: 8px;
    color: #3b3b3b;
    font-size: 20px;
    font-weight: 700;
}

.psm-support__contact small {
    margin-top: 4px;
    color: #626262;
    font-size: 14px;
}

@media (hover: hover) {
    .psm-service-card {
        transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    }

    .psm-service-card__image {
        transition: transform .35s ease;
    }

    .psm-service-card:hover {
        border-color: #bc955c;
        box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
        transform: translateY(-6px);
    }

    .psm-service-card:hover .psm-service-card__image {
        transform: scale(1.035);
    }
}

@keyframes psm-reveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .psm-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .psm-hero__pleca {
        height: 521px;
        background-image: url('/PSM/img/psm-banner-institucional-mobile.svg');
    }

    .psm-hero__contenido {
        width: calc(100% - 32px);
        min-height: 521px;
        align-items: flex-start;
    }

    .psm-hero__texto {
        padding: 48px 0 0;
    }

    .psm-hero__texto h1 {
        font-size: 2.5em;
    }

    .psm-hero__texto p {
        max-width: 288px;
        margin-top: 12px;
        font-size: 1.25em;
    }

    .psm-hero__bandera {
        right: 50%;
        bottom: 24px;
        width: 384px;
        max-width: none;
        transform: translateX(50%);
    }

    .psm-home {
        padding-top: 24px;
        padding-bottom: 48px;
    }

    .psm-home__heading h2 {
        font-size: 30px;
    }

    .psm-home__heading p {
        font-size: 17px;
    }

    .psm-notice {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .psm-notice__mark {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .psm-services {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .psm-service-card__image {
        height: 190px;
    }

    .psm-service-card__body {
        min-height: 0;
        padding: 24px 20px;
    }

    .psm-support {
        gap: 24px;
        padding: 24px 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .psm-support__contact {
        min-width: 0;
        text-align: left;
    }
}

@media (min-width: 651px) and (max-width: 914px) {
    .psm-hero__pleca,
    .psm-hero__contenido {
        min-height: 495px;
        height: 495px;
    }

    .psm-hero__texto h1 {
        font-size: 2.8125em;
    }

    .psm-hero__texto p {
        font-size: 1.625em;
    }

    .psm-hero__bandera {
        width: 448px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .psm-home__heading,
    .psm-notice,
    .psm-service-card,
    .psm-support {
        animation: none;
    }

    .psm-service-card,
    .psm-service-card__image {
        transition: none;
    }
}
