/* ============================================================
   SKNAU Central Library Portal — Main Stylesheet
   ============================================================ */

:root {
    --primary:      #003366;
    --primary-dark: #002244;
    --primary-light:#1a4d8c;
    --secondary:    #E67E22;
    --secondary-dark:#d35400;
    --accent:       #d9a600;
    --bg:           #f5f7fa;
    --bg-white:     #ffffff;
    --text:         #222;
    --text-muted:   #666;
    --border:       #dee2e6;
    --success:      #1b5e20;
    --radius:       8px;
    --shadow:       0 2px 12px rgba(0,0,0,.08);
    --shadow-md:    0 4px 20px rgba(0,0,0,.12);
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

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

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

/* ---- Top Bar ---- */
.topbar {
    background: var(--primary-dark);
    color: #cce;
    font-size: 0.8rem;
    padding: 6px 0;
}
.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}
.topbar-inner span { display: flex; align-items: center; gap: 5px; }
.topbar-right { margin-left: auto; }
.topbar i { color: var(--secondary); }

/* ---- Header ---- */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
}
.header-brand { display: flex; align-items: center; gap: 14px; }
.header-logo { height: 60px; width: auto; }
.header-titles { display: flex; flex-direction: column; }
.header-univ { font-size: 0.78rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .4px; }
.header-lib  { font-family: 'Merriweather', serif; font-size: 1.25rem; color: var(--primary); font-weight: 700; line-height: 1.2; }
.header-sub  { font-size: 0.75rem; color: var(--text-muted); }
.header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-ndli, .btn-nlist {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 5px; font-size: 0.82rem; font-weight: 600;
    transition: all .25s;
}
.btn-ndli  { background: var(--primary); color: #fff; }
.btn-ndli:hover  { background: var(--primary-light); color: #fff; }
.btn-nlist { background: var(--secondary); color: #fff; }
.btn-nlist:hover { background: var(--secondary-dark); color: #fff; }

/* ---- Nav ---- */
.main-nav { background: var(--primary); }
.nav-inner { display: flex; align-items: center; }
.nav-links {
    display: flex; list-style: none; gap: 0;
    width: 100%;
}
.nav-links li a {
    display: flex; align-items: center; gap: 7px;
    padding: 14px 18px;
    color: rgba(255,255,255,.85);
    font-size: 0.88rem; font-weight: 500;
    transition: all .2s;
    border-bottom: 3px solid transparent;
}
.nav-links li a:hover,
.nav-links li a.active {
    color: #fff;
    background: rgba(255,255,255,.1);
    border-bottom-color: var(--secondary);
}
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.3rem; padding: 10px; cursor: pointer; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--secondary) 100%);
    color: #fff;
    padding: 64px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; }
.hero h1 { font-family: 'Merriweather', serif; font-size: 2.4rem; margin-bottom: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero p { font-size: 1.05rem; opacity: .9; max-width: 620px; margin: 0 auto 28px; }
.hero-search { display: flex; max-width: 560px; margin: 0 auto; gap: 0; }
.hero-search input {
    flex: 1; padding: 13px 18px; border: none; border-radius: 5px 0 0 5px;
    font-size: 0.95rem; outline: none;
}
.hero-search button {
    background: var(--secondary); color: #fff; border: none;
    padding: 13px 22px; border-radius: 0 5px 5px 0;
    font-weight: 600; cursor: pointer; font-size: 0.95rem;
    transition: background .2s;
}
.hero-search button:hover { background: var(--secondary-dark); }

/* ---- Ticker / Announcements ---- */
.ticker-bar {
    background: #fff3e0; border-bottom: 2px solid var(--secondary);
    display: flex; align-items: center; overflow: hidden;
}
.ticker-label {
    background: var(--secondary); color: #fff;
    padding: 8px 14px; font-weight: 700; font-size: 0.8rem;
    white-space: nowrap; letter-spacing: .5px;
}
.ticker-wrap { overflow: hidden; flex: 1; padding: 0 16px; }
.ticker-move {
    display: inline-flex; gap: 60px;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}
.ticker-move:hover { animation-play-state: paused; }
.ticker-item { font-size: 0.85rem; color: var(--primary); font-weight: 500; }
.ticker-item .badge-imp {
    background: #c62828; color: #fff;
    font-size: 0.7rem; padding: 1px 6px; border-radius: 3px; margin-right: 6px;
}
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Section ---- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-white); }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.85rem; color: var(--primary); margin-bottom: 10px;
}
.section-header p { color: var(--text-muted); max-width: 580px; margin: 0 auto; }
.section-divider {
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 14px auto 0; border-radius: 2px;
}

/* ---- Stats Bar ---- */
.stats-bar { background: var(--primary); color: #fff; padding: 28px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item h3 { font-size: 2rem; font-weight: 700; color: var(--secondary); margin-bottom: 4px; }
.stat-item p  { font-size: 0.82rem; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Quick Access ---- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.quick-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 16px;
    text-align: center; transition: all .25s; cursor: pointer;
    text-decoration: none; color: var(--text);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); color: var(--primary); }
.quick-card i { font-size: 2rem; color: var(--primary); }
.quick-card:hover i { color: var(--secondary); }
.quick-card span { font-size: 0.88rem; font-weight: 600; }

/* ---- Featured Resources ---- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.resource-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
    display: flex; flex-direction: column; gap: 10px;
    transition: all .25s; position: relative; overflow: hidden;
}
.resource-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--primary); border-radius: 4px 0 0 4px;
}
.resource-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.resource-card:hover::before { background: var(--secondary); }
.resource-card h4 { font-size: 0.97rem; color: var(--primary); font-weight: 600; }
.resource-card p  { font-size: 0.83rem; color: var(--text-muted); flex: 1; }
.resource-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.badge-oa { background: #e8f5e9; color: #2e7d32; font-size: 0.72rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.badge-sub { background: #fff3e0; color: #e65100; font-size: 0.72rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.resource-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.82rem; font-weight: 600; color: var(--primary);
    padding: 5px 12px; border: 1px solid var(--primary); border-radius: 4px;
    transition: all .2s;
}
.resource-link:hover { background: var(--primary); color: #fff; }

/* ---- Category Tabs ---- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.cat-tab {
    padding: 7px 18px; border-radius: 20px;
    border: 2px solid var(--border); background: #fff;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: all .2s; color: var(--text-muted);
}
.cat-tab:hover, .cat-tab.active {
    border-color: var(--primary); background: var(--primary); color: #fff;
}
.cat-panel { display: none; }
.cat-panel.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

/* ---- Announcements ---- */
.ann-list { display: flex; flex-direction: column; gap: 14px; }
.ann-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    display: flex; gap: 14px; align-items: flex-start;
}
.ann-icon { font-size: 1.4rem; color: var(--secondary); flex-shrink: 0; margin-top: 2px; }
.ann-card h4 { font-size: 0.95rem; color: var(--primary); margin-bottom: 4px; }
.ann-card p  { font-size: 0.83rem; color: var(--text-muted); }
.ann-card.important { border-left: 4px solid #c62828; }
.ann-card.important .ann-icon { color: #c62828; }

/* ---- Info Boxes ---- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.info-box {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; text-align: center;
}
.info-box i { font-size: 2rem; color: var(--secondary); margin-bottom: 12px; }
.info-box h4 { font-size: 1rem; color: var(--primary); margin-bottom: 8px; }
.info-box p { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Hours Table ---- */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr:last-child td { border-bottom: none; }
.closed { color: #c62828; }
.open   { color: var(--success); }

/* ---- Page Hero ---- */
.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; padding: 40px 0; text-align: center;
}
.page-hero h1 { font-family: 'Merriweather', serif; font-size: 2rem; margin-bottom: 8px; }
.page-hero p  { opacity: .85; font-size: 0.95rem; }
.breadcrumb { font-size: 0.82rem; opacity: .7; margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }

/* ---- Staff Cards ---- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.staff-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px; text-align: center; }
.staff-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--bg); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); }
.staff-card h4 { font-size: 0.92rem; color: var(--primary); margin-bottom: 4px; }
.staff-card span { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.contact-info p { margin-bottom: 12px; font-size: 0.9rem; }
.contact-info i { color: var(--secondary); margin-right: 8px; width: 18px; }
.map-embed { border-radius: var(--radius); overflow: hidden; height: 300px; }
.map-embed iframe { width: 100%; height: 100%; border: none; }

/* ---- Footer ---- */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.8); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 36px; margin-bottom: 36px; }
.footer-logo { height: 56px; margin-bottom: 14px; }
.footer-col p { font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.7); font-size: 0.85rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--secondary); }
.hours-list { list-style: none; }
.hours-list li { display: flex; justify-content: space-between; font-size: 0.83rem; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { color: rgba(255,255,255,.6); font-size: 1.1rem; transition: color .2s; }
.footer-social a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,.5); margin-bottom: 4px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .topbar-inner { gap: 10px; font-size: 0.75rem; }
    .topbar-right { display: none; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .header-actions { align-self: flex-end; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; width: 100%;
        background: var(--primary-dark);
    }
    .nav-links.open { display: flex; }
    .nav-links li a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .hero h1 { font-size: 1.6rem; }
    .hero-search { flex-direction: column; }
    .hero-search input, .hero-search button { border-radius: 5px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.4rem; }
}
