/* style/lottery.css */

/* Variables (for consistency with shared.css and brand colors) */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --text-color-light: #ffffff;
    --text-color-dark: #333333;
    --bg-dark: #1a1a1a; /* Inherited from shared.css */
    --card-bg-dark: rgba(255, 255, 255, 0.1);
    --card-bg-light: #ffffff;
    --border-color: rgba(255, 255, 255, 0.2);
    --button-hover-bg: #e6c200; /* Slightly darker gold */
    --button-secondary-hover-bg: #6b0000; /* Slightly darker red */
}

.page-lottery {
    font-family: 'Arial', sans-serif;
    color: var(--text-color-light); /* Main text color for dark body background */
    background-color: var(--bg-dark); /* Ensure consistency, though usually inherited */
    line-height: 1.6;
}

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

.page-lottery__section {
    padding: 60px 0;
    text-align: center;
}

.page-lottery__section-title {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: bold;
    text-transform: uppercase;
}

.page-lottery__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-color-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-lottery__text-block strong {
    color: var(--primary-color);
}

.page-lottery__highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.page-lottery__inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-lottery__inline-link:hover {
    color: var(--button-hover-bg);
    text-decoration: underline;
}

/* Hero Section */
.page-lottery__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    overflow: hidden; /* Prevent image overflow */
}

.page-lottery__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any background layers */
}

.page-lottery__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-lottery__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

.page-lottery__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-lottery__hero-title {
    font-size: 3.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.page-lottery__hero-description {
    font-size: 1.4em;
    color: var(--text-color-light);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-lottery__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--primary-color);
    color: var(--text-color-dark); /* Ensure contrast with gold */
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    max-width: 100%; /* Ensure button does not overflow */
    box-sizing: border-box;
}

.page-lottery__cta-button:hover {
    background: var(--button-hover-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* General Grid Layout */
.page-lottery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-lottery__grid--three-cols {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.page-lottery__grid--four-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Card Styles */
.page-lottery__card {
    background: var(--card-bg-dark); /* Dark background with transparency */
    color: var(--text-color-light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-lottery__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-lottery__card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency in cards */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min width */
    min-height: 200px; /* Enforce min height */
}

.page-lottery__card-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-lottery__card-text {
    font-size: 1em;
    color: var(--text-color-light);
    flex-grow: 1; /* Allow text to fill space */
}

.page-lottery__read-more-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-lottery__read-more-link:hover {
    color: var(--button-hover-bg);
    text-decoration: underline;
}

/* How-to-Play Section */
.page-lottery__how-to-play {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
    color: var(--text-color-light);
}

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

.page-lottery__ordered-list {
    list-style-type: none;
    counter-reset: item;
    padding: 0;
    max-width: 800px;
    margin: 40px auto;
    text-align: left;
}

.page-lottery__ordered-list li {
    counter-increment: item;
    margin-bottom: 25px;
    font-size: 1.15em;
    position: relative;
    padding-left: 50px;
    color: var(--text-color-light);
}

.page-lottery__ordered-list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: var(--text-color-dark);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

/* Button Group */
.page-lottery__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box;
}

.page-lottery__button-group--center {
    justify-content: center;
}

.page-lottery__btn-primary,
.page-lottery__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    max-width: 100%; /* Ensure button does not overflow */
    box-sizing: border-box;
}

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

.page-lottery__btn-primary:hover {
    background: var(--button-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.page-lottery__btn-secondary:hover {
    background: var(--button-secondary-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Dark Section */
.page-lottery__dark-section {
    background-color: var(--bg-dark);
}

/* Advantages Section */
.page-lottery__card--advantage {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-color);
    padding: 25px;
    text-align: center;
    align-items: center;
}

.page-lottery__card--advantage .page-lottery__card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.page-lottery__card--advantage .page-lottery__card-text {
    font-size: 0.95em;
}

/* Promotions Section */
.page-lottery__promo-card {
    background: var(--card-bg-dark);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-lottery__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-lottery__promo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.page-lottery__promo-content {
    padding: 25px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-lottery__promo-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-lottery__promo-description {
    font-size: 1em;
    color: var(--text-color-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-lottery__promo-card .page-lottery__btn-primary,
.page-lottery__promo-card .page-lottery__btn-secondary {
    width: fit-content;
    margin-top: auto; /* Push button to the bottom */
    align-self: flex-start;
}

.page-lottery__text-center {
    text-align: center;
}

/* FAQ Section */
.page-lottery__faq-list {
    max-width: 900px;
    margin: 40px auto;
    text-align: left;
}

.page-lottery__faq-item {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-lottery__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

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

.page-lottery__faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--primary-color);
}

.page-lottery__faq-toggle {
    font-size: 1.8em;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.page-lottery__faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    color: var(--text-color-light);
}

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

.page-lottery__faq-item.active .page-lottery__faq-answer {
    max-height: 200px; /* Adjust based on expected content length */
    padding-top: 10px;
    padding-bottom: 20px;
}

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

/* Explore Other Games Section */
.page-lottery__explore-other-games .page-lottery__text-block {
    margin-bottom: 40px;
}

.page-lottery__game-link-card {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-lottery__game-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

.page-lottery__game-link-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.page-lottery__game-link-card p {
    font-size: 0.95em;
    color: var(--text-color-light);
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .page-lottery__hero-title {
        font-size: 3em;
    }

    .page-lottery__hero-description {
        font-size: 1.2em;
    }

    .page-lottery__section-title {
        font-size: 2.5em;
    }

    .page-lottery__grid--three-cols {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .page-lottery__grid--four-cols {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .page-lottery__cta-button {
        padding: 15px 30px;
        font-size: 1.2em;
    }

    .page-lottery__btn-primary,
    .page-lottery__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .page-lottery__hero-section {
        padding-top: var(--header-offset, 100px);
    }

    .page-lottery__hero-title {
        font-size: 2.5em;
    }

    .page-lottery__hero-description {
        font-size: 1.1em;
    }

    .page-lottery__section {
        padding: 40px 0;
    }

    .page-lottery__section-title {
        font-size: 2em;
    }

    .page-lottery__text-block {
        font-size: 1em;
    }

    .page-lottery__grid {
        grid-template-columns: 1fr;
    }

    .page-lottery__grid--three-cols,
    .page-lottery__grid--four-cols {
        grid-template-columns: 1fr;
    }

    .page-lottery__card img {
        
    }

    .page-lottery__ordered-list li {
        font-size: 1em;
        padding-left: 40px;
    }

    .page-lottery__ordered-list li::before {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }

    .page-lottery__button-group {
        flex-direction: column;
        gap: 15px;
    }

    .page-lottery__btn-primary,
    .page-lottery__btn-secondary {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .page-lottery__promo-card {
        flex-direction: column;
    }

    .page-lottery__promo-card img {
        
    }

    .page-lottery__promo-card .page-lottery__btn-primary,
    .page-lottery__promo-card .page-lottery__btn-secondary {
        align-self: center;
        width: 100%;
        max-width: 250px;
    }

    .page-lottery__faq-question h3 {
        font-size: 1.1em;
    }

    .page-lottery__faq-toggle {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .page-lottery__hero-title {
        font-size: 2em;
    }

    .page-lottery__hero-description {
        font-size: 0.95em;
    }

    .page-lottery__section-title {
        font-size: 1.8em;
    }

    .page-lottery__cta-button {
        padding: 12px 25px;
        font-size: 1.1em;
    }

    .page-lottery__card-title {
        font-size: 1.5em;
    }

    .page-lottery__promo-title {
        font-size: 1.5em;
    }
}