:root {
    --primary-color: #800020; /* Deep burgundy - royal and prestigious */
    --secondary-color: #5D3A1A; /* Rich brown */
    --accent-color: #D4AF37; /* Classic gold */
    --text-light: #FFFFFF;
    --text-dark: #2C1810; /* Dark chocolate */
    --background-light: #FDF8F3; /* Warm ivory */
    --border-color: #E8D4C1; /* Light beige */
    --card-background: #F5ECE4; /* Soft ivory */
    --shadow-light: rgba(128, 0, 32, 0.05);
    --shadow-medium: rgba(128, 0, 32, 0.1);
    --shadow-strong: rgba(128, 0, 32, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--grey-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

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

/* --- Header Styles (for sub-pages like Student Hub) --- */
.page-header {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 20px 0 0;
    min-height: 450px; /* Consistent height with home page hero for better image display */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: url('./pics/coursespic.jpg');
    background-size: cover;
    background-position: center center; /* Ensure it's centered */
    background-attachment: fixed; /* Fixed background effect */
}

/* Overlay for Header Section to improve text readability */
.page-header .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent dark overlay */
    z-index: 1; /* Ensures overlay is above background but below content */
}

.navbar-top-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    max-width: 1200px;
    z-index: 10; /* Ensure logo is above overlay */
}

.logo img {
    height: 85px; /* Consistent logo size */
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.header-content-small {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 30px; /* Consistent padding */
    padding-bottom: 30px;
    z-index: 5; /* Ensure text is above overlay */
}

.header-content-small h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5em; /* Consistent heading size */
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.header-content-small p {
    font-size: 1.2em; /* Consistent paragraph size */
    opacity: 0.95;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* --- Main Navigation Styles --- */
.main-nav-container {
    background-color: var(--secondary-color);
    padding: 18px 0;
    box-shadow: 0 4px 15px var(--shadow-medium);
    z-index: 100;
    position: sticky;
    top: 0;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    height: auto;
    align-items: center;
}

.main-nav li a {
    color: var(--text-light);
    font-weight: 600;
    padding: 8px 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 1.05em;
    position: relative;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    transform: translateY(-2px);
}

/* --- Footer Styles --- */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    font-size: 0.95em;
    box-shadow: 0 -2px 10px var(--shadow-medium);
}

/* --- President's Corner --- */
.president-corner {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(44, 85, 48, 0.95);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    opacity: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.president-corner:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.president-corner img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.president-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.president-name {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.president-title {
    margin: 0;
    font-size: 1em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Open Sans', sans-serif;
}

/* --- Main Content Area for Student Hub Page --- */
.student-hub-main-content {
    padding: 80px 0;
    background-color: var(--text-light);
}

.student-hub-section {
    margin-bottom: 80px;
    padding: 40px;
    background-color: var(--border-color);
    
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-medium);
    border: 1px solid var(--text-dark);
}

.student-hub-section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8em;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 120px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 3px;
}

/* --- Latest Announcements Section --- */
.announcements-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 20px;
}

.announcements-list li {
    background: linear-gradient(135deg, #E8D4C1, #ffff);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 18px 25px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    font-size: 1.05em;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.5;
}

.announcements-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.announcements-list li:last-child {
    margin-bottom: 0;
}

.announcements-list li i {
    color: var(--primary-blue);
    font-size: 1.5em;
    flex-shrink: 0;
    padding-top: 2px;
}

.announcement-date {
    font-weight: 700;
    color: darkgreen;
    white-space: nowrap;
    margin-right: 5px;
}

/* --- Quick Links Section --- */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.quick-link-card {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 35px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-link-card:hover::before {
    opacity: 1;
}

.quick-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-strong);
    background-color: #2C1810;
}

.quick-link-card i {
    font-size: 3.5em;
    color: var(--accent-yellow);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.quick-link-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    margin-bottom: 12px;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.quick-link-card p {
    font-size: 1em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* --- Social Media Links Section --- */
.social-links {
    background-color: var(--border-color); /* White background */
}

.social-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust minmax for more icons */
    gap: 25px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.social-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.social-icon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-strong);
    background-color: #2C1810; 
}

.social-icon-card i {
    font-size: 3.5em; /* Large icons */
    color: var(--accent-yellow);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.social-icon-card:hover i {
    color: var(--text-light); /* White icon on hover */
}

.social-icon-card span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-light);
}


/* --- Responsive adjustments --- */
@media (max-width: 992px) {
    /* Header */
    .header-content-small h1 {
        font-size: 2.8em;
    }
    .header-content-small p {
        font-size: 1em;
    }
    /* Navigation */
    .main-nav {
        gap: 15px;
        padding: 0 10px;
    }
    .main-nav li a {
        font-size: 0.95em;
        padding: 6px 8px;
    }
    /* President Corner */
    .president-corner {
        bottom: 20px;
        right: 20px;
        padding: 12px 18px;
        gap: 12px;
    }
    .president-corner img {
        width: 60px;
        height: 60px;
    }
    .president-name {
        font-size: 1.2em;
    }
    .president-title {
        font-size: 0.9em;
    }
    /* Student Hub Specific */
    .student-hub-section {
        padding: 30px;
        margin-bottom: 60px;
    }
    .section-title {
        font-size: 2.2em;
        margin-bottom: 40px;
    }
    .announcements-list li {
        font-size: 1em;
        padding: 15px 20px;
        gap: 15px;
    }
    .announcements-list li i {
        font-size: 1.3em;
    }
    .quick-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }
    .quick-link-card h3 {
        font-size: 1.5em;
    }
    .quick-link-card i {
        font-size: 3em;
    }
    /* Math Puzzle (on Student Hub) */
    .math-puzzle-section .section-title {
        font-size: 2.2em;
    }
    .math-puzzle-section .puzzle-content {
        padding: 30px;
        gap: 20px;
    }
    .math-puzzle-section #puzzle-question {
        font-size: 1.6em;
    }
    .math-puzzle-section #puzzle-answer {
        font-size: 1em;
    }
    /* Social Links */
    .social-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
    }
    .social-icon-card i {
        font-size: 3em;
    }
    .social-icon-card span {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    /* Header */
    .page-header {
        min-height: 350px; /* Adjust height for tablets */
    }
    .header-content-small h1 {
        font-size: 2.2em;
    }
    .header-content-small p {
        font-size: 0.9em;
    }
    /* Navigation */
    .main-nav {
        gap: 10px;
        padding: 0 5px;
    }
    .main-nav li a {
        font-size: 0.85em;
        padding: 5px 6px;
    }
    /* President Corner */
    .president-corner {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
        gap: 10px;
    }
    .president-corner img {
        width: 50px;
        height: 50px;
    }
    .president-name {
        font-size: 1.1em;
    }
    .president-title {
        font-size: 0.8em;
    }
    /* Student Hub Specific */
    .student-hub-section {
        padding: 25px;
        margin-bottom: 50px;
    }
    .section-title {
        font-size: 2em;
        margin-bottom: 35px;
    }
    .announcements-list li {
        font-size: 0.9em;
        padding: 12px 15px;
        gap: 12px;
    }
    .announcements-list li i {
        font-size: 1.2em;
    }
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .quick-link-card h3 {
        font-size: 1.3em;
    }
    .quick-link-card i {
        font-size: 2.5em;
    }
    /* Math Puzzle (on Student Hub) */
    .math-puzzle-section .section-title {
        font-size: 2em;
    }
    .math-puzzle-section .puzzle-content {
        padding: 25px;
        gap: 15px;
    }
    .math-puzzle-section #puzzle-question {
        font-size: 1.4em;
    }
    .math-puzzle-section #puzzle-answer {
        font-size: 0.95em;
    }
    /* Social Links */
    .social-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    .social-icon-card i {
        font-size: 2.5em;
    }
    .social-icon-card span {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    /* Header */
    .page-header {
        min-height: 300px; /* Adjust height for mobile */
    }
    .header-content-small h1 {
        font-size: 1.8em;
    }
    .header-content-small p {
        font-size: 0.8em;
    }
    /* Navigation */
    .main-nav {
        gap: 5px;
        padding: 0;
    }
    .main-nav li a {
        font-size: 0.75em;
        padding: 4px 4px;
    }
    /* President Corner */
    .president-corner {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        gap: 8px;
    }
    .president-corner img {
        width: 40px;
        height: 40px;
    }
    .president-name {
        font-size: 1em;
    }
    .president-title {
        font-size: 0.7em;
    }
    /* Student Hub Specific */
    .student-hub-section {
        padding: 18px;
        margin-bottom: 40px;
    }
    .section-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    .announcements-list li {
        font-size: 0.85em;
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .announcements-list li i {
        font-size: 1em;
    }
    .announcements-list li .announcement-date {
        margin-right: 0;
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    /* Math Puzzle (on Student Hub) */
    .math-puzzle-section .section-title {
        font-size: 1.8em;
    }
    .math-puzzle-section .puzzle-content {
        padding: 20px;
        gap: 10px;
    }
    .math-puzzle-section #puzzle-question {
        font-size: 1.2em;
    }
    .math-puzzle-section #puzzle-answer {
        font-size: 0.85em;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    /* Social Links */
    .social-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    .social-icon-card {
        padding: 15px 10px;
    }
    .social-icon-card i {
        font-size: 2em;
        margin-bottom: 10px;
    }
    .social-icon-card span {
        font-size: 0.8em;
    }
}
