/* Basic Reset & Variables */
/* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}



body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit; 
}*/
:root {
	--mcolor: #2e4396;
	--scolor: #ffb600;
    --text-dark: #333;
    --text-light: #555;
    --bg-light: #fff;
    --border-light: #e0e0e0;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
/* Container */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 900; /* Extra bold */
    color: var(--mcolor);
    margin-bottom: 10px;
}

/* Section Styles */
.course-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.section-title-yellow {
    color: var(--scolor);
}

/* Card Grid Layout */
.card-grid {
    display: flex;
    /* grid-template-columns: repeat(3, 1fr); */
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Course Card Styling */
.course-card {
	position:relative;
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden; /* Crucial for keeping rounded corners with image */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
    cursor: pointer; /* Indicate interactivity */
    display: flex; /* Use flexbox for vertical layout */
    flex-direction: column; /* Stack image and content vertically */
	width: calc(100% / 3 - 20px);
}
.course-card a{position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;}
.card-image-wrapper {
    overflow: hidden; /* Contain the scaled image */
    border-top-left-radius: 10px; /* Match card corners */
    border-top-right-radius: 10px;
}

.course-card img {
    width: 100%;
    aspect-ratio: 16 / 10; /* Adjust aspect ratio if needed */
    object-fit: cover; /* Ensure image covers the area */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth scaling */
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill remaining space */
}

.card-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    /* Set fixed height and overflow for consistency if titles vary a lot */
    /* height: 3.6em; /* Approx 2 lines */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    /* display: -webkit-box; */
    /* -webkit-line-clamp: 2; */
    /* -webkit-box-orient: vertical; */
    transition: color 0.3s ease; /* Smooth color transition */
}

.card-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex; /* Align icon and text */
    align-items: center;
    gap: 5px; /* Space between icon and text */
}

.card-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    display: flex;
    justify-content: space-between; /* Space out organizer and button */
    align-items: center; /* Vertically align items */
    flex-wrap: wrap; /* Allow wrapping on small screens if needed */
    gap: 10px; /* Space between items if they wrap */
}

.card-organizer {
    font-size: 0.85rem;
    color: var(--text-light);
	display: grid;
    margin: 0;
}

.organizer-name {
    font-weight: 700;
    color: var(--mcolor); /* Blue color for STUDII */
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--mcolor); /* Blue background */
    color: var(--bg-light); /* White text */
}

.btn-primary:hover {
    background-color: #2c3a6d; /* Darker blue on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

/* Hover Effect on Card */
.course-card:hover {
    transform: translateY(-5px); /* Lift card slightly */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Increase shadow */
}

.course-card:hover img {
    transform: scale(1.1); /* Scale image */
}

.course-card:hover .card-content h3 {
    color: var(--scolor); /* Change title color to yellow */
}

/* --- Responsive Design --- */

/* Medium Screens (Tablets) */
@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
        gap: 25px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .card-content h3 {
        font-size: 1.1rem;
    }
	.course-card {
		width:100%;
	}
}

/* Small Screens (Phones) */
@media (max-width: 576px) {
    .card-grid {
        grid-template-columns: 1fr; /* 1 column */
        gap: 20px;
    }

    .main-container {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }
     .page-header {
        margin-bottom: 30px;
     }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    .course-section {
        margin-bottom: 40px;
    }


    .card-content {
        padding: 15px;
    }

    .card-content h3 {
        font-size: 1.05rem;
    }
    .card-date, .card-organizer {
         font-size: 0.8rem;
    }
    .btn {
        padding: 7px 15px;
        font-size: 0.75rem;
        width: 60%; /* Make button full width on small screens */
        margin-top: 10px; /* Add space above button when footer wraps */
    }
    .card-footer {
        align-items: flex-start; /* Align items left */
    }

     /* Disable hover lift effect on touch devices if desired */
    .course-card:hover {
        transform: none;
        box-shadow: var(--card-shadow);
    }
    /* Keep image scale and title color change */
     .course-card:hover img {
        transform: scale(1.1);
    }
    .course-card:hover .card-content h3 {
        color: var(--scolor);
    }

}