/*
 * Home page: QR code types as an accordion
 * (resources/views/blue/sections/qrcode-types-showcase.blade.php)
 *
 * Phones: rows with icon, title, short text and a round arrow; the details
 * open below the tapped row. From 900px: list on the left, the open type on
 * the right (text and image side by side from 1200px).
 */

.qt-showcase {
    --qt-green: #11876a;
    --qt-green-hover: #0e7259;
    --qt-soft: #eaf7f2;
    --qt-ink: #022335;
    --qt-muted: #5b6472;
    --qt-line: #e5e7eb;
    --qt-bg: #f8fafc;

    padding: 5rem 1rem;
    background-color: #fff;
    color: var(--qt-ink);
    scroll-margin-top: 88px;
}

.qt-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- heading ---------- */

.qt-head {
    max-width: 46rem;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.qt-eyebrow {
    margin: 0 0 0.75rem;
    color: var(--qt-green);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qt-title {
    margin: 0;
    color: var(--qt-ink);
    font-size: clamp(26px, 2.2vw + 14px, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.qt-lead {
    margin: 1rem 0 0;
    color: var(--qt-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.qt-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--qt-green);
    font-size: 0.9375rem;
    font-weight: 600;
}

/* ---------- rows ---------- */

.qt-acc {
    overflow: hidden;
    border: 1px solid var(--qt-line);
    border-radius: 18px;
    background-color: #fff;
}

.qt-item + .qt-item {
    border-top: 1px solid var(--qt-line);
}

.qt-item.is-open {
    background-color: var(--qt-bg);
}

.qt-row-heading {
    margin: 0;
    font: inherit;
}

.qt-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 16px 16px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* room for the sticky site header when the row is scrolled into view */
    scroll-margin-top: 96px;
}

.qt-row:focus-visible {
    outline: 2px solid var(--qt-green);
    outline-offset: -2px;
    border-radius: 12px;
}

.qt-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: var(--qt-soft);
    color: var(--qt-green);
}

.qt-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qt-row-text {
    flex: 1;
    min-width: 0;
}

.qt-row-text b {
    display: block;
    color: var(--qt-ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.qt-row-text small {
    display: block;
    margin-top: 2px;
    color: var(--qt-muted);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
}

.qt-chev {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--qt-line);
    border-radius: 50%;
    background-color: #fff;
    color: #374151;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.qt-chev svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qt-row:hover .qt-chev {
    border-color: var(--qt-green);
    color: var(--qt-green);
}

.qt-item.is-open .qt-chev {
    border-color: var(--qt-green);
    background-color: var(--qt-green);
    color: #fff;
    transform: rotate(180deg);
}

/* ---------- panel ---------- */

.qt-panel {
    display: flex;
    flex-direction: column;
    padding: 0 16px 20px;
}

.qt-panel[hidden] {
    display: none;
}

.qt-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: var(--qt-soft);
    color: var(--qt-green);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.qt-panel-heading {
    margin: 0.75rem 0 0;
    color: var(--qt-ink);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.qt-panel-desc {
    margin: 0.5rem 0 0;
    color: var(--qt-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.qt-features {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.qt-features li {
    display: flex;
    gap: 0.5rem;
    color: #1f2937;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.qt-features svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    padding: 3px;
    border-radius: 50%;
    background-color: var(--qt-soft);
    fill: none;
    stroke: var(--qt-green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qt-features strong {
    color: var(--qt-ink);
    font-weight: 600;
}

.qt-note {
    margin: 1rem 0 0;
    color: var(--qt-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.qt-type-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.qt-type-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--qt-line);
    border-radius: 999px;
    background-color: #fff;
    color: var(--qt-ink);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.qt-type-links a:hover {
    border-color: var(--qt-green);
    color: var(--qt-green);
}

.qt-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    margin-top: 1.25rem;
    padding: 0 1.25rem;
    border-radius: 8px;
    background-color: var(--qt-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.qt-cta:hover {
    background-color: var(--qt-green-hover);
    color: #fff;
}

.qt-cta svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qt-figure {
    order: -1;
    margin: 0 0 1rem;
}

.qt-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background-color: #f1f5f9;
}

/* ---------- desktop: list left, open type right ---------- */

@media (min-width: 900px) {
    .qt-showcase {
        padding: 6rem 1.5rem;
    }

    .qt-hint {
        display: none;
    }

    .qt-acc {
        display: grid;
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
        grid-template-rows: repeat(4, auto) 1fr;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: none;
        column-gap: 2rem;
    }

    .qt-item {
        display: contents;
    }

    .qt-row-heading {
        grid-column: 1;
        grid-row: var(--qt-row);
        margin-bottom: 8px;
    }

    .qt-row {
        padding: 14px 16px;
        border: 1px solid var(--qt-line);
        border-radius: 14px;
        background-color: #fff;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .qt-row:hover {
        border-color: #cfd6dd;
        box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
    }

    .qt-item.is-open .qt-row {
        border-color: var(--qt-green);
        background-color: var(--qt-soft);
        box-shadow: none;
    }

    .qt-item.is-open .qt-icon {
        background-color: var(--qt-green);
        color: #fff;
    }

    /* on desktop the arrow points to the panel on the right */
    .qt-chev {
        transform: rotate(-90deg);
    }

    .qt-item.is-open .qt-chev {
        transform: rotate(-90deg);
    }

    .qt-panel {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
        padding: 2rem;
        border: 1px solid var(--qt-line);
        border-radius: 18px;
        background-color: var(--qt-bg);
    }

    .qt-panel {
        display: block;
    }

    .qt-figure {
        margin: 1.5rem 0 0;
    }

    .qt-panel-heading {
        font-size: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .qt-panel:not(.qt-panel-more) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 2rem;
        align-items: center;
    }

    .qt-panel[hidden] {
        display: none;
    }

    /* text left, image right (the phone order puts the image first) */
    .qt-figure {
        order: 0;
        margin: 0;
    }
}

/* very narrow phones (320px): the button label stays on one line */
@media (max-width: 360px) {
    .qt-cta {
        padding: 0 1rem;
        font-size: 0.9375rem;
        white-space: nowrap;
    }
}
