/* General Styles - Applied to all screen sizes first (Mobile First approach is good practice) */
body {
    font-family: 'Georgia', serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    font-size: 16px; /* Base font size for calculations */
}

img {
    max-width: 100%; /* Makes all images responsive by default */
    height: auto;    /* Maintains aspect ratio */
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 5%; /* Use percentage for side padding */
    text-align: center;
    border-bottom: 5px solid #ffd700; /* Gold accent */
}

header .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap; /* Allow wrapping if needed on very small screens */
}

header .logo-img {
    width: 50px; /* Slightly smaller for mobile */
    height: auto;
    margin-right: 10px;
}

header h1 {
    margin: 0;
    font-size: 1.8rem; /* Adjusted for mobile */
    font-family: 'Times New Roman', Times, serif;
    width: 100%; /* Ensure it takes full width if logo wraps */
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header p.tagline {
    font-size: 1rem; /* Adjusted for mobile */
    color: #ccc;
    margin-top: 0;
    font-style: italic;
}

nav ul {
    padding: 0;
    list-style: none;
    text-align: center;
    background: #444;
    margin-top: 0.5rem;
}

nav ul li {
    display: block; /* Stack links vertically on mobile */
    border-bottom: 1px solid #555; /* Separator for stacked links */
}

nav ul li:last-child {
    border-bottom: none;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    padding: 0.8rem 1rem; /* Adjusted padding */
    display: block; /* Make the whole area clickable */
    transition: background-color 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    background-color: #ffd700;
    color: #333;
}

.container {
    width: 90%; /* More width for mobile */
    max-width: 1200px; /* Max width for larger screens */
    margin: 20px auto;
    overflow: hidden;
    padding: 15px; /* Adjusted padding */
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.hero {
    background: url('../images/hero-background.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 60px 15px; /* Adjusted padding */
    position: relative;
    margin-bottom: 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay for text visibility */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2rem; /* Adjusted for mobile */
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem; /* Adjusted for mobile */
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 10px 15px; /* Slightly smaller padding */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
}

.btn:hover {
    background: #333;
    color: #ffd700;
}

.section-title {
    text-align: center;
    font-size: 1.5rem; /* Adjusted for mobile */
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffd700;
    display: inline-block;
}

.center-title-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.profile-section {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    align-items: center; /* Center items when stacked */
    gap: 20px;
    margin-bottom: 30px;
    text-align: center; /* Center text for mobile stacked view */
}

.profile-image {
    flex-shrink: 0;
    text-align: center; /* Ensure image is centered if it's smaller than container */
}

.profile-image img {
    width: 200px; /* Fixed size, but max-width: 100% will prevent overflow */
    /* max-width: 100%; already set globally */
    border-radius: 10px;
    border: 5px solid #ffd700;
}

.profile-bio {
    text-align: left; /* Revert to left align for bio text if desired, or keep center */
}
.profile-bio h3 {
    color: #333;
    font-size: 1.5rem; /* Adjusted for mobile */
    margin-top: 0;
    text-align: center; /* Center heading within bio */
}

.profile-bio .highlight {
    color: #d1a000;
    font-weight: bold;
}

.course-grid, .campus-life-grid {
    display: grid;
    /* minmax(280px, 1fr) makes cards a bit more flexible on smaller screens */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.course-card, .activity-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.course-card img, .activity-card img {
    /* max-width: 100%; height: auto; already set globally */
    max-height: 180px; /* Adjusted max height */
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.course-card h3, .activity-card h3 {
    color: #333;
    margin-top: 0;
    font-size: 1.2rem; /* Adjusted for mobile */
}

footer {
    text-align: center;
    padding: 20px 5%; /* Use percentage for side padding */
    background: #333;
    color: #fff;
    margin-top: 30px;
    font-size: 0.9rem;
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    body {
        font-size: 17px; /* Slightly larger base font for tablets */
    }

    header {
        padding: 1.5rem 0; /* Revert to original padding for larger screens */
        text-align: left; /* Align logo/title left, nav right typical pattern */
    }

    header .logo-container {
        justify-content: flex-start; /* Align logo to the left */
        margin-left: 5%;
        width: auto; /* Allow nav to float right */
        margin-bottom: 0;
    }
    header h1 {
        font-size: 2.2rem; /* Increase font size */
        margin-left: 20px; /* Space between logo and title if logo is an image */
        text-align: left;
    }
    header p.tagline {
        font-size: 1.1rem; /* Increase font size */
        margin-left: 5%; /* Align with logo container */
        margin-top: -10px;
        text-align: left;
    }

    nav {
        float: right; /* Example: float nav to right */
        margin-top: -50px; /* Adjust as needed to align with header content */
        margin-right: 5%;
    }

    nav ul {
        background: none; /* Remove background if floating */
        margin-top: 0;
    }

    nav ul li {
        display: inline-block; /* Horizontal navigation */
        border-bottom: none; /* Remove border for horizontal nav */
    }

    nav ul li a {
        padding: 0.8rem 1.2rem; /* Restore padding */
        display: inline-block; /* Ensure it's inline */
    }
    nav ul li a:hover, nav ul li a.active {
        background-color: #ffd700; /* Keep hover consistent */
        color: #333;
    }


    .container {
        width: 85%; /* Adjust container width */
        padding: 20px;
    }

    .hero {
        padding: 80px 20px;
    }
    .hero h2 {
        font-size: 2.8rem;
    }
    .hero p {
        font-size: 1.3rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .profile-section {
        flex-direction: row; /* Horizontal layout for profile */
        align-items: flex-start; /* Align items to the top */
        text-align: left; /* Left align text in profile section */
    }
    .profile-image img {
        width: 250px; /* Restore profile image size */
    }
    .profile-bio {
        text-align: left; /* Ensure bio text is left-aligned */
    }
    .profile-bio h3 {
        font-size: 1.8rem;
        text-align: left; /* Align heading left */
    }

    .course-card h3, .activity-card h3 {
        font-size: 1.3rem;
    }

}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    body {
        font-size: 18px; /* Larger base font for desktops */
    }
    header h1 {
        font-size: 2.5rem;
    }
    header p.tagline {
        font-size: 1.2rem;
    }

    .hero {
        padding: 100px 20px;
    }
    .hero h2 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .container {
        width: 80%;
    }
    /* Adjust nav fine-tuning if needed for large screens */
    nav {
         margin-top: -60px; /* Example adjustment for larger header */
    }
}