:root {
    --primary-gradient: linear-gradient(90deg, #7dd59d 0%, #9bdb6a 100%);
    --secondary-border: #89d777;
    --card-border: #b2da6c;
    --text-color-primary: #ffffff;
    --text-color-active: #000000;
    --bg-dark: #1a1a1a;
    --btn-bg-inactive: rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #050A09;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(125, 213, 157, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(155, 219, 106, 0.06) 0%, transparent 45%),
        linear-gradient(180deg, #050A09 0%, #0B1313 100%);
    background-attachment: fixed;
    color: var(--text-color-primary);
    min-height: 100vh;
    padding: 0;
    display: block;
}

.container {
    padding: 30px 20px;
    padding-top: 30px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    width: 140px;
    height: 42px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-border);
    background-color: var(--btn-bg-inactive);
    color: var(--text-color-primary);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: var(--text-color-active);
    border: none;
}

.filter-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Promotions Grid */
.promotions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

.promo-card {
    width: 100%;
    aspect-ratio: 440 / 246;
    /* Maintain aspect ratio */
    height: auto;
    border-radius: 20px;
    border: 1px solid transparent;
    background: linear-gradient(#000, #000) padding-box,
        linear-gradient(180deg, rgba(178, 218, 108, 0.6) 0%, rgba(62, 79, 32, 0) 100%) border-box;
    /* Ensure inner bg clips to padding, outer bg clips to border */
    background-clip: padding-box, border-box;
    overflow: hidden;
    position: relative;
    /* background-color: #000; Removed as it's now part of the background shorthand above */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.promo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Modal Styling */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
    /* Backdrop */
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid rgba(137, 215, 119, 0.3);
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    animation: slideUp 0.4s ease-out;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 11;
    /* Increased z-index slightly */
    transition: all 0.3s ease;

    /* Circle Background */
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    /* Subtle blur behind the button itself */
}

.close-btn:hover {
    color: #9bdb6a;
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
    /* Nice little interaction detail */
}

.modal-header {
    width: 100%;
    height: auto;
    position: relative;
}

.modal-header img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Gradient overlay on image bottom */
.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(26, 26, 26, 1), transparent);
}

.modal-body {
    padding: 25px 35px 35px 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#modal-title {
    font-size: 28px;
    font-weight: 700;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}



.modal-body {
    padding: 25px 35px 35px 35px;
    text-align: left;
    /* Better for long text readings */
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
    /* Limit height to allow scrolling on long content */
    overflow-y: auto;
    /* Scrollable content */
    scrollbar-width: thin;
    scrollbar-color: rgba(137, 215, 119, 0.5) rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar for Webkit */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(137, 215, 119, 0.5);
    border-radius: 3px;
}

/* Rich Text Styling */
.modal-desc h3 {
    color: #9bdb6a;
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-desc ul {
    list-style: none;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid rgba(137, 215, 119, 0.3);
}

.modal-desc li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #ddd;
    line-height: 1.5;
    padding-left: 10px;
    position: relative;
}

.modal-desc li::before {
    content: '•';
    color: #9bdb6a;
    position: absolute;
    left: -5px;
    font-weight: bold;
}

.modal-desc p {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 15px;
}

.modal-desc strong {
    color: #fff;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .promotions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .promotions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-btn {
        width: 160px;
        font-size: 18px;
        height: 48px;
    }

    .filter-section {
        gap: 20px;
    }

    .modal-content {
        width: 95%;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .promotions-grid {
        grid-template-columns: 1fr;
    }

    .filter-section {
        gap: 10px;
        width: 100%;
        /* Ensure full width usage */
    }

    .filter-btn {
        width: calc(50% - 5px);
        /* Forces 2 items per row with 10px gap */
        font-size: 15px;
        /* Slightly smaller text for better fit */
        height: 45px;
    }
}