/* Estilos para la página de mosaico de servicios */
html, body { 
    overflow-y: auto !important; 
    height: auto !important; 
    position: relative; 
    cursor: none; 
}

body.white-theme {
    background-color: #f0f0f0;
    color: #000;
}

body.gray-theme {
    background-color: #ccc;
    color: #000;
}

.service-page-container {
    padding: 40px 5vw;
    max-width: 1600px;
    margin: 0 auto;
}

.service-page-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    color: #000;
    transition: transform 0.3s;
}

.back-link:hover {
    transform: translateX(-5px);
}

.services-page-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0 0 60px 0;
    text-transform: uppercase;
    font-family: 'Disket Mono', monospace;
    line-height: 0.9;
    text-align: center;
}

.services-page-title a {
    color: #000;
    text-decoration: none;
}

.services-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    color: #000;
    text-decoration: none;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* Initial state for animation */
    transform: translateY(20px); /* Initial state for animation */
    animation: card-enter 0.6s ease-out forwards;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-card i {
    font-size: 3rem;
    color: #000;
    margin-bottom: 20px;
    --fa-primary-color: #aaaaaa;
    --fa-secondary-color: #000000;
    --fa-secondary-opacity: 1.0;
}

.service-card h3 {
    font-family: 'Cutive Mono', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

.service-card p {
    font-family: 'Cutive Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: #555;
}

/* --- Animación de entrada "Snake" --- */
@keyframes card-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fila 1: Izquierda a Derecha */
.service-card:nth-child(1) { animation-delay: 0.15s; }
.service-card:nth-child(2) { animation-delay: 0.30s; }
.service-card:nth-child(3) { animation-delay: 0.45s; }
.service-card:nth-child(4) { animation-delay: 0.60s; }

/* Fila 2: Derecha a Izquierda */
.service-card:nth-child(8) { animation-delay: 0.75s; }
.service-card:nth-child(7) { animation-delay: 0.90s; }
.service-card:nth-child(6) { animation-delay: 1.05s; }
.service-card:nth-child(5) { animation-delay: 1.20s; }

/* Fila 3: Izquierda a Derecha */
.service-card:nth-child(9) { animation-delay: 1.35s; }
.service-card:nth-child(10) { animation-delay: 1.50s; }
.service-card:nth-child(11) { animation-delay: 1.65s; }
.service-card:nth-child(12) { animation-delay: 1.80s; }


@media (max-width: 768px) {
    .service-page-container {
        padding: 40px 20px;
    }
    .services-mosaic {
        grid-template-columns: 1fr;
    }
    /* Secuencia lineal para móvil (uno tras otro hacia abajo) */
    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }
    .service-card:nth-child(4) { animation-delay: 0.4s; }
    .service-card:nth-child(5) { animation-delay: 0.5s; }
    .service-card:nth-child(6) { animation-delay: 0.6s; }
    .service-card:nth-child(7) { animation-delay: 0.7s; }
    .service-card:nth-child(8) { animation-delay: 0.8s; }
    .service-card:nth-child(9) { animation-delay: 0.9s; }
    .service-card:nth-child(10) { animation-delay: 1.0s; }
    .service-card:nth-child(11) { animation-delay: 1.1s; }
    .service-card:nth-child(12) { animation-delay: 1.2s; }
}