/* Home page: banner, tournaments, subscription packs. */
.home {
    max-width: 750px;
    padding-bottom: 24px;
}

.home__banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 610;
    border: 1px solid var(--qc-border);
    border-radius: 12px;
    background: var(--qc-surface);
}

.home__cta {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.home__cta .btn-brand {
    min-width: 180px;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 18px;
    line-height: 1.3;
    box-shadow: 0 6px 16px rgba(74, 74, 107, .25);
}

.home__section {
    margin-top: 32px;
}

.home__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.home__heading {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--qc-brand);
}

/* Horizontally scrolling rails */
.rail {
    display: flex;
    gap: 12px;
    padding: 2px 2px 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* no visible scrollbar; users swipe or drag */
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.rail img {
    -webkit-user-drag: none;
}

/* Position indicator (top-right of each rail section) */
.rail-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rail-dots[hidden] {
    display: none;
}

.rail-dots__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--qc-border);
    transition: width .2s ease, background-color .2s ease;
    cursor: pointer;
}

.rail-dots__dot.is-active {
    width: 22px;
    border-radius: 4px;
    background: var(--qc-brand);
}

.rail > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.tournament-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 200px;
    min-height: 140px;
    padding: 16px 12px 14px;
    border-radius: 12px;
    background: linear-gradient(145deg, #5a5a80 0%, var(--qc-brand) 55%, #34344d 100%);
    box-shadow: 0 4px 14px rgba(74, 74, 107, .25);
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tournament-card:hover,
.tournament-card:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(74, 74, 107, .35);
}

.tournament-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #FFC857;
    font-size: 20px;
}

.tournament-card__name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.tournament-card__prize {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 5px 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--qc-text);
    font-size: 14px;
    font-weight: 600;
}

.tournament-card__prize img {
    width: 14px;
    height: 12px;
}

.pack-card {
    display: flex;
    flex-direction: column;
    width: 240px;
    padding: 12px;
    border: 1px solid var(--qc-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(74, 74, 107, .12);
    white-space: normal;
}

.pack-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.pack-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--qc-brand);
}

.pack-card__note {
    font-size: 10px;
    color: var(--qc-muted);
    text-align: right;
}

.pack-card__price {
    margin: 8px 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--pack-accent, var(--qc-brand));
}

.pack-card__caption {
    flex: 1;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #232323;
}

.pack-card .btn {
    align-self: center;
    min-width: 130px;
    padding: 8px 16px;
    background: var(--pack-accent, var(--qc-brand));
    border-color: var(--pack-accent, var(--qc-brand));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.pack-card .btn:hover,
.pack-card .btn:focus-visible {
    color: #fff;
    filter: brightness(.92);
}

.pack-card--featured {
    --pack-accent: #FF9F41;
}

/* Footer */
.qc-footer {
    margin-top: 40px;
    background: #222;
    color: #fff;
}

.qc-footer__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto;
    max-width: 750px;
    padding: 18px 16px 14px;
    list-style: none;
}

.qc-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.qc-footer__social a:hover,
.qc-footer__social a:focus-visible {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    transform: translateY(-2px);
}

.qc-footer__contact {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, .15);
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

.qc-footer__contact p {
    margin: 0;
}

.qc-footer__contact a {
    display: inline-block;
    padding: 4px 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qc-footer__contact a:hover,
.qc-footer__contact a:focus-visible {
    color: #fff;
    text-decoration-thickness: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .tournament-card,
    .qc-footer__social a,
    .rail-dots__dot { transition: none; }
}
