.services-section {
    padding: 80px 1.5rem;
    background-color: var(--color-bg);
}

.services-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

.title-underline {
    width: 60px;
    height: 3px;
    background-color: var(--color-brand);
    margin: 0 auto;
}

.services-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--color-text);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.85;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 30%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 0.9) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: background 0.4s ease;
}

.service-tag {
    /* Convertimos en bloque en línea para que el fondo solo ocupe el texto */
    display: inline-block; 
    
    /* Colores usando tus variables de base.css */
    background-color: var(--color-brand);
    color: white !important; /* Blanco para contraste sobre el rojo */
    
    /* Forma de Pill */
    padding: 4px 12px;
    border-radius: 9999px;
    
    /* Tipografía */
    font-weight: 800;
    font-size: 0.65rem; /* Un poco más pequeña para que se vea elegante */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    
    /* Espaciado y Visibilidad */
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(0);
    transition: all 0.4s ease;
    
    /* Sombra sutil para despegarlo de la imagen */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.service-overlay h4 {
    font-family: var(--font-serif);
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.service-overlay p {
    color: #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    transform: translateY(15px);
    opacity: 1;
    transition: all 0.4s ease 0.1s;
}

.service-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.service-link span {
    transition: transform 0.3s ease;
}

/* --- EFECTOS HOVER --- */

.service-card:hover img {
    transform: scale(1.1);
}

.service-card:hover .service-overlay {
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(185, 20, 20, 0.2) 50%,
            /* Tinte de tu color-brand */
            rgba(0, 0, 0, 0.95) 100%);
}

.service-card:hover .service-tag {
    background-color: var(--color-brand-hover);
    transform: translateY(-2px); /* Pequeño salto al hacer hover */
}
.service-card:hover .service-tag,
.service-card:hover .service-overlay p {
    transform: translateY(0);
    opacity: 1;
}

.service-link:hover {
    color: var(--color-brand-hover);
}

.service-link:hover span {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .services-section {
        padding: 40px 1rem;
        /* Reducimos espacio excesivo */
    }

    .section-title {
        font-size: 1.5rem;
        /* Título más acorde al ancho del celular */
        letter-spacing: 0.1em;
    }

    .services-grid {
        gap: 1.5rem;
        /* Menos separación entre tarjetas */
        margin-top: 2.5rem;
    }

    .service-card {
        height: 320px;
        /* Reducimos la altura para que no ocupe toda la pantalla */
        border-radius: 8px;
    }

    .service-overlay {
        padding: 1.25rem;
        /* Menos padding interno para ganar espacio de texto */
    }

    .service-overlay h4 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .service-overlay p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        /* Hacemos que el texto sea siempre visible en móvil para evitar frustración */
        transform: translateY(0);
        opacity: 1;
    }

    .service-tag {
        transform: translateY(0);
        opacity: 1;
        font-size: 0.7rem;
    }

    .service-link {
        color: var(--color-brand-hover);
        text-decoration: none;
        font-weight: 700;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: color 0.3s ease;
    }
}