/* style/the-thao.css */

:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --page-bg: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

.page-the-thao {
    font-family: 'Arial', sans-serif;
    color: var(--text-main);
    background-color: var(--page-bg); /* Assuming body background is light */
}

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

/* Hero Section */
.page-the-thao__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 50px;
    text-align: center;
    overflow: hidden;
    background-color: var(--primary-color);
}

.page-the-thao__hero-image-wrapper {
    width: 100%;
    max-height: 550px; /* Limit height for aesthetic */
    overflow: hidden;
    position: relative;
}

.page-the-thao__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-the-thao__hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent white for readability */
    border-radius: 12px;
    margin-top: -80px; /* Overlap slightly with image for visual flow */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-the-thao__main-title {
    font-size: clamp(2em, 4vw, 3.2em);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.page-the-thao__subtitle {
    font-size: 1.15em;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-the-thao__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-the-thao__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-the-thao__btn--primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.4);
}

.page-the-thao__btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.6);
}

.page-the-thao__btn--secondary {
    background-color: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-the-thao__btn--secondary:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.3);
}

.page-the-thao__btn--small {
    padding: 10px 20px;
    font-size: 0.95em;
    border-radius: 6px;
    margin-top: 15px;
}

/* General Content Section Styling */
.page-the-thao__content-section {
    padding: 60px 0;
    background-color: var(--page-bg);
}

.page-the-thao__dark-section {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-the-thao__dark-section .page-the-thao__section-title {
    color: #ffffff;
}

.page-the-thao__dark-section .page-the-thao__section-description {
    color: rgba(255, 255, 255, 0.9);
}

.page-the-thao__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-the-thao__section-description {
    font-size: 1.05em;
    color: var(--text-main);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Feature Grid */
.page-the-thao__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-the-thao__feature-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    color: var(--text-main);
}

.page-the-thao__dark-section .page-the-thao__feature-card {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.page-the-thao__dark-section .page-the-thao__feature-card .page-the-thao__feature-title {
    color: #ffffff;
}

.page-the-thao__dark-section .page-the-thao__feature-card .page-the-thao__feature-text {
    color: rgba(255, 255, 255, 0.8);
}

.page-the-thao__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-the-thao__feature-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-the-thao__feature-text {
    font-size: 1em;
    line-height: 1.7;
}

/* Guide Steps */
.page-the-thao__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.page-the-thao__guide-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.page-the-thao__guide-figure {
    margin: 0 0 20px 0;
}

.page-the-thao__guide-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

.page-the-thao__guide-caption {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.page-the-thao__guide-title {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-the-thao__guide-text {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-main);
}

/* Promo Banner */
.page-the-thao__promo-banner {
    background: var(--button-gradient);
    padding: 80px 0;
    text-align: center;
    color: #ffffff;
}

.page-the-thao__promo-box {
    max-width: 900px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.page-the-thao__promo-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #ffffff;
}

.page-the-thao__promo-text {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Bet Types Grid */
.page-the-thao__bet-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-the-thao__bet-type-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.page-the-thao__bet-type-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-the-thao__bet-type-text {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-main);
}

/* FAQ Section */
.page-the-thao__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
}

.page-the-thao__faq-item {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.page-the-thao__faq-item[open] {
    background-color: rgba(255, 255, 255, 0.25);
}

.page-the-thao__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: #ffffff;
}

.page-the-thao__faq-question::-webkit-details-marker {
    display: none;
}

.page-the-thao__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.page-the-thao__faq-item[open] .page-the-thao__faq-toggle {
    transform: rotate(45deg);
}

.page-the-thao__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.page-the-thao__faq-answer p {
    margin-bottom: 15px;
}

.page-the-thao__faq-answer .page-the-thao__btn {
    margin-top: 15px;
}

/* Responsive Styles */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-the-thao__hero-content {
        margin-top: -60px;
        padding: 25px 20px;
    }

    .page-the-thao__main-title {
        font-size: clamp(2em, 4.5vw, 2.8em);
    }

    .page-the-thao__subtitle {
        font-size: 1.1em;
    }

    .page-the-thao__section-title {
        font-size: clamp(1.8em, 3.8vw, 2.2em);
    }

    .page-the-thao__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-the-thao__feature-card,
    .page-the-thao__guide-item,
    .page-the-thao__bet-type-card {
        padding: 25px;
    }

    .page-the-thao__promo-box {
        padding: 35px;
    }

    .page-the-thao__promo-title {
        font-size: clamp(1.8em, 3.8vw, 2.5em);
    }

    .page-the-thao__promo-text {
        font-size: 1em;
    }

    .page-the-thao__faq-question {
        font-size: 1.1em;
    }

    .page-the-thao__faq-answer {
        font-size: 0.95em;
    }
}

/* Mobile (max-width: 768px) - MUST INCLUDE ALL LISTED SECTIONS */
@media (max-width: 768px) {
    /* 1. Top Section (Hero) + Dual CTA */
    .page-the-thao__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
        padding-bottom: 30px;
    }

    .page-the-thao__hero-image-wrapper {
        max-height: 300px;
    }

    .page-the-thao__hero-content {
        margin-top: -50px;
        padding: 20px 15px;
        border-radius: 8px;
        max-width: calc(100% - 30px); /* Adjust for padding */
    }

    .page-the-thao__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 10px;
    }

    .page-the-thao__subtitle {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .page-the-thao__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to button container */
    }

    .page-the-thao__btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        border-radius: 6px;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    /* 2. Single Column Long Article Container (General Sections) */
    .page-the-thao__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-the-thao__content-section {
        padding: 40px 0;
    }

    .page-the-thao__section-title {
        font-size: clamp(1.6em, 6vw, 2em);
        margin-bottom: 15px;
    }

    .page-the-thao__section-description {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    .page-the-thao__feature-grid,
    .page-the-thao__guide-steps,
    .page-the-thao__bet-types-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-the-thao__feature-card,
    .page-the-thao__guide-item,
    .page-the-thao__bet-type-card {
        padding: 20px;
        height: auto; /* Allow cards to adjust height */
    }

    .page-the-thao__feature-title,
    .page-the-thao__guide-title,
    .page-the-thao__bet-type-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .page-the-thao__feature-text,
    .page-the-thao__guide-text,
    .page-the-thao__bet-type-text {
        font-size: 0.9em;
    }

    /* 3. Generic Images and Figure */
    .page-the-thao img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-the-thao__guide-image {
        height: 160px; /* Adjust height for mobile */
    }

    .page-the-thao__promo-banner {
        padding: 50px 0;
    }

    .page-the-thao__promo-box {
        padding: 30px 20px;
        border-radius: 10px;
        max-width: calc(100% - 30px);
    }

    .page-the-thao__promo-title {
        font-size: clamp(1.6em, 6.5vw, 2.2em);
        margin-bottom: 15px;
    }

    .page-the-thao__promo-text {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    /* 4. Buttons and Button Containers - Already handled by .page-the-thao__cta-buttons and .page-the-thao__btn above */

    /* 5. Registration Tutorial and FAQ Blocks */
    .page-the-thao__guide-item .page-the-thao__btn--small {
        width: auto !important; /* Allow small buttons to be smaller than 100% if needed */
        max-width: fit-content !important;
        margin: 15px auto 0 auto; /* Center small buttons */
    }

    .page-the-thao__faq-list {
        margin-top: 30px;
    }

    .page-the-thao__faq-item {
        margin-bottom: 10px;
    }

    .page-the-thao__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-the-thao__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.9em;
    }

    .page-the-thao__faq-answer .page-the-thao__btn {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.9em;
        padding: 10px 15px;
    }
}

/* Desktop (min-width: 769px) - ensure no overflow */
@media (min-width: 769px) {
    .page-the-thao__cta-buttons {
        flex-wrap: nowrap;
    }
}