/* Prologic redesign - shared card used site-wide (loaded from _Layout).
   Figma: services card (887:9010). Used by the services page grid and by the
   child / sibling page boxes at the bottom of article pages (Article.cshtml ShowTree). */

/* Card (887:9010): #FAFAFA, orange bottom edge, image on top, centred title, arrow bottom-left */
.ph-service {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    height: 100%;
    min-height: 218px;
    padding: 8px 4px 16px;
    overflow: hidden;
    border-bottom: 1px solid var(--color-orange);
    border-radius: 8px;
    background: #FAFAFA;
    box-shadow: 0 0 10px rgba(202, 202, 202, 0.5);
    transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}

.ph-service__media {
    display: block;
    width: 100%;
    height: 124px;
    overflow: hidden;
    border-radius: 8px;
}

.ph-service__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-hover) var(--ease-out);
}

.ph-service__title {
    display: block;
    width: 100%;
    padding: 0 16px 0 9px;
    color: #333333;
    font-family: var(--font-side-tab) !important;
    font-size: 18px;
    line-height: 22.86px;
    text-align: center;
}

.ph-service__arrow {
    position: absolute;
    left: 19px;
    bottom: 12px;          /* = top 182px in the 218px Figma card; stays at the bottom when titles wrap */
    width: 24px;
    height: 24px;
    transition: transform var(--dur-hover) var(--ease-out);
}

/* Hover - no Figma variant; same lift as the other cards */
.ph-service:hover,
.ph-service:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(243, 111, 34, 0.16);
}

.ph-service:hover .ph-service__media img {
    transform: scale(1.04);
}

.ph-service:hover .ph-service__arrow {
    transform: translateX(-4px);
}

.ph-service:hover .ph-service__title {
    color: var(--color-orange);
}

/* Card grid for article pages (inside the legacy 1170px .container) */
.ph-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 26px;
    width: 100%;
    margin: 30px 0 40px;
    padding: 0;
    list-style: none;
    clear: both;
}

.ph-cards > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Article-page boxes are often product logos - show the whole image instead of cropping it */
.ph-cards .ph-service__media {
    background: var(--color-white);
}

.ph-cards .ph-service__media img {
    object-fit: contain;
}

@media (max-width: 991px) {
    .ph-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .ph-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}
