/*
Theme Name: SMKN 1 Sampit
Theme URI: https://smkn1sampit.sch.id
Author: Tim Website SMKN 1 Sampit
Description: Tema kustom website SMK Negeri 1 Sampit. Desain muda & dinamis dengan 7 jurusan, berita, agenda, fasilitas, galeri, guru, dan kontak.
Version: 1.0.0
Text Domain: smkn1sampit
*/

:root {
	--primary: #0b63c4;
	--primary-dark: #094a91;
	--accent: #e91e8c;
	--accent-dark: #b8146e;
	--accent-soft: rgba(233, 30, 140, 0.12);
	--light: #f4f8fd;
	--white: #ffffff;
	--text: #1f2d3d;
	--muted: #6b7a8b;
	--shadow: 0 8px 24px rgba(15, 40, 80, 0.08);
	--radius: 14px;
}

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

body {
	font-family: "Segoe UI", "Poppins", Arial, sans-serif;
	color: var(--text);
	background: var(--white);
	line-height: 1.65;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1140px, 92%); margin: 0 auto; }

/* ============ HEADER ============ */
.topbar {
	background: var(--primary-dark);
	color: #cfe3f7;
	font-size: 0.82rem;
	padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

.site-header {
	background: var(--white);
	box-shadow: var(--shadow);
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-wrap img.site-logo,
.logo-wrap img.custom-logo,
.logo-wrap img.attachment-full {
	height: 52px !important;
	width: auto !important;
	max-width: none !important;
	object-fit: contain;
}
.logo-wrap .custom-logo-link { display: inline-flex; align-items: center; height: 52px; line-height: 0; }
.logo-text { line-height: 1.25; }
.logo-text .school-name { font-weight: 800; font-size: 1.15rem; color: var(--primary-dark); display: block; }
.logo-text .school-sub { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.main-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
	display: block;
	padding: 8px 14px;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--text);
	border-radius: 8px;
	transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
	background: var(--light);
	color: var(--primary);
	text-decoration: none;
}
.main-nav .menu-toggle { display: none; }

/* ============ HERO / BANNER ============ */
.hero {
	background:
		linear-gradient(120deg, rgba(9, 74, 145, 0.92), rgba(11, 99, 196, 0.85));
	color: #fff;
	padding: 88px 0;
	text-align: center;
}
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.9rem); font-weight: 800; margin-bottom: 14px; line-height: 1.2; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: #dbe9f8; font-size: 1.05rem; }
.hero .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(233, 30, 140, 0.4); }
.btn-outline { border: 2px solid rgba(255, 255, 255, 0.75); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }

/* ============ SECTIONS ============ */
.section { padding: 64px 0; }
.section-alt { background: var(--light); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head .eyebrow {
	display: inline-block;
	background: var(--accent-soft);
	color: var(--accent-dark);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: 999px;
	margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); color: var(--primary-dark); }
.section-head p { color: var(--muted); margin-top: 8px; }

/* Cards grid */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform 0.2s;
	display: flex;
	flex-direction: column;
}
.card:hover { transform: translateY(-5px); }
.card .card-media { aspect-ratio: 4 / 3; background: #d8e6f5; overflow: hidden; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--primary-dark); }
.card h3 a { color: inherit; }
.card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.card .card-more { margin-top: 14px; font-weight: 700; color: var(--primary); font-size: 0.88rem; }

/* Small icon-based cards */
.icon-card {
	background: var(--white);
	border: 1px solid #e4edf7;
	border-radius: var(--radius);
	padding: 24px 18px;
	text-align: center;
	transition: transform 0.2s, box-shadow 0.2s;
}
.icon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.icon-card .emoji { font-size: 2rem; margin-bottom: 10px; }
.icon-card h3 { font-size: 0.98rem; color: var(--primary-dark); }
.icon-card p { font-size: 0.85rem; color: var(--muted); }

/* Profil foto guru (potret) */
.guru-media { aspect-ratio: 3 / 4; background: #e8f0f9; }
.guru-media img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Filter chips (Video & Galeri) ===== */
.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.filter-chips .chip {
	display: inline-block;
	padding: 7px 18px;
	border-radius: 999px;
	background: var(--light);
	border: 1px solid #dfeaf5;
	color: var(--text);
	font-size: 0.86rem;
	font-weight: 600;
	transition: all 0.2s;
}
.filter-chips .chip:hover { background: #e3eefb; text-decoration: none; }
.filter-chips .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Video ===== */
.video-media { aspect-ratio: 16 / 9; position: relative; background: #0d1b2a; }
.video-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.play-btn {
	position: absolute; inset: 0; margin: auto;
	width: 56px; height: 56px; border-radius: 999px;
	background: rgba(233, 30, 140, 0.95); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.3rem; padding-left: 4px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.35);
	transition: transform 0.2s;
}
.video-card:hover .play-btn { transform: scale(1.12); }

/* ===== Galeri ===== */
.galeri-media { aspect-ratio: 4 / 3; }
.galeri-card:hover img { filter: brightness(0.92); }

/* ===== Prestasi ===== */
.prestasi-media { aspect-ratio: 16 / 10; }
.prestasi-badges { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge-tingkat, .badge-tahun {
	display: inline-block;
	font-size: 0.72rem; font-weight: 700;
	padding: 4px 12px; border-radius: 999px;
}
.badge-tahun { background: #eef2f7; color: #55657a; }
.tingkat-kabupatenkota,
.tingkat-kabupaten-kota { background: #e8f4e9; color: #2c7a35; }
.tingkat-provinsi { background: #e8effe; color: #2452b1; }
.tingkat-nasional { background: #fff2dc; color: #a46900; }
.tingkat-internasional { background: #fde8e8; color: #b32020; }

/* ===== Front-end CRUD (admin saja) ===== */
.fe-panel { max-width: 980px; margin: 0 auto 34px; }
.fe-toggle {
	display: block;
	width: 100%;
	padding: 13px 20px;
	border: 2px dashed var(--primary);
	border-radius: var(--radius);
	background: rgba(11, 99, 196, 0.05);
	color: var(--primary-dark);
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.2s;
}
.fe-toggle:hover { background: rgba(11, 99, 196, 0.12); }
.fe-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px; height: 22px;
	border-radius: 6px;
	background: var(--primary);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	transition: transform 0.2s;
	vertical-align: middle;
}
.fe-toggle.open .fe-toggle-icon { transform: rotate(45deg); background: var(--accent-dark); }
.fe-form {
	background: var(--white);
	border: 1px solid #dfeaf5;
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	padding: 22px;
	box-shadow: var(--shadow);
}
.fe-row { margin-bottom: 16px; }
.fe-row label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: var(--primary-dark); }
.fe-row input[type="text"],
.fe-row input[type="number"],
.fe-row input[type="url"],
.fe-row select,
.fe-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cdd9e6;
	border-radius: 8px;
	font-size: 0.92rem;
	font-family: inherit;
}
.fe-row textarea { min-height: 88px; resize: vertical; }
.fe-row input[type="file"] { font-size: 0.88rem; }
.fe-row .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.fe-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fe-actions { margin-top: 6px; text-align: right; }
.fe-submit {
	padding: 12px 30px;
	border: 0;
	border-radius: 999px;
	background: var(--primary);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}
.fe-submit:hover { background: var(--primary-dark); }
.fe-hapus {
	position: absolute;
	top: 8px; right: 8px;
	padding: 4px 12px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 999px;
	color: #b32020;
	font-size: 0.72rem;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	z-index: 5;
}
.fe-hapus:hover { background: #fde8e8; text-decoration: none; }
.fe-notice {
	max-width: 980px; margin: 18px auto 0;
	padding: 12px 18px;
	border-radius: 10px;
	font-weight: 600; font-size: 0.9rem;
}
.fe-notice.ok { background: #e8f4e9; color: #2c7a35; border: 1px solid #b8dcbf; }
.fe-notice.gagal, .fe-notice.hapus { background: #fff2dc; color: #a46900; border: 1px solid #f1d9a8; }

.card, .icon-card { position: relative; }

@media (max-width: 700px) {
	.fe-grid2 { grid-template-columns: 1fr; }
}

/* ===== Modal / Lightbox umum ===== */
.media-modal {
	position: fixed; inset: 0; z-index: 200;
	background: rgba(5, 15, 28, 0.88);
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
}
/* Atribut hidden harus menang atas display:flex */
.media-modal[hidden] { display: none !important; }
.media-modal-box { max-width: min(920px, 94vw); width: 100%; position: relative; }
.media-modal-close {
	position: absolute; top: -44px; right: 0;
	background: transparent; border: 0; color: #fff;
	font-size: 2.2rem; cursor: pointer; line-height: 1;
}
.video-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.media-modal-box > img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 12px; display: block; }

/* Badge/kompetensi */
.kompetensi {
	display: inline-block;
	background: rgba(11, 99, 196, 0.1);
	color: var(--primary-dark);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	margin-top: 10px;
}

/* ============ POSTS / NEWS ============ */
.entry-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.post-thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #d8e6f5; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.content-area { padding: 48px 0 72px; }
.entry-content { margin-top: 22px; font-size: 1.02rem; }
.entry-content h2, .entry-content h3 { color: var(--primary-dark); margin: 1.4em 0 0.5em; }
.entry-content p { margin-bottom: 1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1em 1.4em; }
.entry-content img { border-radius: var(--radius); margin: 0.5em 0; }

.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 2px;
	border-radius: 8px;
	background: var(--light);
	color: var(--text);
	font-weight: 600;
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; }

/* ============ CTA STRIP ============ */
.cta-strip {
	background: linear-gradient(120deg, var(--primary-dark), var(--primary));
	color: #fff;
	padding: 52px 0;
	text-align: center;
}
.cta-strip h2 { font-size: 1.6rem; margin-bottom: 10px; }
.cta-strip p { color: #cfe3f7; margin-bottom: 22px; }

/* ============ CONTACT / MAP ============ */
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; border: 0; display: block; }

/* ============ FOOTER ============ */
.site-footer { background: #0d1b2a; color: #9fb2c8; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; gap: 28px; margin-bottom: 40px; }
.site-footer h3 {
	color: #fff;
	font-size: 0.95rem;
	margin-bottom: 14px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.site-footer a { color: #cfdcec; font-size: 0.9rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom {
	border-top: 1px solid #1f3350;
	padding-top: 18px;
	font-size: 0.82rem;
	text-align: center;
	color: #7188a3;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
	.grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }

	.main-nav { position: relative; }
	.main-nav .menu-toggle {
		display: block;
		background: var(--accent);
		color: #fff;
		border: 0;
		font-weight: 700;
		padding: 10px 18px;
		border-radius: 999px;
		cursor: pointer;
		font-size: 0.9rem;
	}
	.main-nav .nav-menu {
		display: none;
		position: absolute;
		right: 0;
		top: calc(100% + 8px);
		background: var(--white);
		box-shadow: var(--shadow);
		border-radius: var(--radius);
		padding: 12px;
		min-width: 230px;
		flex-direction: column;
	}
	.main-nav .nav-menu.open { display: flex; }
}

@media (max-width: 560px) {
	.grid-3, .grid-4 { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.hero { padding: 64px 0; }
	.topbar { font-size: 0.75rem; }
}
