/* Estilos para la página de servicios (Remake 3x3) */
html, body { 
    overflow-y: auto !important; 
    height: auto !important; 
    position: relative; 
    cursor: none; 
    margin: 0;
    padding: 0;
    font-family: 'Cutive Mono', monospace;
}

body.gray-theme {
    background-color: #ccc;
    color: #000;
}

/* Matrix Background Canvas */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3; /* Sutil en el fondo */
}

.service-page-container {
    padding: 100px 5vw 40px 5vw;
    max-width: 1800px;
    margin: 0 auto;
}

.services-page-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin: 0 0 60px 0;
    text-transform: uppercase;
    font-family: 'Disket Mono', monospace;
    line-height: 0.9;
    text-align: center;
}

/* Grid de 3 columnas */
.services-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    justify-items: center; /* Centrar los cards en sus columnas */
}

/* Tarjeta de Servicio */
.service-item {
    display: flex;
    width: 540px; /* Ancho solicitado por el usuario */
    height: auto; /* Alto automático solicitado por el usuario */
    min-height: 400px; /* Mínimo para mantener consistencia */
    background-color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-item.side-by-side {
    flex-direction: row;
}

.service-item.side-by-side.reverse {
    flex-direction: row-reverse;
}

.info-box {
    flex: 0 0 50%; /* No crecer, no encoger, base exacta del 50% */
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 50%;
    box-sizing: border-box;
}

.media-box {
    flex: 0 0 50%; /* No crecer, no encoger, base exacta del 50% */
    position: relative;
    background: #000;
    overflow: hidden;
    width: 50%;
    box-sizing: border-box;
}

.media-box video, .media-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Colores de fondo para info-box */
.white-bg { background-color: #ffffff; color: #000; }
.gray-bg { background-color: #cccccc; color: #000; }
.dark-bg { background-color: #1a1a1a; color: #fff; }

.service-number {
    font-size: 2.2em;
    font-weight: 700;
    color: rgba(100, 100, 100, 0.5);
    margin-bottom: 10px;
    display: block;
}

.service-heading {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: uppercase;
}

.service-heading a {
    text-decoration: none;
    color: inherit;
}

.service-text {
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.service-text-long {
    font-family: 'Cutive Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: inherit;
    text-align: justify;
    margin-bottom: 15px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar para el texto */
.service-text-long::-webkit-scrollbar {
    width: 4px;
}
.service-text-long::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}
.service-text-long::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
}

.more-info-btn {
    background: transparent;
    border: 1px solid currentColor;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    align-self: flex-start;
    margin-top: auto;
    transition: all 0.3s;
}

.white-bg .more-info-btn:hover, .gray-bg .more-info-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.dark-bg .more-info-btn {
    border-color: #fff;
}
.dark-bg .more-info-btn:hover {
    background: #fff;
    color: #000;
}

/* Cursor Custom Styles */
.cursor-dot, .cursor-outline {
    pointer-events: none;
    position: fixed;
    border-radius: 50%;
    z-index: 9999;
}
.cursor-dot { width: 8px; height: 8px; background-color: #000; }
.cursor-outline { width: 40px; height: 40px; border: 2px solid rgba(0, 0, 0, 0.2); }

/* Responsive */
@media (max-width: 1700px) {
    .services-mosaic { grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); }
}

@media (max-width: 1200px) {
    .services-mosaic { grid-template-columns: repeat(2, 1fr); }
    .service-item { width: 100%; max-width: 540px; }
}

@media (max-width: 768px) {
    .service-page-container { 
        padding: 80px 10px 40px 10px; 
    }
    
    .services-mosaic { 
        grid-template-columns: 1fr !important; 
        gap: 30px;
    }

    .service-item { 
        width: 92% !important; 
        max-width: 400px; 
        height: 300px !important; /* Altura fija para el cuadro */
        margin: 15px auto;
        position: relative !important;
        flex-direction: column !important; 
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        cursor: pointer; /* Indicar que es clickeable */
    }

    .info-box {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 2;
        padding: 25px !important;
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%) !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-end !important; /* Texto abajo como en index */
        pointer-events: none; /* Dejar que el click pase al item */
    }

    .media-box {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 1;
        opacity: 1 !important;
    }

    .service-number {
        font-size: 2rem;
        color: rgba(255,255,255,0.6) !important;
        margin: 0;
        position: absolute;
        top: 15px;
        left: 20px;
    }

    .service-heading {
        font-size: 1.2rem;
        color: #fff !important;
        margin-bottom: 8px;
    }

    .service-text { 
        display: block !important; 
        font-size: 0.85rem;
        line-height: 1.3;
        color: rgba(255,255,255,0.8) !important;
        font-weight: 400 !important; /* No negrita */
        margin-bottom: 0;
    }

    .service-text-long { 
        display: none !important; 
    }

    .more-info-btn {
        display: none; /* Ocultar botón en móvil para diseño más limpio */
    }

    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
}
