.academy-section {
    position: relative;
    min-height: 100vh;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: url("https://www.thirdspace.london/wp-content/uploads/2024/08/tabbed-content-image-1-1620x1080.jpg");
}

.content {
    text-align: left;
    max-width: 1200px;
    width: 100%;
    color: black;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: white;
}

.world-class-academy-cards {
    margin-top: 80px;
    display: flex;
    gap: 20px;
    /* Add spacing between cards */
    overflow-x: auto;
    /* Enable horizontal scrolling */
    white-space: nowrap;
    /* Prevent wrapping of cards */
    padding-bottom: 20px;
    /* Add padding for better touch scrolling experience */
    scroll-snap-type: x mandatory;
    /* Enable smooth snap scrolling */
}

.world-class-academy-card {
    padding: 20px;
    border-radius: 8px;
    flex: 0 0 300px;
    /* Fixed width for cards */
    height: auto;
    /* Allow cards to expand with content */
    text-align: left;
    scroll-snap-align: center;
    /* Align cards to the center while scrolling */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Smooth hover effect */
}

.world-class-academy-card:hover {
    transform: translateY(-5px);
    /* Slight lift on hover */
}

.world-class-academy-card hr {
    border: none;
    border-top: 2px solid white;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease, border-width 0.3s ease;
    /* Smooth transition for border */
}

.world-class-academy-card:hover hr {
    border-top: 4px solid white;
    /* Thicker line with dark blue color */
}

.world-class-academy-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    white-space: normal;
    /* Allow multi-line text */
    transition: color 0.3s ease;
    /* Smooth transition for text color */
}

.world-class-academy-card:hover h3 {
    color: white;
    /* Change text color to dark blue */
}

.world-class-academy-card p {
    font-size: 1rem;
    line-height: 1.5;
    color: white;
    white-space: normal;
    /* Allow multi-line text */
    transition: color 0.3s ease;
    /* Smooth transition for text color */
}

.world-class-academy-card:hover p {
    color: white;
    /* Change text color to dark blue */
}

/* Responsive Design */
@media (min-width: 768px) {
    .mobile-image {
        color: white;
        display: none;
    }

    .world-class-academy-cards {
        overflow-x: visible;
        /* Disable horizontal scroll on larger screens */
        justify-content: space-between;
        white-space: normal;
        /* Allow wrapping for cards */
    }

    .world-class-academy-card {
        flex: 1;
        /* Equal width for all cards */
        width: auto;
        /* Dynamic width on larger screens */
    }
}

/* Styling the scrollbar itself */
::-webkit-scrollbar {
    width: 6px;
    /* Horizontal scrollbar width */
    height: 6px;
    /* Vertical scrollbar height */
}

@media (max-width: 768px) {
    .mobile-image {
        color: white;
    }

    .background-overlay {
        background: black;
        background-image: none;
    }

    .world-class-academy-card {
        background: black;
    }
}

/* Styling the track (background of the scrollbar) */
::-webkit-scrollbar-track {
    background: transparent;
    /* Make the track transparent */
}

/* Styling the draggable part of the scrollbar (thumb) */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    /* Light grey color for thumb */
    border-radius: 10px;
    /* Rounded corners */
}

/* Hover effect for the scrollbar thumb */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
    /* Darker grey on hover */
}

/* Optional: Add smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}