/* ==========================================================================
   PROMOTION.CSS - KeyBet Responsive & Luxury Promotion Styles
   ========================================================================== */

/* ── Page Title Header ────────────────────────────────────────────────────── */
#promotions .page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    width: 100%;
}

#promotions .page-title > div {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

#promotions .page-title small {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.4;
}

/* ── Promotion Cards List ─────────────────────────────────────────────────── */
.promo-list {
    display: grid;
    gap: 20px;
    width: 100%;
}

.promo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    min-height: 170px;
    border: 1px solid #755b1c;
    border-radius: 12px;
    padding: 22px 28px;
    background: #0c151b;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Watermark "29" background decoration */
.promo:after {
    content: "29";
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    font-weight: 900;
    color: rgba(212, 156, 29, 0.07);
    pointer-events: none;
    z-index: 1;
    user-select: none;
    line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
    .promo:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    }

    .promo:hover .promo-banner img {
        transform: scale(1.025);
    }
}

.promo-content {
    flex: 1;
    min-width: 0;
    z-index: 2;
}

.promo-content h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1.25;
}

.promo-content strong {
    font-size: clamp(32px, 3.5vw, 44px);
    color: var(--gold);
    line-height: 1.1;
    display: block;
    margin: 6px 0 8px;
    font-weight: 900;
    word-break: break-word;
    letter-spacing: -0.5px;
}

.promo-content p {
    font-weight: 600;
    font-size: 14px;
    color: #c7d2d8;
    margin: 0 0 18px;
    max-width: 520px;
    line-height: 1.5;
}

.promo-content .btn.gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 189, 50, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.promo-content .btn.gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 189, 50, 0.42);
}

.promo-banner {
    flex: 0 0 310px;
    width: 310px;
    max-width: 310px;
    z-index: 2;
    overflow: hidden;
    border-radius: 10px;
}

.promo-banner img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9.5;
    max-height: 185px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(245, 189, 50, 0.28);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    display: block;
    transition: transform 0.3s ease;
}

/* ── Card Theme Gradients ─────────────────────────────────────────────────── */
.promo.welcome {
    background: linear-gradient(100deg, #0b151b 0%, #1f170b 100%);
    border-color: rgba(200, 150, 40, 0.55);
}

.promo.reload {
    background: linear-gradient(100deg, #0b151b 0%, #261909 100%);
    border-color: rgba(220, 140, 30, 0.55);
}

.promo.cashback {
    background: linear-gradient(100deg, #0b151b 0%, #132412 100%);
    border-color: rgba(60, 140, 50, 0.55);
}

.promo.mystery {
    background: linear-gradient(100deg, #0b151b 0%, #1e1127 100%);
    border-color: rgba(140, 60, 180, 0.55);
}

.promo.friend {
    background: linear-gradient(100deg, #0b151b 0%, #0d212b 100%);
    border-color: rgba(40, 130, 170, 0.55);
}

/* ── Skeleton Loading State ──────────────────────────────────────────────── */
.skeleton-card {
    background: #0c151b;
    border: 1px solid #24343f;
    border-radius: 12px;
    min-height: 170px;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.skeleton {
    background: #111e27;
    background-image: linear-gradient(
        90deg,
        #111e27 0px,
        #1a2b37 40px,
        #111e27 80px
    );
    background-size: 600px;
    animation: shine 1.2s infinite linear;
    border-radius: 6px;
}

@keyframes shine {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.skeleton-content {
    flex: 1;
    min-width: 0;
}

.skeleton-title {
    height: 18px;
    width: 180px;
    max-width: 60%;
    margin-bottom: 12px;
}

.skeleton-val {
    height: 38px;
    width: 140px;
    max-width: 50%;
    margin-bottom: 12px;
}

.skeleton-desc {
    height: 14px;
    width: 80%;
    margin-bottom: 18px;
}

.skeleton-btn {
    height: 38px;
    width: 130px;
    border-radius: 8px;
}

.skeleton-banner {
    flex: 0 0 310px;
    width: 310px;
    height: 180px;
    border-radius: 10px;
}

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10050;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: rgba(3, 7, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    max-width: 620px;
    width: 100%;
    margin: auto;
    position: relative;
    animation: promoModalIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes promoModalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    background: #0d171e;
    border: 1px solid #755b1c;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #24343f;
    background: #091218;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.modal-header .close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffd45a;
    cursor: pointer;
    line-height: 1;
    transition: background 0.18s, color 0.18s, transform 0.18s;
}

.modal-header .close:hover {
    color: #fff;
    background: rgba(245, 189, 50, 0.2);
    border-color: var(--gold);
    transform: scale(1.05);
}

.modal-body {
    padding: 20px;
}

.modal-img-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9.5;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(245, 189, 50, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 16px;
    display: block;
}

.modal-text h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
}

.modal-text p {
    color: #c7d2d8;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #24343f;
    text-align: right;
    background: #091218;
}

.modal-footer .btn.gold {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* ── Tablet / Intermediate Screens (max-width: 960px) ─────────────────────── */
@media (max-width: 960px) {
    .promo {
        gap: 18px;
        padding: 20px 22px;
    }

    .promo-banner {
        flex: 0 0 260px;
        width: 260px;
        max-width: 260px;
    }

    .promo-banner img {
        max-height: 165px;
    }

    .skeleton-banner {
        flex: 0 0 260px;
        width: 260px;
        height: 165px;
    }
}

/* ── Mobile Stacking Breakpoint (max-width: 860px) ────────────────────────── */
@media (max-width: 860px) {
    #promotions.page {
        padding: 16px 14px;
    }

    #promotions .page-title {
        margin-bottom: 20px;
        gap: 8px;
    }

    #promotions .page-title > div {
        font-size: 24px;
    }

    /* Stack cards cleanly: banner graphic on top, info content below */
    .promo {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 18px 16px;
        gap: 16px;
        min-height: auto;
    }

    .promo:after {
        display: none;
    }

    .promo-banner {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .promo-banner img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 240px;
    }

    .promo-content {
        width: 100%;
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .promo-content h2 {
        font-size: 17px;
    }

    .promo-content strong {
        font-size: clamp(28px, 6.5vw, 38px);
        margin: 4px 0 8px;
    }

    .promo-content p {
        font-size: 13.5px;
        margin: 0 0 16px;
        max-width: 100%;
    }

    .promo-content .btn.gold {
        width: 100%;
        min-height: 44px;
        padding: 12px 18px;
        font-size: 13.5px;
        text-align: center;
        justify-content: center;
    }

    /* Responsive skeleton loader */
    .skeleton-card {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 18px 16px;
        gap: 16px;
        min-height: auto;
        width: 100%;
    }

    .skeleton-banner {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 220px;
    }

    .skeleton-content {
        width: 100%;
    }

    .skeleton-title {
        width: 55%;
        height: 16px;
        margin-bottom: 10px;
    }

    .skeleton-val {
        width: 40%;
        height: 34px;
        margin-bottom: 10px;
    }

    .skeleton-desc {
        width: 90%;
        height: 14px;
        margin-bottom: 16px;
    }

    .skeleton-btn {
        width: 100%;
        height: 44px;
    }
}

/* ── Phones & Compact Screens (max-width: 560px) ──────────────────────────── */
@media (max-width: 560px) {
    #promotions.page {
        padding: 14px 12px;
    }

    #promotions .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }

    #promotions .page-title > div {
        font-size: 21px;
    }

    #promotions .page-title small {
        font-size: 12px;
    }

    .promo-list {
        gap: 14px;
    }

    .promo {
        padding: 14px 12px;
        gap: 14px;
        border-radius: 10px;
    }

    .promo-banner img {
        border-radius: 8px;
        max-height: 195px;
    }

    .promo-content h2 {
        font-size: 16px;
    }

    .promo-content strong {
        font-size: clamp(26px, 7.5vw, 34px);
    }

    .promo-content p {
        font-size: 13px;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .promo-content .btn.gold {
        min-height: 42px;
        font-size: 13px;
        padding: 10px 14px;
    }

    /* Modal phone optimization */
    .modal {
        padding: 10px;
    }

    .modal-dialog {
        margin: 12px auto;
        max-width: 100%;
    }

    .modal-header {
        padding: 12px 14px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-header .close {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .modal-body {
        padding: 14px;
    }

    .modal-img-wrap img {
        max-height: 175px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .modal-text h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .modal-text p {
        font-size: 13px;
        line-height: 1.5;
    }

    .modal-footer {
        padding: 10px 14px;
    }

    .modal-footer .btn.gold {
        width: 100%;
        min-height: 42px;
        font-size: 13px;
    }
}

/* ── Very Small Screens (max-width: 360px) ─────────────────────────────────── */
@media (max-width: 360px) {
    #promotions.page {
        padding: 10px 8px;
    }

    .promo {
        padding: 12px 10px;
        gap: 12px;
    }

    .promo-content h2 {
        font-size: 15px;
    }

    .promo-content strong {
        font-size: 24px;
    }

    .promo-content p {
        font-size: 12px;
    }

    .modal {
        padding: 6px;
    }

    .modal-dialog {
        margin: 8px auto;
    }

    .modal-body {
        padding: 12px 10px;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-footer {
        padding: 8px 12px;
    }
}
