/* ===========================
   SDN MAGELANG 4 - MAIN CSS
   =========================== */

:root {
  --primary: #1a4b8c;
  --primary-dark: #0f2f5a;
  --primary-light: #2563b8;
  --accent: #e8a020;
  --accent-dark: #c4841a;
  --text: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(26,75,140,0.10);
  --shadow-lg: 0 8px 40px rgba(26,75,140,0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ===== TOPBAR ===== */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,.85); font-size: 13px; padding: 7px 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar-right { display: flex; gap: 20px; }
.topbar span { display: flex; align-items: center; gap: 6px; }
.topbar i { color: var(--accent); }

/* ===== NAVBAR ===== */
.navbar { background: var(--white); box-shadow: 0 2px 16px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 999; transition: all .3s; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 36px; line-height: 1; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: var(--font-heading); font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.logo-tagline { font-size: 11px; color: var(--text-light); font-weight: 500; letter-spacing: .3px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); transition: all .2s; }
.nav-links a:hover, .nav-links a.active { background: var(--primary); color: var(--white); }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--primary); }

/* ===== CAROUSEL ===== */
.carousel-section { position: relative; height: 520px; overflow: hidden; background: var(--primary-dark); }
.carousel-slides { display: flex; height: 100%; transition: transform .7s cubic-bezier(.4,0,.2,1); }
.carousel-slide { min-width: 100%; height: 100%; position: relative; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; }
.carousel-slide img.slide-bg { position: absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.35; }
.slide-pattern { position: absolute; inset:0; background-image: radial-gradient(circle at 20% 80%, rgba(232,160,32,.15) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%); }
.slide-content { position: relative; z-index: 2; text-align: center; color: var(--white); padding: 0 40px; max-width: 800px; }
.slide-content h2 { font-family: var(--font-heading); font-size: clamp(28px, 5vw, 54px); font-weight: 800; line-height: 1.15; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.slide-content p { font-size: clamp(14px, 2vw, 18px); opacity: .9; margin-bottom: 28px; font-weight: 300; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 50px; font-weight: 600; font-size: 15px; transition: all .2s; cursor: pointer; border: none; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,160,32,.4); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,.6); color: var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

.carousel-nav { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .3s; border: none; }
.carousel-dot.active { background: var(--accent); width: 28px; border-radius: 5px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); color: white; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; z-index: 10; transition: all .2s; }
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

/* ===== WELCOME SECTION ===== */
.welcome-section { padding: 70px 0; background: var(--white); }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.section-label { display: inline-block; background: rgba(26,75,140,.08); color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 5px 14px; border-radius: 50px; margin-bottom: 14px; }
.section-title { font-family: var(--font-heading); font-size: clamp(26px, 3.5vw, 40px); font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: 18px; }
.section-title span { color: var(--primary); }
.divider { width: 60px; height: 4px; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 2px; margin: 16px 0 20px; }
.kepala-card { background: var(--bg); border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.kepala-photo { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; border: 4px solid var(--primary); background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-size: 60px; }
.kepala-photo img { width: 100%; height: 100%; object-fit: cover; }
.kepala-name { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--primary); }
.kepala-title { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.kepala-nip { font-size: 12px; color: var(--text-light); }
.badge-ks { display: inline-block; background: var(--primary); color: var(--white); font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 50px; margin-bottom: 10px; }

/* ===== LAYANAN DIGITAL ===== */
.layanan-section { padding: 70px 0; background: var(--bg); }
.section-header { text-align: center; margin-bottom: 48px; }
.layanan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.layanan-card { background: var(--white); border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all .3s; position: relative; overflow: hidden; }
.layanan-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.layanan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.layanan-icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(26,75,140,.08); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 28px; color: var(--primary); transition: all .3s; }
.layanan-card:hover .layanan-icon { background: var(--primary); color: var(--white); }
.layanan-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.layanan-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ===== ARTIKEL & PENGUMUMAN HOME ===== */
.home-content { padding: 70px 0; background: var(--white); }
.home-content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.content-section-title { font-family: var(--font-heading); font-size: 22px; font-weight: 800; color: var(--text); padding-bottom: 14px; border-bottom: 3px solid var(--primary); margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.content-section-title a { font-size: 13px; font-family: var(--font-body); font-weight: 500; color: var(--primary); }
.artikel-card { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); transition: all .2s; }
.artikel-card:last-child { border-bottom: none; }
.artikel-thumb { width: 90px; height: 70px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; }
.artikel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.artikel-card h4 { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.artikel-card h4 a:hover { color: var(--primary); }
.artikel-meta { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 8px; }
.tag { background: rgba(26,75,140,.08); color: var(--primary); padding: 2px 8px; border-radius: 50px; font-size: 11px; font-weight: 600; }

.pengumuman-list { display: flex; flex-direction: column; gap: 0; }
.pengumuman-item { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.pengumuman-item:last-child { border-bottom: none; }
.pengumuman-date { background: var(--primary); color: white; border-radius: 8px; padding: 6px 10px; text-align: center; font-size: 11px; min-width: 50px; flex-shrink: 0; }
.pengumuman-date .day { font-size: 20px; font-weight: 800; display: block; line-height: 1; }
.pengumuman-item h5 { font-size: 14px; font-weight: 600; line-height: 1.4; }
.pengumuman-item h5 a:hover { color: var(--primary); }

/* ===== PAGE HERO ===== */
.page-hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color: white; padding: 60px 0; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 70%, rgba(232,160,32,.15) 0%, transparent 60%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-family: var(--font-heading); font-size: clamp(28px,5vw,48px); font-weight: 800; margin-bottom: 10px; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; font-size: 14px; opacity: .8; }
.breadcrumb a { color: var(--accent); }

/* ===== ABOUT PAGE ===== */
.about-section { padding: 70px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 60px; align-items: start; }
.about-text h2 { font-family: var(--font-heading); font-size: 30px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.about-text p { color: var(--text-light); line-height: 1.8; margin-bottom: 16px; }
.visi-misi-card { background: var(--white); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); border-left: 5px solid var(--primary); }
.visi-misi-card h3 { font-family: var(--font-heading); font-size: 20px; color: var(--primary); margin-bottom: 14px; }
.visi-misi-card p, .visi-misi-card li { color: var(--text-light); line-height: 1.8; font-size: 15px; }
.visi-misi-card ul { padding-left: 20px; list-style: disc; }
.visi-misi-card ul li { margin-bottom: 6px; }

/* ===== STAFF PAGE ===== */
.staff-section { padding: 70px 0; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.staff-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; transition: all .3s; }
.staff-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.staff-photo { height: 180px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; font-size: 64px; overflow: hidden; }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-info { padding: 16px; }
.staff-info h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.staff-info .jabatan { font-size: 13px; color: var(--text-light); background: rgba(26,75,140,.07); padding: 3px 10px; border-radius: 50px; display: inline-block; }

/* ===== ARTIKEL PAGE ===== */
.content-section { padding: 70px 0; }
.artikel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; margin-bottom: 40px; }
.artikel-full-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all .3s; }
.artikel-full-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.artikel-full-card .card-img { height: 200px; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; font-size: 48px; color: white; }
.artikel-full-card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; }
.card-body .tag { margin-bottom: 10px; display: inline-block; }
.card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; line-height: 1.6; }
.card-footer-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-light); }

/* ===== ARTIKEL DETAIL ===== */
.artikel-detail { padding: 60px 0; }
.artikel-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.artikel-content-card { background: var(--white); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.artikel-content-card h1 { font-family: var(--font-heading); font-size: clamp(22px, 3vw, 34px); font-weight: 800; margin-bottom: 16px; line-height: 1.25; }
.artikel-content-card .meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-light); margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.artikel-content-card .cover-img { width: 100%; height: 360px; object-fit: cover; border-radius: 10px; margin-bottom: 24px; }
.artikel-body { font-size: 16px; line-height: 1.9; color: var(--text); }
.artikel-body p { margin-bottom: 16px; }
.artikel-body img { border-radius: 8px; margin: 16px 0; }
.sidebar-card { background: var(--white); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.sidebar-card h4 { font-family: var(--font-heading); font-size: 18px; color: var(--primary); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }

/* ===== PENGUMUMAN PAGE ===== */
.pengumuman-full { background: var(--white); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px; display: flex; gap: 24px; border-left: 5px solid var(--primary); transition: all .2s; }
.pengumuman-full:hover { box-shadow: var(--shadow-lg); }
.pengumuman-date-big { background: var(--primary); color: white; border-radius: 10px; padding: 12px 16px; text-align: center; min-width: 70px; flex-shrink: 0; }
.pengumuman-date-big .day { font-size: 28px; font-weight: 800; display: block; line-height: 1; }
.pengumuman-date-big .month { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.pengumuman-full h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.pengumuman-full h3 a:hover { color: var(--primary); }
.pengumuman-full .excerpt { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ===== GALLERY ===== */
.gallery-section { padding: 70px 0; }
.gallery-tabs { display: flex; gap: 8px; margin-bottom: 32px; }
.gallery-tab { padding: 10px 24px; border-radius: 50px; font-weight: 600; font-size: 14px; cursor: pointer; border: 2px solid var(--border); background: var(--white); color: var(--text-light); transition: all .2s; }
.gallery-tab.active, .gallery-tab:hover { background: var(--primary); color: white; border-color: var(--primary); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.photo-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photo-item:hover img { transform: scale(1.07); }
.photo-item .overlay { position: absolute; inset: 0; background: rgba(26,75,140,.7); display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; opacity: 0; transition: opacity .3s; }
.photo-item:hover .overlay { opacity: 1; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.video-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.video-card iframe { width: 100%; aspect-ratio: 16/9; border: none; }
.video-card .video-info { padding: 16px; }
.video-card .video-info h4 { font-weight: 600; margin-bottom: 6px; }
.video-card .video-info p { font-size: 13px; color: var(--text-light); }

/* ===== LIGHTBOX ===== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 9999; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 36px; cursor: pointer; line-height: 1; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid var(--border); color: var(--text); background: var(--white); transition: all .2s; }
.pagination a:hover, .pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== FOOTER ===== */
.footer { background: var(--primary-dark); color: rgba(255,255,255,.8); }
.footer-top { padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 40px; }
.footer-brand { font-family: var(--font-heading); font-size: 20px; color: white; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; transition: all .2s; }
.footer-social a:hover { background: var(--accent); }
.footer-col h4 { font-size: 15px; font-weight: 700; color: white; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14px; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-contact p { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.footer-contact i { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.footer-bottom { background: rgba(0,0,0,.2); padding: 16px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 13px; }
.admin-link { font-size: 12px; color: rgba(255,255,255,.4); }
.admin-link:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .welcome-grid, .about-grid, .home-content-grid, .artikel-detail-grid { grid-template-columns: 1fr; }
  .layanan-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .carousel-section { height: 400px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: white; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.1); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .layanan-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-left { display: none; }
  .pengumuman-full { flex-direction: column; gap: 12px; }
  .carousel-section { height: 320px; }
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--border); display: block; }

/* ===========================
   UNDUHAN / DOWNLOAD
   =========================== */
.unduhan-section { padding: 60px 0; background: var(--white); }

/* Search bar wrapper */
.unduhan-search-bar {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.unduhan-search-bar .search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.unduhan-search-bar .search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
}
.unduhan-search-bar input[type="text"] {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--white);
    color: var(--text);
    transition: border-color .2s;
}
.unduhan-search-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,75,140,.08);
}
.btn-search {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background .2s;
    white-space: nowrap;
}
.btn-search:hover { background: var(--primary-dark); }
.btn-reset {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-reset:hover { border-color: var(--primary); color: var(--primary); }

/* Filter kategori pills */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.filter-btn {
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Keterangan jumlah */
.unduhan-count-info {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Grid kartu unduhan */
.unduhan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.unduhan-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 20px 20px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    transition: all .3s;
    position: relative;
    overflow: hidden;
}
.unduhan-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 4px 0 0 4px;
}
.unduhan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(26,75,140,.2);
}

.unduhan-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.unduhan-info { flex: 1; min-width: 0; }

.unduhan-badge {
    display: inline-block;
    background: rgba(26,75,140,.07);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    padding: 2px 9px;
    border-radius: 50px;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.unduhan-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.4;
    color: var(--text);
}

.unduhan-info p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.55;
}

.unduhan-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-light);
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: center;
}
.unduhan-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all .2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-download:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,75,140,.3);
}

.unduhan-unavailable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg);
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Empty state */
.unduhan-empty {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-light);
}
.unduhan-empty i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    opacity: .25;
    color: var(--primary);
}
.unduhan-empty h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.unduhan-empty p { font-size: 14px; margin-bottom: 20px; }

/* ===== UNDUHAN LIST (Beranda preview) ===== */
.unduhan-home { padding: 70px 0; background: var(--bg); }
.unduhan-home-list { display: flex; flex-direction: column; gap: 10px; }

.unduhan-list-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    transition: all .2s;
}
.unduhan-list-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateX(3px);
}
.unduhan-list-item .file-icon-sm { font-size: 28px; flex-shrink: 0; line-height: 1; }
.unduhan-list-item .info { flex: 1; min-width: 0; }
.unduhan-list-item .info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.unduhan-list-item .info .meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.unduhan-list-item .aksi { flex-shrink: 0; }

/* Responsive */
@media (max-width: 640px) {
    .unduhan-grid { grid-template-columns: 1fr; }
    .unduhan-card { padding: 16px 16px 16px 20px; }
    .unduhan-list-item { padding: 12px 14px; }
    .unduhan-list-item .aksi .btn-download { padding: 6px 12px; font-size: 12px; }
}


/* Layanan card — clickable variant */
a.layanan-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.layanan-card-link:hover .layanan-icon {
    background: var(--primary);
    color: var(--white);
}
a.layanan-card-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.layanan-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .2px;
}
a.layanan-card-link:hover .layanan-cta {
    color: var(--accent);
}