/* Universal Styles */
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Section */
.sub-header {
    height: 50vh;
    width: 100%;
    background-image: linear-gradient(rgba(4, 9, 30, 0.7), rgba(4, 9, 30, 0.7)), url('images/coursess.jpg');
    background-position: center;
    background-size: cover;
    text-align: center;
    color: white;
    position: relative;
}

.sub-header h1 {
    margin-top: 140px;
    font-size: 42px;
    font-weight: bold;
}

/* Navigation */
nav {
    display: flex;
    padding: 2% 4%;
    justify-content: space-between;
    align-items: center;
}

nav img {
    width: 135px;
}

.nav-links {
    flex: 1;
    text-align: right;
}

.nav-links ul {
    list-style: none;
}

.nav-links ul li {
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.nav-links ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background: #f44336;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links ul li:hover::after {
    width: 100%;
}

/* Hide menu icons on larger screens */
.fa-bars,
.fa-times {
    display: none;
}



/* Hide fa-times and fa-bars on desktop view */
@media (min-width: 769px) {
    .fa-times, .fa-bars {
        display: none !important;
    }
}

/* Responsive Navigation for mobile screens */
@media (max-width: 768px) {
    .fa-bars,
    .fa-times {
        display: block;
        font-size: 22px;
        color: white;
        cursor: pointer;
    }

    .fa-bars {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .fa-times {
        position: absolute;
        top: 20px;
        right: 20px;
        display: none; /* Initially hidden */
    }

    .nav-links {
        position: fixed;
        background: #f44336;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: right 0.5s;
        flex-direction: column;
        padding-top: 50px;
    }

    .nav-links.show {
        right: 0;
    }

    .nav-links ul {
        padding: 30px;
    }

    .nav-links ul li {
        display: block;
        padding: 15px 0;
    }

    .nav-links ul li a {
        font-size: 18px;
        color: #fff;
    }
}


/* Course Intro Section */
.course-intro {
    width: 80%;
    margin: auto;
    text-align: center;
    padding: 60px 0;
}

.course-intro h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

.course-intro p {
    font-size: 20px;
    line-height: 1.8;
    color: #555;
}

/* Courses Section */
.course {
    width: 80%;
    margin: auto;
    padding: 60px 0;
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.course-col {
    flex-basis: 30%;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.course-col:hover {
    transform: translateY(-5px);
}

.course-col img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.course-col h3 {
    margin: 15px 0 10px;
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.course-col p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.course-col .hero-btn {
    text-decoration: none;
    background: #f44336;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.course-col .hero-btn:hover {
    background: #c93025;
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 30px 0;
    background: #222;
    color: white;
}

.footer h4 {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 20px;
}

.icons .fa {
    color: #f44336;
    margin: 0 15px;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.icons .fa:hover {
    color: #f5f1f1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .course-col {
        flex-basis: 100%;
    }
}
