/* ============================================
   SERVICES SECTION - Sección de Servicios
   ============================================ */

.services {
    background: #c9e5d4;
    position: relative;
}

.services svg#wave {
    display: block;
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
    left: 0;
}



/* ============================================
   SERVICES VISUAL GRID - Tarjetas con Imagen
   ============================================ */

/* Override el grid interno cuando tiene imágenes */
.services-group-grid--visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 0;
}

/* Tarjeta visual base */
.svc-img-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
    text-decoration: none;
    cursor: pointer;
    background: #1a2e1a;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.svc-img-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 90, 40, 0.30);
    z-index: 2;
}

/* Tarjeta destacada (2 columnas × 2 filas – mosaico) */
.svc-img-card--featured {
    grid-column: span 2;
    grid-row: span 2;
}

/* Imagen */
.svc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.4s ease;
    will-change: transform;
}

.svc-img-card:hover .svc-img {
    transform: scale(1.07);
    filter: brightness(0.72) saturate(1.1);
}

/* Overlay oscuro inferior */
.svc-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 25, 10, 0.88) 0%,
        rgba(5, 25, 10, 0.40) 45%,
        transparent 70%
    );
    transition: background 0.4s ease;
    z-index: 1;
}

.svc-img-card:hover .svc-img-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 60, 25, 0.92) 0%,
        rgba(0, 50, 20, 0.55) 55%,
        rgba(0, 0, 0, 0.15) 100%
    );
}

/* Tarjeta sin imagen: fondo gradiente verde oscuro */
.svc-img-card--no-img {
    background: linear-gradient(135deg, var(--dark-green), #1a3d2a);
}

.svc-img-card--no-img .svc-img-overlay {
    background: none;
}

/* Contenido sobre la imagen */
.svc-img-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Icono (solo en tarjeta sin imagen) */
.svc-img-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.svc-img-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

/* Badge (ej: "A domicilio") */
.svc-img-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.95);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 4px;
}

/* Título */
.svc-img-title {
    color: #fff;
    font-size: clamp(15px, 1.6vw, 20px);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Descripción – siempre visible (tarjetas grandes con espacio suficiente) */
.svc-img-desc {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    max-height: none;
    opacity: 0.82;
    transition: opacity 0.3s ease;
}

.svc-img-card:hover .svc-img-desc {
    opacity: 1;
}

/* En tarjeta sin imagen, descripción también visible */
.svc-img-card--no-img .svc-img-desc {
    opacity: 0.9;
}

/* CTA flecha – siempre visible */
.svc-img-cta {
    display: inline-block;
    color: #a8f5c0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.85;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.svc-img-card:hover .svc-img-cta {
    opacity: 1;
    transform: translateX(3px);
}

.svc-img-card--no-img .svc-img-cta {
    opacity: 0.9;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .services-group-grid--visual {
        grid-template-columns: repeat(2, 1fr);
    }

    .svc-img-card--featured {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .services-group-grid--visual {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .svc-img-card--featured {
        grid-column: span 2;
    }

    /* Cards pequeñas más altas para que quepa el contenido */
    .svc-img-card:not(.svc-img-card--featured) {
        aspect-ratio: 3 / 4;
    }

    .svc-img-title {
        font-size: 13px;
        line-height: 1.25;
    }

    .svc-img-body {
        padding: 10px;
        gap: 3px;
    }

    /* Ocultar descripción en cards pequeñas — no hay espacio suficiente */
    .svc-img-card:not(.svc-img-card--featured) .svc-img-desc {
        display: none;
    }

    .svc-img-cta {
        font-size: 12px;
    }
}

