/* style/the-thao.css */

/* Base styles and container */
.page-the-thao {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--body-bg, #ffffff); /* Fallback to white if var not set */
}

.page-the-thao__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-the-thao__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-the-thao__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* HERO Section */
.page-the-thao__hero-section {
    padding-top: 10px; /* Small top padding, relying on shared.css for body padding-top */
    padding-bottom: 60px;
    background-color: #f0f8ff; /* Light background for hero */
}

.page-the-thao__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 40px 16px;
    gap: 24px;
}

.page-the-thao__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #1e1765; /* Dark text for light hero background */
}

.page-the-thao__hero-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size */
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-the-thao__hero-description {
    font-size: 1.15em;
    color: #555555;
    margin-bottom: 30px;
}

.page-the-thao__hero-image {
    flex: 1 1 45%;
    text-align: center;
    min-width: 300px;
}

.page-the-thao__hero-side-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.page-the-thao__hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-the-thao__btn-primary,
.page-the-thao__btn-secondary,
.page-the-thao__btn-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding/border included in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-the-thao__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

.page-the-thao__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-the-thao__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-the-thao__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2d;
}

.page-the-thao__btn-link {
    background: none;
    border: none;
    color: #017439;
    padding: 0;
    font-size: 1em;
    text-decoration: underline;
}

.page-the-thao__btn-link:hover {
    color: #005a2d;
}

/* Dark section styling for contrast */
.page-the-thao__dark-section {
    background-color: #017439;
    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: #f0f0f0;
}

/* Intro Section (Module 1) */
.page-the-thao__intro-section {
    padding: 60px 0;
}

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

.page-the-thao__feature-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.page-the-thao__feature-item:hover {
    transform: translateY(-5px);
}

.page-the-thao__icon-box-media {
    width: 180px; /* Display size matches HTML img width/height */
    height: 180px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #017439;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-the-thao__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Ensure image is also circular */
    display: block;
}

.page-the-thao__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-the-thao__feature-text {
    color: #666666;
}

/* Sports Types Section */
.page-the-thao__sports-types-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.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: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-the-thao__sport-card:hover {
    transform: translateY(-5px);
}

.page-the-thao__sport-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-the-thao__sport-title {
    font-size: 1.4em;
    color: #017439;
    margin: 20px 0 10px;
    padding: 0 15px;
    font-weight: bold;
}

.page-the-thao__sport-text {
    color: #666666;
    padding: 0 15px 20px;
}

/* Guide Section */
.page-the-thao__guide-section {
    padding: 60px 0;
}

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

.page-the-thao__guide-step-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-the-thao__guide-step-item .page-the-thao__step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #017439;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.page-the-thao__guide-step-item .page-the-thao__step-title {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-the-thao__guide-step-item .page-the-thao__step-text {
    color: #f0f0f0;
}

.page-the-thao__guide-cta {
    margin-top: 40px;
    text-align: center;
}

/* Promo Section */
.page-the-thao__promo-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

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

.page-the-thao__promo-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
}

.page-the-thao__promo-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-the-thao__promo-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
    padding: 0 15px;
    font-weight: bold;
}

.page-the-thao__promo-text {
    color: #666666;
    padding: 0 15px 20px;
}

/* FAQ Section */
.page-the-thao__faq-section {
    padding: 60px 0;
}

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

.page-the-thao__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.page-the-thao__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    font-size: 1.1em;
    list-style: none; /* Hide default marker */
}

.page-the-thao__faq-question::-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;
    margin-left: 15px;
    color: #FFFF00; /* Custom color for toggle icon */
}

.page-the-thao__faq-answer {
    padding: 0 20px 20px;
    color: #f0f0f0;
    font-size: 0.95em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.page-the-thao__faq-item[open] .page-the-thao__faq-answer {
    max-height: 500px; /* Arbitrary large value for smooth transition */
}

.page-the-thao__faq-cta {
    margin-top: 40px;
    text-align: center;
}

/* General image responsive styles (excluding specific cases like circular images) */
.page-the-thao img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-the-thao__hero-container {
        flex-direction: column;
        text-align: center;
    }

    .page-the-thao__hero-content {
        order: 2; /* Content below image */
        margin-top: 30px;
    }

    .page-the-thao__hero-image {
        order: 1; /* Image above content */
    }

    .page-the-thao__hero-cta-buttons {
        justify-content: center;
    }

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

    .page-the-thao__icon-box-media {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    /* General container and text adjustments */
    .page-the-thao__container {
        padding: 20px 15px !important; /* Ensure mobile padding */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-the-thao {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-the-thao__section-title {
        font-size: 1.8em !important;
        margin-bottom: 15px !important;
    }

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

    /* HERO Section - Specific adjustments */
    .page-the-thao__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
    }
    .page-the-thao__hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
        max-width: 100%;
    }
    .page-the-thao__hero-description {
        font-size: 1em !important;
    }
    .page-the-thao__hero-cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .page-the-thao__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Buttons - Forced responsive styles */
    .page-the-thao__btn-primary,
    .page-the-thao__btn-secondary,
    .page-the-thao__btn-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 !important;
        padding-right: 15px !important;
    }
    .page-the-thao__hero-cta-buttons,
    .page-the-thao__guide-cta,
    .page-the-thao__faq-cta {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Module 1 (Intro Section) - Three-column circular images */
    .page-the-thao__features-grid {
        grid-template-columns: 1fr !important;
    }
    .page-the-thao__feature-item {
        padding: 20px !important;
    }
    .page-the-thao__icon-box-media {
        width: 200px !important; /* Minimum 200px for feature images */
        height: 200px !important;
        border-width: 3px !important;
    }
    .page-the-thao__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Sports Types Section */
    .page-the-thao__sports-grid {
        grid-template-columns: 1fr !important;
    }
    .page-the-thao__sport-card {
        margin-bottom: 20px;
    }
    .page-the-thao__sport-image {
        height: 180px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Guide Section */
    .page-the-thao__guide-steps {
        grid-template-columns: 1fr !important;
    }
    .page-the-thao__guide-step-item {
        padding: 20px !important;
    }
    .page-the-thao__guide-step-item .page-the-thao__step-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.5em !important;
    }
    .page-the-thao__guide-cta {
        margin-top: 30px !important;
    }

    /* Promo Section */
    .page-the-thao__promo-grid {
        grid-template-columns: 1fr !important;
    }
    .page-the-thao__promo-card {
        margin-bottom: 20px;
    }
    .page-the-thao__promo-image {
        height: 180px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* FAQ Section */
    .page-the-thao__faq-list {
        margin-top: 25px !important;
    }
    .page-the-thao__faq-item {
        margin-bottom: 10px !important;
    }
    .page-the-thao__faq-question {
        padding: 15px !important;
        font-size: 1em !important;
    }
    .page-the-thao__faq-toggle {
        font-size: 1.2em !important;
    }
    .page-the-thao__faq-answer {
        padding: 0 15px 15px !important;
    }
    .page-the-thao__faq-cta {
        margin-top: 30px !important;
    }

    /* Universal image responsive rule for content area (excluding special cases like circular images) */
    .page-the-thao img:not(.page-the-thao__icon-box-media img) {
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important;
        display: block !important;
    }
}

/* Color Contrast Fixes (as per requirements) */
.page-the-thao__dark-bg {
  color: #ffffff;
}

.page-the-thao__light-bg {
  color: #333333;
}

.page-the-thao__text-block {
  color: #333333;
  background: #ffffff;
}

.page-the-thao p,
.page-the-thao li {
  color: #333333;
}

.page-the-thao__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

.page-the-thao__dark-section .page-the-thao__section-title,
.page-the-thao__dark-section .page-the-thao__feature-title,
.page-the-thao__dark-section .page-the-thao__step-title,
.page-the-thao__dark-section .page-the-thao__faq-question {
    color: #ffffff;
}

.page-the-thao__dark-section .page-the-thao__hero-description,
.page-the-thao__dark-section .page-the-thao__feature-text,
.page-the-thao__dark-section .page-the-thao__step-text,
.page-the-thao__dark-section .page-the-thao__faq-answer {
    color: #f0f0f0;
}