/* =========================
   Public Services corregido
   Compatible con public-home.css
========================= */

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 370px;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.services-hero {
    background:
        radial-gradient(circle at 92% 12%, rgba(72, 120, 255, 0.32), transparent 32%),
        linear-gradient(135deg, #06183f 0%, #0b2a6f 48%, #244dab 100%);
}

.services-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.services-hero .shell {
    position: relative;
    z-index: 1;
    padding: 72px 0;
}

.services-hero h1 {
    margin: 18px 0 16px;
    max-width: 670px;
    font-size: clamp(48px, 6vw, 76px);
    line-height: .95;
    letter-spacing: -0.07em;
    font-weight: 1000;
}

.services-hero p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 500;
}

.services-public-section {
    background:
        radial-gradient(circle at 90% 0%, rgba(37, 99, 235, .10), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    padding-top: 82px;
}

.services-headline {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: end;
    gap: 32px;
    margin-bottom: 34px;
}

.services-headline h2 {
    margin: 12px 0 0;
    color: var(--primary);
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1;
    letter-spacing: -0.06em;
    font-weight: 1000;
}

.services-headline p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 16px;
}

.public-message {
    margin: 0 0 24px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--text-soft);
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.public-message:empty {
    display: none;
}

.public-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.public-service-card {
    overflow: hidden;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition:
        transform .24s ease,
        box-shadow .24s ease,
        border-color .24s ease;
}

.public-service-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37, 99, 235, 0.30);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.14);
}

.service-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #eef4ff;
    overflow: hidden;
}

.service-image-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition:
        transform .32s ease,
        filter .32s ease;
}

.public-service-card:hover .service-image-link img {
    transform: scale(1.055);
    filter: saturate(1.08);
}

.service-card-content {
    padding: 22px;
}

.service-card-meta {
    margin-bottom: 12px;
}

.service-card-meta span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--primary-soft);
    color: var(--primary-3);
    font-size: 12px;
    font-weight: 1000;
}

.service-card-content h2 {
    margin: 0;
    color: var(--primary);
    font-size: 22px;
    line-height: 1.18;
    font-weight: 1000;
}

.service-card-content p {
    margin: 12px 0 0;
    color: var(--text-soft);
    line-height: 1.62;
    font-size: 15px;
}

.service-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 18px;
    border-radius: 999px;
    padding: 0 18px;
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 1000;
    font-size: 14px;
    box-shadow: 0 14px 26px rgba(11, 42, 111, 0.22);
    transition:
        transform .24s ease,
        background .24s ease,
        box-shadow .24s ease;
}

.service-button::after {
    content: " →";
}

.service-button:hover {
    background: var(--primary-2);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(11, 42, 111, 0.28);
}

/* Corrección fuerte por si web.css quedó cacheado o cargado */
.web-header,
.header-inner,
.web-nav,
.web-menu-button,
.web-container {
    all: unset;
}

/* Responsive */
@media (max-width: 1080px) {
    .services-headline {
        grid-template-columns: 1fr;
    }

    .public-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .page-hero {
        min-height: auto;
    }

    .services-hero .shell {
        padding: 54px 0 76px;
    }

    .services-hero h1 {
        font-size: 48px;
    }

    .services-hero p {
        font-size: 16px;
    }

    .services-headline {
        gap: 16px;
    }

    .services-headline h2 {
        font-size: 40px;
    }

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

    .service-button {
        width: 100%;
    }
}