﻿.pio-offers-grid {
    margin-inline: 0;
}

    .pio-offers-grid > [class*="col-"] {
        display: flex;
        justify-content: center;
    }

    .pio-offers-grid .pio-course-card {
        max-width: 300px;
    }

    .pio-offers-grid .card-body > a {
        align-items: flex-start;
    }

.pio-course-card .pio-offer-subject {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pio-offers-grid .card-text {
    min-height: 30px;
}

.pio-offers-search input.pio-btn-filter {
    text-align: start;
    cursor: text;
    user-select: text;
    padding-inline-end: 34px; 
}

    .pio-offers-search input.pio-btn-filter::placeholder {
        opacity: .55;
    }

.pio-offers-search {
    min-width: 200px;
}

.pio-offers-search-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    opacity: .5;
    pointer-events: none;
}

.pio-offers-pager {
    -\-pio-pager-color: var(-\-pio-primary-color, #F5821F);
}

    .pio-offers-pager .pio-pager-nav {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        border: 1px solid var(-\-pio-pager-color);
        border-radius: 8px;
        background: transparent;
        color: var(-\-pio-pager-color);
        font-size: .875rem;
        line-height: 1.6;
        white-space: nowrap;
        transition: background-color .15s, color .15s;
    }

        .pio-offers-pager .pio-pager-nav:hover:not(:disabled) {
            background: var(-\-pio-pager-color);
            color: #fff;
        }

        .pio-offers-pager .pio-pager-nav:disabled {
            opacity: .4;
            cursor: default;
        }

body[dir="rtl"] .pio-offers-pager .pio-pager-nav i {
    transform: rotate(180deg);
}

.pio-offers-pager .pio-pager-num {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: .875rem;
    line-height: 1;
    transition: background-color .15s, color .15s;
}

    .pio-offers-pager .pio-pager-num:hover:not(.active) {
        background: rgba(245, 130, 31, .1);
    }

    .pio-offers-pager .pio-pager-num.active {
        background: var(-\-pio-pager-color);
        color: #fff;
        font-weight: 600;
    }

.pio-offers-pager .pio-pager-gap {
    padding: 0 2px;
    opacity: .6;
    user-select: none;
}

.pio-offers-busy .pio-hero-heading,
.pio-offers-busy .pio-offers-grid,
.pio-offers-busy .pio-offers-pager {
    opacity: .45;
    transition: opacity .15s ease;
}

.pio-offers-results.pio-is-loading > .pio-loading-overlay {
    align-items: flex-start;
    padding-top: clamp(4rem, 12vh, 9rem);
}

.pio-offers-hero {
    -\-pio-offers-hero-pad: 2.25rem;
    -\-pio-offers-art-w: min(82vw, 24rem);
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(-\-pio-hero-base);
}

    .pio-offers-hero[ng-cloak],
    .pio-offers-hero.ng-cloak {
        display: none !important;
    }

.pio-offers-hero--ink {
    -\-pio-hero-base: #0a1525;
    -\-pio-hero-tint: #152847;
    -\-pio-hero-ink: #152847;
}

/* Tint and ink derived from the root navy, like the amber pair is from #FFA000. */
.pio-offers-hero--teal {
    -\-pio-hero-base: var(-\-pio-blue-color);
    -\-pio-hero-tint: color-mix(in srgb, var(-\-pio-blue-color) 75%, #fff);
    -\-pio-hero-ink: var(-\-pio-blue-color);
}

.pio-offers-hero--amber {
    -\-pio-hero-base: #FFA000;
    -\-pio-hero-tint: #ffb733;
    -\-pio-hero-ink: #A66800;
}

.pio-offers-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .55;
    background: linear-gradient(135deg, var(-\-pio-hero-tint) 0%, transparent 38%);
}

.pio-offers-hero-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

    .pio-offers-hero-deco::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        inset-block-start: -55%;
        inset-inline-end: 6%;
        background: rgba(255, 255, 255, .08);
    }

.pio-offers-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-block: var(-\-pio-offers-hero-pad);
}

.pio-offers-hero-body {
    min-width: 0;
}

.pio-offers-hero-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .3rem .85rem;
    background: #fff;
    color: var(-\-pio-hero-ink);
    font-weight: 700;
    line-height: 1.4;
    font-size: clamp(0.6727rem, calc(0.6455rem + 0.1161vw), 0.75rem);
}

.pio-offers-hero-title {
    margin-block: .9rem .6rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-transform: none;
    font-size: clamp(1.375rem, calc(1.1rem + 1.2vw), 2.25rem);
}

.pio-offers-hero-text {
    margin-bottom: 0;
    max-width: 56ch;
    line-height: 1.7;
    color: rgba(255, 255, 255, .92);
    font-size: clamp(0.8125rem, calc(0.77rem + 0.19vw), 0.9375rem);
}

.pio-offers-hero-figure {
    align-self: flex-end;
    width: var(-\-pio-offers-art-w);
    min-width: 0;
    margin-inline-end: calc((100% - 100vw) / 2 - var(-\-pio-offers-art-w) * .05);
    margin-block-end: calc(-1 * var(-\-pio-offers-hero-pad) - var(-\-pio-offers-art-w) * .045);
}

.pio-offers-hero-art {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .22));
}

@media screen and (min-width: 768px) {
    .pio-offers-hero {
        -\-pio-offers-hero-pad: clamp(2rem, 4vw, 3.25rem);
        -\-pio-offers-art-w: clamp(18rem, calc(8rem + 22.5vw), 31rem);
    }

    .pio-offers-hero-inner {
        flex-direction: row;
        gap: clamp(1.5rem, 4vw, 3.5rem);
    }

    .pio-offers-hero-body {
        flex: 1 1 0;
    }

    .pio-offers-hero-figure {
        flex: 0 0 var(-\-pio-offers-art-w);
        margin-block-start: calc(var(-\-pio-offers-hero-pad) * -.5);
    }
}

/* ---------- discount filter ----------
   Range first (one box: From | To), quick picks under it, then Reset / Apply.
   Nothing runs before "Apply"; closing the menu drops what was not applied.
   The desktop menu (.pio-discount-menu in _offersFiltersV2) and the mobile panel
   (.pio-discount-menu--panel in _offersFilterFabV2) share these rules; logical
   properties, so it reads right to left in Arabic. */
.pio-discount-menu {
    --pio-discount-blue: var(--pio-blue-color, #055386);
    --pio-discount-blue-soft: rgba(5, 83, 134, .08);
    --pio-discount-line: var(--bs-border-color, #e3e7ed);
    --pio-discount-muted: var(--bs-secondary-color, #6c757d);
    --pio-discount-field: var(--bs-tertiary-bg, #f6f8fa);
}

.filteration-dropdowns .dropdown-menu.pio-discount-menu {
    width: 300px;
    max-width: min(92vw, 300px);
    padding: 1.1rem;
    border: 1px solid var(--pio-discount-line);
    border-radius: 16px;
    box-shadow: 0 24px 48px -24px rgba(10, 21, 37, .35);
    text-align: start;
}

/* head */
.pio-discount-head {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-bottom: 1rem;
}

.pio-discount-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bs-body-color, #212529);
}

.pio-discount-hint {
    font-size: .78rem;
    color: var(--pio-discount-muted);
}

/* the range: one box, "From" | "To" */
.pio-discount-range {
    display: flex;
    align-items: stretch;
    height: 48px;
    border: 1px solid var(--pio-discount-line);
    border-radius: 12px;
    background: var(--pio-discount-field);
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .pio-discount-range:focus-within {
        border-color: #86b7fe;
        box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color, rgba(13, 110, 253, .25));
    }

.pio-discount-end {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    margin: 0;
    padding-inline: .85rem;
    cursor: text;
}

.pio-discount-end-label {
    flex: 0 0 auto;
    font-size: .8rem;
    color: var(--pio-discount-muted);
}

.pio-discount-end input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bs-body-color, #212529);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

    .pio-discount-end input::placeholder {
        font-weight: 400;
        color: #b5bcc5;
    }

    .pio-discount-end input::-webkit-outer-spin-button,
    .pio-discount-end input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.pio-discount-unit {
    flex: 0 0 auto;
    font-size: .85rem;
    color: var(--pio-discount-muted);
}

.pio-discount-divider {
    flex: 0 0 1px;
    margin-block: .6rem;
    background: var(--pio-discount-line);
}

/* quick picks: one row, equal parts */
.pio-discount-quick-label {
    display: block;
    margin: 1rem 0 .45rem;
    font-size: .78rem;
    color: var(--pio-discount-muted);
}

.pio-discount-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
}

.pio-discount-chip {
    height: 36px;
    padding: 0 .4rem;
    border: 1px solid var(--pio-discount-line);
    border-radius: 10px;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    font-size: .85rem;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

    .pio-discount-chip:hover {
        border-color: var(--pio-discount-blue);
    }

    .pio-discount-chip.is-active {
        border-color: var(--pio-discount-blue);
        background: var(--pio-discount-blue-soft);
        color: var(--pio-discount-blue);
        font-weight: 700;
    }

/* Reset / Apply */
.pio-discount-actions {
    display: flex;
    gap: .5rem;
    margin-top: 1.1rem;
}

.pio-discount-reset,
.pio-discount-apply {
    height: 42px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    transition: filter .15s ease, background-color .15s ease;
}

.pio-discount-reset {
    flex: 0 0 auto;
    padding-inline: 1rem;
    border: 1px solid var(--pio-discount-line);
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
}

    .pio-discount-reset:hover {
        background: var(--pio-discount-field);
    }

.pio-discount-apply {
    flex: 1 1 auto;
    border: 0;
    background: var(--pio-discount-blue);
    color: #fff;
}

    .pio-discount-apply:hover {
        filter: brightness(1.1);
    }

/* mobile panel: same blocks inside the filter group, no menu box */
.pio-discount-menu--panel {
    padding-top: .25rem;
}

/* dark theme */
body[data-bs-theme="dark"] .pio-discount-title,
body[data-bs-theme="dark"] .pio-discount-chip,
body[data-bs-theme="dark"] .pio-discount-reset {
    color: #f3f4f6;
}

body[data-bs-theme="dark"] .pio-discount-range,
body[data-bs-theme="dark"] .pio-discount-chip,
body[data-bs-theme="dark"] .pio-discount-reset {
    border-color: rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .04);
}

body[data-bs-theme="dark"] .pio-discount-chip.is-active {
    border-color: #8cc3ec;
    color: #8cc3ec;
}
