/* 🟩 Estilos generales */
#servicios {
    min-height: 100vh;
    padding: 40px 20px;
    background-color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.Tseccion {
    width: 100%;
    text-align: center;
    font-size: 50px;
    font-family: 'Edwardian Script ITC', cursive;
    font-weight: 100;
    margin-bottom: 20px;
    color: #333;
}

#carrusel-servicios {
    width: 100%;
    overflow: hidden; /* se mantiene */
    position: relative;
    padding: 0 15%;
    box-sizing: border-box;
}

#contenedor-tarjetas {
    transition: transform 0.4s ease;
}

.tarjeta-servicio {
    width: 100%;
    max-width: 345px;
    height: 300px;
    padding: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.contenido-servicio {
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.icono-servicio {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    transition: filter 0.4s ease;
}

.titulo-servicio {
    font-size: 45px;
    font-weight: 100;
    margin: 10px 0 0;
    font-family: 'Edwardian Script ITC', cursive;
    transition: transform 0.4s ease, text-shadow 0.4s ease;
    white-space: nowrap;
    line-height: 1.1;
}

.descripcion-servicio {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease, text-shadow 0.4s ease;
}

.tarjeta-servicio:hover .icono-servicio {
    filter: drop-shadow(3px 6px 10px rgba(0, 0, 0, 0.4));
}

.tarjeta-servicio:hover .titulo-servicio {
    text-shadow: 3px 6px 8px rgba(0, 0, 0, 0.4);
}

.tarjeta-servicio:hover .descripcion-servicio {
    opacity: 1;
    max-height: 200px;
    text-shadow: 2px 5px 6px rgba(0, 0, 0, 0.3);
}

/* Controles (si se activan manualmente) */
#controles-carrusel {
    margin-top: 20px;
    display: none;
    justify-content: center;
    gap: 20px;
}

#controles-carrusel button {
    padding: 10px 20px;
    font-size: 25px;
    background: #333;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#controles-carrusel button:hover {
    background: #555;
}

/* Flechas decorativas SIEMPRE visibles en carrusel */
.flecha-deco {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(20px, 5vw, 40px);
    color: #dcdcdc;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
    user-select: none;
        z-index: 2; /* subir z-index */
    pointer-events: auto; /* permitir clic */
    cursor: pointer; /* indicar interactividad */
}

#flecha-izquierda {
    left: 16%; /* un poco más que el padding (15%) */
}

#flecha-derecha {
    right: 16%;
}

/* 📱 Carrusel para pantallas < 1025px */
@media (max-width: 1024px) {
    #servicios {
        align-items: center;
        justify-content: center;
    }

    #carrusel-servicios {
        min-height: 420px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #contenedor-tarjetas {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        gap: 0;
    }

    .tarjeta-servicio {
        flex-shrink: 0;
        height: auto;
        width: 80%;
        margin: 0 10%;
    }

    .contenido-servicio {
        height: auto;
        text-align: center;
    }

    .titulo-servicio {
        font-size: clamp(18px, 6vw, 30px);
    }

    #controles-carrusel {
        display: flex;
    }

    .tarjeta-servicio:hover .icono-servicio,
    .tarjeta-servicio:hover .titulo-servicio,
    .tarjeta-servicio:hover .descripcion-servicio {
        filter: none !important;
        transform: none !important;
        text-shadow: none !important;
    }

    #flecha-izquierda,
    #flecha-derecha {
        display: block;
    }
}

/* Pantallas grandes >= 1025px (GRID) */
@media (min-width: 1025px) {
    #contenedor-tarjetas {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 20px;
        max-width: 1100px;
        margin: 0 auto;
        align-content: center;
        justify-content: center;
    }

    #controles-carrusel,
    #flecha-izquierda,
    #flecha-derecha {
        display: none;
    }
}
