/* ===== SERVICIOS.MEXQRO ===== */
/* Coherencia visual con index.html */

:root {
    --brand: #1F3046;
    /* Azul principal MEXQRO */
    --accent: #00AAAD;
    /* Verde-azulado complementario */
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --muted: #6c757d;
}



/* ===== HERO (Servicios) ===== */
:root {
    --nav-h: 72px;
    /* desktop */
}

@media (max-width: 991.98px) {
    :root {
        --nav-h: 56px;
    }

    /* móvil/tablet */
}

.hero-servicios {
    position: relative;
    height: 95vh;
    /* alto = pantalla - navbar */
    overflow: clip;
    color: #fff;
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    animation: heroFade 12s linear infinite, kenBurns 18s ease-in-out infinite;
    will-change: opacity, transform;
}

.hero-slide.s1 {
    animation-delay: 0s;
}

.hero-slide.s2 {
    animation-delay: 4s, 6s;
    /* 4s para fade, 6s para kenBurns */
}

.hero-slide.s3 {
    animation-delay: 8s, 12s;
    /* 8s para fade, 12s para kenBurns */
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }

    40% {
        /* A la mitad de su visibilidad */
        transform: scale(1.05) translate(-10px, -5px);
    }

    100% {
        transform: scale(1) translate(0, 0);
    }
}

@keyframes heroFade {
    0% {
        opacity: 0;
    }

    6% {
        opacity: 1;
    }

    33% {
        opacity: 1;
    }

    39% {
        opacity: 0;
    }

    /* sale */
    100% {
        opacity: 0;
    }
}

.hero-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 20, 30, .55), rgba(10, 20, 30, .65));
    pointer-events: none;
}

.hero-row {
    position: relative;
    z-index: 2;
    min-height: calc(100svh - var(--nav-h));
    display: flex;
    align-items: center;
    padding-block: clamp(2rem, 5vh, 4rem);
}

.hero-glass {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 2rem);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: .5rem;
    color: white;
}

.hero-lead {
    font-family: 'Lato', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    opacity: .95;
    max-width: 60ch;
    margin-bottom: 1.25rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.08);
    /* Fondo sutil */
    border-radius: 12px;
    padding: 1rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-weight: 700;
    color: var(--accent);
    /* Cambiado de #00AAAD */
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0;


}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    /* Resetear margen de <dd> */
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        animation: none;
        opacity: 1;
    }

    .hero-veil {
        background: rgba(10, 20, 30, .6);
    }

    .stat-item {
        transform: none;
        /* Evitar el hover */
    }
}

/* --- SERVICIOS PRINCIPALES --- */

/* Estructura y layout */
.servicio-detail {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 3rem;
}

.servicio-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.servicio-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.servicio-features li {
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.servicio-features i {
    color: var(--accent);
    margin-right: 6px;
}

/* Etiquetas de aplicación */
.app-tags .app-tag {
    background: var(--bg-light);
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-tags .app-tag:hover {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* --- MEJORAS DE INTERACTIVIDAD Y ANIMACIÓN (VERSIÓN CORREGIDA Y SEGURA) --- */

/* Clase base para la animación de entrada */
/* CAMBIO CLAVE: Se elimina 'opacity: 0' para asegurar que el contenido siempre sea visible. */
.servicio-card {
    /* opacity: 0; <-- LÍNEA PROBLEMÁTICA ELIMINADA */
    transform: translateY(30px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* Clase que se añade con JS cuando el elemento es visible */
.servicio-card.is-visible {
    opacity: 1;
    /* Esta línea ahora es redundante pero inofensiva */
    transform: translateY(0);
}

/* Efecto hover en la tarjeta del servicio */
.servicio-card:hover .servicio-media {
    transform: scale(1.02);
}

.servicio-media {
    transition: transform 0.3s ease;
    overflow: hidden;
    border-radius: 0.375rem;
}

.servicio-img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Efecto hover en la imagen */
.servicio-card:hover .servicio-img {
    transform: scale(1.05);
    filter: brightness(0.95);
}

/* --- ESTILOS PARA EL LIGHTBOX --- */
.lightbox {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.lightbox.is-active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #bbb;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1);
    }
}

/* --- MATERIALES --- */

/* Estilos base de la tarjeta (ya existentes, los incluyo para completitud) */
.material-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: all 0.2s ease-in-out;
    position: relative;
    /* Necesario para posicionar el botón de selección */
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.material-card--featured {
    border: 2px solid var(--accent);
}

.material-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.5rem;
}

.material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
}

.material-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand);
}

.material-temp {
    font-size: 0.9rem;
    color: var(--muted);
}

.material-subtitle {
    font-size: 0.9rem;
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--brand);
}

.material-apps {
    list-style: disc;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.material-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

/* --- MEJORAS DE INTERACTIVIDAD --- */

/* Botón de selección */
.material-select-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: var(--muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 2;
}

.material-select-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: scale(1.1);
}

/* Estado 'seleccionado' de la tarjeta */
.material-card.material-card--selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31, 48, 70, 0.2);
}

.material-card.material-card--selected .material-select-btn {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* --- ESTILOS PARA LA BARRA DE COMPARACIÓN --- */
.comparison-bar {
    position: fixed;
    bottom: -100px;
    /* Oculta por defecto */
    left: 0;
    width: 100%;
    background: var(--brand);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    transition: bottom 0.3s ease-in-out;
    z-index: 1000;
}

.comparison-bar.is-active {
    bottom: 0;
}

#comparison-count {
    font-weight: 500;
}

#compare-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- CTA Tabla compatibilidad (estilos ya existentes) --- */
.compatibility-cta {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: inline-block;
    max-width: 700px;
}

/* --- PROCESO --- */

/* Contenedor principal del timeline */
.proceso-timeline {
    position: relative;
    /* Necesario para el indicador de progreso */
    border-left: 3px solid #e9ecef;
    /* Color base del timeline */
    margin-left: 1rem;
    padding-left: 2rem;
}

/* MEJORA: Indicador de progreso que se mueve con el scroll */
.proceso-progress-indicator {
    position: absolute;
    left: -3px;
    /* Se alinea con el borde del timeline */
    top: 0;
    width: 3px;
    background-color: var(--accent);
    height: 0;
    /* Se ajustará con JS */
    transition: height 0.3s ease-out;
    z-index: 1;
}

/* Cada paso del proceso */
.proceso-step {
    position: relative;
    margin-bottom: 2.5rem;
    /* Estado inactivo por defecto */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* MEJORA: El punto del timeline ahora es un pseudo-elemento más grande y con transición */
.proceso-step::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    /* Centrado en la línea del timeline */
    top: 0.3rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e9ecef;
    transition: border-color 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

/* Número del paso */
.step-number {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

/* Título y descripción */
.step-title {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
}

/* --- MEJORAS DE ESTADO ACTIVO E INTERACTIVO --- */

/* Estado cuando el paso está en vista (activo) */
.proceso-step.is-active {
    opacity: 1;
    transform: translateX(5px);
    /* Sutil desplazamiento hacia la derecha */
}

.proceso-step.is-active::before {
    border-color: var(--accent);
    transform: scale(1.2);
    /* El punto crece ligeramente */
}

.proceso-step.is-active .step-number {
    color: var(--accent);
}

.proceso-step.is-active .step-title {
    color: var(--brand);
}

/* --- Beneficios --- */
.proceso-benefits .benefit-mini {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

.proceso-benefits .benefit-mini i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.proceso-benefits .benefit-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .proceso-timeline {
        border-left: none;
        /* Se elimina la línea en móvil */
        margin-left: 0;
        padding-left: 0;
    }

    .proceso-step {
        padding-left: 0;
        opacity: 1;
        /* En móvil, todos son visibles por defecto */
    }

    .proceso-step::before {
        display: none;
        /* Se ocultan los puntos en móvil */
    }

    .proceso-progress-indicator {
        display: none;
        /* El indicador de progreso no es necesario en móvil */
    }
}

/* --- CTA SERVICIOS --- */

.cta-servicios {
    /* Se mueven los estilos en línea aquí */
    background: linear-gradient(180deg, #1f3046 0%, #273b54 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    /* CAMBIO CLAVE: Se elimina 'opacity: 0' para asegurar que el contenido siempre sea visible. */
    transform: translateY(20px);
    transition: transform 0.8s ease-out;
    /* La transición de opacidad ya no es necesaria */
}

/* Efecto de brillo sutil en el fondo */
.cta-servicios::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    animation: shimmer 15s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Contenedor para centrar el contenido y darle contexto de apilamiento */
.cta-servicios .container {
    position: relative;
    z-index: 1;
}

/* Estilos para los botones del CTA */
.cta-btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-btn i {
    font-size: 1.1rem;
}

/* Efecto hover para el botón principal */
.cta-btn.btn-light {
    color: var(--brand);
}

.cta-btn.btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--brand);
}

/* Efecto hover para el botón secundario */
.cta-btn.btn-outline-light:hover {
    transform: translateY(-3px);
    background-color: #fff;
    color: var(--brand);
    border-color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Animación de entrada para la sección CTA --- */
.cta-servicios.is-visible {
    /* opacity: 1; <-- Esta línea ahora es redundante pero inofensiva */
    transform: translateY(0);
}

/* --- FOOTER --- */

#site-footer {
    background-color: #f8f9fa;
    color: var(--text-dark);
}

.footer-title {
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-list {
    padding-left: 0;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-list a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-list a:hover {
    color: var(--accent);
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-btn:hover {
    background-color: var(--accent);
    transform: scale(1.1);
    color: #fff;
}

.footer-subscribe .form-control {
    border-color: #ced4da;
}

.footer-subscribe .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 170, 173, 0.25);
}

/* MEJORA: Estilos para los mensajes de feedback del formulario */
.form-feedback {
    font-size: 0.875rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.form-feedback.success {
    color: #198754;
    /* Color de éxito de Bootstrap */
    background-color: #d1e7dd;
}

.form-feedback.error {
    color: #dc3545;
    /* Color de error de Bootstrap */
    background-color: #f8d7da;
}

.footer-bottom {
    background-color: #e9ecef;
}

/* --- BOTÓN "VOLVER ARRIBA" --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--brand);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}


/* --- QUICKBAR FIJA DERECHA (VERSIÓN LIMPIA Y CONSOLIDADA) --- */
.quickbar {
    list-style: none;
    margin: 0;
    padding: 0;
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 10px;
    z-index: 999;
}

.qb-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    width: 48px;
    padding: 0 12px;
    border-radius: 999px;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(31, 48, 70, .22);
    transition: width .18s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    text-decoration: none;
    /* Los <a> no deben tener subrayado */
}

.qb-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.qb-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.qb-label {
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    line-height: 1;
    letter-spacing: .1px;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .18s ease, transform .18s ease;
    white-space: nowrap;
}

/* Colores de fondo */
.qb-whatsapp {
    background: #25D366;
    border: 1px solid #1ebe57;
}

.qb-custom {
    background: #ffffff;
    border: 1px solid #1F3046;
}

.qb-custom .qb-label {
    color: #1F3046;
}

/* Despliegue al hover del item individual */
.qb-item:hover {
    width: 188px;
}

.qb-item:hover .qb-label {
    opacity: 1;
    transform: translateX(0);
}

.qb-item:hover .qb-label:focus,
.qb-item:hover .qb-label:hover {
    color: white !important;
    /* Asegura que el texto sea blanco en el hover del botón blanco */
}