
/* ===== HERO ===== */
.hero-servicios {
    /* background: url("../Imagenes/Logo/Logo Claro.png") no-repeat center center/cover; */
    color: var(--text);
    text-align: center;
    padding: 50px 20px;
    background: none; /* hero de servicios no usa imagen por defecto */
}

.hero-servicios h1 {
    font-size: 38px;
    margin-bottom: 10px;
}

.hero-servicios p {
    font-size: 18px;
}

/* ===== SECCIÓN DE SERVICIOS ===== */
.servicios-detalle {
    padding: 30px 20px;
    max-width: 1500px;
    margin: 0 auto;
}

/* ===== LAYOUT BASE PARA CADA SERVICIO ===== */
.servicio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

/* Se asegura el ancho fijo de columnas (imagen / texto) */
.servicio img {
    width: 45%;
    height: 470px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    /* orden por defecto: 1 (izquierda) */
    order: 1;
}

.servicio .texto {
    width: 50%;
    text-align: left;
    /* orden por defecto: 2 (derecha) */
    order: 2;
}

/* Para los elementos pares (2,4,6...) invertimos el orden visual */
.servicio:nth-child(even) img {
    order: 2;   /* imagen irá a la derecha */
}

.servicio:nth-child(even) .texto {
    order: 1;   /* texto irá a la izquierda */
}

/* Animación Lateral según posición */
.servicio.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones de entrada lateral según paridad  */
.servicio:nth-child(odd).visible {
    animation: fadeInLeft 0.8s ease both;
}
.servicio:nth-child(even).visible {
    animation: fadeInRight 0.8s ease both;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px) translateY(20px); }
    to   { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px) translateY(20px); }
    to   { opacity: 1; transform: translateX(0) translateY(0); }
}

.servicio h3 {
    color: var(--service-title);
    font-size: 24px;
    margin-bottom: 10px;
}

.servicio p {
    font-size: 16px;
    margin-bottom: 8px;
}

.servicio .precio {
    font-weight: bold;
    color: var(--primary);
}


body.dark-mode .precio {
    color: #4dabf7; /* azul claro brillante, visible sobre fondo oscuro */
}


/* ===== RESPONSIVE ===== */
/* Asesegurar que el TEXTO quede arriba y la IMAGEN abajo.
   Para lograrlo se usa column layout */
@media (max-width: 768px) {
    .servicio {
        flex-direction: column;
        gap: 18px;
        display: flex;
        flex-direction: column; /* columna: arriba-abajo */
        gap: 18px;
        align-items: stretch; /* que ocupe todo el ancho */
        margin-bottom: 36px;
    }
    .servicio img {
        order: 2;              /* MOD: imagen abajo */
        width: auto;
        height: 250px;        /* conserva una altura cómoda en móvil */
        object-fit: contain;    /* sigue llenando el cuadro sin deformar */
        border-radius: 12px;  /* ligeramente menor que en desktop para ajustarse */
        box-shadow: 0 6px 14px rgba(0,0,0,0.18);
        margin: 0 auto;
    }
    .servicio .texto {
        order: 1;              /* MOD: texto arriba */
        width: 100%;
        text-align: left;
        padding: 0 6px; 
    }
    /* Si hay casos pares/impresos, garantizamos el mismo orden (texto arriba) */
    .servicio:nth-child(even) .texto {
        order: 1; /* MOD */
    }
    .servicio:nth-child(even) img {
        order: 2; /* MOD */
    }

    /* Reducimos tamaño de títulos/parrafos en móvil para mejor lectura */
    .servicio h3 {
        font-size: 20px;
    }
    .servicio p {
        font-size: 15px;
    }
}

/* Para pantallas muy pequeñas (opcional ajuste extra) */
@media (max-width: 390px) {
    .servicio img {
        height: 200px;
        width: auto;
        object-fit: contain;
    }
    .servicio .texto {
        padding: 0 10px;
    }
}

