/*
Theme Name: HIGHSSO Custom
Theme URI: https://highsso.com/
Author: HIGHSSO
Description: Custom lightweight news and information theme for HIGHSSO.
Version: 1.0.0
Text Domain: highsso-custom
*/

/* ===== HIGHSSO Base ===== */

:root {
	--hs-max: 1200px;
	--hs-gap: 24px;
	--hs-radius: 16px;
	--hs-border: #e5e7eb;
	--hs-text: #111827;
	--hs-muted: #6b7280;
	--hs-bg: #ffffff;
	--hs-soft: #f8fafc;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--hs-bg);
	color: var(--hs-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	line-height: 1.6;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

.container,
.site-header__inner,
.site-footer__inner {
	width: min(100% - 32px, var(--hs-max));
	margin: 0 auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255,255,255,.96);
	border-bottom: 1px solid var(--hs-border);
	backdrop-filter: blur(12px);
}

.site-header__inner {
	min-height: 72px;
	display: flex;
	align-items: center;
}

.site-logo {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.04em;
}

.site-main {
	min-height: 60vh;
}

.home-hero {
	padding: 48px 0 28px;
	background: var(--hs-soft);
}

.home-hero h1 {
	margin: 0 0 8px;
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.1;
	letter-spacing: -0.05em;
}

.home-hero p {
	margin: 0;
	color: var(--hs-muted);
	font-size: 18px;
}

.home-section {
	padding: 52px 0;
}

.section-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 22px;
}

.section-heading h2 {
	margin: 0;
	font-size: 26px;
	letter-spacing: -0.03em;
}

.section-heading a {
	font-size: 14px;
	color: var(--hs-muted);
}

.top-news-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr);
	gap: var(--hs-gap);
}

.top-news-main {
	border: 1px solid var(--hs-border);
	border-radius: var(--hs-radius);
	overflow: hidden;
	background: #fff;
}

.top-news-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f3f4f6;
}

.top-news-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.top-news-content {
	padding: 24px;
}

.top-news-content h3 {
	margin: 8px 0 10px;
	font-size: clamp(24px, 3vw, 36px);
	line-height: 1.25;
	letter-spacing: -0.04em;
}

.top-news-side {
	display: grid;
	gap: 14px;
}

.top-news-small {
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--hs-border);
}

.top-news-small-image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 12px;
	background: #f3f4f6;
}

.top-news-small-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.top-news-small h3 {
	margin: 6px 0;
	font-size: 17px;
	line-height: 1.35;
	letter-spacing: -0.025em;
}

.post-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.post-card {
	border: 1px solid var(--hs-border);
	border-radius: var(--hs-radius);
	overflow: hidden;
	background: #fff;
	transition: transform .18s ease, box-shadow .18s ease;
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.post-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f3f4f6;
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__content {
	padding: 18px;
}

.post-category {
	color: #2563eb;
	font-size: 13px;
	font-weight: 700;
}

.post-card__title {
	margin: 8px 0 10px;
	font-size: 20px;
	line-height: 1.35;
	letter-spacing: -0.03em;
}

.post-card__excerpt,
.post-excerpt {
	color: var(--hs-muted);
	font-size: 14px;
}

.post-date {
	margin-top: 10px;
	color: #9ca3af;
	font-size: 13px;
}

.site-footer {
	margin-top: 50px;
	border-top: 1px solid var(--hs-border);
	background: var(--hs-soft);
}

.site-footer__inner {
	padding: 30px 0;
	color: var(--hs-muted);
	font-size: 14px;
}

/* ===== Responsive ===== */

@media (max-width: 1024px) {
	.top-news-grid {
		grid-template-columns: 1fr;
	}

	.post-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.container,
	.site-header__inner,
	.site-footer__inner {
		width: min(100% - 24px, var(--hs-max));
	}

	.site-header__inner {
		min-height: 60px;
	}

	.site-logo {
		font-size: 23px;
	}

	.home-hero {
		padding: 32px 0 20px;
	}

	.home-section {
		padding: 36px 0;
	}

	.section-heading h2 {
		font-size: 22px;
	}

	.top-news-content {
		padding: 18px;
	}

	.top-news-content h3 {
		font-size: 26px;
	}

	.top-news-small {
		grid-template-columns: 112px 1fr;
	}

	.top-news-small h3 {
		font-size: 15px;
	}

	.post-card-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.post-card__title {
		font-size: 19px;
	}
}

/* ===== Header / Navigation ===== */

.site-header__inner {
	gap: 28px;
}

.site-logo {
	flex: 0 0 auto;
}

.primary-nav {
	margin-left: auto;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu li {
	margin: 0;
}

.primary-menu a {
	display: block;
	padding: 24px 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.primary-menu a:hover {
	color: #2563eb;
}

.header-search {
	flex: 0 0 auto;
	padding: 8px 12px;
	border: 1px solid var(--hs-border);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
}

.menu-toggle {
	display: none;
	width: 42px;
	height: 42px;
	margin-left: auto;
	padding: 9px;
	border: 1px solid var(--hs-border);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	height: 2px;
	margin: 5px 0;
	background: var(--hs-text);
	border-radius: 2px;
}

@media (max-width: 768px) {
	.site-header__inner {
		position: relative;
		gap: 10px;
	}

	.menu-toggle {
		display: block;
	}

	.header-search {
		display: none;
	}

	.primary-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin: 0;
		background: #fff;
		border-bottom: 1px solid var(--hs-border);
		box-shadow: 0 10px 24px rgba(15,23,42,.08);
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-menu {
		display: block;
		width: min(100% - 24px, var(--hs-max));
		margin: 0 auto;
		padding: 10px 0 16px;
	}

	.primary-menu a {
		padding: 12px 4px;
		font-size: 16px;
	}
}

/* ===== Archive ===== */

.archive-header {
	padding: 42px 0 24px;
	background: var(--hs-soft);
	border-bottom: 1px solid var(--hs-border);
}

.archive-header__inner h1 {
	margin: 0;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.2;
	letter-spacing: -0.04em;
}

.archive-description {
	margin-top: 10px;
	color: var(--hs-muted);
	font-size: 15px;
}

.archive-content {
	padding: 42px 0 64px;
}

.archive-pagination {
	margin-top: 36px;
}

.archive-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.archive-pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--hs-border);
	border-radius: 10px;
	background: #fff;
	font-size: 14px;
	font-weight: 700;
}

.archive-pagination .page-numbers.current {
	background: var(--hs-text);
	color: #fff;
	border-color: var(--hs-text);
}

.archive-pagination .page-numbers:hover {
	border-color: #94a3b8;
}

@media (max-width: 640px) {
	.archive-header {
		padding: 30px 0 20px;
	}

	.archive-content {
		padding: 30px 0 48px;
	}

	.archive-header__inner h1 {
		font-size: 30px;
	}
}

/* ===== Single Post ===== */

.single-header {
	padding: 54px 0 28px;
}

.single-container {
	width: min(100% - 32px, 820px);
	margin: 0 auto;
}

.single-container--wide {
	width: min(100% - 32px, 1100px);
}

.single-category {
	display: inline-block;
	margin-bottom: 14px;
	color: #2563eb;
	font-size: 14px;
	font-weight: 800;
}

.single-title {
	margin: 0;
	font-size: clamp(34px, 5vw, 54px);
	line-height: 1.15;
	letter-spacing: -0.05em;
}

.single-intro {
	margin: 20px 0 0;
	color: var(--hs-muted);
	font-size: 19px;
	line-height: 1.7;
}

.single-meta {
	margin-top: 18px;
	color: #9ca3af;
	font-size: 14px;
}

.single-featured {
	padding-bottom: 34px;
}

.single-featured img {
	width: 100%;
	border-radius: 18px;
}

.single-body {
	padding: 12px 0 54px;
}

.entry-content {
	font-size: 17px;
	line-height: 1.9;
	word-break: keep-all;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 2.2em;
	margin-bottom: .7em;
	line-height: 1.35;
	letter-spacing: -0.035em;
}

.entry-content h2 {
	font-size: 30px;
}

.entry-content h3 {
	font-size: 24px;
}

.entry-content p {
	margin: 0 0 1.5em;
}

.entry-content img {
	margin: 28px auto;
	border-radius: 14px;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.6em;
	padding-left: 1.5em;
}

.entry-content li {
	margin-bottom: .55em;
}

.entry-content blockquote {
	margin: 28px 0;
	padding: 18px 22px;
	border-left: 4px solid #2563eb;
	background: var(--hs-soft);
	border-radius: 0 12px 12px 0;
}

.entry-content table {
	width: 100%;
	margin: 28px 0;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border: 1px solid var(--hs-border);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--hs-soft);
	font-weight: 800;
}

.entry-content .wp-block-button__link,
.entry-content a.button,
.entry-content .button {
	display: inline-block;
	padding: 12px 18px;
	border-radius: 10px;
	background: #2563eb;
	color: #fff;
	font-weight: 800;
}

.single-related,
.single-category-latest {
	padding: 46px 0;
	border-top: 1px solid var(--hs-border);
}

.single-category-latest {
	background: var(--hs-soft);
}

.single-latest-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 24px;
}

.single-latest-item {
	padding: 18px 0;
	border-bottom: 1px solid var(--hs-border);
}

.single-latest-item h3 {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.4;
	letter-spacing: -0.025em;
}

@media (max-width: 640px) {
	.single-header {
		padding: 34px 0 22px;
	}

	.single-container,
	.single-container--wide {
		width: min(100% - 24px, 820px);
	}

	.single-title {
		font-size: 34px;
	}

	.single-intro {
		font-size: 17px;
	}

	.entry-content {
		font-size: 16px;
		line-height: 1.85;
	}

	.entry-content h2 {
		font-size: 26px;
	}

	.entry-content h3 {
		font-size: 22px;
	}

	.entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}

	.single-latest-list {
		grid-template-columns: 1fr;
	}

	.single-related,
	.single-category-latest {
		padding: 36px 0;
	}
}

/* ===== Footer ===== */

.footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: 40px;
	padding: 42px 0 34px;
}

.footer-logo {
	margin: 0 0 12px;
	font-size: 24px;
	letter-spacing: -0.04em;
}

.footer-about p {
	margin: 0;
	max-width: 440px;
	color: var(--hs-muted);
	font-size: 14px;
	line-height: 1.7;
}

.footer-column h3 {
	margin: 0 0 12px;
	font-size: 15px;
}

.footer-column ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-column li {
	margin: 8px 0;
}

.footer-column a {
	color: var(--hs-muted);
	font-size: 14px;
}

.footer-column a:hover {
	color: var(--hs-text);
}

.footer-bottom {
	border-top: 1px solid var(--hs-border);
}

.footer-bottom .site-footer__inner {
	padding: 18px 0;
}

.footer-bottom p {
	margin: 0;
	color: #9ca3af;
	font-size: 13px;
}

@media (max-width: 768px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px;
	}
}

@media (max-width: 520px) {
	.footer-grid {
		grid-template-columns: 1fr;
		padding: 34px 0 26px;
	}
}

/* ===== Header Search ===== */

.header-search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.header-search-input {
	width: 180px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--hs-border);
	border-radius: 10px;
	background: #fff;
	color: var(--hs-text);
	font-size: 14px;
	outline: none;
}

.header-search-input:focus {
	border-color: #94a3b8;
}

.header-search-button {
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--hs-border);
	border-radius: 10px;
	background: #fff;
	color: var(--hs-text);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.header-search-button:hover {
	background: var(--hs-soft);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 768px) {
	.header-search-form {
		width: 100%;
		padding: 10px 12px 14px;
	}

	.header-search-input {
		flex: 1 1 auto;
		width: auto;
	}
}

/* ===== Header Logo Image ===== */

.site-logo__image {
	display: block;
	width: auto;
	height: 46px;
	max-width: 220px;
	object-fit: contain;
}

@media (max-width: 640px) {
	.site-logo__image {
		height: 38px;
		max-width: 180px;
	}
}
