:root {
    --primary-color: #0A2239;
    --secondary-color: #FFD700;
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-dark: #000; /* From shared.css body background */
    --background-light: #f8f9fa;
    --border-color: #e0e0e0;
}

.page-lottery {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--background-dark); /* Ensure consistency with body */
}

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

.page-lottery__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-lottery__light-bg {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-lottery__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section */
}

.page-lottery__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: inherit;
}

/* Hero Section */
.page-lottery__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Prevent image overflow */
}

.page-lottery__hero-section .page-lottery__container {
    position: relative;
    z-index: 1;
    padding-top: 0; /* Already accounted for by section padding-top */
    padding-bottom: 0;
}

.page-lottery__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    z-index: 0;
    min-width: 200px;
    min-height: 200px;
    filter: none; /* No CSS filters to change image colors */
}

.page-lottery__main-title {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-lottery__description {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.page-lottery__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-lottery__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box; /* Include padding in width calculation */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-lottery__cta-button--primary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.page-lottery__cta-button--primary:hover {
    background: #e6c200; /* Slightly darker gold */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-lottery__cta-button--secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.page-lottery__cta-button--secondary:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Intro Section */
.page-lottery__intro-section p {
    font-size: 17px;
    margin-bottom: 15px;
    text-align: justify;
    color: var(--text-dark);
}

/* Game Types Section */
.page-lottery__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-lottery__game-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    text-align: center;
}

.page-lottery__game-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
    filter: none; /* No CSS filters to change image colors */
}

.page-lottery__game-card-title {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding: 0 15px;
}

.page-lottery__game-card-text {
    font-size: 16px;
    color: var(--text-light);
    padding: 0 15px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-lottery__read-more-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-lottery__read-more-button:hover {
    background-color: #e6c200;
    transform: translateY(-1px);
}

/* How To Play Section */
.page-lottery__how-to-play .page-lottery__section-description {
    color: var(--text-dark);
}

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

.page-lottery__step-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-lottery__step-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
    filter: none; /* No CSS filters to change image colors */
}

.page-lottery__step-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-lottery__step-text {
    font-size: 16px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-lottery__step-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-lottery__step-button:hover {
    background-color: #071726; /* Slightly darker primary */
}

/* Advantages Section */
.page-lottery__advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-lottery__advantage-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-lottery__advantage-icon {
    width: 200px; /* Adjust to min 200x200 */
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: none; /* No CSS filters to change image colors */
}

.page-lottery__advantage-title {
    font-size: 22px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-lottery__advantage-text {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Tips Section */
.page-lottery__tips-section .page-lottery__section-description {
    color: var(--text-dark);
}

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

.page-lottery__tips-item {
    background-color: #ffffff;
    border-left: 5px solid var(--secondary-color);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 17px;
    color: var(--text-dark);
}

.page-lottery__tips-item strong {
    color: var(--primary-color);
}

/* FAQ Section */
.page-lottery__faq-section {
    padding-bottom: 60px;
}

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

.page-lottery__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1); /* Card background for dark section */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-lottery__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.15); /* Slightly lighter for question bar */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    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.2);
}

.page-lottery__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click */
    color: var(--secondary-color); /* Gold color for FAQ questions */
}

.page-lottery__faq-toggle {
    font-size: 24px;
    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; /* Prevent icon from blocking click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
    transform: rotate(45deg); /* Change + to X visually */
    color: var(--secondary-color);
}

.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 20px;
    opacity: 0;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly darker for answer background */
    color: var(--text-light);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
    max-height: 2000px !important; /* Sufficiently large for content */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 5px 5px;
}

.page-lottery__faq-answer p {
    margin: 0;
    font-size: 16px;
    color: var(--text-light); /* Ensure text is light on dark background */
}

/* Conclusion Section */
.page-lottery__conclusion-section {
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: center;
}

.page-lottery__conclusion-section .page-lottery__section-title {
    color: var(--secondary-color);
}

.page-lottery__conclusion-section .page-lottery__description {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
    font-size: 19px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-lottery__main-title {
        font-size: 40px;
    }
    .page-lottery__section-title {
        font-size: 30px;
    }
    .page-lottery__description,
    .page-lottery__section-description {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .page-lottery__container {
        padding: 20px 15px;
    }

    /* Fixed header offset for mobile */
    .page-lottery__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }
    
    .page-lottery__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-lottery__description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-lottery__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 400px; /* Limit button group width */
        margin: 0 auto;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-lottery__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .page-lottery__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-lottery__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-lottery__game-grid,
    .page-lottery__steps-grid,
    .page-lottery__advantage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-lottery__game-card-image,
    .page-lottery__step-image,
    .page-lottery__advantage-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    
    .page-lottery__game-card,
    .page-lottery__step-item,
    .page-lottery__advantage-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-lottery__tips-item {
        font-size: 16px;
        padding: 15px 20px;
    }

    .page-lottery__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-lottery__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-lottery__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-lottery__faq-answer {
        padding: 0 15px;
    }
    
    .page-lottery__faq-item.active .page-lottery__faq-answer {
        padding: 15px !important;
    }

    .page-lottery img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-lottery__section,
    .page-lottery__card,
    .page-lottery__container,
    .page-lottery__game-card-text,
    .page-lottery__step-text,
    .page-lottery__advantage-text,
    .page-lottery__tips-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }
    .page-lottery__hero-image {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      object-fit: cover;
    }
    .page-lottery__read-more-button,
    .page-lottery__step-button {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
}

/* Ensure all images adhere to the minimum size and no filters */
.page-lottery img {
    min-width: 200px;
    min-height: 200px;
    filter: none; /* No CSS filters to change image colors */
}