/* --- Services Page Specific Styles --- */

.section-kicker {
    margin: 0 0 0.75rem;
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Services Hero Header --- */
.services-header {
    position: relative;
    min-height: 64vh;
    padding: 8rem 2rem 7rem;
    color: white;
    background-image: url('/static/img/living-room-updated-mobile.webp');
    background-size: cover;
    background-position: center 62%;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.services-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(38, 70, 83, 0.68);
    z-index: 1;
}

.services-header-content {
    position: relative;
    z-index: 2;
    max-width: min(900px, 100%);
    box-sizing: border-box;
}

.services-header .section-kicker,
.services-header h1,
.services-header .lead-text {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.45);
}

.services-header h1 {
    margin: 0 0 1.25rem;
    font-size: 3.4rem;
    line-height: 1.15;
}

.services-header .lead-text {
    max-width: 790px;
    margin-bottom: 2rem;
    font-size: 1.35rem;
}

.services-hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --- Overview --- */
.services-overview {
    max-width: 1140px;
    margin: 0 auto;
    padding: 5rem 2rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 2.5rem;
    align-items: end;
}

.overview-copy h2,
.overview-note h3 {
    text-align: left;
}

.overview-copy h2 {
    margin: 0 0 1rem;
}

.overview-copy p:last-child,
.overview-note p:last-child {
    margin-bottom: 0;
}

.overview-note {
    background: #ffffff;
    border-left: 6px solid var(--color-accent);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.overview-note h3 {
    margin: 0 0 0.75rem;
    color: var(--color-secondary);
    font-size: 1.7rem;
}

/* --- Care Pathway --- */
.care-pathway-section {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.pathway-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.pathway-card {
    min-height: 280px;
    background: #ffffff;
    border: 1px solid rgba(38, 70, 83, 0.12);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.pathway-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: rgba(231, 111, 81, 0.12);
    color: var(--color-accent);
    font-weight: 700;
}

.pathway-card h3 {
    margin: 0 0 0.75rem;
    color: var(--color-secondary);
    font-size: 1.7rem;
}

.pathway-card p {
    margin-bottom: 0;
    font-size: 1.02rem;
}

/* --- Provider Coordination --- */
.provider-section {
    background: #ffffff;
    padding: 5rem 2rem;
}

.provider-card {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "portrait copy"
        "extras   copy";
    column-gap: 3.5rem;
    row-gap: 2rem;
    align-items: start;
}

.provider-portrait {
    grid-area: portrait;
}

.provider-copy {
    grid-area: copy;
}

.provider-extras {
    grid-area: extras;
    align-self: start;
}

.provider-card-no-image {
    display: block;
    max-width: 900px;
}

/* Without a portrait there is no sidebar, so let the trust points wrap
   horizontally again instead of stacking full width. */
.provider-card-no-image .provider-extras .provider-points {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.provider-card-no-image .provider-extras h3 {
    margin-top: 1.5rem;
}

.provider-portrait img {
    width: 100%;
    aspect-ratio: 15 / 16;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.provider-caption {
    margin: 0.7rem 0 0;
    color: var(--color-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    opacity: 0.82;
    transition: color 0.4s ease, opacity 0.4s ease, text-shadow 0.4s ease;
}

/* Caption gently glows on hover */
.provider-caption:hover {
    opacity: 1;
    color: var(--color-primary);
    text-shadow: 0 0 14px rgba(58, 90, 64, 0.4);
}

.provider-copy h2 {
    text-align: left;
    margin: 0 0 1.25rem;
}

.provider-copy h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--color-secondary);
    font-size: 1.55rem;
    text-align: left;
}

.provider-subtitle {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.45;
}

.provider-copy p {
    max-width: 760px;
}

.provider-extras h3 {
    margin: 0 0 1.1rem;
    color: var(--color-secondary);
    font-size: 1.4rem;
    text-align: left;
}

.provider-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0;
    margin: 2rem 0 0;
}

/* In the portrait sidebar the trust points read as a stacked checklist
   directly beneath the photo, filling the left column top to bottom. */
.provider-extras .provider-points {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin: 0;
}

.provider-extras .provider-points li {
    justify-content: flex-start;
}

.provider-points li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #F1ECE7;
    border: 1px solid rgba(38, 70, 83, 0.12);
    border-radius: 999px;
    color: var(--color-secondary);
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.65rem 1.1rem;
    cursor: default;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Check mark cue on each coordination point */
.provider-points li::before {
    content: '\f00c'; /* Font Awesome check */
    font-family: 'Willow Icons';
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--color-accent);
    transition: color 0.25s ease, transform 0.25s ease;
}

.provider-points li:hover {
    transform: translateY(-3px);
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 8px 18px rgba(58, 90, 64, 0.28);
}

.provider-points li:hover::before {
    color: #fff;
    transform: scale(1.15);
}

.provider-closing {
    margin-top: 1.5rem;
    color: var(--color-secondary);
    font-weight: 700;
}

/* --- Service Grid --- */
.service-grid-section {
    padding-top: 5rem;
}

.section-heading {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 3rem;
}

.section-heading h2 {
    margin-bottom: 1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid rgba(58, 90, 64, 0.12);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.service-card i {
    color: var(--color-accent);
    font-size: 2rem;
    margin-bottom: 1.15rem;
}

.service-card h3 {
    margin: 0 0 0.75rem;
    color: var(--color-secondary);
    font-size: 1.65rem;
}

.service-card p {
    margin-bottom: 0;
    font-size: 1.02rem;
}

/* --- Integrated Safety Section --- */
.safety-section {
    background: var(--color-secondary);
    color: white;
    padding: 6rem 2rem;
}

.safety-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.safety-heading {
    max-width: 850px;
    margin: 0 auto 3rem;
    text-align: center;
}

.safety-section h2,
.safety-section h3,
.safety-section .lead-text,
.safety-section p {
    color: white;
}

.safety-section .lead-text {
    color: #f3f0ec;
}

.safety-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.safety-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 1.75rem;
}

.safety-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
}

.safety-card p {
    margin-bottom: 0;
    color: #f3f0ec;
    font-size: 1rem;
}

.safety-disclaimer {
    max-width: 980px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    color: #f3f0ec;
    font-size: 0.98rem;
    text-align: center;
}

.services-cta {
    padding-top: 5rem;
}

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

@media (min-width: 769px) {
    .services-header { background-image: url('/static/img/living-room-updated.webp'); }
}

@media (max-width: 900px) {
    .services-header {
        width: 100%;
        max-width: 100%;
        min-height: 58vh;
        padding: 7rem 1.5rem 6rem;
        background-attachment: scroll;
        box-sizing: border-box;
        overflow: hidden;
    }

    .services-header h1 {
        font-size: 2.7rem;
    }

    .services-overview {
        grid-template-columns: 1fr;
    }

    .provider-card {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-template-areas:
            "portrait"
            "copy"
            "extras";
        row-gap: 2rem;
    }

    .provider-portrait {
        max-width: 360px;
        margin: 0 auto;
    }

    .provider-extras .provider-points {
        align-items: stretch;
    }

    .provider-extras .provider-points li {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    .services-header h1 {
        font-size: 2.05rem;
        width: 100%;
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    .services-header .lead-text {
        font-size: 1.08rem;
        line-height: 1.7;
        width: 100%;
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    .services-hero-actions .btn-primary,
    .services-hero-actions .btn-secondary {
        display: block;
        width: 100%;
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .pathway-grid,
    .service-grid,
    .safety-grid {
        grid-template-columns: 1fr;
    }

    .services-overview,
    .provider-section,
    .safety-section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .pathway-card,
    .service-card,
    .safety-card,
    .overview-note {
        padding: 1.5rem;
    }
}
