/* Section 4 — Service Overview "Lean On Us. Loan With Us." (components/services/services.php) */

.services {
    background: var(--color-navy-mid);
    color: var(--color-off-white);
    border-radius: var(--radius-section);
    padding: 80px var(--side-padding);
    max-width: var(--content-max);
    margin-inline: auto;
}

.services__head { text-align: center; margin-bottom: 48px; }

/* Title — DM Serif Display Regular 82 / 88, mint, per Figma. */
.services__title {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: 82px;
    line-height: 88px;
    margin: 0 auto 20px;
    /* Gold gradient clipped to the text (Figma: C6A15B → E2C986 → F7E6B9 → C6A15B).
       fit-content shrink-wraps the heading so the gradient spans it edge-to-edge. */
    width: fit-content;
    max-width: 100%;
    background: var(--gradient-gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--color-gold); /* fallback if background-clip:text is unsupported */
}

/* Subtitle — Montserrat Regular 20, mint, per Figma. */
.services__subtitle {
    font-family: var(--font-body);
    font-weight: var(--weight-regular);
    font-size: 20px;
    line-height: 1.5;
    color: var(--color-mint-light);
    max-width: 720px;
    margin: 0 auto;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 45px;
    /* Each card hugs its own content so top and bottom padding stay even
       (default stretch would pile the extra height onto shorter cards' bottoms). */
    align-items: start;
}

/* Outlined cards — transparent fill, F7F9F8 hairline border, 40px radius (Figma). */
.service-card {
    position: relative;
    isolation: isolate;
    background: transparent;
    border: 1px solid var(--color-off-white);
    border-radius: 40px;
    padding: 60px 40px;
    transition: box-shadow 0.35s ease;
}
/* When a card carries a link it renders as an <a>; keep it visually identical to
   the static card (no underline, inherited colour) and show it's clickable. */
.service-card--link,
.service-card--link:hover,
.service-card--link:focus,
.service-card--link:focus-within {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.service-card--link .service-card__title,
.service-card--link .service-card__text {
    text-decoration: none;
}
/* Hover fill — the mint→off-white gradient cross-fades in (gradients can't
   transition directly). inset:-1px covers the hairline border so it disappears
   under the fill; the overlay paints above the border but below the content. */
.service-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: var(--gradient-card-hover);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.service-card:hover::before,
.service-card:focus-within::before {
    opacity: 1;
}
.service-card:hover,
.service-card:focus-within {
    box-shadow: 0 14px 34px rgba(9, 30, 66, 0.30);
}

/* Title — Montserrat SemiBold 18, mint; Description — Montserrat Regular 16, mint (Figma). */
.service-card__title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: var(--weight-semibold);
    color: var(--color-mint-light);
    /* Generous gap from the icon, medium gap to the description (Figma). */
    margin: 40px 0 20px;
    transition: color 0.35s ease;
}
.service-card__text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: var(--weight-regular);
    line-height: 1.6;
    color: var(--color-mint-light);
    margin: 0;
    transition: color 0.35s ease;
}

/* On the light hover fill the content inverts to dark for contrast (Figma):
   navy title/body, and the icon box flips to navy with a light glyph. */
/* Icon box — 80×80, 10px radius, F7F9F8 fill by default (Figma). */
.service-card .icon-box {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: var(--color-off-white);
    transition: background-color 0.35s ease, color 0.35s ease;
}
/* Image-based icon (PNG/SVG file). On hover the box turns navy, so the glyph is
   filtered to pure white to keep contrast — matching the SVG's currentColor flip. */
.service-card .icon-box__img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: filter 0.35s ease;
}
.service-card:hover .icon-box__img,
.service-card:focus-within .icon-box__img {
    filter: brightness(0) invert(1);
}
.service-card:hover .service-card__title,
.service-card:focus-within .service-card__title {
    color: var(--color-navy-deep);
}
.service-card:hover .service-card__text,
.service-card:focus-within .service-card__text {
    color: var(--color-navy-mid);
}
.service-card:hover .icon-box,
.service-card:focus-within .icon-box {
    background: var(--color-navy-deep);
    color: var(--color-off-white);
}

/* Medical Finance spotlight — narrower image column so the 48px title fits one line. */
.services__spotlight {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 56px;
}
/* Faded illustration (Figma). */
.services__spotlight-media img {
    opacity: 0.5;
}
/* Title — DM Serif Display Regular 48, mint (Figma). */
.services__spotlight-title {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: 48px;
    color: var(--color-mint-light);
    margin: 0 0 16px;
}
/* Text — Montserrat Regular 20, mint (Figma). */
.services__spotlight-text {
    font-family: var(--font-body);
    font-weight: var(--weight-regular);
    font-size: 20px;
    line-height: 1.6;
    color: var(--color-mint-light);
    margin-bottom: 28px;
}

@media (max-width: 1024px) {
    .services { border-radius: 0; padding: 56px 24px; }
    .services__grid { grid-template-columns: 1fr; }
    .services__title { font-size: 48px; line-height: 1.1; }
    .services__spotlight { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .services__title { font-size: 36px; }
    .services__subtitle { font-size: 16px; }
    .service-card { border-radius: 28px; padding: 32px 24px; }
}
