/*
Theme Name: PUSDIG PRO
Theme URI: https://pusdigsmkpgri1sby.com/
Author: Tim IT SMK PGRI 1 Surabaya
Description: Tema WordPress Premium Perpustakaan Digital SMK PGRI 1 Surabaya (PUSDIG SKAGRISA) - NPP: 3578021H2000003. Kompatibel semua versi PHP, pembaca buku PDF draggable, serta memuat menu, pos, dan laman yang sudah ada.
Version: 4.0 PRO
Text Domain: pusdig-pro
*/

:root {
    --primary: #14452f;
    --primary-dark: #0c2b1d;
    --primary-light: #e8f3ee;
    --accent: #f38020;
    --accent-hover: #d96b10;
    --gold: #facc15;
    --crimson: #991b1b;
    --bg-body: #f6f8f7;
    --surface: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 10px rgba(20, 69, 47, 0.06);
    --shadow-md: 0 12px 28px -6px rgba(20, 69, 47, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }

.top-bar { background: var(--primary-dark); color: #e2e8f0; font-size: 0.78rem; padding: 6px 0; border-bottom: 2px solid var(--accent); }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.npp-badge { background: rgba(243, 128, 32, 0.2); color: #fed7aa; border: 1px solid rgba(243, 128, 32, 0.4); padding: 2px 10px; border-radius: 999px; font-weight: 700; }

.site-header { background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 900; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo-wrap { width: 54px; height: 54px; border-radius: 50%; background: #000000; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid var(--accent); flex-shrink: 0; }
.brand-logo { width: 100%; height: 100%; object-fit: cover; }
.brand-info h1 { font-size: 1.15rem; font-weight: 800; color: var(--primary); line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.pro-tag { background: linear-gradient(135deg, var(--accent), var(--crimson)); color: #ffffff; font-size: 0.65rem; padding: 2px 7px; border-radius: 6px; font-weight: 800; }
.brand-info span { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); display: block; }

.desktop-nav ul { display: flex; list-style: none; gap: 6px; flex-wrap: wrap; }
.desktop-nav li { position: relative; }
.desktop-nav a { padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; color: var(--text-muted); transition: all 0.2s ease; display: inline-block; }
.desktop-nav a:hover { color: var(--primary); background-color: var(--primary-light); }
.desktop-nav .current-menu-item > a, .desktop-nav .current_page_item > a, .desktop-nav a.active { background-color: var(--primary); color: #ffffff; box-shadow: 0 4px 12px rgba(20, 69, 47, 0.25); }
.desktop-nav ul ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px; box-shadow: var(--shadow-md); border-radius: 12px; border: 1px solid var(--border); padding: 6px; z-index: 950; }
.desktop-nav li:hover > ul { display: block; }
.desktop-nav ul ul a { width: 100%; padding: 8px 12px; }

.hero-section { padding-top: 24px; }
.slider-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--primary-dark); min-height: 410px; display: flex; align-items: flex-end; }
.slider-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slider-overlay { position: relative; z-index: 2; width: 100%; padding: 56px 36px 36px; background: linear-gradient(to top, rgba(12, 43, 29, 0.96) 0%, rgba(12, 43, 29, 0.68) 55%, transparent 100%); color: #ffffff; }
.badge-school { display: inline-block; background: var(--accent); color: #ffffff; font-weight: 800; font-size: 0.76rem; padding: 5px 14px; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase; }
.slider-overlay h2 { font-size: 1.95rem; font-weight: 800; line-height: 1.25; margin-bottom: 10px; max-width: 820px; }
.slider-overlay p { font-size: 1rem; color: #e2e8f0; max-width: 680px; margin-bottom: 20px; }

.quick-search-bar { margin: -24px auto 0; position: relative; z-index: 10; max-width: 780px; background: var(--surface); padding: 10px; border-radius: 14px; box-shadow: var(--shadow-md); border: 1px solid var(--border); display: flex; gap: 10px; }
.quick-search-bar input { flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 0.95rem; }
.quick-search-bar button { background: var(--primary); color: #ffffff; padding: 10px 22px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer; }

.identity-section { margin-top: 32px; background: var(--surface); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); position: relative; overflow: hidden; }
.identity-section::before { content: ''; position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: linear-gradient(to bottom, var(--primary), var(--accent), var(--crimson)); }
.identity-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.identity-title-group h2 { font-size: 1.45rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.identity-title-group p { color: var(--text-muted); font-size: 0.95rem; }
.npp-pill { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(20, 69, 47, 0.2); padding: 8px 16px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-box { background: var(--bg-body); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: flex; align-items: flex-start; gap: 12px; }
.contact-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-text small { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.contact-text span, .contact-text a { font-size: 0.92rem; font-weight: 700; color: var(--text-main); word-break: break-word; }

.services-section { margin-top: 36px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-heading h3 { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); }
.see-all-link { font-size: 0.88rem; font-weight: 700; color: var(--primary); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: all 0.25s ease; display: block; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.service-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.service-card h4 { font-size: 1.12rem; font-weight: 800; margin-bottom: 6px; }
.service-card p { font-size: 0.88rem; color: var(--text-muted); }

.news-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card-modern { background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.post-card-modern:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-thumb { position: relative; display: block; height: 220px; background: var(--primary-dark); overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; color: #fff; font-weight: 800; text-align: center; }
.date-pill-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: #2563eb; color: #ffffff; font-size: 0.78rem; font-weight: 800; padding: 5px 12px; border-radius: 8px; }
.post-card-content { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.post-card-content h4 { font-size: 1.08rem; font-weight: 800; color: var(--text-main); line-height: 1.35; margin-bottom: 8px; }
.post-card-meta, .post-card-excerpt { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 12px; }
.btn-open-pdf { width: 100%; background: var(--primary); color: #ffffff; font-weight: 700; padding: 10px 14px; border-radius: 10px; font-size: 0.86rem; border: none; cursor: pointer; }

.pdf-floating-window { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 860px; background: #ffffff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); border: 2px solid var(--primary); z-index: 2500; flex-direction: column; overflow: hidden; resize: both; }
.pdf-window-header { background: var(--primary-dark); color: #ffffff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: move; user-select: none; border-bottom: 3px solid var(--accent); }
.pdf-window-title { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; overflow: hidden; }
.pdf-drag-badge { background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 800; padding: 2px 7px; border-radius: 5px; }
.pdf-window-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pdf-window-controls button { background: rgba(255,255,255,0.16); color: #fff; border: none; padding: 5px 10px; border-radius: 7px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.pdf-window-controls .btn-close-pdf { background: #dc2626; }
.pdf-edit-drawer { background: #f1f5f9; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pdf-edit-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-edit-row input { flex: 1; min-width: 160px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.82rem; }
.pdf-edit-row button, .pdf-edit-row a { background: var(--primary); color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 700; border: none; cursor: pointer; }
.pdf-window-body { height: 500px; background: #1e293b; }
.pdf-window-body iframe { width: 100%; height: 100%; border: none; display: block; }
.floating-show-pdf-btn { position: fixed; bottom: 84px; right: 20px; z-index: 2600; background: var(--accent); color: #fff; border: none; padding: 12px 18px; border-radius: 999px; font-weight: 800; font-size: 0.85rem; cursor: pointer; box-shadow: 0 10px 25px rgba(243, 128, 32, 0.4); }
.inline-pdf-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.inline-pdf-toolbar { background: var(--primary-light); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline-pdf-toolbar button { background: var(--primary); color: #fff; border: none; padding: 6px 12px; border-radius: 7px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }

.page-content-wrap { margin-top: 28px; background: var(--surface); border-radius: var(--radius-lg); padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

.site-footer { margin-top: 56px; background: var(--primary-dark); color: #cbd5e1; padding: 36px 0; text-align: center; font-size: 0.9rem; border-top: 4px solid var(--accent); }
.site-footer strong { color: #ffffff; }
.site-footer p + p { margin-top: 6px; font-size: 0.85rem; opacity: 0.85; }

.mobile-bottom-nav { display: none; }

@media (max-width: 992px) {
    .contact-grid, .services-grid, .news-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .slider-card { min-height: 330px; }
}

@media (max-width: 768px) {
    body { padding-bottom: 78px; }
    .top-bar, .desktop-nav { display: none; }
    .header-inner { height: 66px; justify-content: center; }
    .brand-logo-wrap { width: 44px; height: 44px; }
    .brand-info h1 { font-size: 1rem; }
    .slider-card { min-height: 250px; }
    .slider-overlay { padding: 24px 18px 20px; }
    .slider-overlay h2 { font-size: 1.18rem; }
    .quick-search-bar { margin-top: 14px; }
    .identity-section, .page-content-wrap { padding: 20px 16px; }
    .contact-grid, .news-cards-grid { grid-template-columns: 1fr; gap: 12px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pdf-window-body { height: 380px; }

    .mobile-bottom-nav { display: flex; align-items: center; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(20, 69, 47, 0.1); z-index: 1000; }
    .mobile-bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; gap: 4px; position: relative; }
    .mobile-bottom-nav a svg { width: 22px; height: 22px; stroke-width: 2.2; }
    .mobile-bottom-nav a.active { color: var(--primary); }
    .mobile-bottom-nav a.active::before { content: ''; position: absolute; top: 0; width: 30px; height: 3.5px; background: var(--accent); border-radius: 0 0 4px 4px; }
    .mobile-bottom-nav a.active svg { color: var(--accent); }
}