/* 
   Caussanel College of Arts and Science - Primary Style 
   Theme: Loyola College Inspired (Dark Blue & Gold)
*/

:root {
    --primary-blue: #002147;
    --secondary-gold: #FDC800;
    --text-dark: #333;
    --text-light: #fff;
    --bg-light: #f4f4f4;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@500;700&display=swap');

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
}

/* Header Sections */
.top-bar {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.top-bar a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.top-btn {
    background: var(--secondary-gold);
    color: var(--primary-blue) !important;
    padding: 3px 12px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    margin-right: 5px;
    display: inline-block;
}

.top-btn:hover {
    background: #fff;
    color: var(--primary-blue) !important;
}

.top-bar a:not(.top-btn):hover {
    color: var(--secondary-gold);
}

.search-box {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 150px;
}

.search-btn {
    background: var(--secondary-gold);
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 2px;
}

header {
    background: #fff;
    padding: 20px 5%;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo img {
    width: 100px;
    height: 100px;
}

.college-details h1 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.college-details h2 {
    font-size: 1.1rem;
    color: #555;
    font-weight: 400;
}

.college-details .recognition {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Interactive Enhancements */
nav.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.5s;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-gold);
    color: var(--primary-blue);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1500;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    position: relative;
    border-top: 10px solid var(--secondary-gold);
}

.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Stat Counters */
.stats-section {
    background: var(--primary-blue);
    color: #fff;
    padding: 80px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--secondary-gold);
    margin-bottom: 10px;
}

/* Navigation Fixed correction */
nav {
    background: var(--primary-blue);
    position: relative; /* Changed from sticky to relative to handle JS scroll toggle */
    z-index: 1000;
}

.nav-container {
    list-style: none;
    display: flex;
    padding: 0 5%;
}

.nav-container li {
    position: relative;
}

.nav-container li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.nav-container li a:hover {
    background: var(--secondary-gold);
    color: var(--primary-blue);
}

/* News Ticker (Sticky Bottom) */
.news-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--secondary-gold);
    color: var(--primary-blue);
    padding: 10px;
    z-index: 2000;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.ticker-label {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 5px 15px;
    margin-right: 15px;
    white-space: nowrap;
}

.ticker-content marquee {
    flex-grow: 1;
}

/* Main Content */
.main-wrapper {
    padding-bottom: 60px; /* Space for ticker */
}

.hero-slider {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    background: rgba(0, 33, 71, 0.8);
    color: var(--text-light);
    padding: 40px;
    max-width: 600px;
    text-align: center;
    border-top: 5px solid var(--secondary-gold);
}

/* Footer */
footer {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 50px 5% 100px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    color: var(--secondary-gold);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* Responsiveness */
@media (max-width: 1024px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 300px;
    }
    
    .hero-content {
        padding: 20px;
        margin: 0 5%;
    }
}
