/**
 * 법률광장 Header & Hero UI
 * GeneratePress Child Theme – lawgwangjang.com
 */

/* ── Design Tokens ── */
:root {
	--lgw-navy: #0c2340;
	--lgw-navy-dark: #081829;
	--lgw-blue: #2563eb;
	--lgw-blue-hover: #1d4ed8;
	--lgw-text: #1a1a2e;
	--lgw-text-muted: #5c6578;
	--lgw-border: #e8ecf1;
	--lgw-bg: #ffffff;
	--lgw-bg-soft: #f7f9fc;
	--lgw-radius: 18px;
	--lgw-radius-sm: 10px;
	--lgw-shadow: 0 4px 24px rgba(12, 35, 64, 0.06);
	--lgw-shadow-md: 0 8px 32px rgba(12, 35, 64, 0.1);
	--lgw-header-height: 68px;
	--lgw-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Shared Button ── */
.lgw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.35rem;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: var(--lgw-radius-sm);
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--lgw-transition), color var(--lgw-transition), transform var(--lgw-transition), box-shadow var(--lgw-transition);
}

.lgw-btn--primary {
	background: var(--lgw-navy);
	color: #fff;
}

.lgw-btn--primary:hover {
	background: var(--lgw-blue);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

/* ══════════════════════════════════════
   HEADER
   ══════════════════════════════════════ */

.lgw-renewal-header .site-header {
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--lgw-border);
	transition: box-shadow var(--lgw-transition), background var(--lgw-transition);
	z-index: 9999;
}

.lgw-renewal-header .site-header.lgw-is-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	box-shadow: var(--lgw-shadow);
	background: rgba(255, 255, 255, 0.98);
}

.lgw-renewal-header.lgw-header-sticky-active {
	padding-top: var(--lgw-header-height);
}

.lgw-renewal-header .inside-header {
	min-height: var(--lgw-header-height);
	padding-top: 0;
	padding-bottom: 0;
	display: flex;
	align-items: center;
}

/* Logo */
.lgw-renewal-header .site-branding {
	display: flex;
	align-items: center;
}

.lgw-renewal-header .main-title {
	margin: 0;
	font-size: 0;
	line-height: 1;
}

.lgw-renewal-header .main-title a {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--lgw-navy);
	text-decoration: none;
	letter-spacing: -0.03em;
	transition: color var(--lgw-transition);
}

.lgw-renewal-header .main-title a:hover {
	color: var(--lgw-blue);
}

/* Navigation */
.lgw-renewal-header #site-navigation {
	margin-left: auto;
}

.lgw-renewal-header .inside-navigation {
	min-height: var(--lgw-header-height);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.lgw-renewal-header .main-nav > ul {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.lgw-renewal-header .main-nav > ul > li > a {
	padding: 0.5rem 0.85rem;
	font-size: 15px;
	font-weight: 500;
	color: var(--lgw-text);
	text-decoration: none;
	border-radius: 8px;
	transition: color var(--lgw-transition), background var(--lgw-transition);
}

.lgw-renewal-header .main-nav > ul > li > a:hover,
.lgw-renewal-header .main-nav > ul > li.current-menu-item > a,
.lgw-renewal-header .main-nav > ul > li.current_page_item > a {
	color: var(--lgw-blue);
	background: rgba(37, 99, 235, 0.06);
}

/* Header search toggle */
.lgw-header-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-left: 0.35rem;
	padding: 0;
	background: var(--lgw-bg-soft);
	border: 1px solid var(--lgw-border);
	border-radius: 50%;
	color: var(--lgw-navy);
	cursor: pointer;
	transition: background var(--lgw-transition), border-color var(--lgw-transition), color var(--lgw-transition), transform var(--lgw-transition);
	flex-shrink: 0;
}

.lgw-header-search-toggle:hover {
	background: #fff;
	border-color: var(--lgw-blue);
	color: var(--lgw-blue);
	transform: scale(1.05);
}

.lgw-header-search-toggle[aria-expanded="true"] {
	background: var(--lgw-navy);
	border-color: var(--lgw-navy);
	color: #fff;
}

@media (min-width: 769px) {
	.lgw-header-search-toggle--mobile {
		display: none;
	}
}

@media (max-width: 768px) {
	.lgw-header-search-toggle--desktop {
		display: none;
	}

	.lgw-renewal-header #mobile-menu-control-wrapper {
		display: flex;
		align-items: center;
		gap: 0.35rem;
		margin-left: auto;
	}
}

/* Mobile menu toggle */
.lgw-renewal-header .menu-toggle {
	border: 1px solid var(--lgw-border);
	border-radius: 10px;
	padding: 0.45rem 0.65rem;
	background: var(--lgw-bg-soft);
	color: var(--lgw-navy);
	transition: background var(--lgw-transition), border-color var(--lgw-transition);
}

.lgw-renewal-header .menu-toggle:hover {
	background: #fff;
	border-color: var(--lgw-blue);
	color: var(--lgw-blue);
}

.lgw-renewal-header #mobile-menu-control-wrapper .menu-toggle {
	border-radius: 50%;
	width: 42px;
	height: 42px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Search panel overlay */
.lgw-search-panel {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 6rem 1.25rem 1.25rem;
}

.lgw-search-panel[hidden] {
	display: none;
}

.lgw-search-panel__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 24, 41, 0.45);
	backdrop-filter: blur(4px);
}

.lgw-search-panel__inner {
	position: relative;
	width: 100%;
	max-width: 640px;
	padding: 1.5rem;
	background: #fff;
	border-radius: var(--lgw-radius);
	box-shadow: var(--lgw-shadow-md);
	animation: lgwSlideDown 0.3s ease;
}

@keyframes lgwSlideDown {
	from {
		opacity: 0;
		transform: translateY(-16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lgw-search-panel__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: var(--lgw-bg-soft);
	border: none;
	border-radius: 50%;
	color: var(--lgw-text-muted);
	cursor: pointer;
	transition: background var(--lgw-transition), color var(--lgw-transition);
}

.lgw-search-panel__close:hover {
	background: var(--lgw-border);
	color: var(--lgw-navy);
}

.lgw-search-panel__form {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.lgw-search-panel__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 1rem;
	border: 1px solid var(--lgw-border);
	border-radius: var(--lgw-radius-sm);
	font-size: 16px;
	color: var(--lgw-text);
	transition: border-color var(--lgw-transition), box-shadow var(--lgw-transition);
}

.lgw-search-panel__input:focus {
	outline: none;
	border-color: var(--lgw-blue);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ══════════════════════════════════════
   HERO (홈페이지 전용)
   ══════════════════════════════════════ */

/* 기존 Hero 블록 숨김 (Spectra 콘텐츠는 유지, 화면만 교체) */
.lgw-renewal-hero .entry-header {
	display: none;
}

.lgw-renewal-hero .entry-content > *:nth-child(1),
.lgw-renewal-hero .entry-content > *:nth-child(2),
.lgw-renewal-hero .entry-content > *:nth-child(3) {
	display: none !important;
}

.lgw-hero {
	background: linear-gradient(160deg, var(--lgw-bg-soft) 0%, #fff 55%, #fff 100%);
	border-bottom: 1px solid var(--lgw-border);
	padding: 3.5rem 0 4rem;
}

.lgw-hero__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.lgw-hero__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--lgw-blue);
}

.lgw-hero__title {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 4vw, 2.65rem);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.03em;
	color: var(--lgw-navy);
}

.lgw-hero__desc {
	margin: 0 0 1.75rem;
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--lgw-text-muted);
}

.lgw-hero__search-inner {
	display: flex;
	align-items: center;
	gap: 0;
	background: #fff;
	border: 1px solid var(--lgw-border);
	border-radius: 999px;
	box-shadow: var(--lgw-shadow);
	padding: 0.35rem 0.35rem 0.35rem 1.15rem;
	transition: box-shadow var(--lgw-transition), border-color var(--lgw-transition);
}

.lgw-hero__search-inner:focus-within {
	border-color: var(--lgw-blue);
	box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
}

.lgw-hero__search-icon {
	flex-shrink: 0;
	color: var(--lgw-text-muted);
}

.lgw-hero__search-input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 0.75rem;
	border: none;
	background: transparent;
	font-size: 16px;
	color: var(--lgw-text);
}

.lgw-hero__search-input:focus {
	outline: none;
}

.lgw-hero__search-btn {
	border-radius: 999px;
	padding: 0 1.5rem;
	height: 48px;
	flex-shrink: 0;
}

.lgw-hero__tags {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.lgw-hero__tags-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--lgw-text-muted);
	margin-right: 0.25rem;
}

.lgw-hero__tag {
	display: inline-flex;
	padding: 0.35rem 0.85rem;
	font-size: 13px;
	font-weight: 500;
	color: var(--lgw-navy);
	background: #fff;
	border: 1px solid var(--lgw-border);
	border-radius: 999px;
	text-decoration: none;
	transition: background var(--lgw-transition), border-color var(--lgw-transition), color var(--lgw-transition), transform var(--lgw-transition);
}

.lgw-hero__tag:hover {
	background: rgba(37, 99, 235, 0.06);
	border-color: var(--lgw-blue);
	color: var(--lgw-blue);
	transform: translateY(-1px);
}

/* Hero visual */
.lgw-hero__visual-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--lgw-border);
	border-radius: var(--lgw-radius);
	box-shadow: var(--lgw-shadow-md);
	padding: 2rem 1.5rem 1.5rem;
	transition: transform var(--lgw-transition), box-shadow var(--lgw-transition);
}

.lgw-hero__visual-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 48px rgba(12, 35, 64, 0.12);
}

.lgw-hero__illustration {
	width: 100%;
	height: auto;
	display: block;
}

.lgw-hero__visual-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1rem;
	padding: 0.45rem 0.85rem;
	font-size: 13px;
	font-weight: 600;
	color: var(--lgw-navy);
	background: var(--lgw-bg-soft);
	border-radius: 999px;
}

.lgw-hero__visual-badge svg {
	color: var(--lgw-blue);
}

/* ── Responsive ── */
@media (max-width: 992px) {
	.lgw-hero__container {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.lgw-hero__visual {
		order: -1;
		max-width: 420px;
		margin: 0 auto;
	}

	.lgw-hero__br-desktop {
		display: none;
	}
}

@media (max-width: 768px) {
	:root {
		--lgw-header-height: 64px;
	}

	.lgw-renewal-header.lgw-header-sticky-active {
		padding-top: 64px !important;
	}

	.lgw-renewal-header .site-header {
		position: relative;
	}

	.lgw-renewal-header .site-header,
	.lgw-renewal-header .inside-header,
	.lgw-renewal-header .inside-navigation {
		min-height: 64px;
	}

	.lgw-renewal-header .inside-header {
		padding-top: 0;
		padding-bottom: 0;
		align-items: center;
	}

	.lgw-renewal-header .site-branding,
	.lgw-renewal-header .site-logo {
		margin-top: 0;
		margin-bottom: 0;
	}

	.lgw-renewal-header .main-title a {
		font-size: 1.15rem;
		line-height: 1.2;
	}

	.has-inline-mobile-toggle .inside-header {
		flex-wrap: nowrap !important;
		height: 64px !important;
		min-height: 64px !important;
		max-height: 64px !important;
	}

	.has-inline-mobile-toggle #mobile-menu-control-wrapper {
		display: flex !important;
		align-items: center !important;
		height: 64px !important;
		min-height: 64px !important;
		margin-left: auto !important;
	}

	.has-inline-mobile-toggle #site-navigation:not(.toggled) {
		display: none !important;
		flex-basis: 0 !important;
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
	}

	.has-inline-mobile-toggle #site-navigation:not(.toggled) .inside-navigation {
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
	}

	.has-inline-mobile-toggle #site-navigation.toggled {
		display: block !important;
		position: absolute !important;
		top: 64px !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		flex-basis: 100% !important;
		height: auto !important;
		min-height: 64px !important;
		max-height: none !important;
		overflow: visible !important;
	}

	.lgw-header-search-toggle,
	.lgw-renewal-header #mobile-menu-control-wrapper .menu-toggle {
		width: 44px;
		height: 44px;
		min-height: 44px;
		margin-top: 0;
		margin-bottom: 0;
	}

	.lgw-renewal-hero .site-content,
	.lgw-renewal-hero .content-area,
	.lgw-renewal-hero .site-main,
	.lgw-renewal-hero .inside-article,
	.lgw-renewal-hero .entry-content {
		margin-top: 0;
		padding-top: 0;
	}

	.lgw-hero {
		padding: 1.25rem 0 2.5rem;
	}

	.lgw-hero__container {
		padding: 0 1.15rem;
	}

	.lgw-hero__search-inner {
		flex-wrap: wrap;
		border-radius: var(--lgw-radius);
		padding: 0.75rem;
	}

	.lgw-hero__search-input {
		width: 100%;
		height: 44px;
		padding: 0 0.25rem;
	}

	.lgw-hero__search-btn {
		width: 100%;
		margin-top: 0.35rem;
		border-radius: var(--lgw-radius-sm);
	}

	.lgw-search-panel__form {
		flex-direction: column;
	}

	.lgw-search-panel__input,
	.lgw-search-panel .lgw-btn--primary {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.lgw-hero__tags {
		flex-direction: column;
		align-items: flex-start;
	}

	.lgw-hero__tags-list {
		display: flex;
		flex-wrap: wrap;
		gap: 0.4rem;
	}
}
/* ==========================================
   TEMP FIX - GeneratePress Mobile Navigation
   ========================================== */
@media (max-width: 768px) {

	/* 닫힌 모바일 메뉴는 완전히 제거 */
	.has-inline-mobile-toggle #site-navigation:not(.toggled) {
		display: none !important;
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		flex-basis: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		background: transparent !important;
	}

	/* 내부 navigation도 제거 */
	.has-inline-mobile-toggle #site-navigation:not(.toggled) .inside-navigation {
		display: none !important;
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
	}

	/* 메뉴가 열렸을 때만 다시 표시 */
	.has-inline-mobile-toggle #site-navigation.toggled {
		display: block !important;
		position: absolute !important;
		top: 64px !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		height: auto !important;
		min-height: 64px !important;
		max-height: none !important;
		flex-basis: 100% !important;
		overflow: visible !important;
		background: #fff !important;
	}

	.has-inline-mobile-toggle #site-navigation.toggled .inside-navigation {
		display: flex !important;
		min-height: 64px !important;
		height: auto !important;
	}
}
