/* =========================================================
   HOME — e-Serviços Amambai
   ========================================================= */

/* =========================================================
   HERO PRINCIPAL
   ========================================================= */

.home-hero {
    position: relative;
    overflow: hidden;
    min-height: 710px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background:
        linear-gradient(
            110deg,
            rgba(5, 30, 58, 0.88) 0%,
            rgba(0, 86, 166, 0.64) 48%,
            rgba(0, 58, 115, 0.48) 100%
        ),
        url("/static/img/identidade/hero-cidade.png") center center / cover no-repeat;
}

.home-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(5, 37, 74, 0.50) 0%,
            rgba(5, 37, 74, 0.30) 38%,
            rgba(5, 37, 74, 0.14) 68%,
            rgba(5, 37, 74, 0.04) 100%
        ),
        radial-gradient(circle at 12% 18%, rgba(0, 168, 107, 0.18), transparent 32%),
        radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.12), transparent 26%);
}

.home-hero__glow {
    position: absolute;
    z-index: 1;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(8px);
    opacity: 0.34;
    animation: homeGlowFloat 8s ease-in-out infinite;
}

.home-hero__glow--one {
    left: -120px;
    top: 88px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 68%);
}

.home-hero__glow--two {
    right: 6%;
    bottom: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.20), transparent 70%);
    animation-delay: 1.6s;
}

.home-hero__container {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 92px 22px 210px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 34px;
    align-items: center;
}

.home-hero__content,
.home-hero__panel,
.home-hero__actions {
    position: relative;
    z-index: 5;
}

.home-badge {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.82rem;
    font-weight: 800;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 26px rgba(7, 42, 83, 0.16);
}

.home-hero__content h1 {
    position: relative;
    z-index: 4;
    margin: 18px 0 16px;
    max-width: 720px;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.home-hero__content p {
    position: relative;
    z-index: 4;
    margin: 0;
    max-width: 660px;
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

.home-hero__actions {
    z-index: 5;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.home-hero__actions .btn,
.home-map-call__actions .btn {
    position: relative;
    overflow: hidden;
    min-height: 58px;
    padding-inline: 28px;
    border-radius: 999px;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease,
        border-color 0.28s ease;
    box-shadow: 0 18px 36px rgba(7, 42, 83, 0.20);
}

.home-hero__actions .btn::after,
.home-map-call__actions .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 80%
    );
    transform: translateX(-120%);
    transition: transform 0.72s ease;
}

.home-hero__actions .btn:hover::after,
.home-map-call__actions .btn:hover::after {
    transform: translateX(120%);
}

.home-hero__actions .btn:hover,
.home-map-call__actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(7, 42, 83, 0.24);
}

.home-hero__panel {
    display: flex;
    justify-content: flex-end;
}

/* =========================================================
   ONDAS SOBREPOSTAS DO HERO
   ========================================================= */

.home-hero__waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 6;
    height: 210px;
    pointer-events: none;
}

.home-hero__wave {
    position: absolute;
    left: -8%;
    width: 116%;
    line-height: 0;
    will-change: transform;
}

.home-hero__wave svg {
    display: block;
    width: 100%;
}

.home-hero__wave--back {
    bottom: 26px;
    opacity: 0.72;
    animation: waveDriftBack 18s ease-in-out infinite alternate;
}

.home-hero__wave--back svg {
    height: 178px;
}

.home-hero__wave--back path {
    fill: rgba(210, 235, 247, 0.54);
    filter: drop-shadow(0 -12px 26px rgba(7, 42, 83, 0.08));
}

.home-hero__wave--front {
    bottom: 0;
    animation: waveDriftFront 12s ease-in-out infinite alternate;
}

.home-hero__wave--front svg {
    height: 188px;
}

.home-hero__wave--front path {
    fill: var(--color-bg);
    filter: drop-shadow(0 -10px 24px rgba(7, 42, 83, 0.12));
}

/* =========================================================
   CARD LATERAL DA HOME
   ========================================================= */

.home-panel-card {
    width: 100%;
    max-width: 410px;
    padding: 30px;
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.20),
            rgba(255, 255, 255, 0.12)
        );
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 24px 64px rgba(7, 42, 83, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    animation: homePanelFloat 5.5s ease-in-out infinite;
}

.home-panel-card__icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(7, 42, 83, 0.16);
}

.home-panel-card__icon svg {
    width: 30px;
    height: 30px;
}

.home-panel-card h2 {
    margin: 18px 0 12px;
    font-size: 1.5rem;
    color: #ffffff;
}

.home-panel-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
}

.home-panel-card__items {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.home-panel-card__items span,
.home-panel-card__items a {
    min-height: 52px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.home-panel-card__items a:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(7, 42, 83, 0.18);
}

.home-panel-card__items svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* =========================================================
   SERVIÇOS DA HOME
   ========================================================= */

.home-services {
    position: relative;
    overflow: hidden;
    max-width: var(--container);
    margin: 0 auto;
    padding: 58px 22px 78px;
}

.home-services::before {
    content: "";
    position: absolute;
    top: 24px;
    right: -90px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 86, 166, 0.08), transparent 70%);
    pointer-events: none;
}

.home-section__header {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin-bottom: 32px;
}

.home-section__header h2 {
    margin: 14px 0 12px;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    color: var(--color-primary-deep);
}

.home-section__header p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.services-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 292px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 86, 166, 0.24);
    box-shadow: var(--shadow-md);
}

.service-card__icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(0, 86, 166, 0.20);
}

.service-card__icon svg {
    width: 30px;
    height: 30px;
}

.service-card__content span {
    display: inline-block;
    margin: 18px 0 8px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.service-card__content h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--color-primary-deep);
}

.service-card__content p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.65;
}

/* =========================================================
   BOTÕES DOS CARDS — PREMIUM
   ========================================================= */

.service-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-weight: 800;
    transition:
        transform 0.26s ease,
        box-shadow 0.26s ease,
        background 0.26s ease,
        border-color 0.26s ease;
    overflow: hidden;
    isolation: isolate;
}

.service-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        120deg,
        transparent 18%,
        rgba(255, 255, 255, 0.18) 46%,
        transparent 72%
    );
    transform: translateX(-120%);
    transition: transform 0.72s ease;
}

.service-card__link:hover::before {
    transform: translateX(120%);
}

.service-card__link-label,
.service-card__link-icon {
    position: relative;
    z-index: 1;
}

.service-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-card__link-icon svg {
    width: 18px;
    height: 18px;
}

.service-card__link:hover {
    transform: translateY(-2px);
}

.service-card__link:hover .service-card__link-icon {
    transform: translateX(2px);
}

.service-card__link--mapa {
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #0a468d);
    box-shadow: 0 14px 30px rgba(10, 70, 141, 0.22);
}

.service-card__link--mapa .service-card__link-icon {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.service-card__link--mapa:hover {
    box-shadow: 0 18px 36px rgba(10, 70, 141, 0.28);
}

.service-card__link--solicitar {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.22);
}

.service-card__link--solicitar .service-card__link-icon {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.service-card__link--solicitar:hover {
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.28);
}

.service-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);
}

.service-card__link--padrao .service-card__link-icon {
    background: linear-gradient(135deg, #0f5bb5, #0a468d);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(10, 70, 141, 0.22);
}

.service-card__link--padrao:hover {
    box-shadow: 0 16px 28px rgba(7, 42, 83, 0.14);
}

/* =========================================================
   CHAMADA DO MAPA
   ========================================================= */

.home-map-call {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(
            120deg,
            rgba(5, 30, 58, 0.82),
            rgba(0, 86, 166, 0.54)
        ),
        url("/static/img/identidade/hero-cachoeira.png") center center / cover no-repeat;
}

.home-map-call__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(7, 35, 70, 0.70) 0%,
            rgba(7, 35, 70, 0.44) 42%,
            rgba(7, 35, 70, 0.20) 72%,
            rgba(7, 35, 70, 0.06) 100%
        ),
        radial-gradient(
            circle at 85% 20%,
            rgba(0, 146, 255, 0.10),
            transparent 34%
        );
}

.home-map-call__container {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin: 0 auto;
    padding: 74px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.home-map-call__content {
    position: relative;
    z-index: 3;
    max-width: 760px;
}

.home-map-call__content h2 {
    margin: 14px 0 12px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    color: #ffffff;
}

.home-map-call__content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.75;
}

.home-map-call__actions {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* =========================================================
   ANIMAÇÕES
   ========================================================= */

.home-reveal {
    opacity: 0;
    transform: translateY(24px);
    animation: homeFadeUp 0.76s ease forwards;
}

.home-reveal--delay {
    animation-delay: 0.18s;
}

.service-card.home-reveal:nth-child(2) {
    animation-delay: 0.08s;
}

.service-card.home-reveal:nth-child(3) {
    animation-delay: 0.16s;
}

.service-card.home-reveal:nth-child(4) {
    animation-delay: 0.24s;
}

@keyframes homeFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homePanelFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes homeGlowFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(14px, -10px, 0) scale(1.04);
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes waveDriftBack {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(2.8%);
    }
}

@keyframes waveDriftFront {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-2.4%);
    }
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1100px) {
    .home-hero {
        min-height: 740px;
    }

    .home-hero__container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 82px;
        padding-bottom: 190px;
    }

    .home-hero__panel {
        justify-content: flex-start;
    }

    .home-panel-card {
        max-width: 560px;
    }

    .home-hero__waves {
        height: 190px;
    }

    .home-hero__wave--back svg {
        height: 150px;
    }

    .home-hero__wave--front svg {
        height: 162px;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-map-call__container {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-map-call__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 0;
        background-position: center center;
    }

    .home-hero__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(5, 37, 74, 0.48) 0%,
                rgba(5, 37, 74, 0.26) 45%,
                rgba(5, 37, 74, 0.08) 100%
            ),
            radial-gradient(circle at 22% 18%, rgba(0, 168, 107, 0.12), transparent 34%);
    }

    .home-hero__glow {
        display: none;
    }

    .home-hero__container,
    .home-services,
    .home-map-call__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-hero__container {
        gap: 24px;
        padding-top: 58px;
        padding-bottom: 142px;
    }

    .home-badge {
        font-size: 0.78rem;
        padding: 7px 12px;
    }

    .home-hero__content h1 {
        margin-top: 16px;
        font-size: clamp(2.15rem, 12vw, 3.3rem);
        line-height: 1.04;
    }

    .home-hero__content p {
        font-size: 1rem;
        line-height: 1.65;
    }

    .home-hero__actions,
    .home-map-call__actions {
        width: 100%;
        display: grid;
        gap: 12px;
    }

    .home-hero__actions .btn,
    .home-map-call__actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 54px;
    }

    .home-panel-card {
        max-width: 100%;
        padding: 22px;
        border-radius: 22px;
        animation: none;
    }

    .home-panel-card__items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .home-panel-card__items span,
    .home-panel-card__items a {
        min-height: 46px;
        text-align: center;
        border-radius: 14px;
        font-size: 0.86rem;
    }

    .home-hero__waves {
        height: 132px;
    }

    .home-hero__wave {
        left: -10%;
        width: 122%;
    }

    .home-hero__wave--back {
        bottom: 14px;
    }

    .home-hero__wave--back svg {
        height: 96px;
    }

    .home-hero__wave--front svg {
        height: 104px;
    }

    .home-services {
        padding-top: 48px;
        padding-bottom: 60px;
    }

    .home-map-call__container {
        gap: 22px;
        padding-top: 58px;
        padding-bottom: 58px;
    }

    .home-map-call__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(7, 35, 70, 0.58) 0%,
                rgba(7, 35, 70, 0.32) 52%,
                rgba(7, 35, 70, 0.10) 100%
            );
    }

    .service-card__link {
        min-height: 52px;
        padding: 8px 8px 8px 16px;
    }

    .service-card__link-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 620px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .home-hero__actions {
        flex-direction: column;
    }

    .home-panel-card__items {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .home-hero__container {
        padding-top: 48px;
        padding-bottom: 118px;
    }

    .home-panel-card__items {
        grid-template-columns: 1fr;
    }

    .home-hero__waves {
        height: 102px;
    }

    .home-hero__wave--back svg {
        height: 72px;
    }

    .home-hero__wave--front svg {
        height: 82px;
    }

    .home-hero__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(5, 37, 74, 0.42) 0%,
                rgba(5, 37, 74, 0.20) 48%,
                rgba(5, 37, 74, 0.06) 100%
            );
    }

    .home-map-call__overlay {
        background:
            linear-gradient(
                180deg,
                rgba(7, 35, 70, 0.52) 0%,
                rgba(7, 35, 70, 0.26) 55%,
                rgba(7, 35, 70, 0.08) 100%
            );
    }

    .service-card__link {
        font-size: 0.92rem;
    }
}

/* =========================================================
   ACESSIBILIDADE — REDUZIR MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .home-reveal,
    .home-panel-card,
    .home-hero__glow,
    .home-hero__wave,
    .home-hero__actions .btn,
    .home-map-call__actions .btn,
    .home-hero__actions .btn::after,
    .home-map-call__actions .btn::after,
    .service-card,
    .service-card__link,
    .service-card__link::before,
    .service-card__link-icon,
    .home-panel-card__items a {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* =========================================================
   BOTÕES DOS CARDS — HOME
   ========================================================= */

.service-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-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-card__link:hover::before {
    transform: translateX(120%);
}

.service-card__link-label,
.service-card__link-icon {
    position: relative;
    z-index: 1;
}

.service-card__link-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.service-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-card__link-icon svg {
    width: 18px;
    height: 18px;
}

.service-card__link:hover {
    transform: translateY(-2px);
}

.service-card__link:hover .service-card__link-icon {
    transform: translateX(2px);
}

/* Botão verde — Solicitar serviço */
.service-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-card__link--solicitar .service-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-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-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-card__link--mapa .service-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-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 — Acessar serviço */
.service-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-card__link--padrao .service-card__link-icon {
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow: 0 8px 18px rgba(10, 70, 141, 0.22);
}

.service-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-card__link {
        min-height: 52px;
        padding: 8px 8px 8px 16px;
        font-size: 0.94rem;
    }

    .service-card__link-icon {
        width: 36px;
        height: 36px;
    }

    .service-card__link-icon svg {
        width: 17px;
        height: 17px;
    }
}

@media (max-width: 420px) {
    .service-card__link {
        font-size: 0.9rem;
        gap: 8px;
    }
}

/* =========================================================
   HOME — LINKS LEGAIS E ACESSO DO SERVIDOR
========================================================= */

.home-legal-access {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 72px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(15, 91, 181, 0.12), transparent 34%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid rgba(191, 211, 234, 0.92);
    box-shadow:
        0 22px 52px rgba(7, 42, 83, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.home-legal-access__content {
    max-width: 780px;
    margin-bottom: 24px;
}

.home-legal-access__content h2 {
    margin: 12px 0 10px;
    color: var(--color-primary-deep);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
    font-weight: 950;
}

.home-legal-access__content p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.home-legal-access__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-legal-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    padding: 20px;
    border-radius: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    color: var(--color-primary-deep);
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(191, 211, 234, 0.86);
    box-shadow: 0 14px 34px rgba(7, 42, 83, 0.08);
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease;
}

.home-legal-card::after {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 118px;
    height: 118px;
    border-radius: 999px;
    background: rgba(15, 91, 181, 0.08);
}

.home-legal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 91, 181, 0.32);
    box-shadow: 0 22px 48px rgba(7, 42, 83, 0.14);
}

.home-legal-card__icon {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f5bb5, #073f7d);
    box-shadow:
        0 12px 24px rgba(7, 42, 83, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.home-legal-card__icon svg {
    width: 23px;
    height: 23px;
}

.home-legal-card div:last-child {
    position: relative;
    z-index: 2;
}

.home-legal-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--color-primary-deep);
    font-size: 1.05rem;
    font-weight: 950;
}

.home-legal-card span {
    display: block;
    color: var(--color-muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.home-legal-card--server .home-legal-card__icon {
    background: linear-gradient(135deg, #10b981, #047857);
}

/* =========================================================
   RESPONSIVO — HOME LINKS LEGAIS
========================================================= */

@media (max-width: 940px) {
    .home-legal-access__cards {
        grid-template-columns: 1fr;
    }

    .home-legal-card {
        min-height: 112px;
    }
}

@media (max-width: 560px) {
    .home-legal-access {
        width: min(100% - 22px, 1180px);
        margin: 26px auto 52px;
        border-radius: 24px;
    }

    .home-legal-card {
        padding: 18px;
        border-radius: 20px;
        gap: 13px;
    }

    .home-legal-card__icon {
        width: 46px;
        height: 46px;
        border-radius: 16px;
    }
}

/* =========================================================
   HOME — CARDS PREMIUM DE SERVIÇOS
========================================================= */

.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 h3 {
    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 POR TIPO DE SERVIÇO
========================================================= */

.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 — CARDS PREMIUM DE SERVIÇOS
========================================================= */

@media (max-width: 760px) {
    .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 h3 {
        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 NA HOME
   1º Iluminação pública
   2º Farmácias
   3º Demais serviços
========================================================= */

.services-grid > .service-card {
    order: 500;
}

.services-grid > .service-card--order-iluminacao {
    order: 10;
}

.services-grid > .service-card--order-farmacias {
    order: 20;
}

.services-grid > .service-card--order-default {
    order: 500;
}

/* =========================================================
   ATALHOS DO PAINEL INICIAL
   Mantém Iluminação e Farmácias lado a lado quando houver
   espaço de tela.
========================================================= */

.home-panel-card__items--prioritized {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-panel-card__items--prioritized .home-panel-card__item--primary {
    font-weight: 800;
}

@media (max-width: 520px) {
    .home-panel-card__items--prioritized {
        grid-template-columns: 1fr;
    }
}