/* Subtle grid pattern for technical architectural feel */
    .bg-grid-technical {
        background-size: 32px 32px;
        background-image:
            linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    }

    /* Smooth transitions for interactive components */
    .hover-lift {
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    }

    .hover-lift:hover {
        transform: translateY(-5px);
    }

    /* Subtle pulse and bounce animation for scroll indicator */
    @keyframes scrollBounce {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }

        40% {
            transform: translateY(6px);
        }

        60% {
            transform: translateY(3px);
        }
    }

    .animate-scroll-bounce {
        animation: scrollBounce 2s infinite ease-in-out;
    }

    /* Reglas para Modo Oscuro y Alto Contraste */
    [data-theme="dark"] .theme-project-card,
    [data-theme="dark"] .theme-pillar-card,
    [data-theme="dark"] .theme-client-card {
        background-color: #1A1E24 !important;
        border-color: #2D3540 !important;
    }

    [data-theme="contrast"] .theme-project-card,
    [data-theme="contrast"] .theme-pillar-card,
    [data-theme="contrast"] .theme-client-card {
        background-color: #000000 !important;
        border: 2px solid #FFC107 !important;
        color: #ffffff !important;
    }

    [data-theme="contrast"] .theme-project-card button,
    [data-theme="contrast"] .theme-project-card .text-\[\#16191D\],
    [data-theme="contrast"] .theme-project-card button.text-\[\#16191D\] {
        color: #FFC107 !important;
        font-weight: 800 !important;
    }

    [data-theme="contrast"] .theme-project-card button:hover {
        color: #ffffff !important;
    }

    [data-theme="contrast"] .theme-project-card .bg-brand-yellow {
        background-color: #FFC107 !important;
        color: #000000 !important;
        font-weight: 900 !important;
    }

    [data-theme="contrast"] .bg-brand-yellow,
    [data-theme="contrast"] a.bg-brand-yellow,
    [data-theme="contrast"] button.bg-brand-yellow {
        background-color: #FFC107 !important;
        color: #000000 !important;
        border: 2px solid #FFC107 !important;
        font-weight: 800 !important;
        text-decoration: none !important;
    }

    [data-theme="contrast"] .bg-brand-yellow *,
    [data-theme="contrast"] a.bg-brand-yellow *,
    [data-theme="contrast"] button.bg-brand-yellow * {
        color: #000000 !important;
    }

    [data-theme="contrast"] .bg-brand-yellow:hover,
    [data-theme="contrast"] a.bg-brand-yellow:hover,
    [data-theme="contrast"] button.bg-brand-yellow:hover {
        background-color: #000000 !important;
        color: #FFC107 !important;
        border: 2px solid #FFC107 !important;
    }

    [data-theme="contrast"] .bg-brand-yellow:hover *,
    [data-theme="contrast"] a.bg-brand-yellow:hover *,
    [data-theme="contrast"] button.bg-brand-yellow:hover * {
        color: #FFC107 !important;
    }

    [data-theme="contrast"] .text-brand-yellow,
    [data-theme="contrast"] .theme-title-accent {
        color: #FFC107 !important;
    }

    [data-theme="contrast"] section {
        background-color: #000000 !important;
        border-color: #FFC107 !important;
    }

    /* Logotipo corporativo en Blanco Nítido en Alto Contraste y Modo Oscuro */
    [data-theme="contrast"] #trayectoria img,
    [data-theme="contrast"] [data-purpose="about-trajectory"] img,
    [data-theme="contrast"] .trajectory-logo-img,
    [data-theme="dark"] #trayectoria img,
    [data-theme="dark"] [data-purpose="about-trajectory"] img,
    [data-theme="dark"] .trajectory-logo-img {
        filter: brightness(0) invert(1) !important;
        opacity: 1 !important;
    }

    /* ==========================================================================
       CARRUSEL CONTINUO DE CLIENTES (INFINITO, FLUIDO & SIN DRAG N DROP)
       ========================================================================== */
    .client-marquee-container {
        position: relative;
        width: 100%;
        overflow: hidden;
        padding: 30px 0;
        background: transparent;
        cursor: default;
        user-select: none;
        mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
    }

    .client-marquee-track {
        display: flex;
        align-items: center;
        width: max-content;
        will-change: transform;
        animation: clientMarqueeScroll 38s linear infinite;
    }

    .client-marquee-container:hover .client-marquee-track {
        animation-play-state: paused;
    }

    @keyframes clientMarqueeScroll {
        0% { transform: translate3d(0, 0, 0); }
        100% { transform: translate3d(-50%, 0, 0); }
    }

    @media (prefers-reduced-motion: reduce) {
        .client-marquee-track {
            animation-duration: 90s;
        }
    }

    .client-marquee-group {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 56px;
        padding-right: 56px;
    }

    .client-logo-item {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 20px;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        flex-shrink: 0;
        position: relative;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    [data-theme="dark"] .client-logo-item,
    [data-theme="contrast"] .client-logo-item {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .client-logo-item::before {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 14px;
        background: radial-gradient(circle, rgba(255, 193, 7, 0.16) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 75%);
        opacity: 0.6;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .client-logo-item:hover::before {
        opacity: 1;
        transform: scale(1.12);
    }

    .client-logo-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        height: 96px;
    }

    .client-logo-item img {
        height: 72px;
        max-height: 75px;
        max-width: 215px;
        width: auto;
        object-fit: contain;
        display: block;
        opacity: 0.94;
        pointer-events: none;
        filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.12));
        transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    }

    .client-logo-item:hover img {
        opacity: 1;
        transform: scale(1.08);
        filter: drop-shadow(0 6px 18px rgba(255, 193, 7, 0.5));
    }

    /* Adaptación para Dark y Contrast Theme */
    [data-theme="dark"] .client-logo-item img,
    [data-theme="contrast"] .client-logo-item img {
        filter: drop-shadow(0 3px 12px rgba(255, 255, 255, 0.16)) brightness(1.06);
    }

    [data-theme="dark"] .client-logo-item:hover img,
    [data-theme="contrast"] .client-logo-item:hover img {
        filter: drop-shadow(0 6px 20px rgba(255, 193, 7, 0.6)) brightness(1.14);
    }

    /* Adaptabilidad Responsive Multi-pantalla */
    @media (max-width: 991px) {
        .client-marquee-container {
            padding: 24px 0;
            mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
            -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
        }
        .client-marquee-group {
            gap: 40px;
            padding-right: 40px;
        }
        .client-logo-link {
            height: 80px;
        }
        .client-logo-item img {
            height: 58px;
            max-height: 60px;
            max-width: 180px;
        }
    }

    @media (max-width: 768px) {
        .client-marquee-container {
            padding: 18px 0;
            mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
            -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
        }
        .client-marquee-group {
            gap: 28px;
            padding-right: 28px;
        }
        .client-logo-item {
            padding: 6px 12px;
        }
        .client-logo-link {
            height: 68px;
        }
        .client-logo-item img {
            height: 48px;
            max-height: 50px;
            max-width: 150px;
        }
    }

    @media (max-width: 480px) {
        .client-marquee-container {
            padding: 14px 0;
        }
        .client-marquee-group {
            gap: 20px;
            padding-right: 20px;
        }
        .client-logo-item {
            padding: 4px 8px;
        }
        .client-logo-link {
            height: 58px;
        }
        .client-logo-item img {
            height: 40px;
            max-height: 42px;
            max-width: 125px;
        }
    }

    /* ==========================================================================
       VISOR INMERSIVO FRAMELESS (100% IDÉNTICO AL DE LA PÁGINA DE PROYECTOS)
       ========================================================================== */
    .immersive-modal.modal {
        z-index: 1060 !important;
    }

    .modal-backdrop.show {
        z-index: 1055 !important;
        background-color: rgba(15, 23, 42, 0.45) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        opacity: 1 !important;
    }

    .immersive-modal .modal-dialog {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .immersive-modal .modal-content {
        background: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    /* Barra Superior Flotante */
    .floating-top-bar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 28px;
        z-index: 50;
        pointer-events: none;
    }

    .floating-top-bar > * {
        pointer-events: auto;
    }

    .floating-info-card {
        background: rgba(22, 22, 22, 0.88);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 9px 20px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .floating-title {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #ffffff;
        margin: 0;
        display: inline-block;
    }

    .floating-subtitle {
        font-size: 11.5px;
        color: #ffc107;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-left: 8px;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 8px;
    }

    .floating-counter-badge {
        background: rgba(22, 22, 22, 0.88);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        color: #ffffff;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        padding: 8px 16px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .btn-floating-close {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        background: rgba(22, 22, 22, 0.88);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .btn-floating-close:hover {
        background-color: #ffc107;
        color: #1e232a;
        border-color: #ffc107;
        transform: rotate(90deg) scale(1.05);
    }

    /* Escenario Visual Principal */
    .immersive-stage {
        flex: 1;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        padding: 60px 20px 80px 20px;
        cursor: pointer;
    }

    .immersive-viewport {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        cursor: zoom-in;
    }

    .immersive-viewport.is-zoomed {
        cursor: grab;
    }

    .immersive-viewport.is-dragging {
        cursor: grabbing !important;
    }

    /* Transiciones cinematográficas entre imágenes */
    .immersive-main-img {
        max-height: 86vh;
        max-width: 94vw;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 6px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
        transform-origin: center center;
        will-change: transform, opacity, filter;
        cursor: zoom-in;
        pointer-events: auto;
    }

    .slide-next-out {
        opacity: 0 !important;
        transform: translateX(-30px) scale(0.98) !important;
        filter: blur(3px);
    }

    .slide-next-in {
        animation: slideFromRight 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .slide-prev-out {
        opacity: 0 !important;
        transform: translateX(30px) scale(0.98) !important;
        filter: blur(3px);
    }

    .slide-prev-in {
        animation: slideFromLeft 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .fade-thumb-in {
        animation: luxuryFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideFromRight {
        0% { opacity: 0; transform: translateX(30px) scale(0.98); filter: blur(3px); }
        100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0px); }
    }

    @keyframes slideFromLeft {
        0% { opacity: 0; transform: translateX(-30px) scale(0.98); filter: blur(3px); }
        100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0px); }
    }

    @keyframes luxuryFadeIn {
        0% { opacity: 0; transform: scale(0.97); filter: blur(3px); }
        100% { opacity: 1; transform: scale(1); filter: blur(0px); }
    }

    /* Botones de Navegación Flotantes Izquierda / Derecha */
    .immersive-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: rgba(22, 22, 22, 0.75);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10;
        opacity: 0.85;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .immersive-nav-btn:hover {
        opacity: 1;
        background: #ffc107;
        color: #1e232a;
        border-color: #ffc107;
        transform: translateY(-50%) scale(1.1);
    }

    .immersive-nav-prev { left: 24px; }
    .immersive-nav-next { right: 24px; }

    /* Barra Flotante de Zoom & Rotación */
    .floating-zoom-tools {
        position: absolute;
        bottom: 24px;
        right: 24px;
        display: flex;
        align-items: center;
        gap: 6px;
        background: rgba(22, 22, 22, 0.88);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        padding: 6px 10px;
        border-radius: 8px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
        z-index: 10;
    }

    .zoom-tool-btn {
        width: 34px;
        height: 34px;
        border-radius: 5px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.18s ease;
    }

    .zoom-tool-btn:hover {
        background: #ffc107;
        color: #1e232a;
        border-color: #ffc107;
        transform: scale(1.08);
    }

    .zoom-level-text {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
        font-weight: 700;
        color: #ffffff;
        min-width: 44px;
        text-align: center;
        user-select: none;
    }

    /* Tira Flotante de Miniaturas */
    .floating-thumbs-bar {
        position: absolute;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 8px;
        max-width: 80vw;
        overflow-x: auto;
        padding: 8px 12px;
        background: rgba(22, 22, 22, 0.88);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
        z-index: 10;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .floating-thumbs-bar::-webkit-scrollbar {
        height: 4px;
    }

    .floating-thumbs-bar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }

    .floating-thumb {
        width: 60px;
        height: 42px;
        min-width: 60px;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        border: 2px solid transparent;
        opacity: 0.55;
        transition: all 0.2s ease;
    }

    .floating-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .floating-thumb:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

    .floating-thumb.active {
        opacity: 1;
        border-color: #ffc107;
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    }

    /* Adaptación Responsive para Móviles y Tablets */
    @media (max-width: 768px) {
        .floating-top-bar {
            padding: 10px 14px;
        }
        .floating-info-card {
            padding: 6px 12px;
            max-width: calc(100vw - 120px);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .floating-subtitle {
            display: none;
        }
        .floating-title {
            font-size: 11.5px;
            letter-spacing: 0.04em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .floating-counter-badge {
            padding: 6px 10px;
            font-size: 11px;
        }
        .btn-floating-close {
            width: 34px;
            height: 34px;
        }
        .immersive-stage {
            padding: 55px 10px 70px 10px;
        }
        .immersive-main-img {
            max-height: 78vh;
            max-width: 96vw;
        }
        .immersive-nav-btn {
            width: 42px;
            height: 42px;
            opacity: 0.85;
        }
        .immersive-nav-prev { left: 10px; }
        .immersive-nav-next { right: 10px; }
        .floating-zoom-tools {
            bottom: 68px;
            right: 12px;
        }
        .floating-thumbs-bar {
            max-width: 95vw;
            padding: 5px 8px;
            bottom: 8px;
        }
        .floating-thumb {
            width: 48px;
            height: 34px;
            min-width: 48px;
        }
    }
