/* Public service browsing pages: /Services (ServiceTypeList.razor) and /Services/{id} (ServiceGrid.razor) */

/* ── /Services: category list, styled like the open mobile nav menu ──
   Centered turquoise Comfortaa links, no lines between items, one longer beige line above and below
   the whole list (same as .nav-mobile-menu nav::before/::after in PageLayout.css). */
.service-type-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 3rem;
}
.service-type-nav::before,
.service-type-nav::after {
    content: '';
    display: block;
    width: 60%;
    max-width: 16rem;
    border-top: 1px solid var(--color-secondary-dark);
    margin: 0.75rem auto;
}
.service-type-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin: 1rem 0;
    padding: 0.4rem 1rem;
    color: var(--color-main);
    font-family: ComfortaMedium;
    font-size: 1.25rem;
    letter-spacing: 0.07em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s;
}
.service-type-nav-link:hover,
.service-type-nav-link:focus { color: var(--color-main); opacity: 0.7; }

/* ── /Services/{id}: service cards, same look as the employee cards on the Team page ──
   White rounded card, photo on top with a shadow along its bottom edge, text part with a beige border
   on the sides and bottom. Service names use Comfortaa (not the Allura script of the employee names):
   long service names were hard to read in script (same choice as the service detail title).
   Columns: 2 below 600px (cards shrink with the screen), 3 from 600px, 4 from 1280px.
   Thin beige lines between the cards, as on the Team page. */
.service-card-grid {
    --service-card-gap: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 13rem));
    justify-content: center;
    gap: var(--service-card-gap);
    margin: 1.5rem 0 3.5rem;
}
@media (min-width: 600px) {
    .service-card-grid { --service-card-gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 14rem)); }
}
@media (min-width: 1280px) {
    .service-card-grid { grid-template-columns: repeat(4, 14rem); }
}

.service-card-link { position: relative; display: block; text-decoration: none; }
/* Vertical line between cards in a row (::after) and horizontal line above every row but the first (::before) */
.service-card-link::after,
.service-card-link::before { position: absolute; background-color: var(--color-secondary); }
.service-card-link::after  { top: 15%; bottom: 15%; right: calc(var(--service-card-gap) / -2); width: 1px; }
.service-card-link::before { left: 8%; right: 8%; top: calc(var(--service-card-gap) / -2); height: 1px; }
@media (max-width: 599.98px) {
    .service-card-link:not(:nth-child(2n))::after,
    .service-card-link:not(:nth-child(-n+2))::before { content: ''; }
}
@media (min-width: 600px) and (max-width: 1279.98px) {
    .service-card-link:not(:nth-child(3n))::after,
    .service-card-link:not(:nth-child(-n+3))::before { content: ''; }
}
@media (min-width: 1280px) {
    .service-card-link:not(:nth-child(4n))::after,
    .service-card-link:not(:nth-child(-n+4))::before { content: ''; }
}
/* The last card of the list has no neighbour to its right */
.service-card-link:last-child::after { content: none !important; }

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px 2px rgba(0,0,0,0.1), 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.15s;
}
.service-card-link:hover .service-card { box-shadow: 0 8px 24px 3px rgba(0,0,0,0.16), 0 1px 4px rgba(0,0,0,0.06); transform: translateY(-2px); }
.service-card-photo {
    display: block;
    width: 100%;
    aspect-ratio: 24 / 19;   /* same shape as the employee card photo */
    object-fit: cover;
    border-radius: 1rem 1rem 0 0;
}
/* Shadow along the photo's bottom edge, falling up into the photo (overlay: an inset shadow on the
   <img> itself would be painted under the image) — same as .team-employee-photo-wrap */
.service-card-photo-wrap { position: relative; }
.service-card-photo-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1rem 1rem 0 0;
    box-shadow: inset 0px -8px 14px -4px rgba(0,0,0,0.35);
    pointer-events: none;
}
.service-card-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-secondary);
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    padding: 0.8rem 0.6rem 0.9rem;
}
.service-card-name {
    display: block;
    text-align: center;
    font-family: ComfortaMedium;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    line-height: 1.3;
    word-break: break-word;
}
@media (min-width: 600px) {
    .service-card-text { padding: 0.9rem 0.75rem 1rem; }
    .service-card-name { font-size: 1.05rem; }
}
