/* ----------------- Find Courses Section ----------------- */
.find-courses {
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.find-courses::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: url('../img/find-course.jpg') no-repeat center center/cover;
    filter: blur(4px);
    z-index: 0;
}

.find-courses::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.find-container {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 90%;
    max-width: 600px;
    padding: 2vw;
}

.find-container h1 {
    font-size: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--light);
    text-shadow:
        0 0 10px var(--light-blue),
        0 0 20px var(--light-blue),
        0 0 30px var(--light-blue),
        0 0 40px var(--light-blue);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1.5s ease forwards;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--dark-grey);
}

.search-box i {
    padding: 10px;
    color: var(--grey);
}

/* ----------------- Main Wrapper ----------------- */
.main-wrapper {
    display: flex;
    justify-content: center;
    margin: 1% 0;
    width: 100%;
}

.wrapper {
    width: 95%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    gap: 20px;
}

/* ----------------- Headings Row ----------------- */
.headings-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* auto adjust */
    color: #7e7d7dff;
    gap: 10px;
    width: 100%;
}

.headings-row div {
    padding: 10px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
}

/* ----------------- Co-Container ----------------- */
.co-container {
    display: grid;
    grid-template-columns: minmax(180px, 250px) 1fr; /* sidebar + courses */
    gap: 20px;
    padding: 10px;
    width: 100%;
}

/* ----------------- Left Section ----------------- */
.left-section {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    min-width: 150px;
    max-width: 250px; /* sidebar won’t stretch too wide */
}

.left-scroll {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
}

.left-scroll ul li {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--grey);
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: color 0.3s;
}

.left-scroll ul li:hover {
    color: var(--dark-grey);
}

.left-scroll ul li.active {
    color: var(--blue);
    font-weight: bold;
}

/* ----------------- Right Section / Courses ----------------- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* responsive cards */
    gap: 20px;
    width: 100%;
}

/* ----------------- Course Card ----------------- */
.course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.course-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

/* ----------------- Course Content ----------------- */
.course-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-content small {
    font-size: 0.8rem;
    color: var(--grey);
    margin-bottom: 5px;
}

.course-content h3 {
    font-size: 1rem;
    color: var(--blue);
    margin-bottom: 10px;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.course-info p {
    font-size: 0.85rem;
    color: var(--grey);
    margin: 0;
}

.info-label {
    font-weight: 600;
    color: var(--dark-grey);
    margin-right: 5px;
}

/* ----------------- Scrollbar Styling ----------------- */
.left-scroll::-webkit-scrollbar {
    width: 6px;
}
.left-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* ----------------- Responsive (only when necessary) ----------------- */
@media (max-width: 768px) {
    .co-container {
        grid-template-columns: 1fr; /* stack sidebar + courses */
    }

    .left-section {
        border-right: none;
        border-bottom: 1px solid #ddd;
        margin-bottom: 10px;
    }
}
