: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;
}

.page-header {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 20px 0 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: url('./pics/studentpic.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* 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-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 {
    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-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;
}

.pq-main-content {
    padding: 80px 0; /* Consistent with main content sections on other pages */
    background-color: var(--grey-background);
}

.pq-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px; /* More space below controls */
    gap: 25px; /* Slightly more gap */
    background-color: var(--card-background);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.filters {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filters label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1em;
}

.filters select {
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px; /* More rounded */
    background-color: var(--light-blue-bg); /* Light blue background for selects */
    font-size: 1em;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http://www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%230A2647%22%20d%3D%22M287%20197.8L159.2%2069.9c-2.3-2.3-5.3-3.5-8.5-3.5s-6.2%201.2-8.5%203.5L5.4%20197.8c-4.6%204.6-4.6%2012%200%2016.6l12.4%2012.4c4.6%204.6%2012%204.6%2016.6%200l112-112%20112%20112c4.6%204.6%2012%204.6%2016.6%200l12.4-12.4c4.6-4.6%204.6-12%200-16.6z%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 12px top 50%; /* Adjust position */
    background-size: 14px auto; /* Slightly larger arrow */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* Inner shadow for depth */
}

.search-past-questions {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 12px 22px; /* Slightly more padding */
    flex-grow: 1;
    max-width: 450px; /* Slightly wider search bar */
    box-shadow: 0 2px 8px var(--shadow-light);
    background-color: var(--text-light);
}

.search-past-questions input {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 1.1em;
    padding: 5px 0;
    background-color: transparent;
}

.search-past-questions input::placeholder {
    color: #aaa;
}

.search-past-questions i {
    color: #888;
    margin-left: 10px;
    font-size: 1.3em; /* Slightly larger icon */
}

.pq-level-section {
    margin-bottom: 80px; /* Consistent spacing */
    padding-top: 20px;
}

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

.pq-level-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 120px; /* Consistent with section titles */
    height: 5px; /* Consistent with section titles */
    background-color: var(--accent-yellow);
    border-radius: 3px;
}

.semester-section {
    margin-bottom: 40px;
    padding: 30px; /* More padding */
    background-color: var(--card-background);
    border-radius: 12px; /* More rounded */
    box-shadow: 0 4px 15px var(--shadow-light); /* Consistent shadow */
    border: 1px solid var(--border-color);
}

.semester-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2em; /* Larger semester titles */
    color: var(--secondary-blue);
    margin-bottom: 30px; /* More space below title */
    text-align: center;
    padding-bottom: 12px; /* More padding below title */
    border-bottom: 2px solid var(--light-blue-bg); /* Thicker, lighter border */
}

.pq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px; /* More generous gap */
}

.pq-card {
    background-color: var(--grey-background);
    border-radius: 12px; /* More rounded */
    box-shadow: 0 6px 20px var(--shadow-light); /* More pronounced shadow */
    padding: 30px; /* More padding */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--primary-color); /* Subtle border */
}

.pq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-medium);
}

.pq-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em; /* Larger PQ title */
    color: var(--primary-blue);
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.3;
}

.pq-details {
    font-size: 1em; /* Slightly larger details */
    color: #666;
    margin-bottom: 18px;
    text-align: left;
}

.pq-description {
    font-size: 1.05em; /* Slightly larger description */
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 30px; /* More space before button */
    flex-grow: 1;
    text-align: left;
}

/* Specific styling for the Download PQ button within past question cards */
.pq-card .btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* More gap for icon */
    margin-top: auto;
    font-size: 0.95em; /* Slightly larger font */
    padding: 10px 20px; /* Adjusted padding */
}
.btn-outline{
    background-color: #5D3A1A;
    color: #E8D4C1;
    
}
.btn-outline:hover{
    background-color: rgba(44, 85, 48, 0.95);
    
}

@keyframes fadeInStart {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* --- 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;
    }
    /* Past Questions Specific */
    .pq-controls {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 40px;
        gap: 20px;
        padding: 20px;
    }
    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    .filters select {
        width: 100%;
    }
    .search-past-questions {
        max-width: 100%;
    }
    .pq-level-section h2 {
        font-size: 2.2em;
        margin-bottom: 40px;
    }
    .semester-section {
        padding: 25px;
        margin-bottom: 30px;
    }
    .semester-section h3 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    .pq-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    .pq-card {
        padding: 25px;
    }
    .pq-card h3 {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    /* Header */
    .page-header {
        min-height: 350px;
    }
    .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;
    }
    /* Past Questions Specific */
    .pq-main-content {
        padding: 60px 0;
    }
    .pq-controls {
        padding: 18px;
    }
    .pq-level-section h2 {
        font-size: 2em;
        margin-bottom: 35px;
    }
    .semester-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    .semester-section h3 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    .pq-list {
        grid-template-columns: 1fr; /* Single column on tablets */
        gap: 25px;
    }
    .pq-card {
        padding: 20px;
    }
    .pq-card h3 {
        font-size: 1.4em;
    }
    .pq-description {
        font-size: 0.95em;
    }
    .pq-card .btn-outline {
        font-size: 0.9em;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    /* Header */
    .page-header {
        min-height: 300px;
    }
    .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;
    }
    /* Past Questions Specific */
    .pq-controls {
        gap: 15px;
    }
    .filters label {
        font-size: 1em;
    }
    .filters select {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .search-past-questions {
        padding: 10px 15px;
    }
    .search-past-questions input {
        font-size: 1em;
    }
    .search-past-questions i {
        font-size: 1.1em;
    }
    .pq-level-section h2 {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    .semester-section {
        padding: 15px;
        margin-bottom: 25px;
    }
    .semester-section h3 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }
    .pq-list {
        gap: 20px;
    }
    .pq-card {
        padding: 18px;
    }
    .pq-card h3 {
        font-size: 1.2em;
    }
    .pq-details {
        font-size: 0.9em;
    }
    .pq-description {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    .pq-card .btn-outline {
        font-size: 0.85em;
        padding: 7px 12px;
    }
}