/* ============================================================
   Melex evergreen promo — premium visual layer
   Loaded site-wide. Inline price components + hero countdown.
   ============================================================ */

/* Inline price components used by @melexPrice / @melexPricePerOs Blade directives.
   When promo is OFF, .price-new renders the only price.
   When promo is ON, .price--promo wraps the trio: strikethrough old + bold new + chip,
   with the chip on its OWN line ABOVE the prices (stacked layout, cleaner premium look). */
.price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}
/* Grid layout — badge on row 1 (content-width via justify-self: start),
   strikethrough + new price + per-os on row 2 inline. This avoids the
   "badge stretches to full row" issue that flex-basis: 100% produced. */
.price--promo {
    display: inline-grid;
    grid-template-columns: repeat(3, auto);
    column-gap: 8px;
    row-gap: 3px;
    align-items: baseline;
    justify-content: start;
}
.price--promo .price-badge {
    grid-column: 1 / -1;   /* span all columns to force a row break for siblings */
    justify-self: start;   /* sit at the left, sized to content (not stretched) */
    margin-bottom: 1px;
}
.price-new {
    color: var(--accent, #f59e0b);
    font-weight: 800;
    font-size: 1.05em;
    letter-spacing: -0.01em;
}
.price-old {
    color: rgba(100, 116, 139, 0.85);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(239, 68, 68, 0.55);
    font-size: 0.82em;
    font-weight: 500;
}
.price-per {
    color: rgba(100, 116, 139, 0.85);
    font-size: 0.78em;
    font-weight: 500;
}
.price-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 0.62em;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
    white-space: nowrap;
}

/* On dark backgrounds (hero, footer, tour-widget-card full-bleed), the strikethrough
   color needs to be lighter to stay legible. */
.tour-widget-card .price-old,
.melex-banner-body .price-old,
.hero-content .price-old,
[data-on-dark] .price-old {
    color: rgba(255, 255, 255, 0.55);
    text-decoration-color: rgba(248, 113, 113, 0.7);
}
.tour-widget-card .price-per,
.melex-banner-body .price-per,
.hero-content .price-per,
[data-on-dark] .price-per {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Wrapper strip — placed BELOW the hero, ABOVE the trust-bar on /melex.
   Same dark navy as the hero gradient bottom + the trust-bar above the
   features strip, so it flows visually without a colour break.
   ============================================================ */
.promo-strip {
    background: #0a0f1f;
    padding: 24px;
    margin: 0;
}
.promo-strip__inner {
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .promo-strip { padding: 18px 16px; }
}
@media (max-width: 480px) {
    .promo-strip { padding: 14px 12px; }
}
/* Wariant w hero (melex): szufladka wysuwająca się spod widgetu Quick Booking.
   .hero-inner to grid (1fr 420px, gap 60px) — pasek siedzi w 2. kolumnie pod
   widgetem; ujemny margines zjada gap i wsuwa górne 14px pod widget (z-index). */
.promo-strip--hero {
    background: transparent;
    padding: 0;
    grid-column: 2;
    margin-top: calc(-60px - 14px);
    position: relative;
    z-index: 0;
    align-self: start;
}
.promo-strip--hero .promo-strip__inner { max-width: none; }
.promo-strip--hero .promo-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 12px 30px;
    border-radius: 0 0 18px 18px;
    padding: 26px 16px 14px;
    /* mocniejsza zasłona — zdjęcie w tle ledwo widoczne */
    background:
        linear-gradient(115deg, rgba(10,15,31,0.96) 0%, rgba(16,25,52,0.92) 50%, rgba(10,15,31,0.88) 100%),
        url('/images/melex1.webp') center 35% / cover no-repeat;
}
/* Pary: chip tuż nad zakresem | "Offer ends in" tuż nad timerem */
.promo-bar__group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.promo-strip--hero .promo-bar__scope { font-size: 0.85rem; text-align: center; }
.promo-strip--hero .promo-bar__label { text-align: center; }
/* Pasek jest linkiem do #routes — zachowanie tekstu + delikatny hover */
a.promo-bar {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.promo-bar:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 12px 34px rgba(10, 15, 30, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.promo-bar__scope {
    color: rgba(255,255,255,0.92);
    font-weight: 700;
    font-size: 0.95rem;
}
/* Poniżej 900px widget znika — pasek jako wycentrowana pigułka, elementy
   w JEDNEJ kolumnie (flex column ignoruje grid-placement, timer nie wystaje) */
@media (max-width: 900px) {
    .promo-strip--hero {
        grid-column: 1;
        margin-top: 14px;
        z-index: auto;
    }
    .promo-strip--hero .promo-bar {
        flex-direction: column;
        gap: 12px;
        width: max-content;
        max-width: calc(100vw - 48px);
        margin: 0 auto;
        padding: 16px 22px;
        border-radius: 14px;
    }
}

/* ============================================================
   Hero countdown banner — only renders inside <div class="promo-bar"> blocks
   placed in templates (e.g. melex.blade.php hero, homepage hero).
   ============================================================ */
.promo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    background:
        linear-gradient(115deg, rgba(10,15,31,0.92) 0%, rgba(20,32,66,0.78) 45%, rgba(10,15,31,0.6) 100%),
        url('/images/melex1.webp') center 35% / cover no-repeat;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 14px;
    padding: 20px 26px;
    box-shadow:
        0 8px 28px rgba(10, 15, 30, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}
.promo-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 55%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.1), transparent 50%);
    pointer-events: none;
}
.promo-bar > * { position: relative; z-index: 1; }
.promo-bar__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent, #f59e0b);
    color: #0a0f1f;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
}
.promo-bar__label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.promo-bar__clock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.06em;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 6px 14px;
    border-radius: 8px;
    min-width: 130px;
    justify-content: center;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.35), 0 1px 2px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.promo-bar__clock .clock-sep {
    color: rgba(245, 158, 11, 0.7);
    animation: promoBlink 1s steps(2) infinite;
}
@keyframes promoBlink {
    50% { opacity: 0.3; }
}
.promo-bar__cta {
    display: inline-flex;
    align-items: center;
    background: var(--accent, #f59e0b);
    color: #0a0f1f;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: 9px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.promo-bar__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* ============================================================
   Sticky bar promo badge — chip placed inside the existing sticky bar
   on the melex page (rendered only when promo is active).
   ============================================================ */
.sticky-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    white-space: nowrap;
    margin-right: 10px;
    animation: stickyPromoPulse 2s ease-in-out infinite;
}
@keyframes stickyPromoPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
    50%      { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.7); }
}

/* When promo is active, the sticky bar gets a subtle accent border-top */
.sticky-bar--promo {
    border-top: 2px solid var(--accent, #f59e0b) !important;
}

/* Animated ticker INSIDE the sticky WhatsApp button.
   Alternates between "Book Now" (slide 1) and "-20% Limited offer" (slide 2)
   every ~6s. Pure CSS keyframes - no JS interval needed. This is the ONLY
   visible promo indicator on mobile because melex.css hides
   .sticky-bar-left + .sticky-btn-call below 600px (single-CTA design). */
.sticky-cta-ticker {
    position: relative;
    display: inline-block;
    height: 1.35em;
    line-height: 1.35em;
    overflow: hidden;
    min-width: 150px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.sticky-cta-ticker__slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    animation: stickyCtaSlide 6s cubic-bezier(.65,.05,.36,1) infinite;
    will-change: transform, opacity;
}
/* Slide 1 (Book Now) starts visible immediately, slide 2 delayed by half cycle. */
.sticky-cta-ticker__slide:nth-child(1) { animation-delay: 0s; }
.sticky-cta-ticker__slide:nth-child(2) { animation-delay: 3s; }
.sticky-cta-ticker__slide--promo {
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
}

@keyframes stickyCtaSlide {
    0%   { opacity: 0; transform: translateY(100%); }
    5%   { opacity: 1; transform: translateY(0); }
    45%  { opacity: 1; transform: translateY(0); }
    50%  { opacity: 0; transform: translateY(-100%); }
    100% { opacity: 0; transform: translateY(-100%); }
}

/* Respect prefers-reduced-motion — show first slide statically, no animation. */
@media (prefers-reduced-motion: reduce) {
    .sticky-cta-ticker { min-width: auto; height: auto; }
    .sticky-cta-ticker__slide {
        position: static;
        opacity: 1;
        transform: none;
        animation: none;
    }
    .sticky-cta-ticker__slide--promo { display: none; }
}

/* Countdown clock inside the sticky bar — desktop only, mono digits */
.sticky-promo-clock {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.22);
    padding: 5px 11px;
    border-radius: 7px;
    margin-right: 12px;
    min-width: 92px;
    justify-content: center;
}
.sticky-promo-clock .clock-sep {
    color: rgba(245, 158, 11, 0.65);
    animation: promoBlink 1s steps(2) infinite;
}
@media (max-width: 900px) {
    /* Tablet + below: clock takes too much space, hide it (promo bar above has its own) */
    .sticky-promo-clock { display: none; }
}

/* Mobile sticky bar with promo — keep buttons visible, just shrink the chatty text */
@media (max-width: 640px) {
    .sticky-bar--promo .sticky-text span    { display: none; }   /* subtitle out */
    .sticky-bar--promo .sticky-text strong  { font-size: 0.8rem; line-height: 1.2; }
    .sticky-promo-badge { font-size: 0.66rem; padding: 4px 8px; margin-right: 8px; }
    /* Buttons stay fully visible, just tighter padding */
    .sticky-bar--promo .sticky-btn-call { padding: 8px 12px; font-size: 0.8rem; }
    .sticky-bar--promo .sticky-btn-wa   { padding: 8px 14px; font-size: 0.85rem; gap: 5px; }
    .sticky-bar--promo .sticky-btn-wa .btn-icon { width: 15px; height: 15px; }
}
@media (max-width: 420px) {
    /* Tiny phones: drop the avail dot + main strong label to make room */
    .sticky-bar--promo .sticky-avail-dot { display: none; }
    .sticky-bar--promo .sticky-text { display: none; }
    .sticky-promo-badge { margin-right: 4px; }
    .sticky-bar--promo .sticky-btn-call { padding: 7px 10px; font-size: 0.75rem; }
    .sticky-bar--promo .sticky-btn-wa span { font-size: 0.78rem; }
}

/* Mobile — stack vertically, smaller clock */
@media (max-width: 640px) {
    .promo-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px 18px;
        text-align: center;
    }
    .promo-bar__clock {
        font-size: 1.2rem;
        padding: 5px 12px;
        min-width: 110px;
    }
    .promo-bar__cta {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
