/* ==========================================================================
   Perpustakaan IAIN Curup — custom homepage
   ========================================================================== */

:root {
	--lib-green-900: #122c22;
	--lib-green-800: #16342a;
	--lib-green-700: #1b4332;
	--lib-green-600: #235141;
	--lib-green-500: #2d6a4f;
	--lib-green-100: #e8f0ea;
	--lib-gold: #d4a017;
	--lib-gold-light: #f0c75e;
	--lib-text: #1c231f;
	--lib-muted: #5b6b62;
	--lib-bg-alt: #f5f8f6;
	--lib-border: #e3e9e5;
	--lib-radius: 16px;
	--lib-shadow: 0 10px 30px rgba(18, 44, 34, 0.08);
	--lib-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--lib-font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lib-home { font-family: var(--lib-font); color: var(--lib-text); line-height: 1.5; }
.lib-home h1, .lib-home h2, .lib-home h3, .lib-home h4,
.lib-home .lib-eyebrow, .lib-home .lib-brand-text strong, .lib-home .lib-footer-brand strong,
.lib-home .lib-stat-card strong, .lib-home .lib-btn-pill, .lib-home .lib-card-icon strong {
	font-family: var(--lib-font-display);
}

/* ---------- Scroll reveal ---------- */
.lib-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.lib-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.lib-reveal { opacity: 1; transform: none; transition: none; }
}
.lib-home--page { overflow-x: hidden; }
.lib-home * { box-sizing: border-box; }
.lib-home img { max-width: 100%; display: block; }
.lib-home a { text-decoration: none; color: inherit; }
.lib-home ul { list-style: none; margin: 0; padding: 0; }
.lib-home .lib-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.lib-home .lib-eyebrow {
	display: flex; align-items: center; gap: 10px;
	font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
	color: var(--lib-green-700); margin-bottom: 10px;
}
.lib-home .lib-eyebrow .lib-ic { font-size: 1rem; }
.lib-home .lib-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.lib-home .lib-section-head h2 { margin: 0; font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 800; }
.lib-home .lib-section-head .lib-more { font-weight: 700; color: var(--lib-green-700); font-size: 0.92rem; white-space: nowrap; }
.lib-home .lib-section-head .lib-more:hover { text-decoration: underline; }
.lib-home section { padding: 64px 0; }
.lib-home section.lib-alt { background: var(--lib-bg-alt); position: relative; }

/* ---------- Wave dividers ---------- */
.lib-wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 2; pointer-events: none; }
.lib-wave svg { width: 100%; height: 50px; display: block; }

/* ---------- Header ---------- */
.lib-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--lib-border); }
.lib-header .lib-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.lib-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.lib-brand-mark { width: 46px; height: 46px; border-radius: 50%; background: var(--lib-green-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lib-brand-mark svg { width: 22px; height: 22px; }
.lib-brand-mark--plain { background: none; }
.lib-brand-mark--plain .lib-brand-logo-img { width: 100%; height: 100%; object-fit: contain; }
.lib-brand-text { line-height: 1.2; }
.lib-brand-text strong { display: block; font-size: 0.95rem; font-weight: 800; color: var(--lib-green-800); }
.lib-brand-text span { display: block; font-size: 0.72rem; color: var(--lib-muted); }

.lib-nav { display: flex; align-items: center; gap: 26px; flex: 1; justify-content: center; }
.lib-nav > li { position: relative; }
.lib-nav > li > a { font-size: 0.92rem; font-weight: 600; color: var(--lib-text); padding: 8px 0; display: inline-block; }
.lib-nav > li.is-active > a { color: var(--lib-green-700); border-bottom: 2px solid var(--lib-green-700); }
.lib-nav > li:hover > a { color: var(--lib-green-700); }
.lib-nav .lib-caret { font-size: 0.6rem; margin-left: 4px; opacity: 0.6; }
.lib-nav .lib-dropdown {
	position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px;
	box-shadow: var(--lib-shadow); border-radius: 10px; padding: 8px; opacity: 0; visibility: hidden;
	transform: translateY(6px); transition: all .15s ease; border: 1px solid var(--lib-border);
}
.lib-nav > li:hover .lib-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lib-nav .lib-dropdown a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 0.88rem; font-weight: 500; }
.lib-nav .lib-dropdown a:hover { background: var(--lib-green-100); color: var(--lib-green-700); }

.lib-dropdown-item { position: relative; }
.lib-dropdown-item > a { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.lib-subdropdown {
	position: absolute; top: 0; left: 100%; margin-left: 6px; background: #fff; min-width: 220px;
	box-shadow: var(--lib-shadow); border-radius: 10px; padding: 8px; opacity: 0; visibility: hidden;
	transform: translateX(6px); transition: all .15s ease; border: 1px solid var(--lib-border);
}
.lib-dropdown-item:hover .lib-subdropdown { opacity: 1; visibility: visible; transform: translateX(0); }
.lib-subdropdown a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 0.88rem; font-weight: 500; }
.lib-subdropdown a:hover { background: var(--lib-green-100); color: var(--lib-green-700); }

.lib-header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.lib-icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--lib-border); display: flex; align-items: center; justify-content: center; color: var(--lib-text); }
.lib-icon-btn:hover { border-color: var(--lib-green-700); color: var(--lib-green-700); }
.lib-btn-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--lib-green-700); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.lib-btn-pill:hover { background: var(--lib-green-800); color: #fff; }
.lib-icon-btn svg, .lib-btn-pill svg, .lib-search button svg { width: 18px; height: 18px; flex-shrink: 0; }

.lib-logo-img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.lib-partner-badge .lib-logo-img { width: 20px; height: 20px; padding: 0; object-fit: contain; }
.lib-nav-toggle {
	display: none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--lib-border);
	background: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; flex-shrink: 0;
}
.lib-nav-toggle span { display: block; width: 18px; height: 2px; background: var(--lib-green-800); transition: transform .15s ease, opacity .15s ease; }
.lib-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lib-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.lib-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.lib-hero { position: relative; color: #fff; padding: 110px 0 90px; background-size: cover; background-position: center 35%; }
.lib-hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(18,44,34,0.55) 0%, rgba(18,44,34,0.75) 55%, rgba(18,44,34,0.95) 100%);
}
.lib-hero .lib-wrap { position: relative; z-index: 1; text-align: center; }
.lib-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: 0.01em; margin: 0 0 10px; color: #fff !important; }
.lib-hero .lib-tagline { color: var(--lib-gold-light) !important; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin: 0 auto 14px; }
.lib-hero p { max-width: 640px; margin: 0 auto 32px; color: rgba(255,255,255,0.9) !important; font-size: 0.98rem; }

.lib-search {
	max-width: 620px; margin: 0 auto 26px; display: flex; background: #fff; border-radius: 999px;
	padding: 6px; box-shadow: var(--lib-shadow);
}
.lib-search input { flex: 1; border: 0; outline: 0; padding: 12px 18px; font-size: 0.95rem; border-radius: 999px; color: var(--lib-text); min-width: 0; }
.lib-search button {
	display: flex; align-items: center; gap: 8px; background: var(--lib-green-700); color: #fff; border: 0;
	padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.92rem; cursor: pointer; flex-shrink: 0;
}
.lib-search button:hover { background: var(--lib-green-800); }

.lib-quicklinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lib-quicklinks a {
	display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.55);
	padding: 9px 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: #fff;
	white-space: nowrap;
}
.lib-quicklinks a:hover { background: rgba(255,255,255,0.15); }

/* ---------- Icon grids (Akses Cepat / Sumber Informasi / Layanan Unggulan) ---------- */
.lib-grid6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.lib-grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.lib-card-icon {
	background: #fff; border: 1px solid var(--lib-border); border-radius: var(--lib-radius);
	padding: 22px 12px; text-align: center; transition: transform .15s ease, box-shadow .15s ease;
}
.lib-card-icon:hover { transform: translateY(-4px); box-shadow: var(--lib-shadow); border-color: transparent; }
.lib-card-icon .lib-ic-circle {
	width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--lib-green-100);
	display: flex; align-items: center; justify-content: center;
}
.lib-card-icon .lib-ic-circle svg { width: 24px; height: 24px; color: var(--lib-green-700); }
.lib-card-icon strong { display: block; font-size: 0.88rem; font-weight: 700; }
.lib-card-icon small { display: block; font-size: 0.74rem; color: var(--lib-muted); margin-top: 3px; }

.lib-iconrow-item { text-align: center; }
.lib-iconrow-item .lib-ic-circle { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; background: var(--lib-green-100); display: flex; align-items: center; justify-content: center; }
.lib-iconrow-item .lib-ic-circle svg { width: 20px; height: 20px; color: var(--lib-green-700); }
.lib-iconrow-item span { display: block; font-size: 0.78rem; font-weight: 600; }

/* ---------- Stats ---------- */
.lib-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lib-stat-card {
	background: linear-gradient(160deg, var(--lib-green-700), var(--lib-green-900));
	color: #fff; border-radius: var(--lib-radius); padding: 26px 20px; text-align: center;
}
.lib-stat-card .lib-ic-circle { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.lib-stat-card .lib-ic-circle svg { width: 22px; height: 22px; }
.lib-stat-card strong { display: block; font-size: 1.6rem; font-weight: 800; }
.lib-stat-card span { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-top: 4px; }

/* ---------- Testimoni ---------- */
.lib-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lib-testi-card { background: #fff; border: 1px solid var(--lib-border); border-radius: var(--lib-radius); padding: 26px 22px; }
.lib-testi-mark { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 3rem; line-height: 1; color: var(--lib-gold); margin-bottom: -8px; }
.lib-testi-card p { font-size: 0.9rem; color: var(--lib-text); margin: 0 0 18px; line-height: 1.6; }
.lib-testi-person { display: flex; align-items: center; gap: 12px; }
.lib-testi-person img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lib-testi-person strong { display: block; font-size: 0.88rem; }
.lib-testi-person span { display: block; font-size: 0.76rem; color: var(--lib-muted); }

/* ---------- Berita + Agenda ---------- */
.lib-news-agenda { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.lib-news-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--lib-border); }
.lib-news-item:last-child { border-bottom: 0; }
.lib-news-item .lib-thumb { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--lib-green-100); }
.lib-news-item .lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-news-item .lib-news-body h3 { margin: 0 0 4px; font-size: 0.92rem; font-weight: 700; line-height: 1.35; }
.lib-news-item .lib-news-body time { font-size: 0.76rem; color: var(--lib-muted); }

.lib-agenda-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--lib-border); }
.lib-agenda-item:last-child { border-bottom: 0; }
.lib-agenda-date { flex-shrink: 0; width: 54px; height: 54px; border-radius: 10px; background: var(--lib-green-700); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lib-agenda-date strong { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.lib-agenda-date span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; }
.lib-agenda-body h3 { margin: 0 0 4px; font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.lib-agenda-body p { margin: 0; font-size: 0.78rem; color: var(--lib-muted); }

/* ---------- Inovasi & Ruang Literasi ---------- */
.lib-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lib-space-card { position: relative; border-radius: var(--lib-radius); overflow: hidden; height: 180px; display: block; transition: transform .15s ease, box-shadow .15s ease; }
.lib-space-card:hover { transform: translateY(-4px); box-shadow: var(--lib-shadow); }
.lib-space-card img { width: 100%; height: 100%; object-fit: cover; }
.lib-space-card .lib-space-label {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px;
	background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
	color: #fff; font-weight: 700; font-size: 0.9rem;
}

/* ---------- Akreditasi banner ---------- */
.lib-accred { background: linear-gradient(120deg, var(--lib-green-800), var(--lib-green-900)); color: #fff; border-radius: var(--lib-radius); padding: 40px; display: flex; align-items: center; gap: 40px; }
.lib-accred img { width: 140px; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.35); flex-shrink: 0; }
.lib-accred .lib-accred-body { flex: 1; }
.lib-accred h2 { margin: 0 0 8px; font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 800; color: #fff !important; }
.lib-accred p { margin: 0 0 18px; color: rgba(255,255,255,0.88) !important; font-size: 0.92rem; max-width: 560px; }
.lib-accred-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lib-accred-seal { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--lib-gold-light); font-size: 0.9rem; }
.lib-accred-seal svg { width: 30px; height: 30px; }
.lib-accred .lib-btn-pill { background: var(--lib-gold); color: var(--lib-green-900); }
.lib-accred .lib-btn-pill:hover { background: var(--lib-gold-light); color: var(--lib-green-900); }

/* ---------- Kolaborasi ---------- */
.lib-partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.lib-partner-badge {
	display: flex; align-items: center; gap: 10px; border: 1px solid var(--lib-border); border-radius: 999px;
	padding: 10px 20px; font-weight: 700; font-size: 0.85rem; color: var(--lib-green-800); background: #fff;
}
.lib-partner-badge svg { width: 18px; height: 18px; color: var(--lib-green-700); }

/* ---------- Footer ---------- */
.lib-footer { background: var(--lib-green-900); color: rgba(255,255,255,0.85); padding: 56px 0 0; }
.lib-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.lib-footer h4 { color: #fff; font-size: 0.95rem; font-weight: 700; margin: 0 0 16px; }
.lib-footer ul li { margin-bottom: 9px; font-size: 0.85rem; }
.lib-footer ul li a:hover { color: var(--lib-gold-light); }
.lib-footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lib-footer-brand strong { color: #fff; font-size: 1rem; }
.lib-footer p.lib-desc { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin: 0 0 16px; }
.lib-social { display: flex; gap: 10px; }
.lib-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.lib-social a:hover { background: var(--lib-gold); color: var(--lib-green-900); }
.lib-social svg { width: 16px; height: 16px; }
.lib-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.lib-footer address { font-style: normal; }
.lib-contact-line { display: flex; gap: 8px; font-size: 0.85rem; margin-bottom: 10px; }
.lib-contact-line svg { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; color: var(--lib-gold-light); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
	.lib-header-actions .lib-icon-btn { display: none; }
	.lib-nav-toggle { display: flex; }
	.lib-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
		flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px;
		border-bottom: 1px solid var(--lib-border); box-shadow: var(--lib-shadow);
	}
	.lib-nav.is-open { display: flex; }
	.lib-nav > li { width: 100%; }
	.lib-nav > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--lib-border); }
	.lib-nav > li.is-active > a { border-bottom: 1px solid var(--lib-green-700); }
	.lib-nav .lib-dropdown {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
		border: 0; display: none; padding: 0 0 0 14px; margin-top: -6px;
	}
	.lib-nav > li:hover .lib-dropdown { display: block; }
	.lib-subdropdown {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
		border: 0; display: none; padding: 0 0 0 14px; margin: 0;
	}
	.lib-dropdown-item:hover .lib-subdropdown { display: block; }
	.lib-grid6 { grid-template-columns: repeat(3, 1fr); }
	.lib-grid7 { grid-template-columns: repeat(4, 1fr); }
	.lib-stats { grid-template-columns: repeat(2, 1fr); }
	.lib-news-agenda { grid-template-columns: 1fr; }
	.lib-grid3 { grid-template-columns: repeat(2, 1fr); }
	.lib-testi-grid { grid-template-columns: 1fr; }
	.lib-footer-grid { grid-template-columns: 1fr 1fr; }
	.lib-accred { flex-direction: column; text-align: center; }
	.lib-accred-actions { justify-content: center; }
}
@media (max-width: 560px) {
	.lib-grid6, .lib-grid7 { grid-template-columns: repeat(2, 1fr); }
	.lib-grid3 { grid-template-columns: 1fr; }
	.lib-stats { grid-template-columns: 1fr 1fr; }
	.lib-footer-grid { grid-template-columns: 1fr; }
	.lib-search { flex-direction: column; border-radius: 18px; }
	.lib-search button { border-radius: 14px; justify-content: center; }
	.lib-search input { text-align: center; }
	.lib-brand-text { max-width: 130px; }
	.lib-header-actions .lib-btn-label { display: none; }
	.lib-header-actions .lib-btn-pill { padding: 10px; border-radius: 50%; }
}
