/* Pagina „Tombolă — Cadouri pentru primării”. Tema deschisă implicit; .winter-mode = tema întunecată. */

.tb {
    --tb-accent: #e6502d;
    --tb-accent-2: #ff8a3d;
    --tb-bg: #f6f4f0;
    --tb-panel: #ffffff;
    --tb-border: #e6e1d8;
    --tb-title: #151515;
    --tb-text: #45464a;
    --tb-muted: #74757a;
    --tb-shadow: 0 18px 40px -22px rgba(20, 20, 20, 0.45);
    --tb-radius: 18px;

    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(230, 80, 45, 0.12), transparent 60%),
        var(--tb-bg);
}

.winter-mode .tb {
    --tb-bg: #0d0d0d;
    --tb-panel: #161616;
    --tb-border: #2a2a2a;
    --tb-title: #ffffff;
    --tb-text: #d6d6d6;
    --tb-muted: #a2a2a2;
    --tb-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.9);
}

/* ---------- Hero ---------- */
.tb .tb-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.tb .tb-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tb-accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tb .tb-edition {
    margin: 14px 0 6px;
    color: var(--tb-accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.tb .tb-title {
    margin: 0 0 1rem;
    line-height: 1;
    color: var(--tb-title);
}

.tb .tb-title__script {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    color: var(--tb-title);
}

.tb .tb-title__main {
    display: block;
    margin-top: 0.35rem;
    font-weight: 900;
    font-size: clamp(1.9rem, 4.4vw, 3.3rem);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--tb-accent);
}

.tb .tb-lead {
    max-width: 560px;
    margin: 0 0 1rem;
    color: var(--tb-text);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.6;
}

.tb .tb-until {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px dashed var(--tb-accent);
    color: var(--tb-title);
    font-weight: 600;
    font-size: 0.92rem;
}

.tb .tb-until.is-ended {
    border-style: solid;
    border-color: var(--tb-border);
    color: var(--tb-muted);
}

.tb .tb-hero__ornaments {
    position: relative;
    min-height: clamp(360px, 40vw, 520px);
}

/* globuri agățate: ață + fundă + poza rotundă (ca în afiș) */
.tb .tb-ornament {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: 50% 0;
    animation: tb-swing 6s ease-in-out infinite;
}

.tb .tb-ornament--a {
    left: 2%;
    width: 56%;
}

.tb .tb-ornament--b {
    right: 0;
    width: 48%;
    animation-delay: -3s;
}

.tb .tb-ornament__string {
    display: block;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(240, 138, 60, 0.2), #f08a3c 30%);
}

.tb .tb-ornament--a .tb-ornament__string {
    height: clamp(30px, 4vw, 56px);
}

.tb .tb-ornament--b .tb-ornament__string {
    height: clamp(110px, 13vw, 170px);
}

.tb .tb-ornament__bow {
    position: relative;
    z-index: 2;
    width: clamp(54px, 6vw, 78px);
    height: auto;
    aspect-ratio: 64 / 40;
    margin-top: -18px;
    margin-bottom: -16px;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

.tb .tb-ornament__ball {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--tb-shadow), 0 0 0 6px rgba(230, 80, 45, 0.85);
}

.tb .tb-ornament__ball img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes tb-swing {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* ---------- Sections ---------- */
.tb .tb-section {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.tb .tb-h2 {
    margin: 0 0 1.25rem;
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    text-transform: uppercase;
    color: var(--tb-title);
}

.tb .tb-steps {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tb .tb-step {
    position: relative;
    padding: 22px 22px 20px;
    border-radius: var(--tb-radius);
    background: var(--tb-panel);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
}

.tb .tb-step__num {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--tb-accent);
    color: #fff;
    font-weight: 800;
    margin-bottom: 12px;
}

.tb .tb-step__title {
    margin: 0 0 6px;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--tb-title);
}

.tb .tb-step__text {
    margin: 0;
    color: var(--tb-text);
    line-height: 1.55;
}

.tb .tb-example {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.tb .tb-example__text {
    margin: 0;
    padding: 20px 22px;
    border-radius: var(--tb-radius);
    border-left: 4px solid var(--tb-accent);
    background: var(--tb-panel);
    color: var(--tb-text);
    line-height: 1.6;
}

.tb .tb-calc {
    padding: 18px 22px;
    border-radius: var(--tb-radius);
    background: linear-gradient(135deg, #e6502d, #ff7a3d);
    color: #fff;
}

.tb .tb-calc .tb-calc__label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: #fff;
}

.tb .tb-calc__row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tb .tb-calc .tb-calc__input {
    width: 150px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #151515;
    font-weight: 700;
    font-size: 1rem;
}

.tb .tb-calc .tb-calc__eq,
.tb .tb-calc .tb-calc__out {
    color: #fff;
    font-weight: 900;
    font-size: 1.25rem;
}

/* ---------- Prizes ---------- */
.tb .tb-prizes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
}

.tb .tb-prize {
    border-radius: var(--tb-radius);
    overflow: hidden;
    background: var(--tb-panel);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
}

.tb .tb-prize__media {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.tb .tb-prize__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tb .tb-prize:hover .tb-prize__media img {
    transform: scale(1.04);
}

.tb .tb-prize__media figcaption {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
}

.tb .tb-prize__body {
    position: relative;
    padding: 18px 22px 20px 64px;
}

.tb .tb-prize__check {
    position: absolute;
    left: 22px;
    top: 20px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid var(--tb-accent);
    color: var(--tb-accent);
    font-weight: 900;
}

.tb .tb-prize__type {
    margin: 0 0 2px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tb-title);
}

.tb .tb-prize__model {
    margin: 0;
    color: var(--tb-accent);
    font-weight: 700;
}

/* ---------- CTA ---------- */
.tb .tb-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--tb-radius);
    background: var(--tb-panel);
    border: 1px solid var(--tb-border);
    border-left: 5px solid var(--tb-accent);
    box-shadow: var(--tb-shadow);
}

.tb .tb-cta__title {
    margin: 0 0 4px;
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 900;
    color: var(--tb-title);
}

.tb .tb-cta__text {
    margin: 0;
    color: var(--tb-text);
}

.tb .tb-cta__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.tb a.tb-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.tb a.tb-btn--primary {
    background: var(--tb-accent);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(230, 80, 45, 0.85);
}

.tb a.tb-btn--primary:hover {
    background: #d1452a;
    color: #fff;
    transform: translateY(-2px);
}

.tb a.tb-btn--ghost {
    border: 1px solid var(--tb-border);
    color: var(--tb-title);
}

.tb a.tb-btn--ghost:hover {
    border-color: var(--tb-accent);
    color: var(--tb-accent);
}

.tb a.tb-link {
    color: var(--tb-accent);
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .tb .tb-hero {
        grid-template-columns: 1fr;
    }

    .tb .tb-hero__ornaments {
        min-height: clamp(340px, 78vw, 500px);
        max-width: 560px;
        width: 100%;
        margin: 10px auto 0;
    }

    .tb .tb-steps {
        grid-template-columns: 1fr;
    }

    .tb .tb-example {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .tb .tb-prizes {
        grid-template-columns: 1fr;
    }

    .tb .tb-hero__ornaments {
        min-height: 92vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tb .tb-ornament {
        animation: none;
    }
}
