:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --btn-register-bg: #C30808;
    --btn-register-text: #FFFF00;
    --bg-light: #FFFFFF;
    --bg-dark: #017439; /* Using primary color for dark background sections */
    --header-offset: 120px; /* Default value, will be overridden by shared.css */
}

/* Base styles for the page-lottery scope */
.page-lottery {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--bg-light); /* Default light background for the main content */
}

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

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

.page-lottery__heading {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-lottery__heading--white {
    color: var(--text-light);
}

.page-lottery__paragraph {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-lottery__paragraph--white {
    color: var(--text-light);
}

.page-lottery__highlight {
    font-weight: bold;
    color: var(--primary-color); /* Ensure contrast for highlights */
}

/* Dark background sections */
.page-lottery__dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-lottery__dark-bg .page-lottery__highlight {
    color: var(--btn-register-text); /* Yellow highlight on dark background */
}

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

.page-lottery__light-bg .page-lottery__highlight {
    color: var(--primary-color);
}

/* Buttons */
.page-lottery__cta-button,
.page-lottery__btn-primary,
.page-lottery__btn-secondary,
.page-lottery__btn-register {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

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

.page-lottery__btn-primary:hover {
    background-color: #016632; /* Darker green */
    border-color: #016632;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-lottery__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-lottery__btn-register {
    background-color: var(--btn-register-bg);
    color: var(--btn-register-text);
    border: 2px solid var(--btn-register-bg);
}

.page-lottery__btn-register:hover {
    background-color: #AE0707; /* Darker red */
    border-color: #AE0707;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-lottery__btn-small {
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
}

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

/* 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); /* Ensure space for fixed header */
    overflow: hidden; /* Prevent content 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 image if image is background-like */
}

.page-lottery__hero-image-main {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

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

.page-lottery__hero-section h1 {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.2;
}

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

/* Introduction Section */
.page-lottery__introduction .page-lottery__heading {
    color: var(--primary-color);
}
.page-lottery__introduction .page-lottery__paragraph {
    color: var(--text-dark);
}

/* Game Types Section */
.page-lottery__game-types {
    background-color: var(--bg-dark);
}

.page-lottery__game-types .page-lottery__heading {
    color: var(--text-light);
}

.page-lottery__game-types .page-lottery__paragraph {
    color: var(--text-light);
}

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

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

.page-lottery__card--dark {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark bg */
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-lottery__card--dark .page-lottery__card-title {
    color: var(--text-light);
}

.page-lottery__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 100%; /* Ensure responsive */
    display: block; /* Ensure responsive */
}

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

.page-lottery__card-text {
    font-size: 16px;
    line-height: 1.5;
    flex-grow: 1; /* Allow text to take available space */
}

/* How-to-Play Section */
.page-lottery__how-to-play {
    background-color: var(--bg-light);
}

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

.page-lottery__process-step {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
}