/* ==========================================================================
   Pagina inicial
   O "bilhete" (.r-ticket) e o elemento marcante do tema: corpo + canhoto
   separados por uma linha picotada com os recortes nas laterais.
   ========================================================================== */

.home-wrap {
    max-width: var(--r-max);
    margin: 0 auto;
    padding: 14px 14px 24px;
}

/* ---------- selos de status ---------- */
.r-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
}
.r-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.r-badge--live { background: var(--r-green-soft); color: var(--r-green); }
.r-badge--hot  { background: var(--r-red); color: #fff; }
.r-badge--hot::before { animation: rPulse 1.4s ease-in-out infinite; }
.r-badge--done { background: var(--r-panel); color: var(--r-ink-2); }
.r-badge--soon { background: var(--r-amber-soft); color: var(--r-amber); }
@keyframes rPulse { 50% { opacity: .25; } }

/* ---------- barra de progresso ---------- */
.r-meter {
    height: 6px;
    border-radius: 999px;
    background: var(--r-panel);
    overflow: hidden;
    margin-top: 10px;
}
.r-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--r-red);
}
.r-meter--sm { height: 4px; margin-top: 8px; }
.r-meter__label {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--r-ink-2);
}

/* ---------- bilhete ---------- */
.r-ticket {
    --notch: 9px;
    --stub: 92px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr var(--stub);
    background: #fff;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    color: var(--r-ink);
    text-decoration: none;
    transition: border-color .15s;
}
a.r-ticket:hover { border-color: var(--r-ink); color: var(--r-ink); }

.r-ticket__body { min-width: 0; padding: 12px 14px; }

.r-ticket__stub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 10px 6px;
    border-left: 2px dashed var(--r-line-strong);
    text-align: center;
}
/* recortes do picote, em cima e embaixo da linha tracejada */
.r-ticket__stub::before,
.r-ticket__stub::after {
    content: "";
    position: absolute;
    left: calc(var(--notch) * -1 - 1px);
    width: calc(var(--notch) * 2);
    height: var(--notch);
    background: var(--r-bg);
    border: 1px solid var(--r-line);
}
.r-ticket__stub::before { top: -1px; border-top: 0; border-radius: 0 0 var(--notch) var(--notch); }
.r-ticket__stub::after { bottom: -1px; border-bottom: 0; border-radius: var(--notch) var(--notch) 0 0; }
a.r-ticket:hover .r-ticket__stub::before,
a.r-ticket:hover .r-ticket__stub::after { border-color: var(--r-ink); }

.r-ticket__stub small { font-size: 11px; color: var(--r-ink-2); }
.r-ticket__stub strong {
    font-size: 16px;
    font-weight: 800;
    font-stretch: 85%;
    color: var(--r-red);
    line-height: 1.1;
    white-space: nowrap;
}

/* ---------- destaque ---------- */
.r-hero { display: block; text-decoration: none; color: var(--r-ink); }
.r-hero:hover { color: var(--r-ink); }
.r-hero__media {
    position: relative;
    border-radius: var(--r-radius) var(--r-radius) 0 0;
    overflow: hidden;
    background: var(--r-panel);
    border: 1px solid var(--r-line);
    border-bottom: 0;
}
.r-hero__media img {
    width: 100%;
    height: auto;
    display: block;
}
.r-hero__media .r-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.r-hero__media .r-badge--live,
.r-hero__media .r-badge--soon,
.r-hero__media .r-badge--done { background: #fff; }

.r-ticket--hero {
    --stub: 116px;
    border-radius: 0 0 var(--r-radius) var(--r-radius);
}
.r-ticket--hero .r-ticket__body { padding: 14px 16px 16px; }
.r-hero:hover .r-ticket--hero { border-color: var(--r-ink); }
.r-hero:hover .r-hero__media { border-color: var(--r-ink); }

.r-hero__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    font-stretch: 88%;
    line-height: 1.1;
    letter-spacing: -.02em;
    text-transform: uppercase;
    word-break: break-word;
}
.r-hero__sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--r-ink-2);
}
.r-ticket--hero .r-ticket__stub strong { font-size: 21px; }
.r-ticket__go {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--r-red);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.r-hero:hover .r-ticket__go { background: var(--r-red-dark); }

/* ---------- secoes ---------- */
.r-section { margin-top: 26px; }
.r-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.r-section__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.r-section__head a {
    font-size: 13px;
    font-weight: 700;
    color: var(--r-red);
    text-decoration: none;
}

/* ---------- lista de campanhas ---------- */
.r-list { display: flex; flex-direction: column; gap: 10px; }

.r-ticket--row { grid-template-columns: 76px 1fr var(--stub); --stub: 84px; }
.r-ticket__thumb { padding: 8px 0 8px 8px; }
.r-ticket__thumb img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--r-panel);
    display: block;
}
.r-ticket--row .r-ticket__body { padding: 10px 12px; }
.r-ticket--row h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.r-ticket--row p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--r-ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.r-ticket__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
}
.r-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--r-ink-2);
}

/* ---------- ganhadores ---------- */
.r-winners {
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    overflow: hidden;
}
.r-winner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}
.r-winner + .r-winner { border-top: 1px solid var(--r-line); }
.r-winner img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--r-panel);
    flex-shrink: 0;
}
.r-winner__info { flex: 1; min-width: 0; }
.r-winner__info strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.r-winner__info span { font-size: 12px; color: var(--r-ink-2); }
.r-winner__num { text-align: right; flex-shrink: 0; }
.r-winner__num small { display: block; font-size: 10px; color: var(--r-ink-3); }
.r-winner__num b {
    font-size: 17px;
    font-weight: 800;
    color: var(--r-red);
    font-variant-numeric: tabular-nums;
}

/* ---------- ranking ---------- */
.r-rank {
    list-style: none;
    counter-reset: rank;
    margin: 0;
    padding: 0;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    overflow: hidden;
}
.r-rank li {
    counter-increment: rank;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    font-size: 14px;
}
.r-rank li + li { border-top: 1px solid var(--r-line); }
.r-rank li::before {
    content: counter(rank);
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--r-panel);
    font-size: 12px;
    font-weight: 800;
}
.r-rank li:first-child::before { background: var(--r-red); color: #fff; }
.r-rank__name { flex: 1; font-weight: 700; }
.r-rank__val { color: var(--r-ink-2); font-weight: 600; }

/* ---------- ajuda ---------- */
.r-help {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding: 14px;
    border-radius: var(--r-radius);
    background: var(--r-panel);
    color: var(--r-ink);
    text-decoration: none;
}
.r-help > i:first-child {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    color: var(--r-red);
    font-size: 19px;
    flex-shrink: 0;
}
.r-help span { flex: 1; }
.r-help strong { display: block; font-size: 15px; font-weight: 800; }
.r-help small { font-size: 12px; color: var(--r-ink-2); }
.r-help__chev { color: var(--r-ink-3); }
.r-help:hover { color: var(--r-ink); }
.r-help:hover .r-help__chev { color: var(--r-red); }

/* ---------- vazio ---------- */
.r-empty {
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed var(--r-line-strong);
    border-radius: var(--r-radius);
}
.r-empty i { font-size: 34px; color: var(--r-red); }
.r-empty h2 { margin: 10px 0 4px; font-size: 18px; font-weight: 800; }
.r-empty p { margin: 0; font-size: 14px; color: var(--r-ink-2); }

@media (max-width: 380px) {
    .r-ticket--row { --stub: 76px; grid-template-columns: 64px 1fr var(--stub); }
    .r-ticket__thumb img { width: 56px; height: 56px; }
    .r-ticket--hero { --stub: 100px; }
    .r-hero__title { font-size: 19px; }
}
