/**
 * Promosyonlar sayfası — tüm stiller
 * assets/css/promotions.css
 */

/* ========== Desktop — menü altı gereksiz boşluk (/promotions + /promosyonlar) ========== */
@media (min-width: 992px) {
    .page-promotions .centerWrap,
    .promosyonlar-page .centerWrap {
        margin-top: 0 !important;
        padding-top: 8px;
    }

    .page-promotions router-outlet {
        display: none !important;
    }

    .page-promotions app-promotions-bonus,
    .page-promotions app-g6-promotions-bonus {
        display: block;
    }

    .page-promotions .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-promotions .container-fluid > .row,
    .page-promotions .container-fluid > .row > .col-12,
    .page-promotions .container-fluid > .row > .col-12 > .row,
    .page-promotions .bonusRow {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .page-promotions .promo-categories-scroll-wrap {
        margin-top: 0 !important;
        margin-bottom: 0.75rem;
    }

    .page-promotions .promo-categories-bar.bonus-page-cats {
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* ========== Sayfa konteyneri — header ile aynı çizgide (eşitlik) ========== */
/* Header .container-fluid ile aynı max-width ve yatay padding */
.promosyonlar-page .centerWrap {
    max-width: var(--max-width, 2620px);
    margin: 8px auto 0 !important;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 992px) {
    .promosyonlar-page .centerWrap {
        padding-left: 4px;
        padding-right: 4px;
    }
}

.promosyonlar-page {
    background: var(--body-bg, #0f0522);
    min-height: 60vh;
    padding: 0 0 2rem;
}

.promosyonlar-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ========== Üst kategori çubuğu ========== */
.promo-categories-bar {
    background: linear-gradient(180deg, #1a0f2e 0%, #160b28 100%);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(81, 33, 223, 0.2);
}

.promo-categories-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    min-height: 48px;
}

/* Yatay kaydırma (mobil/tablet) */
.promo-categories-inner::-webkit-scrollbar {
    height: 6px;
}

.promo-categories-inner::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.promo-categories-inner::-webkit-scrollbar-thumb {
    background: rgba(81, 33, 223, 0.5);
    border-radius: 3px;
}

.promo-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.promo-cat-btn i {
    font-size: 1rem;
    opacity: 0.95;
}

.promo-cat-btn:hover,
.promo-cat-btn:focus-visible {
    background: rgba(81, 33, 223, 0.3);
    color: #fff;
    outline: none;
}

.promo-cat-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(81, 33, 223, 0.6);
}

.promo-cat-btn.active {
    background: linear-gradient(135deg, #f5a623 0%, #e9c40a 100%);
    color: #000;
    box-shadow: 0 2px 12px rgba(233, 196, 10, 0.4);
}

.promo-cat-btn.active i {
    color: #000;
}

/* ========== Promosyon grid ========== */
.promo-grid-container {
    width: 100%;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.promo-card,
.bonus-card {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.promo-card.promo-card-hidden,
.bonus-card.promo-card-hidden {
    display: none !important;
}

.promo-card-inner {
    background: linear-gradient(145deg, #1a0a2e 0%, #0d0518 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(81, 33, 223, 0.25);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.promo-card-inner:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(81, 33, 223, 0.25);
    border-color: rgba(81, 33, 223, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .promo-card-inner,
    .promo-cat-btn {
        transition: none;
    }
    .promo-card-inner:hover {
        transform: none;
    }
    .promo-card-image::before {
        transition: none;
    }
}

/* Kart görsel alanı — 1:2 oran (en:boy) */
.promo-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 2;
    background-size: cover;
    background-position: center;
    background-color: #1a0a2e;
    overflow: hidden;
}

/* Hover: sadece opacity (backdrop-filter ve transform Windows'ta kasma yapıyor) */
.promo-card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.promo-card-inner:hover .promo-card-image::before {
    opacity: 1;
}

.promo-card-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px 10px;
    border-radius: 8px;
}

.promo-card-logo img {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.promo-card-logo .fa-circle-check {
    color: #22c55e;
    font-size: 0.9rem;
}

.promo-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f5a623, #e9c40a);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Kart içerik */
.promo-card-content {
    padding: 1.25rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.promo-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Boş liste / yükleme ========== */
.promo-grid-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.promo-grid-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* ========== Responsive ========== */
@media (min-width: 576px) {
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .promo-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .promo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }

    .promo-categories-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .promo-cat-btn {
        flex-shrink: 0;
        padding: 0.75rem 1.1rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .promo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .promo-card-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 575px) {
    .promo-categories-bar {
        padding: 0.4rem;
        margin-bottom: 1.25rem;
    }

    .promo-categories-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .promo-cat-btn {
        flex-shrink: 0;
        padding: 0.55rem 0.85rem;
        font-size: 0.75rem;
    }

    .promo-cat-btn span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .promo-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* ========== /promotions bonus grid: head'den erken yüklenir ========== */
.page-promotions .bonusRow.ng-star-inserted {
    padding-top: 0;
}

.page-promotions .bonusRow .promo-categories-scroll-wrap,
.page-promotions .bonusRow .promo-categories-bar.bonus-page-cats {
    margin-top: 0;
}

.page-promotions .promo-categories-scroll-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.page-promotions .promo-categories-bar.bonus-page-cats {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
    box-shadow: none;
}

.page-promotions .bonus-page-cats .promo-categories-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    min-height: 44px;
}

.page-promotions .bonus-page-cats .promo-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(81, 33, 223, 0.3);
    border-radius: 4px;
    background: rgba(40, 25, 70, 0.8);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.page-promotions .bonus-page-cats .promo-cat-btn i {
    font-size: 0.95rem;
    opacity: 0.95;
}

.page-promotions .bonus-page-cats .promo-cat-btn:hover,
.page-promotions .bonus-page-cats .promo-cat-btn:focus-visible {
    background: rgba(81, 33, 223, 0.35);
    border-color: rgba(129, 80, 235, 0.5);
    color: #fff;
    outline: none;
}

.page-promotions .bonus-page-cats .promo-cat-btn.active {
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
    border-color: #7c3aed;
    color: #fff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.page-promotions .bonus-page-cats .promo-cat-btn.active i {
    color: #fff;
}

.page-promotions .promo-cats-scroll-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    height: fit-content;
    margin: auto 0;
    padding: 0;
    border: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.page-promotions .promo-cats-scroll-hint i {
    line-height: 1;
    display: block;
}

.page-promotions .promo-cats-scroll-hint--left {
    left: 0;
    justify-content: flex-start;
    padding-left: 2px;
    background: linear-gradient(to right, rgba(14, 1, 36, 0.97) 30%, rgba(14, 1, 36, 0));
}

.page-promotions .promo-cats-scroll-hint--right {
    right: 0;
    justify-content: flex-end;
    padding-right: 2px;
    background: linear-gradient(to left, rgba(14, 1, 36, 0.97) 30%, rgba(14, 1, 36, 0));
}

.page-promotions .promo-categories-scroll-wrap.promo-cats--overflow:not(.promo-cats--at-end) .promo-cats-scroll-hint--right {
    opacity: 1;
    pointer-events: auto;
}

.page-promotions .promo-categories-scroll-wrap.promo-cats--overflow:not(.promo-cats--at-start) .promo-cats-scroll-hint--left {
    opacity: 1;
    pointer-events: auto;
}

.page-promotions .bonus-grid-container {
    width: 100%;
    padding: 20px 0;
}

.page-promotions .bonus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    width: 100%;
}

.page-promotions .bonus-card {
    position: relative;
    background: linear-gradient(145deg, #0a0a0a, #111111);
    border-radius: 16px;
    border: 1px solid rgba(133, 106, 0, 0.2);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-promotions .bonus-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 30%,
        rgba(139, 92, 246, 0.5) 45%,
        rgba(167, 139, 250, 0.85) 50%,
        rgba(139, 92, 246, 0.5) 55%,
        transparent 70%,
        transparent 100%
    );
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    transition: left 0.5s ease;
    pointer-events: none;
}

.page-promotions .bonus-card:hover::after {
    left: 100%;
}

.page-promotions .bonus-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-promotions .bonus-image {
    position: relative;
    width: 100%;
    aspect-ratio: 57 / 40;
    overflow: hidden;
    flex-shrink: 0;
}

.page-promotions .bonus-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-promotions .bonus-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-promotions .bonus-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 46px;
}

.page-promotions .bonus-description {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-promotions .withdrawal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(133, 106, 0, 0.2);
    color: #856A00;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(133, 106, 0, 0.3);
    margin-top: auto;
}

.page-promotions .no-bonuses {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    text-align: center;
    width: 100%;
}

.page-promotions .no-bonuses-content {
    max-width: 400px;
}

.page-promotions .no-bonuses-content i {
    font-size: 64px;
    color: #856A00;
    margin-bottom: 20px;
}

.page-promotions .no-bonuses-content h3 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 10px;
}

.page-promotions .no-bonuses-content p {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.5;
}

@media (min-width: 1200px) {
    .page-promotions .bonus-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .page-promotions .bonus-card {
        max-width: 100%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .page-promotions .bonus-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .page-promotions .bonus-title {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .page-promotions .promo-categories-bar.bonus-page-cats {
        padding: 0.4rem 0.2rem;
    }

    .page-promotions .bonus-page-cats .promo-categories-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        gap: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .page-promotions .bonus-page-cats .promo-categories-inner::-webkit-scrollbar {
        display: none;
    }

    .page-promotions .bonus-page-cats .promo-cat-btn {
        flex-shrink: 0;
        font-size: 0.62rem;
        padding: 0.35rem 0.45rem;
        gap: 0.28rem;
        letter-spacing: 0.02em;
    }

    .page-promotions .bonus-page-cats .promo-cat-btn i {
        font-size: 0.72rem;
    }

    .page-promotions .promo-cats-scroll-hint {
        width: 26px;
        font-size: 11px;
    }

    .page-promotions .bonus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .page-promotions .bonus-content {
        padding: 15px;
    }
}

@media (max-width: 767px) {
    .page-promotions .bonus-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }

    .page-promotions .bonus-grid-container {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .page-promotions .bonus-grid {
        grid-template-columns: 1fr;
    }

    .page-promotions .bonus-title {
        font-size: 16px;
        min-height: auto;
    }
}

/* ========== Mobil kart parlaması ========== */
/* Masaüstünde hover ile tetiklenen mor ışık süzülmesi; dokunmatikte hover
   olmadığı için aynı efekt kendi kendine döngüye alınır. */
@keyframes promoCardShine {
    0%,
    12% {
        transform: translateX(0);
        opacity: 0;
    }

    18% {
        opacity: 1;
    }

    44% {
        opacity: 1;
    }

    50%,
    100% {
        transform: translateX(286%);
        opacity: 0;
    }
}

@media (hover: none), (pointer: coarse), (max-width: 991px) {
    .page-promotions .bonus-card::after,
    .page-promotions .bonus-card:hover::after {
        left: -100%;
        animation: promoCardShine 5s ease-in-out infinite;
    }

    .page-promotions .bonus-card:nth-child(2n)::after {
        animation-delay: 0.45s;
    }

    .page-promotions .bonus-card:nth-child(3n)::after {
        animation-delay: 0.9s;
    }

    .page-promotions .bonus-card:nth-child(4n)::after {
        animation-delay: 1.35s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-promotions .bonus-card::after,
    .page-promotions .bonus-card:hover::after {
        animation: none;
        opacity: 0;
    }
}

