/* Competitions Page Styles */

:root {
    --primary-dark: #363f49;
    --primary-light: #f8fbfb;
    --text-gray: #7f7f80;
    --accent-teal: #69b1b9;
    --accent-yellow: #ffba1e;
    --light-gray: #cbd1d8;
    --white: #ffffff;
    --purple: #6b2a93;
    --pink: #e91e63;
}

/* Competitions Header */
.competitions-hero {
    background: linear-gradient(to right, var(--accent-teal), #48b1b5);
    padding: 40px 0;
    color: var(--white);
    text-align: center;
    margin-bottom: 30px;
}

.competitions-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.competitions-hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

/* Live Raffles Section */
.live-raffles-section {
    padding: 30px 0 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
}

.live-indicator {
    width: 10px;
    height: 10px;
    background-color: #ff3860;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 56, 96, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 56, 96, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 56, 96, 0);
    }
}

.view-all-link {
    color: var(--accent-teal);
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #5899a1;
    text-decoration: underline;
}

/* Raffles Grid */
.raffles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* Raffle Card */
.raffle-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.raffle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.raffle-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 66.67%; /* 3:2 aspect ratio */
}

.raffle-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.raffle-card:hover .raffle-image {
    transform: scale(1.05);
}

.price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-yellow);
    color: var(--primary-dark);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
}

.premium-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--purple);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.raffle-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.raffle-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.raffle-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.draw-date {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.enter-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--accent-teal);
    color: var(--white);
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.enter-btn:hover {
    background-color: #5899a1;
}

.details-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: transparent;
    color: var(--primary-dark);
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--light-gray);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.details-btn:hover {
    background-color: var(--light-gray);
    color: var(--primary-dark);
}

/* Featured Raffle */
.featured-raffle {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.featured-raffle-image-container {
    position: relative;
    max-height: 360px;
    overflow: hidden;
}

.featured-raffle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-countdown {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 5;
}

.featured-countdown::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    z-index: -1;
}

.featured-countdown p {
    color: white;
    font-size: 16px;
    margin-bottom: 10px;
}

.featured-timer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.featured-timer-item {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px;
    border-radius: 5px;
    min-width: 60px;
}

.featured-timer-item span {
    display: block;
    text-align: center;
    color: white;
}

.featured-timer-item span:first-child {
    font-size: 20px;
    font-weight: 700;
}

.featured-timer-label {
    font-size: 12px;
    opacity: 0.8;
}

.featured-raffle-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--primary-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
}

.featured-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.featured-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.featured-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-teal);
    margin-bottom: 20px;
}

.featured-actions {
    display: flex;
    gap: 15px;
}

.featured-cta {
    padding: 12px 25px;
    background-color: var(--accent-teal);
    color: var(--white);
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.featured-cta:hover {
    background-color: #5899a1;
}

.featured-secondary {
    padding: 12px 25px;
    background-color: transparent;
    color: var(--primary-dark);
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--light-gray);
    transition: background-color 0.3s ease;
}

.featured-secondary:hover {
    background-color: var(--light-gray);
}

/* Special Promotions */
.special-promotion {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 200px;
    margin-bottom: 40px;
    background: linear-gradient(to right, #6b2a93, #9d4e79);
}

.promotion-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    color: var(--white);
    z-index: 2;
}

.promotion-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1612137247864-87d397c5b00c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 1;
}

.promotion-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.promotion-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 600px;
}

.promotion-cta {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent-yellow);
    color: var(--primary-dark);
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.promotion-cta:hover {
    background-color: #e3ac1c;
}

/* Categories Section */
.categories-section {
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 15px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Ending Soon Section */
.ending-soon-section {
    margin-bottom: 60px;
}

/* Raffle card countdown styles */
.raffle-countdown {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 5;
}

.raffle-countdown::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    z-index: -1;
}

.raffle-countdown p {
    color: white;
    font-size: 12px;
    margin-bottom: 5px;
}

.raffle-timer {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.raffle-timer-item {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px;
    border-radius: 5px;
    min-width: 40px;
}

.raffle-timer-item span {
    display: block;
    text-align: center;
    color: white;
}

.raffle-timer-item span:first-child {
    font-size: 16px;
    font-weight: 700;
}

.raffle-timer-label {
    font-size: 10px;
    opacity: 0.8;
}

/* Original countdown badge styling (keeps compatibility) */
.countdown-badge {
    position: relative;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

.raffle-image-container .countdown-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    margin-bottom: 0;
}

.countdown-badge.urgent {
    background-color: rgba(233, 30, 99, 0.9);
}

/* Featured and promotion countdown timer styles */
.countdown-container, .promotion-countdown {
    margin: 15px 0;
}

.countdown-container p, .promotion-countdown p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.timer-display {
    display: flex;
    gap: 10px;
}

.timer-unit {
    background-color: var(--primary-dark);
    color: var(--white);
    border-radius: 5px;
    padding: 8px 12px;
    text-align: center;
    min-width: 60px;
}

.promotion-countdown .timer-unit {
    background-color: rgba(255, 255, 255, 0.2);
}

.time-value {
    font-size: 20px;
    font-weight: 700;
    display: block;
}

.time-label {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    margin-top: 3px;
}

.ended-message {
    background-color: rgba(233, 30, 99, 0.9);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
}

/* Responsive Adjustments */
@media screen and (max-width: 1200px) {
    .raffles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .raffles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-raffle {
        grid-template-columns: 1fr;
    }

    .featured-raffle-image-container {
        max-height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .competitions-hero h1 {
        font-size: 28px;
    }

    .competitions-hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .featured-title {
        font-size: 24px;
    }

    .featured-actions {
        flex-direction: column;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .raffles-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .featured-raffle-content {
        padding: 20px;
    }

    .featured-title {
        font-size: 22px;
    }

    .promotion-title {
        font-size: 24px;
    }
}
