/* Custom CSS Variables based on provided palette */
:root {
    --page-primary-color: #11A84E;
    --page-secondary-color: #22C768;
    --page-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --page-card-bg: #11271B;
    --page-background: #08160F;
    --page-text-main: #F2FFF6;
    --page-text-secondary: #A7D9B8;
    --page-border: #2E7A4E;
    --page-glow: #57E38D;
    --page-gold: #F2C14E;
    --page-divider: #1E3A2A;
    --page-deep-green: #0A4B2C;
}

/* Base styles for the page-the-thao */
.page-the-thao {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--page-text-main);
    background-color: var(--page-background);
}

/* Container for content sections */
.page-the-thao__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

/* Section Titles */
.page-the-thao__section-title {
    font-size: 2.5em;
    color: var(--page-text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-the-thao__section-description {
    font-size: 1.1em;
    color: var(--page-text-secondary);
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Titles */
.page-the-thao__card-title {
    font-size: 1.5em;
    color: var(--page-text-main);
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Card Text */
.page-the-thao__card-text {
    font-size: 1em;
    color: var(--page-text-secondary);
    line-height: 1.5;
}

/* Buttons */
.page-the-thao__btn-primary,
.page-the-thao__btn-secondary,
.page-the-thao__btn-outline,
.page-the-thao__btn-text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-the-thao__btn-primary {
    background: var(--page-button-gradient);
    color: #ffffff;
}

.page-the-thao__btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-the-thao__btn-secondary {
    background-color: transparent;
    border: 2px solid var(--page-border);
    color: var(--page-text-main);
}

.page-the-thao__btn-secondary:hover {
    background-color: var(--page-border);
    color: #ffffff;
}

.page-the-thao__btn-outline {
    background-color: transparent;
    border: 1px solid var(--page-border);
    color: var(--page-text-secondary);
    padding: 8px 15px;
    font-size: 0.95em;
    margin-top: auto; /* For flex column items */
}

.page-the-thao__btn-outline:hover {
    background-color: var(--page-border);
    color: #ffffff;
}

.page-the-thao__btn-text-link {
    background: none;
    border: none;
    color: var(--page-glow);
    padding: 0;
    font-size: 1em;
    font-weight: normal;
    text-decoration: underline;
    display: block; /* Make it block to take full width if needed */
    text-align: left; /* Align text to left */
}

.page-the-thao__btn-text-link:hover {
    color: var(--page-text-main);
}

/* Image base styles */
.page-the-thao img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* Consistent rounded corners */
}

/* HERO Section */
.page-the-thao__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, not var(--header-offset) */
    background-color: var(--page-background);
    color: var(--page-text-main);
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-the-thao__hero-image {
    width: 100%;
    max-height: 675px; /* Max height for hero image */
    object-fit: cover;
    border-radius: 0; /* Hero image usually full width, no rounded corners */
}

.page-the-thao__hero-content {
    padding: 40px 15px 60px;
    max-width: 900px;
    width: 100%;
    box-sizing: border-box;
}

.page-the-thao__hero-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Use clamp for H1 */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--page-gold); /* Using Gold for hero title */
}

.page-the-thao__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--page-text-main);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-the-thao__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* About Sports Section */
.page-the-thao__about-sports-section {
    background-color: var(--page-card-bg);
    padding: 60px 0;
}

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

.page-the-thao__feature-card {
    background-color: var(--page-deep-green);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-the-thao__feature-icon {
    width: 100px; 
    height: 100px; 
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 0; 
}

/* Sports Overview Section */
.page-the-thao__sports-overview-section {
    background-color: var(--page-background);
    padding: 80px 0;
}

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

.page-the-thao__sport-card {
    background-color: var(--page-card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}

.page-the-thao__sport-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 15px;
}

/* Live Betting Section */
.page-the-thao__live-betting-section {
    background-color: var(--page-deep-green);
    padding: 80px 0;
}

.page-the-thao__live-betting-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.page-the-thao__text-block {
    flex: 1;
}

.page-the-thao__text-block p {
    color: var(--page-text-secondary);
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-the-thao__live-betting-image {
    flex: 1;
    min-width: 300px; /* Ensure image doesn't get too small */
    height: auto;
    object-fit: cover;
}

/* How to Start Section */
.page-the-thao__how-to-start-section {
    background-color: var(--page-background);
    padding: 80px 0;
}

.page-the-thao__steps-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-the-thao__step-item {
    background-color: var(--page-card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-the-thao__step-title {
    font-size: 1.3em;
    color: var(--page-text-main);
    margin-bottom: 10px;
    font-weight: bold;
}

/* Promotions Section */
.page-the-thao__promotions-section {
    background-color: var(--page-card-bg);
    padding: 80px 0;
}

.page-the-thao__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.page-the-thao__promo-card {
    background-color: var(--page-deep-green);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-the-thao__promo-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
}

.page-the-thao__all-promos-cta {
    text-align: center;
}

/* Responsible Gaming Section */
.page-the-thao__responsible-gaming-section {
    background-color: var(--page-background);
    padding: 80px 0;
    text-align: center;
}

.page-the-thao__responsible-gaming-section .page-the-thao__text-block {
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.page-the-thao__responsible-gaming-section .page-the-thao__text-block p {
    color: var(--page-text-secondary);
}

/* FAQ Section */
.page-the-thao__faq-section {
    background-color: var(--page-card-bg);
    padding: 80px 0;
}

.page-the-thao__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-the-thao__faq-item {
    background-color: var(--page-deep-green);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-the-thao__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--page-text-main);
    font-weight: bold;
    font-size: 1.1em;
}

.page-the-thao__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-the-thao__faq-qtext {
    flex-grow: 1;
}

.page-the-thao__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--page-glow);
}

.page-the-thao__faq-item[open] .page-the-thao__faq-toggle {
    content: "-"; /* Change to minus when open */
    transform: rotate(45deg); /* Simple animation for plus to cross */
}

.page-the-thao__faq-answer {
    padding: 0 20px 20px;
    color: var(--page-text-secondary);
    font-size: 1em;
    line-height: 1.6;
}

.page-the-thao__faq-answer p {
    margin-bottom: 15px;
    color: var(--page-text-secondary);
}

.page-the-thao__faq-answer .page-the-thao__btn-text-link {
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-the-thao__section-title {
        font-size: 2em;
    }
    .page-the-thao__hero-title {
        font-size: clamp(2em, 4.5vw, 3em);
    }
    .page-the-thao__live-betting-content {
        flex-direction: column;
        text-align: center;
    }
    .page-the-thao__live-betting-image {
        margin-top: 30px;
    }
    .page-the-thao__features-grid,
    .page-the-thao__sports-grid,
    .page-the-thao__steps-list,
    .page-the-thao__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* General content area padding and sizing */
    .page-the-thao__container {
        padding: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsiveness */
    .page-the-thao img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-the-thao__feature-icon { /* Specific for feature icons, ensuring they are still visible */
        width: 80px !important;
        height: 80px !important;
        object-fit: contain !important;
    }

    /* HERO Section */
    .page-the-thao__hero-section {
        padding-top: 10px !important; /* Small top padding */
    }
    .page-the-thao__hero-content {
        padding: 30px 15px 40px !important;
    }
    .page-the-thao__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important;
        margin-bottom: 15px !important;
    }
    .page-the-thao__hero-description {
        font-size: 1em !important;
        margin-bottom: 25px !important;
    }
    .page-the-thao__hero-cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        max-width: 90% !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* Buttons responsiveness */
    .page-the-thao__btn-primary,
    .page-the-thao__btn-secondary,
    .page-the-thao__btn-outline,
    .page-the-thao__btn-text-link,
    .page-the-thao a[class*="button"],
    .page-the-thao a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-the-thao__hero-cta-buttons,
    .page-the-thao__all-promos-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    /* Section Titles */
    .page-the-thao__section-title {
        font-size: 1.8em !important;
        margin-bottom: 30px !important;
    }
    .page-the-thao__section-description {
        font-size: 0.95em !important;
        margin-bottom: 40px !important;
    }

    /* Grids (features, sports, steps, promo) */
    .page-the-thao__features-grid,
    .page-the-thao__sports-grid,
    .page-the-thao__steps-list,
    .page-the-thao__promo-grid {
        grid-template-columns: 1fr !important; /* Single column layout */
        gap: 20px !important;
    }
    .page-the-thao__sport-image,
    .page-the-thao__promo-image {
        height: 180px !important; /* Maintain reasonable image height */
    }

    /* Live Betting Section */
    .page-the-thao__live-betting-content {
        flex-direction: column !important;
        gap: 30px !important;
    }
    .page-the-thao__live-betting-image {
        min-width: unset !important; /* Remove min-width for mobile */
        width: 100% !important;
    }
    .page-the-thao__text-block p {
        font-size: 1em !important;
    }

    /* FAQ Section */
    .page-the-thao__faq-item summary {
        font-size: 1em !important;
        padding: 15px !important;
    }
    .page-the-thao__faq-answer {
        padding: 0 15px 15px !important;
        font-size: 0.95em !important;
    }
    .page-the-thao__faq-toggle {
        font-size: 1.2em !important;
    }
}