/* =========================================================================
   Offer strip (pattern: codehelp.in). One full-width bar at the very top of the page, ABOVE the header, inside the site header so it sticks with it.
   Every active offer is a slide: arrows, dots, auto-rotate, swipe on touch, close for the session.
   A long offer scrolls sideways; an offer with an end time shows its own countdown.
   ========================================================================= */
/* the older single strip from the layout is replaced by this one on this page */
.mc-offers {
    position: relative;
    z-index: 1;
    max-height: 90px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(100deg, #0e7490, #4f46e5 55%, #a21caf);
    transition: max-height .26s cubic-bezier(.2, .7, .2, 1), opacity .26s;
}

.mc-offers.is-closing { max-height: 0; opacity: 0; }

.mc-offers__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 8px 0 14px;
}

.mc-offers__side { display: none; }

.mc-offers__stage { display: grid; min-width: 0; }

.mc-offer {
    grid-area: 1 / 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    min-width: 0;
    padding: 6px 2px;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .35s cubic-bezier(.2, .7, .2, 1), transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s .35s;
}

.mc-offer.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mc-offer:hover { color: #fff; }
.mc-offer:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

.mc-offer__text { min-width: 0; max-width: 100%; overflow: hidden; font: 600 .86rem/1.35 var(--mc-font-h, inherit); white-space: nowrap; }
.mc-offer__text > span { display: inline-block; }

.mc-offer__text.is-scroll { -webkit-mask: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
.mc-offer__text.is-scroll > span { animation: mc-marq var(--dur, 10s) ease-in-out infinite alternate; }

@keyframes mc-marq {
    0%, 12% { transform: translateX(0); }
    88%, 100% { transform: translateX(var(--shift, 0)); }
}

.mc-offer__time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: none;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font: 700 .76rem/1 var(--mc-font-h, inherit);
}

.mc-offer__time i { margin-right: 3px; font-style: normal; font-weight: 600; opacity: .9; }
.mc-offer__time b { min-width: 24px; padding: 3px 5px; border-radius: 5px; background: #fff; color: #3730a3; font-variant-numeric: tabular-nums; text-align: center; }
.mc-offer__time u { margin-right: 2px; text-decoration: none; opacity: .9; }

.mc-offer__go {
    display: none;
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    color: #3730a3;
    font: 700 .78rem/1 var(--mc-font-h, inherit);
}

.mc-offers__ctrl { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }

.mc-offers__btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.mc-offers__btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.mc-offers__btn:focus-visible, .mc-offers__dot:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.mc-offers__btn svg { display: block; width: 15px; height: 15px; }

.mc-offers__dots { display: none; align-items: center; gap: 6px; padding: 0 6px; }

.mc-offers__dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .3s cubic-bezier(.2, .7, .2, 1), background-color .3s;
}

.mc-offers__dot.is-on { width: 16px; background: #fff; }

@media (min-width: 768px) {
    .mc-offers__bar { grid-template-columns: 170px minmax(0, 1fr) 170px; padding: 0 14px; }
    .mc-offers__side { display: block; }
    .mc-offers__dots { display: flex; }
    .mc-offer { flex-wrap: nowrap; }
    .mc-offer__text { font-size: .9rem; }
    .mc-offer__go { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
    .mc-offer, .mc-offers { transition: none; }
    .mc-offer__text { white-space: normal; }
}

/* phones: a single 44px row (text scrolls, countdown is compact) so the sticky strip never eats the screen */
@media (max-width: 767.98px) {
    .mc-offer { flex-wrap: nowrap; gap: 8px; }
    .mc-offer__text { flex: 1 1 0; min-width: 0; font-size: .82rem; }
    .mc-offer__time { padding: 3px 6px; font-size: .7rem; gap: 2px; }
    .mc-offer__time i { display: none; }
    .mc-offer__time b { min-width: 21px; padding: 2px 4px; }
}

/* the outgoing slide fades first, then the next one comes in, so two offers never overlap */
.mc-offer { transition: opacity .18s ease, transform .18s ease, visibility 0s .18s; }
.mc-offer.is-on { transition: opacity .3s ease .16s, transform .3s ease .16s, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .mc-offer, .mc-offer.is-on { transition: none; } }
