/* ==========================================
   SERVICIOS V2 — Visual cards with product thumbnails
   ========================================== */

.servicios-section {
    background: var(--warg-bg-gray);
    padding: 80px 48px;
    position: relative;
}

.servicios-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

/* ---- SERVICE CARD V2 ---- */
.servicio-card-v2 {
    background: var(--warg-bg-white);
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    transition: transform 0.35s ease, filter 0.35s ease;
    filter: drop-shadow(0 2px 8px rgba(10, 43, 78, 0.06));
    position: relative;
    display: flex;
    flex-direction: column;
}

.servicio-card-v2:hover {
    transform: translateY(-6px);
    filter:
        drop-shadow(0 0 8px rgba(27, 117, 188, 0.3))
        drop-shadow(0 0 20px rgba(27, 117, 188, 0.12))
        drop-shadow(0 8px 16px rgba(10, 43, 78, 0.1));
}

/* Star badge for Dotaciones */
.servicio-card-v2--star {
    outline: 2px solid var(--warg-blue-vibrant);
    outline-offset: -2px;
}

.servicio-v2-star-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--warg-blue-vibrant);
    color: var(--warg-text-light);
    font-family: var(--warg-font-display);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    z-index: 3;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

/* Cover image area */
.servicio-v2-cover {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
}

.servicio-v2-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.servicio-card-v2:hover .servicio-v2-cover img {
    transform: scale(1.08);
}

.servicio-v2-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 43, 78, 0.85) 0%, rgba(10, 43, 78, 0.1) 60%);
    pointer-events: none;
}

.servicio-v2-name {
    position: absolute;
    bottom: 16px;
    left: 20px;
    font-family: var(--warg-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--warg-text-light);
    letter-spacing: 1px;
    z-index: 1;
}

/* Product thumbnails grid */
.servicio-v2-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid rgba(27, 117, 188, 0.08);
}

.servicio-v2-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-right: 1px solid rgba(27, 117, 188, 0.06);
    border-bottom: 1px solid rgba(27, 117, 188, 0.06);
}

.servicio-v2-thumb:nth-child(3n) {
    border-right: none;
}

.servicio-v2-thumb:nth-child(n+4) {
    border-bottom: none;
}

.servicio-v2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.servicio-v2-thumb:hover img {
    transform: scale(1.12);
}

.servicio-v2-thumb span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: linear-gradient(0deg, rgba(10, 43, 78, 0.8), transparent);
    font-family: var(--warg-font-display);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--warg-text-light);
    text-align: center;
}

/* CTA button */
.servicio-v2-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background: var(--warg-blue-navy);
    color: var(--warg-text-light);
    font-family: var(--warg-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
    margin-top: auto;
}

.servicio-v2-cta:hover {
    background: var(--warg-blue-vibrant);
}

.servicio-card-v2--star .servicio-v2-cta {
    background: var(--warg-blue-vibrant);
}

.servicio-card-v2--star .servicio-v2-cta:hover {
    background: #1565a8;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .servicios-section {
        padding: 60px 24px;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .servicios-section {
        padding: 48px 20px;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .servicio-v2-cover {
        aspect-ratio: 16/9;
    }

    .servicio-v2-name {
        font-size: 1.1rem;
        bottom: 12px;
        left: 16px;
    }

    .servicio-v2-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .servicio-v2-thumb span {
        font-size: 0.55rem;
        padding: 3px 4px;
    }

    .servicio-v2-cta {
        padding: 14px 16px;
        min-height: 44px;
        font-size: 0.75rem;
    }

    .servicio-v2-star-badge {
        font-size: 0.6rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .servicios-section {
        padding: 36px 16px;
    }

    .servicios-grid {
        gap: 14px;
    }

    .servicio-card-v2 {
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    }

    .servicio-v2-cover {
        aspect-ratio: 16/10;
    }

    .servicio-v2-name {
        font-size: 1rem;
        bottom: 10px;
        left: 12px;
        letter-spacing: 0.5px;
    }

    .servicio-v2-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .servicio-v2-thumb span {
        font-size: 0.5rem;
        letter-spacing: 0.5px;
    }

    .servicio-v2-thumb:nth-child(3n) {
        border-right: 1px solid rgba(27, 117, 188, 0.06);
    }

    .servicio-v2-thumb:nth-child(2n) {
        border-right: none;
    }

    .servicio-v2-thumb:nth-child(n+4) {
        border-bottom: 1px solid rgba(27, 117, 188, 0.06);
    }

    .servicio-v2-thumb:nth-child(n+5) {
        border-bottom: none;
    }

    .servicio-v2-cta {
        padding: 12px 14px;
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }
}
