/* Quendevs — Our Services section, contact section, success dialog. */

html.qs-lock { overflow: hidden; padding-right: var(--qs-sbw, 0px); }

/* ---------- Our Services ---------- */
.qs-section {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 6rem 5% 4rem;
    scroll-margin-top: 4rem;
}

.qs-header { text-align: center; max-width: 820px; margin: 0 auto 3.5rem; }
.qs-header .section-title { margin-bottom: 1rem; }

.qs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #c9ccd2;
}
.qs-eyebrow::before,
.qs-eyebrow::after {
    content: "";
    width: 38px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(199, 203, 209, 0.6));
}
.qs-eyebrow::after { transform: scaleX(-1); }

.qs-subtitle { margin: 0 auto; max-width: 52ch; color: var(--text-muted, #A1A1AA); font-size: 1.05rem; line-height: 1.6; }

.qs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
}

.qs-card {
    --mx: 50%;
    --my: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.6rem;
    text-align: left;
    font: inherit;
    color: #f4eef0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid transparent;
    background:
        linear-gradient(160deg, #1d0a11, #0c0507) padding-box,
        linear-gradient(145deg, rgba(230, 93, 127, 0.55), rgba(199, 203, 209, 0.08) 40%, rgba(169, 54, 75, 0.3)) border-box;
    box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.9);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    -webkit-tap-highlight-color: transparent;
}

.qs-grid:not(.in) .qs-card { opacity: 0; transform: translateY(26px); }
.qs-grid.in .qs-card { animation: qs-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--k) * 70ms); }
@keyframes qs-rise { from { opacity: 0; transform: translateY(26px); } }

.qs-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(340px circle at var(--mx) var(--my), rgba(196, 48, 74, 0.2), transparent 60%);
}

.qs-card:focus-visible,
.qs-close:focus-visible,
.qs-cta:focus-visible { outline: 2px solid #e65d7f; outline-offset: 3px; }

.qs-card-top { display: flex; justify-content: space-between; align-items: center; }
.qs-no { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.18em; color: #c9919d; }

.qs-chip {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(230, 93, 127, 0.4);
    background: radial-gradient(circle at 30% 25%, rgba(196, 48, 74, 0.35), rgba(100, 28, 43, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.qs-chip svg { width: 22px; height: 22px; fill: none; stroke: #e65d7f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.qs-card h3 { margin: 0.4rem 0 0; font-size: 1.45rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
.qs-card > p { margin: 0; color: var(--text-muted, #A1A1AA); font-size: 0.92rem; line-height: 1.55; }

.qs-preview { list-style: none; margin: 0.3rem 0 0; padding: 0.9rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.09); display: grid; gap: 0.35rem; }
.qs-preview li { position: relative; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.4; color: #d3c4c9; }
.qs-preview li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; border-radius: 50%; background: #a9364b; }

.qs-more { margin-top: auto; padding-top: 0.5rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: #e8d9dd; }
.qs-count {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(230, 93, 127, 0.55);
    color: #e65d7f;
    font-size: 0.74rem;
    transition: background 0.3s ease, color 0.3s ease;
}

@media (hover: hover) {
    .qs-card:hover { transform: translateY(-6px); box-shadow: 0 30px 56px -26px rgba(169, 54, 75, 0.6); }
    .qs-card:hover::after { opacity: 1; }
    .qs-card:hover .qs-count { background: #a9364b; border-color: #a9364b; color: #fff; }
}

@media (min-width: 701px) {
    .qs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
}

@media (min-width: 1100px) {
    .qs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
    .qs-card:nth-child(1),
    .qs-card:nth-child(5),
    .qs-card:nth-child(7),
    .qs-card:nth-child(8) { grid-column: span 2; }
    .qs-card:nth-child(1) h3,
    .qs-card:nth-child(5) h3,
    .qs-card:nth-child(7) h3,
    .qs-card:nth-child(8) h3 { font-size: 1.8rem; }
    .qs-card { padding: 1.8rem; }
}

/* ---------- Expanded panel ---------- */
.qs-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 20px;
    background: rgba(6, 2, 4, 0.82);
    opacity: 0;
    visibility: hidden;
    overscroll-behavior: contain;
    touch-action: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.qs-overlay.on { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }

/* A div, so the global `section { padding; max-width; margin }` rules in style.css cannot reach it. */
.qs-panel {
    position: relative;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    width: min(800px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 30px;
    color: #f4eef0;
    border: 1px solid rgba(230, 93, 127, 0.35);
    background: linear-gradient(160deg, #240b13, #0d0507 62%);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 60px rgba(100, 28, 43, 0.3);
    outline: none;
    will-change: transform;
}
.qs-panel.on { display: flex; }

.qs-panel-in { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; opacity: 0; transition: opacity 0.15s ease; }
.qs-panel.on .qs-panel-in { opacity: 1; transition: opacity 0.3s ease 0.18s; }
.qs-panel-head, .qs-panel-foot { flex: 0 0 auto; }

.qs-panel-head {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.6rem 5rem 1.3rem 1.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(120deg, rgba(169, 54, 75, 0.2), transparent 70%);
}
.qs-panel-head h3 { margin: 0; font-size: clamp(1.4rem, 4.5vw, 2rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
.qs-panel-head p { margin: 0.45rem 0 0; color: var(--text-muted, #A1A1AA); font-size: 0.92rem; line-height: 1.55; }

.qs-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}
.qs-close svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
@media (hover: hover) { .qs-close:hover { background: #a9364b; transform: rotate(90deg); } }

.qs-panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 0.4rem 1.7rem 1.2rem; }
.qs-panel-body:focus-visible { outline: 2px solid rgba(230, 93, 127, 0.7); outline-offset: -4px; }
.qs-panel-body h4 { margin: 1.5rem 0 0.5rem; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #c9919d; }

.qs-list { list-style: none; counter-reset: qs; margin: 0.6rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.2rem 1.2rem; }
.qs-list li {
    position: relative;
    counter-increment: qs;
    padding: 0.6rem 0.6rem 0.6rem 2.6rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.35;
}
.qs-list li::before {
    content: counter(qs);
    position: absolute;
    left: 0.5rem;
    top: 0.55rem;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(169, 54, 75, 0.25);
    color: #f08aa0;
    font-size: 0.7rem;
    font-weight: 700;
}
.qs-panel.on .qs-list li { animation: qs-pop 0.35s both; animation-delay: calc(var(--i) * 16ms + 240ms); }
@keyframes qs-pop { from { opacity: 0; transform: translateY(8px); } }
@media (hover: hover) { .qs-list li:hover { background: rgba(169, 54, 75, 0.12); } }

.qs-panel-foot { padding: 1rem 1.7rem calc(1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, 0.09); background: rgba(8, 3, 5, 0.6); }

.qs-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
    border: 1px solid rgba(230, 93, 127, 0.45);
    border-radius: 999px;
    background: linear-gradient(120deg, #641c2b, #a9364b);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.qs-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .qs-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(196, 48, 74, 0.8); } }

@media (min-width: 701px) {
    .qs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qs-cta { width: auto; }
    .qs-panel-foot { display: flex; justify-content: flex-end; }
}

@media (max-width: 700px) {
    .qs-section { padding: 4rem 1.1rem 2.5rem; }
    .qs-header { margin-bottom: 2.2rem; }
    .qs-overlay { padding: 0; align-items: end; }
    .qs-panel {
        width: 100%;
        max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
        border-radius: 24px 24px 0 0;
        border-bottom: 0;
    }
    .qs-panel-head { padding: 1.3rem 4.2rem 1.1rem 1.2rem; }
    .qs-panel-head .qs-chip { display: none; }
    .qs-panel-body, .qs-panel-foot { padding-left: 1.2rem; padding-right: 1.2rem; }
    .qs-close { top: 0.8rem; right: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .qs-card, .qs-overlay, .qs-panel-in, .qs-close,     .qs-cta { transition: none !important; }
        .qs-grid.in .qs-card, .qs-panel.on .qs-list li { animation: none !important; }
        .qs-grid:not(.in) .qs-card { opacity: 1; transform: none; }
}
