/*
Theme Name: College Library
Theme URI:
Author:
Description: Blueprint theme for the college library website - top bar, logo banner, dropdown navigation, hero banner and notices/new-arrivals landing sections. Structure only; content, colors and images to be finalised in WordPress admin.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: college-library
*/

/* ---------- Reset (minimal) ---------- */
* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	color: #222;
	background: #f4f6e9;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #000;
	color: #fff;
	padding: 8px 16px;
	z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.top-bar {
	background: #f4f6e9;
	text-align: right;
	font-size: 13px;
	padding: 6px 16px;
}
.top-bar a { margin-left: 12px; }
.top-bar a:hover { text-decoration: underline; }

/* ---------- Banner (logo + title) ---------- */
.site-banner {
	background: #e7efc6;
	padding: 16px;
	text-align: center;
}
.site-banner .banner-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	max-width: 1100px;
	margin: 0 auto;
	flex-wrap: wrap;
}
.site-banner .banner-inner .custom-logo-link { flex: 0 0 auto; }
.site-banner .banner-text { flex: 1 1 auto; min-width: 260px; }
.site-banner .custom-logo { max-height: 90px; width: auto; }
.site-banner h1 {
	margin: 0;
	font-size: 28px;
	color: #8a1c1c;
}
.site-banner p.site-description {
	margin: 0 0 4px;
	font-size: 18px;
	font-style: italic;
	color: #a4a41d;
}
.site-banner .accreditation {
	margin-top: 4px;
	font-size: 13px;
	color: #212b41;
}
.site-banner .accreditation .dot {
	color: #c90064;
	font-size: 8px;
	margin: 0 8px;
	vertical-align: middle;
}
.site-banner .library-title {
	margin-top: 10px;
	font-size: 26px;
	font-weight: bold;
	color: #1a4fa0;
	letter-spacing: 2px;
}

/* ---------- Primary navigation with dropdowns ---------- */
.primary-nav-wrap {
	background: #f4f6e9;
	border-bottom: 3px solid #e0791a;
}
.nav-toggle {
	display: none;
	background: #e0791a;
	color: #fff;
	border: 0;
	padding: 10px 16px;
	font-size: 16px;
	width: 100%;
	text-align: left;
	cursor: pointer;
}
.primary-nav {
	display: flex;
	flex-wrap: wrap;
}
.primary-nav > li {
	position: relative;
	flex: 1 1 0;
}
.primary-nav > li > a {
	display: block;
	padding: 10px 16px;
	margin: 5px 3px;
	background: #e88a2e;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	text-align: center;
	white-space: nowrap;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.primary-nav > li:first-child > a { background: #6b9c1f; }
.primary-nav > li:hover > a,
.primary-nav > li.focus > a,
.primary-nav > li > a:focus {
	background: #c86b12;
}

/* dropdown (sub-menu) */
.primary-nav ul.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #ffffff;
	box-shadow: 0 6px 14px rgba(0,0,0,0.15);
	z-index: 100;
}
.primary-nav ul.sub-menu li a {
	display: block;
	padding: 10px 16px;
	color: #222;
	font-size: 14px;
	border-bottom: 1px solid #eee;
}
.primary-nav ul.sub-menu li a:hover { background: #f4f6e9; }

.primary-nav li:hover > ul.sub-menu,
.primary-nav li.focus > ul.sub-menu {
	display: block;
}

.primary-nav li.menu-item-has-children > a::after {
	content: " \25BE";
	font-size: 11px;
}

/* ---------- Hero slider ---------- */
.hero-slider {
	position: relative;
	max-width: 1200px;
	margin: 20px auto;
	overflow: hidden;
	background: #222;
	min-height: 320px;
}
.hero-slider .slide {
	display: none;
	position: relative;
}
.hero-slider .slide.is-active { display: block; }
.hero-slider .slide img {
	width: 100%;
	height: 380px;
	object-fit: cover;
}
.hero-slider .slide .caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0,0,0,0.55);
	color: #fff;
	padding: 12px 20px;
	font-size: 18px;
}
.hero-slider .slide-dots {
	position: absolute;
	bottom: 10px;
	right: 16px;
	display: flex;
	gap: 6px;
}
.hero-slider .slide-dots button {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	background: rgba(255,255,255,0.6);
	cursor: pointer;
	padding: 0;
}
.hero-slider .slide-dots button.is-active { background: #fff; }

/* ---------- Notice ticker ---------- */
.notice-ticker {
	background: #8a1c1c;
	color: #fff;
	display: flex;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	font-size: 14px;
}
.notice-ticker .label {
	background: #5c1010;
	padding: 8px 14px;
	white-space: nowrap;
	font-weight: bold;
}
.notice-ticker marquee, .notice-ticker .ticker-text {
	padding: 8px 14px;
}

/* ---------- Landing 3-column section ---------- */
.landing-columns {
	max-width: 1200px;
	margin: 24px auto;
	display: grid;
	grid-template-columns: 1fr 2fr 1fr;
	gap: 16px;
	padding: 0 16px;
}
.landing-columns .col {
	background: #fff;
	border: 1px solid #ddd;
}
.landing-columns .col-header {
	background: #6b9c1f;
	color: #fff;
	padding: 10px 14px;
	font-weight: bold;
}
.landing-columns .col.notices .col-header { background: #2e7d32; }
.landing-columns .col.welcome .col-header {
	background: #e7dfa6;
	color: #222;
	text-align: center;
}
.landing-columns .col-body { padding: 14px; font-size: 14px; }
.landing-columns .col-body ul li { padding: 4px 0; border-bottom: 1px dashed #eee; }

@media (max-width: 900px) {
	.landing-columns { grid-template-columns: 1fr; }
}

/* ---------- WebOPAC / Useful Links / Quick Links / Librarian message ---------- */
.webopac-box,
.useful-links,
.quick-links {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}
.webopac-box h3,
.useful-links h3,
.quick-links h3 {
	margin: 0 0 8px;
	font-size: 15px;
	color: #1a4fa0;
}
.webopac-desc { font-size: 12px; color: #666; margin: 0 0 8px; }
.webopac-search { display: flex; gap: 6px; }
.webopac-search input {
	flex: 1;
	padding: 6px 8px;
	border: 1px solid #ccc;
}
.webopac-search button {
	background: #6b9c1f;
	color: #fff;
	border: 0;
	padding: 6px 12px;
	cursor: pointer;
}
.webopac-note { font-size: 12px; color: #999; font-style: italic; }

.link-list li { padding: 4px 0; border-bottom: 1px dashed #eee; }
.link-list a:hover { text-decoration: underline; }

.librarian-message {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}
.librarian-message h3 { margin: 0 0 8px; font-size: 15px; color: #8a1c1c; }
.librarian-signature { font-weight: bold; text-align: right; }

.visitor-count {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #eee;
	font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer {
	background: #2b2b2b;
	color: #ddd;
	margin-top: 30px;
}
.site-footer .footer-widgets {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	padding: 30px 16px;
}
.site-footer .footer-widgets h2,
.site-footer .footer-widgets .widgettitle {
	font-size: 16px;
	color: #fff;
	margin-top: 0;
}
.site-footer .footer-bottom {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	text-align: center;
	padding: 14px;
	font-size: 13px;
	background: #1c1c1c;
}
.site-footer .footer-bottom-links a { color: #9fd3ff; }
.site-footer .footer-bottom-links a:hover { text-decoration: underline; }
@media (max-width: 900px) {
	.site-footer .footer-widgets { grid-template-columns: 1fr; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.primary-nav {
		display: none;
		flex-direction: column;
	}
	.primary-nav.is-open { display: flex; }
	.primary-nav > li > a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.3); }
	.primary-nav ul.sub-menu { position: static; box-shadow: none; display: none; }
	.primary-nav li.focus > ul.sub-menu { display: block; }
}
