/* style/lottery.css */

:root {
    --primary-color: #007bff;
    --secondary-color: #ffc107;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #121212;
    --bg-light: #f0f2f5;
    --card-bg-dark: rgba(255, 255, 255, 0.1);
    --border-color: #2c2c2c;
    --shadow-color-dark: rgba(0, 0, 0, 0.5);
    --shadow-color-light: rgba(0, 0, 0, 0.1);
}

/* Base styles for the lottery page */
.page-lottery {
    background-color: var(--bg-dark); /* Inherits from body, but explicitly set for clarity */
    color: var(--text-light);
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-top: 120px; /* Desktop: Adjust for fixed header */
}

.page-lottery__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-lottery__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-lottery__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.page-lottery__text-block {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

/* Hero Section */
.page-lottery__hero-section {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 80px 0;
    text-align: center;
    color: var(--text-light);
    box-shadow: 0 4px 15px var(--shadow-color-dark);
}

.page-lottery__hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-lottery__main-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-lottery__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.page-lottery__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-lottery__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-lottery__btn-primary {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.page-lottery__btn-primary:hover {
    background: #e6a800;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.page-lottery__btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.page-lottery__introduction-section {
    padding: 60px 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-lottery__introduction-section .page-lottery__section-title {
    color: var(--text-light);
}

.page-lottery__introduction-section .page-lottery__section-title::after {
    background-color: var(--secondary-color);
}

/* Game Types Section */
.page-lottery__game-types-section {
    padding: 60px 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-lottery__game-types-section .page-lottery__section-title {
    color: var(--primary-color);
}

.page-lottery__game-types-section .page-lottery__text-block {
    color: var(--text-dark);
}

.page-lottery__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-lottery__game-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color-light);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-lottery__game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.page-lottery__game-card-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-lottery__game-card-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-lottery__game-card-description {
    font-size: 16px;
    color: #666666;
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-lottery__game-card-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background: var(--primary-color);
    color: var(--text-light);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.page-lottery__game-card-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Why Choose Section */
.page-lottery__why-choose-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-lottery__why-choose-section .page-lottery__section-title {
    color: var(--text-light);
}

.page-lottery__why-choose-section .page-lottery__section-title::after {
    background-color: var(--secondary-color);
}

.page-lottery__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-lottery__feature-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color-dark);
    transition: background-color 0.3s ease;
}

.page-lottery__feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.page-lottery__feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.page-lottery__feature-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 15px;
}

.page-lottery__feature-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* How To Play Section */
.page-lottery__how-to-play-section {
    padding: 60px 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-lottery__how-to-play-section .page-lottery__section-title {
    color: var(--primary-color);
}

.page-lottery__how-to-play-section .page-lottery__text-block {
    color: var(--text-dark);
}

.page-lottery__steps-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-lottery__step-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px var(--shadow-color-light);
    border-left: 5px solid var(--secondary-color);
    position: relative;
}

.page-lottery__step-item:last-child {
    margin-bottom: 0;
}

.page-lottery__step-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-lottery__step-description {
    font-size: 17px;
    color: #555555;
    margin-bottom: 20px;
}

/* FAQ Section */
.page-lottery__faq-section {
    padding: 60px 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-lottery__faq-section .page-lottery__section-title {
    color: var(--text-light);
}

.page-lottery__faq-section .page-lottery__section-title::after {
    background-color: var(--secondary-color);
}

.page-lottery__faq-list {
    margin-top: 40px;
}

.page-lottery__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.page-lottery__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-lottery__faq-question:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-lottery__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-light);
    pointer-events: none;
}

.page-lottery__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-lottery__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background-color: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain content */
    padding: 20px 25px !important;
    opacity: 1;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
    transform: rotate(45deg);
    color: var(--primary-color);
}

/* Bottom CTA Section */
.page-lottery__cta-bottom-section {
    padding: 60px 0;
    background: linear-gradient(45deg, #0056b3, #007bff);
    text-align: center;
    color: var(--text-light);
    box-shadow: 0 -4px 15px var(--shadow-color-dark);
}

.page-lottery__cta-bottom-section .page-lottery__section-title {
    color: var(--text-light);
}

.page-lottery__cta-bottom-section .page-lottery__section-title::after {
    background-color: var(--secondary-color);
}

.page-lottery__cta-bottom-section .page-lottery__text-block {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-lottery__main-title {
        font-size: 40px;
    }
    .page-lottery__section-title {
        font-size: 32px;
    }
    .page-lottery__hero-description {
        font-size: 18px;
    }
    .page-lottery__game-card-title {
        font-size: 22px;
    }
    .page-lottery__feature-title {
        font-size: 20px;
    }
    .page-lottery__step-title {
        font-size: 22px;
    }
    .page-lottery__faq-question h3 {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .page-lottery {
        padding-top: 100px !important; /* Mobile: Adjust for fixed header */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-lottery__container {
        padding: 0 15px;
    }

    .page-lottery__hero-section {
        padding: 60px 0;
    }

    .page-lottery__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-lottery__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-lottery__cta-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }

    .page-lottery__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 25px !important;
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-lottery__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-lottery__text-block {
        font-size: 16px;
    }

    .page-lottery__game-grid, .page-lottery__features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-lottery__game-card, .page-lottery__feature-item, .page-lottery__step-item {
        padding: 25px;
        border-radius: 8px;
    }

    .page-lottery__game-card-image {
        max-width: 200px;
    }

    .page-lottery__game-card-title {
        font-size: 20px;
    }

    .page-lottery__feature-icon {
        width: 80px;
        height: 80px;
    }

    .page-lottery__feature-title {
        font-size: 18px;
    }

    .page-lottery__step-title {
        font-size: 20px;
    }

    .page-lottery__step-description {
        font-size: 16px;
    }

    .page-lottery__faq-question {
        padding: 15px 20px;
    }

    .page-lottery__faq-question h3 {
        font-size: 16px;
    }

    .page-lottery__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }

    .page-lottery__faq-answer {
        padding: 0 20px;
    }

    .page-lottery__faq-item.active .page-lottery__faq-answer {
        padding: 15px 20px !important;
    }
    
    /* Image responsive for mobile */
    .page-lottery img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-lottery__game-card-image {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .page-lottery__feature-icon {
        max-width: 80px !important;
        width: 80px !important;
    }

    .page-lottery__introduction-section,
    .page-lottery__game-types-section,
    .page-lottery__why-choose-section,
    .page-lottery__how-to-play-section,
    .page-lottery__faq-section,
    .page-lottery__cta-bottom-section {
        padding: 40px 0;
    }
    
    .page-lottery__game-card,
    .page-lottery__feature-item,
    .page-lottery__step-item,
    .page-lottery__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .page-lottery__main-title {
        font-size: 28px;
    }
    .page-lottery__section-title {
        font-size: 24px;
    }
    .page-lottery__hero-description {
        font-size: 15px;
    }
    .page-lottery__cta-button {
        font-size: 15px !important;
        padding: 10px 20px !important;
    }
    .page-lottery__game-card-title {
        font-size: 18px;
    }
    .page-lottery__feature-title {
        font-size: 17px;
    }
    .page-lottery__step-title {
        font-size: 18px;
    }
    .page-lottery__faq-question h3 {
        font-size: 15px;
    }
}