html {
    scroll-behavior: smooth;
}
.instructor-profile {
    scroll-margin-top: 20px;
}

/* Main heading */
.main-title {
    text-align: center;
    margin: 3rem 0 2rem 0;
    color: #000000;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Course grid - Mobile First */
.course-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 6rem;
    padding: 0 1rem;
}

/* Tablet and Desktop - flexible grid */
@media (min-width: 768px) {
    .course-list {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 3rem;
        row-gap: 5rem;
        margin-bottom: 8rem;
        padding: 0 2rem;
    }
}

/* Course cards */
.course-card {
    background: #FFEEE1;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1rem 2rem 2rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #BF3232;
}

/* Course title */
.course-title {
    color: #000000;
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* Course description */
.course-description {
    margin-bottom: 1.5rem;
    color: #000000;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 1rem;
    text-align: justify;
}

/* Instructor section with photo and button */
.instructor-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
}

/* Instructor photo link */
.instructor-photo-link {
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.instructor-photo-link:hover {
    transform: scale(1.1);
}

/* Instructor photo */
.instructor-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #e0e0e0;
    background-image: linear-gradient(45deg, #c0c0c0 25%, transparent 25%),
                      linear-gradient(-45deg, #c0c0c0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #c0c0c0 75%),
                      linear-gradient(-45deg, transparent 75%, #c0c0c0 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    transition: all 0.3s ease;
}

.instructor-photo-link:hover .instructor-photo {
    box-shadow: 0 0 0 4px #BF3232;
}

/* Instructor link */
.instructor-link {
    color: #BF3232;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.instructor-link:hover {
    color: #A52A2A;
    text-decoration: underline;
}

/* Book button */
.book-button {
    display: inline-block;
    background-color: #BF3232;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    white-space: nowrap;
}

.book-button:hover {
    background-color: #A52A2A;
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .main-title {
        font-size: 2rem;
        margin: 2rem 0;
        padding-top: 4rem;
    }

    .course-card {
        padding: 1.5rem;
    }

    .course-title {
        font-size: 1rem;
    }

    .instructor-section {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .instructor-photo {
        width: 55px;
        height: 55px;
    }

    .instructor-link {
        font-size: 1.1rem;
    }

    .book-button {
        padding: 0.7rem 1.8rem;
        font-size: 1rem;
    }
}
