/**
 * QS Blocks — Shared Styles (all 8 Quiénes Somos blocks)
 * Matches the Lovable React design 1:1
 *
 * @package AloraAlkemia
 */

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════════════════ */
.qs-hero-block,.qs-video-block,.qs-proposito-block,.qs-diff-block,
.qs-valores-block,.qs-team-block,.qs-alianzas-block,.qs-clientes-block {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    color: #fff;
    box-sizing: border-box;
    --qs-accent: #FF1400;
    --qs-dark: #050B18;
    --qs-navy: #001C59;
    --qs-border: rgba(255,255,255,.08);
    --qs-text-dim: rgba(255,255,255,.65);
    --qs-text-mute: rgba(255,255,255,.35);
}
.qs-hero-block *,.qs-video-block *,.qs-proposito-block *,.qs-diff-block *,
.qs-valores-block *,.qs-team-block *,.qs-alianzas-block *,.qs-clientes-block * {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════════════════
   SECTION + SHELL
══════════════════════════════════════════════════════════════════════════ */
.qs-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.qs-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Per-section max-width overrides */
.qs-shell--860  { max-width: 860px; }
.qs-shell--1000 { max-width: 1000px; }
.qs-shell--1080 { max-width: 1080px; }
.qs-shell--1100 { max-width: 1100px; }

/* ══════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════════════════════════════════════ */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 1 — QS HERO
══════════════════════════════════════════════════════════════════════════ */
.qs-hero-block {
    background:
        radial-gradient(ellipse 70% 80% at 100% 50%, rgba(0,28,89,.25) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 0% 100%, rgba(255,20,0,.08) 0%, transparent 50%),
        #050B18;
    padding: calc(88px + 80px) 60px 80px; /* 88px fixed header clearance + 80px design padding */
}

.qs-hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Eyebrow — pipe prefix format */
.qs-eyebrow-pipe {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .2em;
    color: var(--qs-accent);
    margin-bottom: 32px;
    display: block;
}

/* H1 */
.qs-h1 {
    font-weight: 800;
    font-size: 28px;
    line-height: 1.3;
    margin: 0 0 32px;
}
.qs-h1-white { color: #fff; }
.qs-h1-red   { color: var(--qs-accent); display: block; }

/* Hero body text */
.qs-hero-body {
    font-weight: 400;
    font-size: 16px;
    color: rgba(255,255,255,.65);
    line-height: 1.8;
    margin: 0 0 16px;
}
.qs-hero-body + .qs-hero-body { margin-top: 0; }

/* Stats */
.qs-stats-row {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.qs-stats-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,.15);
    flex-shrink: 0;
}
.qs-stat-value {
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    line-height: 1.1;
    display: block;
}
.qs-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-top: 8px;
    display: block;
}

/* ── TransmutationVisual ── */
.qs-transmutation {
    position: relative;
    width: 100%;
    height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.qs-tx-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
}
.qs-tx-ring-3 {
    width: 600px; height: 600px;
    margin: -300px 0 0 -300px;
    border: 1px solid rgba(0,28,89,.3);
}
.qs-tx-ring-2 {
    width: 500px; height: 500px;
    margin: -250px 0 0 -250px;
    border: 1px dashed rgba(255,255,255,.07);
    animation: qs-spin-rev 18s linear infinite;
}
.qs-tx-ring-1 {
    width: 380px; height: 380px;
    margin: -190px 0 0 -190px;
    border: 1.5px solid rgba(255,20,0,.3);
    animation: qs-spin 10s linear infinite;
}
.qs-tx-dot {
    position: absolute;
    border-radius: 50%;
    top: 0;
    left: 50%;
}
.qs-tx-dot--white {
    width: 5px; height: 5px;
    margin: -2.5px 0 0 -2.5px;
    background: rgba(255,255,255,.4);
}
.qs-tx-dot--red {
    width: 8px; height: 8px;
    margin: -4px 0 0 -4px;
    background: #FF1400;
    box-shadow: 0 0 12px rgba(255,20,0,.8);
}
.qs-tx-nucleus {
    position: absolute;
    top: 50%; left: 50%;
    width: 280px; height: 280px;
    margin: -140px 0 0 -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,20,0,.3) 0%, rgba(255,20,0,.05) 70%, transparent 100%);
    border: 2px solid rgba(255,20,0,.8);
    box-shadow:
        0 0 120px rgba(255,20,0,.35),
        0 0 240px rgba(255,20,0,.12),
        inset 0 0 40px rgba(255,20,0,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: qs-core-pulse 3s ease-in-out infinite;
}
.qs-tx-ak {
    font-weight: 800;
    font-size: 64px;
    color: #FF1400;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}

/* ── Hero responsive ── */
@media (max-width: 900px) {
    .qs-hero-block { padding: calc(80px + 48px) 24px 48px; }
    .qs-hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .qs-transmutation { height: 360px; }
    .qs-tx-ring-3 { width: 320px; height: 320px; margin: -160px 0 0 -160px; }
    .qs-tx-ring-2 { width: 270px; height: 270px; margin: -135px 0 0 -135px; }
    .qs-tx-ring-1 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
    .qs-tx-nucleus { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
    .qs-tx-ak { font-size: 36px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 2 — QS VIDEO
══════════════════════════════════════════════════════════════════════════ */
.qs-video-block {
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,28,89,.5) 0%, transparent 70%),
        #050B18;
    padding: 80px 24px;
}
.qs-video-ratio {
    max-width: 860px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(0,28,89,.3) 0%, rgba(5,11,24,.8) 100%);
    border: 1px solid var(--qs-border);
    border-radius: 16px;
    box-shadow: 0 0 80px rgba(0,28,89,.4), 0 0 0 1px rgba(255,255,255,.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
/* Video player */
.qs-video-ratio iframe,
.qs-video-ratio .qs-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    border-radius: 16px;
}

/* Controls overlay — sits above the video */
.qs-video-controls {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* subtle dark vignette so button is readable on bright video */
    background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(0,0,0,.25) 0%, transparent 70%);
    transition: background .3s ease;
}
.qs-video-ratio.is-playing .qs-video-controls {
    background: transparent;
}

/* Shared button base */
.qs-video-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(10,10,20,.55);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,.18), 0 8px 32px rgba(0,0,0,.4);
}
.qs-video-btn svg { display: block; }

/* Animated ring */
.qs-video-btn__ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,20,0,.5);
    animation: qs-ring-pulse 2.4s ease-in-out infinite;
}
@keyframes qs-ring-pulse {
    0%, 100% { transform: scale(1);   opacity: .6; }
    50%       { transform: scale(1.15); opacity: 0; }
}

/* PLAY button */
.qs-video-btn--play {
    opacity: 1;
    transform: scale(1);
}
.qs-video-btn--play svg { transform: translateX(3px); } /* optical center */
.qs-video-btn--play:hover { transform: scale(1.08); box-shadow: 0 0 0 1.5px #FF1400, 0 0 40px rgba(255,20,0,.35), 0 8px 32px rgba(0,0,0,.4); }

/* PAUSE button — hidden by default, shows on hover while playing */
.qs-video-btn--pause {
    position: absolute;
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* State: playing */
.qs-video-ratio.is-playing .qs-video-btn--play {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}
.qs-video-ratio.is-playing .qs-video-controls:hover .qs-video-btn--pause {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.qs-video-ratio.is-playing .qs-video-btn--pause:hover {
    box-shadow: 0 0 0 1.5px #FF1400, 0 0 40px rgba(255,20,0,.35), 0 8px 32px rgba(0,0,0,.4);
}
.qs-video-btn--pause .qs-video-btn__ring { animation-duration: 3.6s; }

/* Static button (placeholder) */
.qs-video-btn--static { cursor: default; }
.qs-video-btn--static .qs-video-btn__ring { animation-play-state: paused; opacity: .4; }

/* Placeholder */
.qs-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.qs-video-placeholder__logo {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    pointer-events: none;
}

/* Scanlines overlay */
.qs-video-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.04) 0px,
        rgba(255,255,255,.04) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 1;
}
.qs-video-label {
    position: relative;
    z-index: 2;
    font-weight: 400;
    font-size: 12px;
    color: rgba(255,255,255,.3);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 3 — QS PROPÓSITO
══════════════════════════════════════════════════════════════════════════ */
.qs-proposito-block {
    position: relative;
    background:
        radial-gradient(ellipse 50% 70% at 15% 50%, rgba(255,20,0,.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 85% 50%, rgba(0,28,89,.35) 0%, transparent 60%),
        radial-gradient(ellipse 80% 40% at 50% 100%, rgba(0,28,89,.2) 0%, transparent 50%),
        #050B18;
    padding: 100px 24px;
    overflow: hidden;
}
/* Perspective grid SVG is inline in block.php */
.qs-proposito-grid-svg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.qs-proposito-head {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}
.qs-eyebrow-red {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .25em;
    color: var(--qs-accent);
    opacity: .8;
    display: block;
    margin-bottom: 12px;
}
.qs-proposito-h2 {
    font-weight: 800;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.qs-proposito-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
}
.qs-proposito-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,.03);
    border-top: 1px solid rgba(255,255,255,.08);
    border-right: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
    border-left: 3px solid var(--qs-accent);
    border-radius: 2px;
    padding: 52px 48px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
    transition: border-color .35s ease, box-shadow .35s ease;
}
.qs-proposito-card:hover {
    border-left-color: #ff3a26;
    box-shadow: inset 0 0 40px rgba(0,28,89,.2), 0 20px 60px rgba(0,0,0,.3), 0 0 40px rgba(255,20,0,.08);
}
.qs-proposito-icon {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(255,20,0,.08);
    border: 1px solid rgba(255,20,0,.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    transition: box-shadow .35s ease;
    color: var(--qs-accent);
}
.qs-proposito-card-title {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    margin: 0 0 20px;
}
.qs-proposito-card-body {
    font-weight: 400;
    font-size: 15px;
    color: rgba(255,255,255,.6);
    line-height: 1.85;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 4 — QS DIFERENCIADORES
══════════════════════════════════════════════════════════════════════════ */
.qs-diff-block {
    background: #050B18;
    padding: 100px 24px;
}

.qs-diff-section-head {
    text-align: center;
    margin-bottom: 80px;
}
.qs-diff-section-title {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .3em;
    color: rgba(255,255,255,.4);
    text-align: center;
    margin: 0 0 20px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}
.qs-diff-section-bar {
    width: 40px;
    height: 2px;
    background: var(--qs-accent);
    margin: 0 auto;
}

/* Diff rows */
.qs-diff-row {
    display: grid;
    grid-template-columns: 15% 65% 20%;
    align-items: center;
    gap: 0;
    padding: 48px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: opacity .2s ease;
}
.qs-diff-row:first-child { border-top: 1px solid rgba(255,255,255,.06); }

.qs-diff-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 72px;
    line-height: 1;
    color: rgba(255,20,0,.12);
    transition: color .25s ease;
}
.qs-diff-row:hover .qs-diff-num { color: rgba(255,20,0,.35); }

.qs-diff-content { }
.qs-diff-row-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    margin: 0 0 12px;
    transition: color .25s ease;
}
.qs-diff-row:hover .qs-diff-row-title { color: var(--qs-accent); }

.qs-diff-row-body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: rgba(255,255,255,.55);
    line-height: 1.8;
    margin: 0;
    max-width: 560px;
}

.qs-diff-icon-col {
    display: flex;
    justify-content: flex-end;
    color: rgba(255,20,0,.4);
    transition: color .25s ease;
}
.qs-diff-row:hover .qs-diff-icon-col { color: rgba(255,20,0,.9); }
.qs-diff-icon-col svg { width: 32px; height: 32px; stroke-width: 1.6; }

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 5 — QS VALORES
══════════════════════════════════════════════════════════════════════════ */
.qs-valores-block {
    background: #050B18;
    padding: 100px 24px;
}

.qs-valores-h2 {
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    text-align: center;
    margin: 0 0 60px;
}

.qs-valores-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0;
}
.qs-valor-item {
    position: relative;
    padding: 20px 36px;
    border-left: 1px solid rgba(255,255,255,.1);
}
.qs-valor-item:first-child { border-left: none; }

.qs-valor-ghost {
    font-weight: 900;
    font-size: 72px;
    color: rgba(255,20,0,.15);
    line-height: 1;
    position: absolute;
    top: 0;
    left: 24px;
    z-index: 0;
    pointer-events: none;
}
.qs-valor-content {
    position: relative;
    z-index: 1;
    padding-top: 40px;
}
.qs-valor-title {
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    margin: 0 0 12px;
}
.qs-valor-body {
    font-weight: 400;
    font-size: 15px;
    color: rgba(255,255,255,.7);
    line-height: 1.7;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 6 — QS TEAM
══════════════════════════════════════════════════════════════════════════ */
.qs-team-block {
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,28,89,.35) 0%, transparent 60%),
        #050B18;
    padding: 80px 24px;
}

.qs-team-section-title {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .3em;
    color: rgba(255,255,255,.35);
    text-align: center;
    margin: 0 0 80px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

.qs-team-row {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 64px 0;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.qs-team-row + .qs-team-row { border-top: none; }
.qs-team-row--reverse { flex-direction: row-reverse; }

.qs-team-avatar-col {
    flex: 0 0 30%;
    display: flex;
    justify-content: flex-start;
}
.qs-team-row--reverse .qs-team-avatar-col { justify-content: flex-end; }

.qs-team-avatar {
    position: relative;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(0,28,89,.6) 0%, rgba(5,11,24,.9) 100%);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .3s ease;
    overflow: visible;
}
.qs-team-row:hover .qs-team-avatar { border-color: rgba(255,20,0,.2); }

.qs-team-initials {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 72px;
    color: rgba(255,20,0,.15);
    line-height: 1;
    transition: color .3s ease;
}
.qs-team-row:hover .qs-team-initials { color: rgba(255,20,0,.3); }

.qs-team-avatar-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    color: rgba(255,255,255,.2);
}
.qs-team-avatar-icon svg { width: 36px; height: 36px; stroke-width: 1.4; }

.qs-team-role-badge {
    position: absolute;
    bottom: -12px;
    right: -12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .15em;
    color: var(--qs-accent);
    background: rgba(255,20,0,.1);
    border: 1px solid rgba(255,20,0,.3);
    padding: 6px 12px;
    border-radius: 2px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
}

.qs-team-text-col {
    flex: 0 0 calc(70% - 60px);
}
.qs-team-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    margin: 0 0 8px;
    transition: color .3s ease;
}
.qs-team-row:hover .qs-team-name { color: rgba(255,255,255,.9); }
.qs-team-bar {
    width: 48px;
    height: 2px;
    background: var(--qs-accent);
    margin-bottom: 20px;
}
.qs-team-bio {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: rgba(255,255,255,.6);
    line-height: 1.85;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 7 — QS ALIANZAS
══════════════════════════════════════════════════════════════════════════ */
.qs-alianzas-block {
    background: #050B18;
    padding: 80px 24px;
}
.qs-alianzas-h2 {
    font-weight: 700;
    font-size: 24px;
    color: rgba(255,255,255,.6);
    text-align: center;
    margin: 0 0 48px;
}
/* ── Infinite marquee ─────────────────────────────────────────
   Pattern: ONE .qs-alianzas-track with ALL items × 2.
   Animate translateX(0 → -25%): -25% of a 4-copy track = one set width
   = exactly one full set → seamless snap, zero jump.
─────────────────────────────────────────────────────────────── */
.qs-alianzas-logos {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
}
.qs-alianzas-track {
    display: flex;
    align-items: center;
    gap: 32px;
    width: max-content;
    padding: 8px 0;           /* vertical breathing room */
    will-change: transform;
    animation: alianzas-scroll 30s linear infinite;
}
.qs-alianzas-logos:hover .qs-alianzas-track {
    animation-play-state: paused;
}
@keyframes alianzas-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); } /* -25% of 4-copy track = exactly 1 set width */
}
.qs-alianza-sep { display: none; }

/* Logo card */
.qs-alianza-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    padding: 16px 36px;
    height: 72px;
    box-sizing: border-box;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.qs-alianza-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}

/* Dark card modifier — for white/light logos on both carousels */
.qs-logo-card--dark {
    background: #1a2340 !important;
    border: 1px solid rgba(255,255,255,.12);
}
.qs-logo-card--dark:hover {
    background: #243060 !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
}
.qs-alianza-logo {
    max-height: 36px;
    max-width: 140px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}
.qs-alianza-text {
    font-weight: 700;
    font-size: 18px;
    color: #1a1a2e;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   BLOCK 8 — QS CLIENTES  (carousel, same pattern as alianzas, reversed)
══════════════════════════════════════════════════════════════════════════ */
.qs-clientes-block {
    background: #001C59;
    padding: 80px 24px;
}
.qs-clientes-inner {
    text-align: center;
}
.qs-clientes-h2 {
    font-weight: 700;
    font-size: 24px;
    color: rgba(255,255,255,.6);
    margin: 0 0 48px;
}

/* ── Infinite marquee — same as alianzas but animation-direction: reverse ── */
.qs-clientes-logos {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
}
.qs-clientes-track {
    display: flex;
    align-items: center;
    gap: 32px;
    width: max-content;
    padding: 8px 0;
    will-change: transform;
    animation: alianzas-scroll 80s linear infinite reverse; /* more logos → longer duration to match px/s speed */
}
.qs-clientes-logos:hover .qs-clientes-track {
    animation-play-state: paused;
}

/* Logo card — white card (same as alianzas) so ALL logos are visible */
.qs-cliente-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    padding: 16px 36px;
    height: 72px;
    box-sizing: border-box;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.qs-cliente-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.qs-cliente-logo {
    max-height: 36px;
    max-width: 140px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}
.qs-cliente-text {
    font-weight: 700;
    font-size: 18px;
    color: rgba(255,255,255,.5);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════════════════ */
@keyframes qs-spin {
    to { transform: rotate(360deg); }
}
@keyframes qs-spin-rev {
    to { transform: rotate(-360deg); }
}
@keyframes qs-core-pulse {
    0%, 100% { transform: scale(1); opacity: .9; }
    50%        { transform: scale(1.04); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — 768px
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .qs-hero-block { padding: calc(80px + 48px) 24px 48px; }
    .qs-hero-grid { grid-template-columns: 1fr; gap: 48px; }

    .qs-diff-row { grid-template-columns: 80px 1fr; }
    .qs-diff-icon-col { display: none; }

    .qs-valores-items { grid-template-columns: 1fr; }
    .qs-valor-item { border-left: none; border-top: 1px solid rgba(255,255,255,.1); padding: 24px 24px; }
    .qs-valor-item:first-child { border-top: none; }

    .qs-team-row,
    .qs-team-row--reverse { flex-direction: column; gap: 32px; padding: 48px 0; }
    .qs-team-avatar-col,
    .qs-team-row--reverse .qs-team-avatar-col { flex: none; justify-content: flex-start; }
    .qs-team-text-col { flex: none; }

    .qs-alianzas-track { gap: 20px; animation-duration: 20s; }
    .qs-alianza-card { padding: 12px 24px; height: 60px; }
    .qs-alianza-logo { max-height: 28px; max-width: 100px; }

    .qs-clientes-track { gap: 20px; animation-duration: 25s; }
    .qs-cliente-card { padding: 12px 24px; height: 60px; }
    .qs-cliente-logo { max-height: 28px; max-width: 100px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .qs-tx-ring-1, .qs-tx-ring-2, .qs-tx-nucleus { animation: none !important; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }

    /* Alianzas — stop + show as wrap grid */
    .qs-alianzas-track { animation: none !important; flex-wrap: wrap; justify-content: center; gap: 24px; width: 100%; }
    .qs-alianzas-logos { -webkit-mask-image: none; mask-image: none; overflow: visible; }
    .qs-alianza-card[aria-hidden="true"] { display: none; }

    /* Clientes — stop + show as wrap grid */
    .qs-clientes-track { animation: none !important; flex-wrap: wrap; justify-content: center; gap: 24px; width: 100%; }
    .qs-clientes-logos { -webkit-mask-image: none; mask-image: none; overflow: visible; }
    .qs-cliente-card[aria-hidden="true"] { display: none; }
}
