: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(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Chalkboard Preloader Styles --- */
#preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-image: url('./pics/3656235.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #F5E6D3; /* Warm cream color for chalk effect */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999 !important;
    transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
}

#preloader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    z-index: 0;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 5vh;
    width: 100%;
    z-index: 1;
}

.preloader-logo {
    height: 10vh;
    width: auto;
    object-fit: contain;
    margin: 0 10px;
}

.preloader-line {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    animation: chalk-write 2s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.preloader-line.line-1 {
    animation-name: chalk-write, shake-and-color;
    animation-duration: 2s, 1s;
    animation-delay: 0s, 2s;
    animation-timing-function: ease-out, ease-in-out;
    animation-fill-mode: forwards, forwards;
    animation-iteration-count: 1, infinite;
}

.preloader-line.line-2 {
    color: #D4A76A; /* Gold accent color */
    animation-name: chalk-write, shake-and-color;
    animation-duration: 2s, 1s;
    animation-delay: 1s, 3s;
    animation-timing-function: ease-out, ease-in-out;
    animation-fill-mode: forwards, forwards;
    animation-iteration-count: 1, infinite;
}

.preloader-line.erasing {
    animation: chalk-erase 1s ease-in forwards;
}

@keyframes chalk-write {
    to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

@keyframes chalk-erase {
    from {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: scale(1);
        opacity: 1;
    }
    to {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        transform: scale(1.1);
        opacity: 0;
    }
}

@keyframes shake-and-color {
    0% { transform: rotate(0deg); color: #F5E6D3; }
    25% { transform: rotate(1deg); color: #D4A76A; }
    50% { transform: rotate(-1deg); color: #8F754F; }
    75% { transform: rotate(1deg); color: #D4A76A; }
    100% { transform: rotate(0deg); color: #F5E6D3; }
}

@media (min-width: 768px) {
    .preloader-line { font-size: 4rem; }
}

.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 and Hero Section */
.hero-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 20px 0 0;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    background-image: url('./pics/nams.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero-section .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;
}

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

.logo img {
    height: 80px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 50px;
    padding-bottom: 50px;
    z-index: 5;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5em;
    margin-bottom: 10px;
    line-height: 1.1;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.hero-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 15px var(--shadow-medium);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #C0955C;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-strong);
}

/* Navigation */
.main-nav-container {
    background-color: var(--secondary-color);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

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

/* Search Section */
.search-section {
    background-color: var(--card-background);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    background-color: var(--background-light);
}

.search-box i {
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 1.2em;
    flex-shrink: 0;
}

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

.search-box input::placeholder {
    color: #A89C8B;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 999;
    display: none;
    border: 1px solid var(--border-color);
}

.search-suggestions.active { display: block; }

.search-suggestions a {
    display: block;
    padding: 12px 20px;
    color: var(--primary-color);
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.search-suggestions a:hover {
    background-color: var(--border-color);
}

.search-suggestions a.highlighted {
    background-color: var(--border-color);
    font-weight: 600;
}

.result-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.result-item:last-child { border-bottom: none; }

.result-item strong {
    color: var(--primary-color);
    margin-right: 5px;
    flex-shrink: 0;
}

.result-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1;
    word-break: break-word;
}

.result-item a:hover,
.result-item:hover a { text-decoration: underline; }

.result-item.highlighted {
    background-color: var(--border-color);
    font-weight: 600;
}

.search-suggestions .no-results {
    padding: 15px 20px;
    color: var(--text-dark);
    text-align: center;
    font-style: italic;
    background-color: var(--card-background);
}

/* Why Study Section */
.why-study-section {
    background-color: var(--background-light);
    padding: 60px 0;
    text-align: left;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

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

.why-study-section ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    padding-left: 20px;
}

.why-study-section ul li {
    font-size: 1.1em;
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.why-study-section ul li i {
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 5px;
    font-size: 1.2em;
}

/* Quick Links / Feature Cards */
.quick-links-section {
    background-color: var(--card-background);
    padding: 60px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.card p {
    font-size: 1em;
    margin-bottom: 25px;
    flex-grow: 1;
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: auto;
    text-transform: uppercase;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background-color: #C0955C;
}

/* Daily Insight Section */
.daily-insight-section {
    background-color: var(--background-light);
    padding: 60px 0;
    text-align: center;
}

.insight-content {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#daily-fact {
    font-family: 'Montserrat', sans-serif;
    font-size: 2em;
    font-style: italic;
    line-height: 1.4;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9em;
}

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

.president-corner:hover {
    opacity: 1;
    transform: translateY(-3px);
}

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

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

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

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

/* Responsive adjustments remain exactly the same */
@media (max-width: 768px) {
    .navbar-top-logo {
        justify-content: center;
        padding: 0 20px;
    }
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 0 5px;
        height: auto;
        align-items: center;
    }
    .main-nav li {
        margin: 0;
    }
    .main-nav li a {
        font-size: 0.9em;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content h2 {
        font-size: 1.5em;
    }
    .hero-content p {
        font-size: 1em;
    }

    .why-study-section h2 {
        font-size: 2em;
    }
    .why-study-section ul {
        grid-template-columns: 1fr;
    }

    .daily-insight-section .section-title {
        font-size: 2em;
    }
    .insight-content {
        padding: 30px;
    }
    #daily-fact {
        font-size: 1.5em;
    }

    .search-box {
        max-width: 90%;
        padding: 8px 15px;
    }
    .search-box input {
        font-size: 1em;
    }

    .search-box i {
        font-size: 1em;
        margin-right: 5px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .president-corner {
        bottom: 18px;
        right: 18px;
        padding: 10px 15px;
        gap: 10px;
    }
    .president-corner img {
        width: 50px;
        height: 50px;
    }
    .president-name {
        font-size: 1.1em;
    }
    .president-title {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content h2 {
        font-size: 1.2em;
    }
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.8em;
    }

    .main-nav {
        gap: 8px;
        justify-content: space-around;
        padding: 0 5px;
        height: auto;
        align-items: center;
    }
    .main-nav li a {
        padding: 5px 5px;
        font-size: 0.8em;
        white-space: nowrap;
    }

    .search-box {
        padding: 6px 10px;
        border-radius: 25px;
    }
    .search-box input {
        font-size: 0.9em;
        padding: 3px;
    }
    .search-box i {
        font-size: 1em;
        margin-right: 5px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .president-corner {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        gap: 8px;
    }
    .president-corner img {
        width: 45px;
        height: 45px;
    }
    .president-name {
        font-size: 1em;
    }
    .president-title {
        font-size: 0.7em;
    }
}