/* Sport Page Styles */

/* General Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 700px;
    min-height: auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: -120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Lower z-index to prevent conflict with menu toggle */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #ffffff;
    width: 100%;
    text-align: center;
}

/* Welcome Section */
.welcome-section {
    padding: 60px 0;
    background-color: #fff;
}

.welcome-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
}

.welcome-text {
    flex: 1;
}

.welcome-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.welcome-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
    text-align: left;
}

.welcome-image {
    flex: 1;
    text-align: center;
}

.welcome-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.welcome-text-content {
    padding: 0;
    width: 100%;
}

.welcome-text-content p {
    text-align: left;
    margin-bottom: 15px;
}

.welcome-text-content p:last-child {
    margin-bottom: 0;
}

/* Optional Sections */
.optional-section-1,
.optional-section-2 {
    padding: 60px 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-sizing: border-box; /* Ensure padding is included in width */
}

.optional-section-1 {
    background-color: #f8f8f8;
}

.optional-section-2 {
    background-color: #fff;
}

.optional-section-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    max-width: 100%; /* Ensure content doesn't exceed container width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.optional-section.text-only .optional-section-content {
    flex-direction: column;
    gap: 20px;
}

.optional-section.with-image.image-left .optional-section-content {
    flex-direction: row;
}

.optional-section.with-image.image-right .optional-section-content {
    flex-direction: row-reverse;
}

.optional-section-text {
    flex: 1;
    min-width: 0; /* Allow text container to shrink below its content size */
}

.optional-section-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    word-wrap: break-word; /* Allow long words to break */
}

.optional-section-text-content {
    padding: 0;
    width: 100%;
    word-wrap: break-word; /* Allow long words to break */
    overflow-wrap: break-word; /* Modern browsers */
}

.optional-section-text-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
    text-align: left;
}

.optional-section-text-content p:last-child {
    margin-bottom: 0;
}

.optional-section-image {
    flex: 1;
    text-align: center;
    min-width: 0; /* Allow image container to shrink */
}

.optional-section-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.optional-section-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Button styles for optional sections */
.optional-section-button {
    margin-top: 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    line-height: 1.5;
    max-width: 100%; /* Ensure button doesn't overflow */
    white-space: normal; /* Allow text to wrap */
    text-align: center;
}

.btn-text {
    flex: 1;
    text-align: center;
    word-break: break-word; /* Allow long words to break */
}

.btn-primary {
    background-color: #E53E3E;
    color: #fff;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.2);
}

.btn-primary:hover {
    background-color: #C53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
}

.btn-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Add styles for links within content */
.optional-section-text-content a {
    color: #1774A1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
    word-break: break-word; /* Allow URLs to break */
}

.optional-section-text-content a:hover {
    color: #E53E3E;
    border-bottom: 1px solid #E53E3E;
}

/* Sport Classes Section */
.sport-classes-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.sport-classes-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

/* Make collapsible sections consistent */
.sport-class-box {
    background: #fff;
    margin-bottom: 40px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
}

.sport-class-box h3 {
    padding: 20px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.sport-class-box h3::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: #D91E3A;
}

.sport-class-box.active h3::after {
    transform: rotate(180deg);
}

.sport-class-box .class-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sport-class-box.active .class-content {
    max-height: 2000px;
    padding: 20px;
}

.class-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.class-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Team Section */
.team-section {
    margin-bottom: 60px;
}

.team-section-header {
    margin-bottom: 30px;
    padding: 0 20px;
}

.team-section-header h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

.team-section-header p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* Section Accordion */
.section-accordion {
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    width: 100%;
    margin: 0 0 20px; /* Add bottom margin between sections */
    padding: 0;
}

.section-accordion:last-child {
    margin-bottom: 40px; /* Add extra margin for the last section */
}

.section-header {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    min-height: 48px;
    box-sizing: border-box;
    width: 100%;
    max-width: none !important; /* Override any external max-width constraints */
    margin: 0;
}

.section-header h3 {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    line-height: 1.2;
    text-align: left;
    flex: 1;
    max-width: none; /* Ensure header text can also expand fully */
}

.section-toggle {
    font-size: 1.125rem;
    transition: transform 0.3s ease;
    color: #D91E3A;
    line-height: 1;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-accordion.active .section-toggle {
    transform: rotate(180deg);
}

.section-content {
    padding: 0;
    margin: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
}

.section-accordion.active .section-content {
    max-height: 5000px;
    padding-bottom: 20px;
}

.section-description {
    padding: 20px 20px 0;
    width: 100%;
    margin: 0;
}

.section-description p {
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    margin: 0;
    text-align: left;
}

/* Team Accordion (nested) */
.team-accordion {
    margin: 20px 20px 15px;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #E5E5E5;
    width: calc(100% - 40px); /* Account for left and right margins */
}

.team-accordion:last-child {
    margin-bottom: 20px;
}

.team-header {
    padding: 12px 20px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    box-sizing: border-box;
    position: relative;
}

.team-header h4 {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
    flex: 1;
    padding-left: 15px;
    position: relative;
}

.team-header h4::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #D91E3A;
    font-size: 1.2rem;
    line-height: 1;
}

.team-toggle {
    font-size: 1.125rem;
    line-height: 1;
    color: #D91E3A;
    transition: transform 0.3s ease;
    margin: 0;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.team-accordion.active .team-toggle {
    transform: rotate(360deg);
}

.team-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
}

.team-accordion.active .team-content {
    max-height: 2000px;
}

.team-details {
    padding: 20px;
}

/* Section Image Slider */
.section-slider {
    margin: 20px 0;
    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.section-slider-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    display: block !important; /* Override inline flex */
    width: 100% !important;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #D91E3A #f0f0f0;
}

/* Customize scrollbar for WebKit browsers */
.section-slider-container::-webkit-scrollbar {
    height: 6px;
}

.section-slider-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.section-slider-container::-webkit-scrollbar-thumb {
    background-color: #D91E3A;
    border-radius: 10px;
}

.section-slider-track {
    display: flex !important;
    width: 100% !important; /* Force track to take full width */
    padding: 0 10px;
    flex-wrap: nowrap !important;
    transform: none !important;
    transition: none !important;
}

/* Override individual slide widths */
.section-slide {
    flex: 0 0 auto !important;
    padding: 0 5px;
    margin-right: 15px;
    box-sizing: border-box;
    min-width: 30% !important; /* Default width for all slides */
    width: auto !important; /* Override inline width */
}

.section-slide:last-child {
    margin-right: 0;
}

.section-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-slide img:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Single image in section slider - ORIGINAL STYLING */
/* .section-slider.single-image .section-slider-container {
    overflow: hidden !important;
    display: block !important;
}

.section-slider.single-image .section-slider-track {
    display: block !important;
    width: 45% !important;
    padding: 0;
} */

/* .section-slider.single-image .section-slide {
    width: 100% !important;
    margin-right: 0 !important;
    aspect-ratio: 16 / 9 !important;
    min-width: 100% !important;
} */

.section-slider.single-image .section-slide img {
    height: 220px !important;
    width: 330px !important;
    object-fit: cover !important;
}

/* Remove navigation dots since we're using scroll */
.section-slider-nav {
    display: none;
}

/* Team Data Section (for Conventus integration) */
.team-data {
    margin-top: 30px;
}

/* Conventus Button Styling */
input.cvt_bt {
    padding: 8px 16px;
    margin: 10px 0;
    border-radius: 4px;
    border: none;
    background-color: #D91E3A;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

input.cvt_bt:hover {
    background-color: #b01830;
}

/* Details Table */
.details-table {
    width: 100%;
    margin-bottom: 20px;
}

.details-table th {
    font-weight: 600;
    padding: 12px 0;
    text-align: left;
    width: 30%;
    vertical-align: top;
}

.details-table td {
    padding: 12px 0;
}

/* Trainer Information */
.trainer-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.trainer-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

/* CTA Button */
.cta-button {
    background-color: #D91E3A;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #b01830;
}

/* Add visual indicator for scrollable content */
.section-slider:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.8));
    pointer-events: none;
    z-index: 2;
    opacity: 0.7;
}

/* Only show indicator when there's scrollable content */
.section-slider.no-scroll:after {
    display: none;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 991px) {
    .hero-section {
        height: 600px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .welcome-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .welcome-text h2 {
        font-size: 2rem;
    }
    
    .sport-classes-section h2 {
        font-size: 2rem;
    }
    
    .optional-section-content {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .optional-section-text h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        height: 500px;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .welcome-section {
        padding: 40px 0;
    }
    
    .welcome-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .welcome-text {
        order: 1;
        width: 100%;
    }
    
    .welcome-text h2 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .welcome-text-content {
        padding: 0;
    }
    
    .welcome-text-content p {
        font-size: 0.95rem;
    }
    
    .welcome-image {
        order: 2;
        width: 100%;
    }
    
    .welcome-image img {
        max-width: 100%;
    }
    
    .sport-classes-section {
        padding: 40px 0;
    }
    
    .sport-classes-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .optional-section-1,
    .optional-section-2 {
        padding: 40px 0;
    }
    
    .optional-section-text h2 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .optional-section-text-content p {
        font-size: 0.95rem;
    }
    
    .optional-section-image {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 10px 16px;
    }
    
    .section-slider {
        margin: 20px 0;
    }
    
    .section-slider-container {
        padding-bottom: 15px;
    }
    
    .section-slide {
        min-width: 85%;
    }
    
    .section-slide img {
        height: 180px;
        width: 270px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .section-slider {
        margin: 25px 0;
    }
    
    .section-slide {
        min-width: 45%;
    }
    
    .section-slide img {
        height: 200px;
        width: 300px;
    }
}

@media (min-width: 992px) {
    .section-slider {
        margin: 30px 0;
    }
    
    .section-slide {
        min-width: 30%;
    }
    
    .section-slide img {
        height: 220px;
        width: 330px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 400px;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .welcome-text h2,
    .sport-classes-section h2,
    .optional-section-text h2 {
        font-size: 1.5rem;
    }
    
    .welcome-image img,
    .optional-section-image img {
        border-radius: 6px;
    }
    
    .section-slide img {
        height: 160px;
        width: 240px;
    }
    
    .team-details {
        padding: 10px;
    }
    
    .section-accordion,
    .team-accordion {
        margin-bottom: 15px;
    }
    
    .section-toggle,
    .team-toggle {
        font-size: 1.2rem;
    }
    
    .welcome-section {
        padding: 30px 0;
    }
    
    .welcome-text h2 {
        margin-bottom: 10px;
    }
    
    .welcome-text-content p {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    
    .optional-section-1,
    .optional-section-2 {
        padding: 30px 0;
    }
    
    .hero-section {
        margin-top: -80px;
    }
}

/* Remove the iOS Safari fix since we're not using 100vh anymore */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        height: 600px;
    }
}

/* Ensure smooth scrolling on all devices */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden; /* Prevent horizontal scrolling at root level */
    max-width: 100%;
}

body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-width: 100vw;
    width: 100%;
    box-sizing: border-box;
}

/* Sport-specific page styling */
.sport-page .mobile-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 1005;
    padding: 4rem 1.5rem 2rem;
    overflow-y: auto;
}

.sport-page .mobile-menu-container.is-active {
    display: block;
}

/* Special styling for basketball page */
.basketball-page {
    /* Add any basketball-specific styles here */
}

/* Special styling for badminton page */
.badminton-page {
    /* Add any badminton-specific styles here */
}

/* Add more sport-specific styles as needed */

/* Fix for main container */
.site-main {
    overflow-x: hidden; /* Prevent horizontal scrolling at the root level */
    width: 100%;
    box-sizing: border-box;
}