/* ============================================
   JME Glass Recycling - Service Page Styles
   Used on all service pages (reusable template)
   ============================================ */

/* --- Qualified Banner (green band) --- */
.qualified-banner {
    background: var(--green-primary);
    color: var(--white);
    padding: 56px 0;
}

.qualified-banner__inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
    align-items: center;
}

.qualified-banner__left h2 {
    color: var(--white);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.qualified-banner__right p {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 100%;
}

/* --- SEO Content Block --- */
.seo-content {
    max-width: 860px;
}

.seo-content__body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.seo-content__body p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-mid);
    max-width: 72ch;
}

/* --- Related Service Cards --- */
.related-services-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, calc((100% - 48px) / 3));
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 18px;
    margin: 0 -4px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--green-primary) transparent;
}

.related-services-slider::-webkit-scrollbar {
    height: 8px;
}

.related-services-slider::-webkit-scrollbar-track {
    background: transparent;
}

.related-services-slider::-webkit-scrollbar-thumb {
    background: var(--green-primary);
    border-radius: 999px;
}

.related-service-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    text-decoration: none;
    scroll-snap-align: start;
    transition: var(--transition);
}

.related-service-card:hover {
    border-color: var(--green-light);
    box-shadow: var(--shadow-med);
    transform: translateY(-2px);
}

.related-service-card__icon {
    width: 48px;
    height: 48px;
    background: var(--green-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.related-service-card__icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--green-primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.related-service-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.related-service-card__text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 16px;
    max-width: 100%;
    flex: 1;
}

.related-service-card__link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--green-primary);
    transition: var(--transition);
}

.related-service-card:hover .related-service-card__link {
    color: var(--green-dark);
}

/* --- Section header (left-aligned intro block) --- */
.section-header {
    max-width: 640px;
}

/* --- Services index: alternating service features --- */
body[data-page="services"] .services-list-section {
    background: var(--white);
}

.services-list__header {
    margin-bottom: 52px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.services-feature {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(36px, 6vw, 84px);
    align-items: center;
}

.services-feature--reverse {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.services-feature--reverse .services-feature__content {
    order: 2;
}

.services-feature--reverse .services-feature__image {
    order: 1;
}

.services-feature__content h3 {
    margin-bottom: 18px;
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    line-height: 1.12;
    color: var(--text-dark);
}

.services-feature__content p:not(.section-label) {
    max-width: 54ch;
}

.services-feature__content .btn {
    margin-top: 10px;
}

.services-feature__image {
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-med);
}

.services-feature__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (max-width: 768px) {
    .services-list__header {
        margin-bottom: 36px;
    }

    .services-list {
        gap: 52px;
    }

    .services-feature,
    .services-feature--reverse {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .services-feature--reverse .services-feature__content,
    .services-feature--reverse .services-feature__image {
        order: initial;
    }

    .services-feature__image,
    .services-feature__image img {
        min-height: 260px;
    }
}

/* --- Non-home page rhythm: white / branded grey / green --- */
body:not([data-page="home"]) .section--grey {
    background: #1f252b;
    color: var(--white);
}

body:not([data-page="home"]) .section--grey h2,
body:not([data-page="home"]) .section--grey .step__title {
    color: var(--white);
}

body:not([data-page="home"]) .section--grey .lead,
body:not([data-page="home"]) .section--grey .step__text {
    color: rgba(255,255,255,0.82);
}

body:not([data-page="home"]) [aria-labelledby="process-heading"] p:not(.section-label) {
    color: var(--white);
}

body[data-page="services"] .section--grey .content-image__content p:not(.section-label) {
    color: var(--white);
}

body:not([data-page="home"]) .section--grey .divider {
    background: var(--green-primary);
}

body:not([data-page="home"]) .section--grey .stats-row {
    background: rgba(255,255,255,0.16);
}

body:not([data-page="home"]) .section--grey .section-label {
    color: var(--green-light);
}

.cta-section--dark {
    background: #1f252b;
}

/* --- Responsive overrides for service pages --- */
@media (max-width: 1024px) {

    .related-services-slider {
        grid-auto-columns: minmax(280px, calc((100% - 24px) / 2));
    }
}

@media (max-width: 768px) {

    .related-services-slider {
        grid-auto-columns: minmax(260px, 84%);
        gap: 16px;
        padding-bottom: 16px;
    }

    .related-service-card {
        padding: 24px;
    }

    .qualified-banner__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .qualified-banner {
        padding: 40px 0;
    }
}
