.services-page,
.service-detail {
    max-width: var(--container);
    margin: 0 auto;
    padding: 72px 22px;
}

.services-page__header,
.service-detail__header {
    max-width: 820px;
    margin-bottom: 34px;
}

.services-page__header h1,
.service-detail__header h1 {
    margin: 14px 0 12px;
    font-size: clamp(2.1rem, 4vw, 3.4rem);
    color: var(--color-primary-deep);
    letter-spacing: -0.035em;
}

.services-page__header p,
.service-detail__header p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.75;
    font-size: 1.02rem;
}

.services-page__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.service-list-card {
    min-height: 290px;
    padding: 24px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.service-list-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-list-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.service-list-card__icon,
.service-detail__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-list-card__icon svg,
.service-detail__icon svg {
    width: 30px;
    height: 30px;
}

.service-list-card__status {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.service-list-card__body span,
.service-detail__title span {
    display: inline-block;
    margin: 18px 0 8px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.service-list-card__body h2 {
    margin: 0 0 10px;
    color: var(--color-primary-deep);
    font-size: 1.25rem;
}

.service-list-card__body p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.service-list-card__link {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--color-secondary-dark);
    font-weight: 800;
}

.service-list-card__link svg {
    width: 18px;
    height: 18px;
}

.service-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--color-primary-dark);
    font-weight: 800;
}

.service-detail__back svg {
    width: 18px;
    height: 18px;
}

.service-detail__title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.service-detail__title span {
    margin: 0 0 6px;
}

.service-detail__title h1 {
    margin: 0;
}

.service-detail__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.service-detail__card {
    padding: 24px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.service-detail__card > svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.service-detail__card h2 {
    margin: 0 0 10px;
    color: var(--color-primary-deep);
    font-size: 1.2rem;
}

.service-detail__card p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.service-detail__actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-light {
    background: #ffffff;
    color: var(--color-primary-dark);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

@media (max-width: 980px) {
    .services-page__grid,
    .service-detail__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .services-page,
    .service-detail {
        padding: 58px 16px;
    }

    .services-page__grid,
    .service-detail__grid {
        grid-template-columns: 1fr;
    }

    .service-detail__title {
        align-items: flex-start;
    }

    .service-detail__icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .service-detail__actions {
        flex-direction: column;
    }
}

.btn-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.service-detail__status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.btn-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================================
   BOTÕES DOS CARDS — LISTA DE SERVIÇOS
   ========================================================= */

.service-list-card__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    margin-top: 24px;
    padding: 8px 10px 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.26s ease,
        box-shadow 0.26s ease,
        background 0.26s ease,
        border-color 0.26s ease;
}

.service-list-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        120deg,
        transparent 18%,
        rgba(255, 255, 255, 0.20) 46%,
        transparent 72%
    );
    transform: translateX(-120%);
    transition: transform 0.72s ease;
}

.service-list-card__link:hover::before {
    transform: translateX(120%);
}

.service-list-card__link-label,
.service-list-card__link-icon {
    position: relative;
    z-index: 1;
}

.service-list-card__link-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.service-list-card__link-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition:
        transform 0.24s ease,
        background 0.24s ease,
        box-shadow 0.24s ease;
}

.service-list-card__link-icon svg {
    width: 18px;
    height: 18px;
}

.service-list-card__link:hover {
    transform: translateY(-2px);
}

.service-list-card__link:hover .service-list-card__link-icon {
    transform: translateX(2px);
}

/* Botão verde — Solicitar serviço */
.service-list-card__link--solicitar {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow:
        0 14px 30px rgba(5, 150, 105, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.service-list-card__link--solicitar .service-list-card__link-icon {
    background: rgba(255, 255, 255, 0.17);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 8px 18px rgba(4, 120, 87, 0.24);
}

.service-list-card__link--solicitar:hover {
    box-shadow:
        0 18px 38px rgba(5, 150, 105, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

/* Botão azul — Ver no mapa / Abrir mapa */
.service-list-card__link--mapa {
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow:
        0 14px 30px rgba(10, 70, 141, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.service-list-card__link--mapa .service-list-card__link-icon {
    background: rgba(255, 255, 255, 0.17);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 8px 18px rgba(7, 63, 125, 0.24);
}

.service-list-card__link--mapa:hover {
    box-shadow:
        0 18px 38px rgba(10, 70, 141, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

/* Botão claro — Ver detalhes */
.service-list-card__link--padrao {
    color: var(--color-primary-deep);
    background: linear-gradient(135deg, #f8fbff, #edf4fb);
    border: 1px solid rgba(15, 91, 181, 0.14);
    box-shadow:
        0 10px 24px rgba(7, 42, 83, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.service-list-card__link--padrao .service-list-card__link-icon {
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow: 0 8px 18px rgba(10, 70, 141, 0.22);
}

.service-list-card__link--padrao:hover {
    border-color: rgba(15, 91, 181, 0.22);
    box-shadow:
        0 16px 30px rgba(7, 42, 83, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

/* Responsividade dos botões */
@media (max-width: 768px) {
    .service-list-card__link {
        min-height: 52px;
        padding: 8px 8px 8px 16px;
        font-size: 0.94rem;
    }

    .service-list-card__link-icon {
        width: 36px;
        height: 36px;
    }

    .service-list-card__link-icon svg {
        width: 17px;
        height: 17px;
    }
}

@media (max-width: 420px) {
    .service-list-card__link {
        font-size: 0.9rem;
        gap: 8px;
    }
}

/* =========================================================
   LISTA DE SERVIÇOS — CARDS PREMIUM PADRÃO HOME
========================================================= */

.services-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card--premium {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 24px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.11), transparent 34%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid rgba(191, 211, 234, 0.92);
    box-shadow:
        0 18px 42px rgba(7, 42, 83, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition:
        transform 0.26s ease,
        box-shadow 0.26s ease,
        border-color 0.26s ease;
}

.service-card--premium:hover {
    transform: translateY(-6px);
    border-color: rgba(15, 91, 181, 0.35);
    box-shadow:
        0 28px 58px rgba(7, 42, 83, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.service-card__shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.62),
            rgba(255, 255, 255, 0) 42%
        );
    z-index: 1;
}

.service-card--premium::after {
    content: "";
    position: absolute;
    right: -54px;
    top: -54px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(15, 91, 181, 0.08);
    z-index: 1;
}

.service-card__top,
.service-card__content,
.service-card__link {
    position: relative;
    z-index: 2;
}

.service-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.service-card--premium .service-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow:
        0 14px 28px rgba(7, 42, 83, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.service-card--premium .service-card__icon svg {
    width: 26px;
    height: 26px;
}

.service-card__badge {
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: #0f5bb5;
    background: rgba(15, 91, 181, 0.09);
    border: 1px solid rgba(15, 91, 181, 0.14);
    font-size: 0.73rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.service-card__category {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.service-card--premium h2 {
    margin: 0 0 12px;
    color: var(--color-primary-deep);
    font-size: 1.32rem;
    line-height: 1.16;
    font-weight: 950;
}

.service-card--premium p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.68;
    font-size: 0.96rem;
}

.service-card--premium .service-card__content {
    flex: 1;
}

.service-card--premium .service-card__link {
    margin-top: 24px;
    min-height: 52px;
    padding: 0 8px 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-decoration: none;
    font-weight: 950;
    letter-spacing: -0.01em;
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow:
        0 14px 30px rgba(7, 42, 83, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.service-card--premium .service-card__link:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 18px 38px rgba(7, 42, 83, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.service-card__link-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #073f7d;
    background: rgba(255, 255, 255, 0.92);
}

.service-card__link-icon svg {
    width: 19px;
    height: 19px;
}

/* =========================================================
   VARIAÇÕES DOS CARDS
========================================================= */

.service-card--solicitar .service-card__icon,
.service-card--solicitar .service-card__link {
    background: linear-gradient(135deg, #10b981, #047857);
}

.service-card--solicitar .service-card__badge {
    color: #047857;
    background: rgba(16, 185, 129, 0.11);
    border-color: rgba(16, 185, 129, 0.20);
}

.service-card--solicitar .service-card__link-icon {
    color: #047857;
}

.service-card--mapa .service-card__icon,
.service-card--mapa .service-card__link {
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
}

.service-card--mapa .service-card__badge {
    color: #0f5bb5;
    background: rgba(15, 91, 181, 0.09);
    border-color: rgba(15, 91, 181, 0.14);
}

.service-card--mapa .service-card__link-icon {
    color: #073f7d;
}

.service-card--padrao .service-card__icon,
.service-card--padrao .service-card__link {
    background: linear-gradient(135deg, #475569, #1e293b);
}

.service-card--padrao .service-card__badge {
    color: #475569;
    background: rgba(71, 85, 105, 0.10);
    border-color: rgba(71, 85, 105, 0.18);
}

.service-card--padrao .service-card__link-icon {
    color: #1e293b;
}

/* =========================================================
   RESPONSIVO — LISTA DE SERVIÇOS
========================================================= */

@media (max-width: 1080px) {
    .services-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .services-page__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-card--premium {
        min-height: 0;
        padding: 21px;
        border-radius: 24px;
    }

    .service-card__top {
        margin-bottom: 18px;
    }

    .service-card--premium .service-card__icon {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .service-card--premium .service-card__icon svg {
        width: 23px;
        height: 23px;
    }

    .service-card--premium h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 460px) {
    .service-card__top {
        flex-direction: column;
    }

    .service-card__badge {
        width: fit-content;
    }

    .service-card--premium .service-card__link {
        width: 100%;
    }
}

/* =========================================================
   ORDEM DOS CARDS DE SERVIÇOS
   1º Iluminação pública
   2º Farmácias
   3º Demais serviços e locais de interesse
========================================================= */

.services-page__grid > .service-card {
    order: 500;
}

.services-page__grid > .service-card--order-iluminacao {
    order: 10;
}

.services-page__grid > .service-card--order-farmacias {
    order: 20;
}

.services-page__grid > .service-card--order-default {
    order: 500;
}