/* style/ththao.css */

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

.page-ththao {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Arial', sans-serif; /* Placeholder, assume a good font is loaded by shared.css or system */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from content */
}

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

/* Text Colors based on custom colors */
.page-ththao__text-main {
    color: var(--text-main);
}

.page-ththao__text-secondary {
    color: var(--text-secondary);
}

.page-ththao__dark-bg {
    background-color: var(--bg-page);
    color: var(--text-main); /* Default text color for dark backgrounds */
}

.page-ththao__card-bg {
    background-color: var(--bg-card);
    color: var(--text-main); /* Default text color for card backgrounds */
    border: 1px solid var(--border-color);
}

/* Hero Section */
.page-ththao__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
    text-align: center;
    overflow: hidden;
}

.page-ththao__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-ththao__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-ththao__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-ththao__main-title {
    font-size: clamp(2.2em, 5vw, 3.5em); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-ththao__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

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

.page-ththao__btn-primary,
.page-ththao__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button respects container width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-ththao__btn-primary {
    background: var(--btn-gradient);
    color: #ffffff; /* White text on dark gradient */
    border: 2px solid transparent;
}

.page-ththao__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87, 227, 141, 0.4); /* Glow effect */
}

.page-ththao__btn-secondary {
    background-color: transparent;
    color: var(--color-primary); /* Primary color text */
    border: 2px solid var(--color-primary);
}

.page-ththao__btn-secondary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(17, 168, 78, 0.3);
}

/* General Section Styling */
.page-ththao__intro-section,
.page-ththao__sports-types-section,
.page-ththao__features-section,
.page-ththao__guide-section,
.page-ththao__promotions-section,
.page-ththao__faq-section,
.page-ththao__conclusion-section {
    padding: 80px 0;
}

.page-ththao__section-title {
    font-size: clamp(1.8em, 4vw, 2.8em);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-main);
}

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

/* Sports Grid */
.page-ththao__sports-grid,
.page-ththao__features-grid,
.page-ththao__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-ththao__sports-card,
.page-ththao__feature-item,
.page-ththao__promotion-card {
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-ththao__sports-card:hover,
.page-ththao__feature-item:hover,
.page-ththao__promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-ththao__sports-image,
.page-ththao__feature-image,
.page-ththao__promotion-image,
.page-ththao__faq-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-ththao__card-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-ththao__card-description {
    font-size: 0.95em;
    color: var(--text-secondary);
    flex-grow: 1; /* Allow description to take available space */
}

.page-ththao__feature-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-ththao__feature-description {
    font-size: 0.95em;
    color: var(--text-secondary);
}

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

.page-ththao__guide-step {
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-ththao__step-title {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

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

/* FAQ Section */
.page-ththao__faq-list {
    margin-top: 40px;
}

.page-ththao__faq-item {
    margin-bottom: 20px;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-ththao__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-main);
    list-style: none; /* For details/summary */
}

.page-ththao__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Chrome/Safari */
}

.page-ththao__faq-qtext {
    flex-grow: 1;
    margin-right: 10px;
}

.page-ththao__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--color-primary);
    background-color: var(--bg-page);
    transition: transform 0.3s ease;
}

.page-ththao__faq-item[open] .page-ththao__faq-toggle {
    transform: rotate(0deg); /* Explicitly set for consistency, as initial state is '-' */
}

.page-ththao__faq-answer {
    padding-top: 15px;
    font-size: 1em;
    color: var(--text-secondary);
}

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

.page-ththao__faq-btn {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 0.9em;
}

/* Conclusion Section */
.page-ththao__conclusion-section .page-ththao__cta-buttons {
    margin-top: 40px;
}

/* --- Responsive Design --- */

/* All images must be responsive */
.page-ththao img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* All buttons must be responsive */
.page-ththao__cta-button,
.page-ththao__btn-primary,
.page-ththao__btn-secondary,
.page-ththao a[class*="button"],
.page-ththao a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-ththao__cta-buttons,
.page-ththao__button-group,
.page-ththao__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .page-ththao__container {
        padding: 0 15px; /* Adjust padding for smaller screens */
    }

    .page-ththao__hero-section {
        padding: 10px 0 40px 0; /* Adjust padding */
    }

    .page-ththao__hero-image-wrapper {
        max-height: 300px; /* Smaller hero image on mobile */
    }

    .page-ththao__main-title {
        font-size: 2.2em; /* Ensure H1 is readable but not too big */
    }

    .page-ththao__description {
        font-size: 1em;
    }

    .page-ththao__intro-section,
    .page-ththao__sports-types-section,
    .page-ththao__features-section,
    .page-ththao__guide-section,
    .page-ththao__promotions-section,
    .page-ththao__faq-section,
    .page-ththao__conclusion-section {
        padding: 50px 0; /* Adjust section padding */
    }

    .page-ththao__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-ththao__sports-grid,
    .page-ththao__features-grid,
    .page-ththao__promotions-grid,
    .page-ththao__guide-steps {
        grid-template-columns: 1fr; /* Single column layout for cards */
        gap: 20px;
    }

    .page-ththao__sports-card,
    .page-ththao__feature-item,
    .page-ththao__promotion-card,
    .page-ththao__guide-step {
        padding: 20px;
    }

    .page-ththao__card-title,
    .page-ththao__feature-title {
        font-size: 1.3em;
    }

    .page-ththao__faq-question {
        font-size: 1.1em;
    }
    
    /* Mobile specific image adaptation */
    .page-ththao img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* All image containers must be responsive */
    .page-ththao__hero-image-wrapper,
    .page-ththao__sports-card,
    .page-ththao__feature-item,
    .page-ththao__promotion-card,
    .page-ththao__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ensure no overflow */
    }

    /* Mobile specific button adaptation */
    .page-ththao__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-ththao__btn-primary,
    .page-ththao__btn-secondary,
    .page-ththao a[class*="button"],
    .page-ththao a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    /* Ensure no content causes horizontal scroll */
    .page-ththao__intro-section,
    .page-ththao__sports-types-section,
    .page-ththao__features-section,
    .page-ththao__guide-section,
    .page-ththao__promotions-section,
    .page-ththao__faq-section,
    .page-ththao__conclusion-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }
}