/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #f1f1f1;
    line-height: 1.6;
}

/* Custom Audio Wrapper to Control Centering & Width */
.custom-audio-wrapper {
    display: flex;
    justify-content: center;  /* Centers the audio player */
    align-items: center;
    width: 100%;  /* Matches content width */
    max-width: 800px;  /* Adjust as needed to match content */
    margin: 20px auto;  /* Adds spacing above/below */
}

/* Style the Audio Player */
audio {
    width: 100%; /* Makes it fill the container */
    height: 50px; /* Slightly larger than default */
    border-radius: 10px; /* Softens edges */
    background-color: #222; /* Darker background */
    padding: 10px;
}

/* Style for Audio Caption */
.audio-caption {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    color: #ff9800; /* Matches highlight color */
    margin-bottom: 8px;
}

/* Increase Play & Volume Button Sizes */
audio::-webkit-media-controls-panel {
    transform: scale(1.2); /* Increases overall size */
}

/* Centered Content with Max Width */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Links */
a {
    color: #ff9800;
    text-decoration: none;
}

/* Header */
header {
    background-color: #222;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    margin-bottom: 5px;
}

/* Custom Bulleted List with Star Symbol */
ul {
    list-style: none; /* Removes default bullets */
    padding: 0;
}

ul li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

ul li::before {
    content: "★"; /* Inserts star symbol */
    font-size: 1em; /* Adjust size */
    position: absolute;
    left: 0;
    top: 0;
}

.highlight-text {
    color: #ff9800; /* Orange */
    font-weight: bold;
    font-style: italic;
}

.about-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #ff9800;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
}

.about-button:hover {
    background-color: #e68900;
}

.discord-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #7289da;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
}

.discord-button:hover {
    background-color: #7e96ed;
}

/* Featured Courses (Now at Top) */
#courses {
    padding: 0;
    text-align: center;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course {
    background-color: #333;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: left; /* Ensures readable text alignment */
    max-width: 800px; /* Keeps content easy to read */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adds depth */
    border: 2px solid #ff9800; /* Distinguishes courses */
}

.course h3 {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

.course img {
    max-width: 100%;
    border-radius: 20px;
}

.course-subtitle {
    font-size: 1.2em;
    font-style: italic;
    text-align: center;
    margin: 0 0 15px 0;
    color: #ff9800;
}

.course-content {
    position: relative;
}

.course-image {
    width: 320px; /* Adjust for best fit */
    height: auto;
    border-radius: 20px;
    float: right;
    margin-left: 15px;
    margin-bottom: 10px;
    box-shadow: 0 0 0 3px #222; /* Outer stroke effect */
}

.course-content p {
    text-align: left;
    margin-bottom: 10px; /* Adds spacing between paragraphs */
}

/* Responsive Fix: Ensure Image Stacks on Mobile */
@media (max-width: 768px) {
    .course-content {
        display: flex;
        flex-direction: column; /* Stack content on mobile */
        align-items: center; /* Center content */
    }

    .course-image {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
        width: 100%;
        max-width: 300px;
    }
}

.coupon-button {
    display: block;
    margin: 20px auto;
    padding: 14px 20px; /* Slightly larger padding for better usability */
    background-color: #ff9800;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    font-size: 1.8em; /* Slightly bigger text for readability */
    transition: background-color 0.3s ease;
    max-width: 200px; /* Wider for a better click target */
}

.coupon-button:hover {
    background-color: #e68900;
}

/* About Section (Now Below Courses) */
#about {
    padding: 0;
    background-color: #1a1a1a;
    text-align: left;
}

.about-image {
    width: 240px; /* Adjust for best fit */
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    float: right;
    margin-left: 15px;
    margin-bottom: 10px;
    border-radius: 20px;
}

/* Video Styling */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Testimonials (Now Right After About) */
#testimonials {
    padding: 40px 20px;
    background-color: #252525;
    text-align: center;
}

.testimonial-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
}

.testimonial {
    width: 45%;
    background-color: #222;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: #fff;
}

.testimonial p {
    font-style: italic;
}

.testimonial h4 {
    margin-top: 10px;
    font-weight: bold;
    color: orange;
}

/* Responsive: Stack testimonials on smaller screens */
@media (max-width: 768px) {
    .testimonial {
        width: 100%;
    }
}

/* Discord Section */
#discord {
    padding: 40px 20px;
    background-color: #1a1a1a;
    text-align: center;
}

/* Footer */
footer {
    padding: 20px;
    background-color: #333;
    color: white;
    text-align: center;
}

footer a {
    color: #ff9800;
}

/* Table of Contents */
.table-of-contents {
    color: white;
    padding: 0;
    border-radius: 8px;
    max-width: 550px;
    margin: 0 auto 20px auto;
    text-align: left;
}

.table-of-contents h3 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents ul ul {
    padding-left: 20px;
}

.table-of-contents li {
    margin: 5px 0;
}

.table-of-contents a {
    color: #ff9800;
    text-decoration: none;
    font-weight: bold;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

@media (min-width: 1440px) {  
    header {
        margin-left: 300px; /* Same as the main content */
        width: calc(100% - 300px);
        padding: 20px;
        box-sizing: border-box;
    }

    /* Align footer with the main content */
    footer {
        margin-left: 300px; /* Same as the header */
        width: calc(100% - 300px);
        padding: 20px;
        box-sizing: border-box;
        background-color: #333;
        text-align: center;
    }

    /* Flexbox layout to position sidebar & content */
    .content-wrapper {
        display: flex;
        align-items: flex-start;
    }

    /* Sidebar TOC (starts at top and resizes properly) */
    #table-of-contents {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px; /* Keep your original width */
        height: auto; /* Allow it to grow */
        min-height: 100vh; /* Ensures it reaches the bottom */
        background: rgba(0, 0, 0, 0.5); /* Preserves original style */
        padding: 20px;
        box-sizing: border-box;
    }

    /* If the window is too short, allow scrolling inside TOC */
    .table-of-contents {
        overflow-y: auto; /* Allows scrolling when necessary */
        max-height: 100vh; /* Prevents cutting off content */
    }

    .table-of-contents h2 {
        font-size: 1.2em;
        margin-bottom: 0;
    }
    

    /* Push the main content to the right so it doesn't overlap */
    .main-content {
        margin-left: 300px;
        width: calc(100% - 300px);
        padding: 20px;
    }
}

