/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

header .logo span {
    color: teal;
}

header nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
}

header .nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

header .nav-links a:hover {
    background-color: #f0f0f0;
}

header .sign-in-btn {
    font-size: 14px;
    background-color: teal;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    position: absolute;
    top: 15px;
    right: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

header .sign-in-btn:hover {
    background-color: #005f4f;
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background-color: #fefefe;
    padding: 50px 0;
    text-align: center;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Allow elements to wrap on smaller screens */
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.hero-content h1 span {
    color: teal;
}

.hero-content p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
}

/* EDIT: Added text-decoration removal for buttons */
.hero-content .sign-in-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none; /* REMOVE UNDERLINE */
}

.hero-content .sign-in-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.hero-images img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
}

/* Buttons */
button,
a.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: teal;
    color: white;
    text-decoration: none; /* REMOVE UNDERLINE */
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover,
a.button:hover {
    background-color: #005f4f;
    transform: scale(1.05);
}

a.button {
    text-decoration: none; /* REMOVE UNDERLINE */
}

/* Features Section */
.features {
    padding: 50px 0;
    text-align: center;
}

/* EDIT: Adjusted container to align cards in columns */
.features-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.feature {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1 1 calc(33.333% - 20px); /* Ensure 3 columns */
    max-width: calc(33.333% - 20px);
}

.feature img {
    max-width: 50px;
    margin-bottom: 10px;
}

/* Responsive Fix for Features Section */
@media (max-width: 768px) {
    .features-container {
        flex-direction: column;
        align-items: center; /* Center cards on small screens */
    }

    .feature {
        max-width: 100%;
    }
}

/* Popular Courses Section */
.popular-courses {
    padding: 50px 0;
    background-color: #f9f9f9;
}

.course-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.course-card {
    background-color: white;
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* Ensure 3 columns */
    max-width: calc(33.333% - 20px);
}

.course-card img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* EDIT: Align buttons and remove underline */
.course-card a {
    display: inline-block;
    padding: 10px 20px;
    background-color: teal;
    color: white;
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none; /* REMOVE UNDERLINE */
    margin-top: 10px; /* Align buttons consistently */
}

.course-card a:hover {
    background-color: #005f4f;
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
}

footer .footer-content {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
    }

    .features-container,
    .course-container {
        flex-direction: column;
        gap: 30px;
    }

    .course-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    header .nav-links {
        flex-direction: column;
        text-align: center;
    }
}

.sign-up-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group input:focus {
    border-color: teal;
    outline: none;
}
