/* ══════════════════════════════════════════════════════════════════
   REDBUS STYLE: OFFERS FOR YOU SECTION & CAROUSEL
   ══════════════════════════════════════════════════════════════════ */

.rb-offers-container {
    width: 100%;
    margin: 20px auto 26px;
}

.floating-glass-dashboard .rb-offers-container {
    margin: 0 0 22px 0;
}

/* Header Section */
.rb-offers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.rb-offers-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.rb-offers-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff; /* High contrast on dark hero */
    margin: 0;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Filter Tabs (All / Bus) */
.rb-offers-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rb-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rb-tab-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.rb-tab-btn.active {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    font-weight: 800;
}

/* View More Link */
.rb-view-more {
    font-size: 13.5px;
    font-weight: 700;
    color: #60a5fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.rb-view-more:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Slider Track and Wrap */
.rb-slider-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.rb-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 14px 2px;
    align-items: stretch;
}

.rb-slider-track::-webkit-scrollbar {
    display: none;
}

/* Desktop: 3 cards in view */
.rb-slide-item {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    scroll-snap-align: start;
    box-sizing: border-box;
    display: flex;
}

/* If exactly 2 cards on desktop */
@media (min-width: 769px) {
    .rb-slider-track.rb-cards-2 .rb-slide-item {
        flex: 0 0 calc((100% - 16px) / 2);
        min-width: calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}

/* Single Card Full Width */
.rb-single-card .rb-slide-item,
.rb-slider-track.rb-cards-1 .rb-slide-item {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Small Screens / Mobile & Tablet (<= 768px): FULL WIDTH per card */
@media (max-width: 768px) {
    .rb-slide-item,
    .rb-slider-track .rb-slide-item,
    .rb-slider-track.rb-cards-2 .rb-slide-item,
    .rb-slider-track.rb-cards-1 .rb-slide-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        scroll-snap-align: center;
    }

    .rb-card-left {
        max-width: 72% !important;
    }

    .rb-badge-operator {
        max-width: 200px !important;
    }

    .rb-card-title {
        font-size: 14px !important;
        height: auto !important;
        min-height: 36px;
    }
}

/* Uniform Card Height */
.rb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 180px; /* Fixed uniform height for all cards */
    min-height: 180px;
    max-height: 180px;
    border-radius: 16px;
    padding: 14px 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.rb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

/* Themes */
.rb-theme-peach {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: rgba(251, 146, 60, 0.25);
}

.rb-theme-rose {
    background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 100%);
    border-color: rgba(244, 63, 94, 0.25);
}

.rb-theme-sky {
    background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
    border-color: rgba(14, 165, 233, 0.25);
}

.rb-theme-mint {
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    border-color: rgba(34, 197, 94, 0.25);
}

.rb-theme-lavender {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
    border-color: rgba(168, 85, 247, 0.25);
}

/* Decorative Sunburst */
.rb-card-sunburst {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Card Content (Left Column) */
.rb-card-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    z-index: 2;
    max-width: 68%;
}

/* Single Card Layout Adjustment */
.rb-single-card .rb-card-left,
.rb-slider-track.rb-cards-1 .rb-card-left {
    max-width: 78%;
}

/* Top Badges */
.rb-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rb-badge-bus {
    background: #334155;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

.rb-badge-operator {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 130px;
}

/* Main Heading (uniform 2 lines clamp) */
.rb-card-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 2px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 35px; /* Fixed height for title area so lines always align */
}

/* Validity & Live countdown (Single Line on large & small screens) */
.rb-validity-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.rb-validity-text {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.rb-validity-dot-sep {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1;
}

.rb-countdown-text {
    font-size: 10.5px;
    font-weight: 700;
    color: #d97706;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rb-countdown-text.rb-upcoming {
    color: #0284c7;
}

/* Bottom Coupon Code Button */
.rb-coupon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    user-select: none;
    width: fit-content;
}

.rb-coupon-btn:hover {
    background: #f8fafc;
    border-color: #475569;
    transform: scale(1.02);
}

.rb-coupon-btn.copied {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.rb-tag-icon {
    font-size: 10.5px;
    color: #475569;
}

.rb-coupon-btn.copied .rb-tag-icon {
    color: #10b981;
}

/* Card Right Illustration */
.rb-card-right {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 105px;
    height: 75px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.rb-card:hover .rb-card-right {
    transform: translateX(-3px) scale(1.04);
}

.rb-bus-svg {
    width: 100%;
    height: auto;
    max-height: 75px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

/* Single Card Bus Graphic adjustment */
.rb-single-card .rb-card-right,
.rb-slider-track.rb-cards-1 .rb-card-right {
    width: 140px;
    height: 95px;
    right: 18px;
    bottom: 10px;
}
.rb-single-card .rb-bus-svg,
.rb-slider-track.rb-cards-1 .rb-bus-svg {
    max-height: 95px;
}

/* Pagination & Mobile Indicator */
.rb-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.rb-counter-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.rb-dots-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rb-dot.active {
    width: 16px;
    border-radius: 4px;
    background: #ef4444;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .rb-offers-title {
        font-size: 18px;
    }

    .rb-card {
        padding: 12px 14px;
        height: 175px;
        min-height: 175px;
        max-height: 175px;
    }

    .rb-card-left {
        max-width: 68%;
    }

    .rb-card-title {
        font-size: 13.5px;
    }

    .rb-card-right {
        width: 100px;
        height: 72px;
        right: 4px;
        bottom: 6px;
    }
}
