/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #f7f7f7;
}

.course-header {
    background-color: var(--gray-web);
    padding: 20px 0;
    color: white;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap; /* Ensures responsiveness */
}

.filter-btn {
    padding: 8px 16px;
    margin: 0;
    background-color: white;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

/* Highlight active button */
.filter-btn.active {
    background-color: #f8b240;
    color: white;
    border-color: #f8b240;
}

.filter-btn:hover {
    background-color: #e6e6e6;
}


.courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    justify-content: center; /* Centers items in smaller layouts */
}

/* General Container for Courses */
.courses {
    display: flex;
    flex-wrap: wrap; /* Allow the items to wrap if necessary */
    justify-content: space-evenly; /* Evenly distribute the space between cards */
    gap: 20px; /* Adjust the gap to control space between the cards */
    margin: 0 auto;
    padding: 20px;
}

/* General Course Card Styles */
.courses .course-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 250px; /* Make the cards smaller */
    flex: 1; /* Allow the cards to take up available space */
    min-width: 220px; /* Prevent them from getting too small */
    text-align: center;
    margin: 0; /* No extra margin between cards */
}

/* Hover effect */
.courses .course-card:hover {
    transform: scale(1.05);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

/* Ensure the course card header is uniquely styled */
.courses .card-header {
    position: relative;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Gradient header for each course type */
.courses .card-header.scratch-junior {
    background: linear-gradient(45deg, #F0B7FF, #FF86B8); /* Scratch Junior */
}

.courses .card-header.scratch-3 {
    background: linear-gradient(45deg, #36C6E5, #FF5EC0); /* Scratch 3 */
}

.courses .card-header.html5 {
    background: linear-gradient(45deg, #F76C6C, #FFB881); /* HTML5 */
}

.courses .card-header.css3 {
    background: linear-gradient(45deg, #6A77F7, #58A4F9); /* CSS3 */
}

.courses .card-header.bootstrap {
    background: linear-gradient(45deg, #8354B8, #D34878); /* Bootstrap */
}

.courses .card-header.python {
    background: linear-gradient(45deg, #1A94D5, #33CC95); /* Python */
}

.courses .card-header.app-development {
    background: linear-gradient(45deg, #AB5FF5, #F06292); /* App Development */
}

.courses .card-header.javascript {
    background: linear-gradient(45deg, #FF8E53, #FFC34D); /* JavaScript */
}

.courses .card-header.java {
    background: linear-gradient(45deg, #F5B230, #FF5F6D); /* Java */
}

.courses .card-header.git-github {
    background: linear-gradient(45deg, #24292F, #4C6F91); /* Git & GitHub */
}

.courses .card-header.flutter {
    background: linear-gradient(45deg, #00B3F5, #43A7FF); /* Flutter */
}

.courses .card-header.arduino {
    background: linear-gradient(45deg, #FFAB00, #E55B51); /* Arduino */
}

.courses .card-header.robotics-kit {
    background: linear-gradient(45deg, #70C1B3, #8A4B7D); /* Robotics Kit */
}

.courses .card-header.electronics {
    background: linear-gradient(45deg, #F1E8B8, #E5C7A9); /* Electronics */
}

.courses .card-header.abacus {
    background: linear-gradient(45deg, #F1C6F1, #F672A7); /* Abacus */
}

.courses .card-header.chess {
    background: linear-gradient(45deg, #8D6E63, #D7C5A6); /* Chess */
}


/* Course Icon */
.course-icon {
    width: 100px;
    height: 100px;
    background: white;
    border: 4px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: -30px;
    z-index: 2;
}

/* Card Content Section */
.courses .card-content {
    padding: 25px 15px 15px; /* Adjusted padding for smaller space */
}

.courses .card-content h2 {
    font-size: 18px;
    color: #f8b240;
    margin: 10px 0 5px;
}

.courses .card-content p {
    font-size: 14px;
    color: #555;
    margin: 0 0 15px;
}

.courses .read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f8b240;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.courses .read-more:hover {
    background-color: #e5962d;
}

/* Container for the Join Us button */
.courses .join-us-container {
    margin-top: 40px; /* Space between courses and the button */
    width: 100%; /* Full width of the section */
    display: flex;
    justify-content: center;  /* Aligns button horizontally */
}

/* Style for the Join Us button */
.courses .join-us-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #F0B7FF, #FF86B8); /* Gradient */
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block; /* Ensure it's treated as a block */
}

.courses .join-us-btn:hover {
    background: linear-gradient(45deg, #FF5EC0, #36C6E5);
    transform: scale(1.05);
}

.courses .join-us-btn:active {
    transform: scale(0.98);
}


/* General form styling */
.booking-form-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.booking-form-container h2 {
    text-align: center;
    color: #f8b240;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Form layout */
.form-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

form {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

form label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    grid-column: span 2;
}

form input,
form select,
form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
    grid-column: span 2;
}

form textarea {
    resize: none;
    height: 100px;
}

.book-btn {
    grid-column: span 2;
    padding: 12px;
    background: linear-gradient(45deg, #36C6E5, #FF5EC0);
    color: #fff;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s ease;
}

.book-btn:hover {
    background: linear-gradient(45deg, #FF86B8, #F0B7FF);
}

/* Image styling */
.form-image {
    flex: 0.7;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    align-self: center;
}

img.form-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Success message */
.success-message {
    background: #4CAF50;
    color: white;
    padding: 15px;
    text-align: center;
    margin-top: 20px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-wrapper {
        flex-direction: column;
        align-items: center;
    }

    form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-image {
        max-width: 80%;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    form input,
    form select,
    form textarea {
        padding: 8px;
        font-size: 12px;
    }

    .book-btn {
        padding: 10px;
        font-size: 14px;
    }

    .form-image {
        max-width: 100%;
    }
}
