/* ============================================================
   RESPONSIVE.CSS — Global Responsive Overrides
   ============================================================ */

/* Wide Desktop → Hide right sidebar column */
@media (max-width: 1199px) {
	.wl-content-layout {
		grid-template-columns: 260px minmax(0, 1fr);
	}

	.wl-sidebar-right {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		gap: 1.5rem;
	}
}

/* Tablet → 2-col grids collapse */
@media (max-width: 992px) {
	.wl-grid-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.wl-frontpage-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Tablet → Stack layout, mobile nav, hide left sidebar */
@media (max-width: 768px) {
	/* Content Layout */
	.wl-content-layout,
	.wl-content-layout-no-right,
	.wl-frontpage-shell {
		grid-template-columns: 1fr;
		display: flex;
		flex-direction: column;
	}

	.wl-main-content {
		order: 1;
	}

	.wl-sidebar-right {
		order: 2;
	}

	.wl-sidebar-left {
		display: block;
		order: 2;
		position: static;
		left: auto;
		width: 100%;
		height: auto;
		background: transparent;
		padding: 0;
		box-shadow: none;
		overflow: visible;
	}

	.wl-sidebar-left.wl-drawer-open {
		left: auto;
	}

	/* Navigation Toggle */
	.wl-menu-toggle {
		display: block;
	}

	.wl-brand-nav-center {
		position: static;
	}

	.wl-main-navigation ul {
		display: none;
		flex-direction: column;
		align-items: stretch !important;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--wl-color-white);
		padding: 1rem 2rem !important;
		box-shadow: var(--wl-shadow-md);
		width: 100%;
		z-index: 1050;
	}

	.wl-main-navigation li {
		width: 100%;
		text-align: left;
	}

	.wl-nav-menu > li > a {
		padding: 0.75rem 0 !important;
		display: block;
		width: 100%;
	}

	.wl-nav-menu > li > a::after {
		left: 0 !important;
		transform: none !important;
	}

	.wl-nav-menu ul.sub-menu {
		position: static !important;
		box-shadow: none !important;
		border: none !important;
		padding-left: 1.5rem !important;
		width: 100% !important;
		background: transparent !important;
		margin: 0 !important;
	}

	.wl-main-navigation.toggled > ul {
		display: flex;
	}

	/* Grid Utilities */
	.wl-grid-cols-3,
	.wl-grid-cols-2 {
		grid-template-columns: 1fr;
	}

	.wl-frontpage-posts {
		grid-template-columns: 1fr;
	}

	/* Hero */
	.wl-hero h2 {
		font-size: 2rem;
	}

	/* Mobile Header UI Fixes */
	.wl-brand-inner {
		padding: 0.5rem 1rem !important;
		gap: 0.5rem;
	}
	.wl-brand-text span:first-child {
		font-size: 1.1rem !important;
	}
	.wl-brand-text span:last-child {
		font-size: 0.7rem !important;
	}
	.wl-brand-logo .custom-logo, .wl-logo-link img {
		max-height: 60px !important;
	}
	.wl-brand-actions {
		gap: 0.5rem !important;
	}
	.wl-lang-switch .wl-lang-btn {
		padding: 0.2rem 0.4rem !important;
		font-size: 0.75rem !important;
	}
	.wl-action-link {
		font-size: 0.8rem !important;
		padding: 0.3rem 0.6rem !important;
	}
	.wl-sidebar-drawer-toggle {
		padding: 0.3rem !important;
		font-size: 1.2rem !important;
		margin: 0 !important;
	}

	.wl-hero-section {
		flex-direction: column;
		padding: 2rem 1rem;
	}

	.wl-hero-text {
		max-width: 100%;
	}

	.wl-hero-image {
		display: flex;
		margin-top: 2rem;
	}

	.wl-feature-panel {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 1.5rem;
		text-align: center;
	}

	.wl-feature-copy p {
		margin: 0 auto 1.5rem;
	}

	.wl-feature-actions {
		justify-content: center;
	}

	/* List Items */
	.wl-list-item {
		flex-direction: column;
	}

	.wl-list-item-image {
		width: 100%;
	}

	/* Sidebar Drawer */
	.wl-sidebar-drawer-toggle {
		display: inline-block;
		margin: 1rem 0;
	}

	.wl-drawer-close {
		display: none;
	}

	.wl-drawer-overlay {
		display: none;
	}
}

/* Mobile → 4-col grids collapse fully */
@media (max-width: 576px) {
	.wl-grid-cols-4 {
		grid-template-columns: 1fr;
	}

	.wl-archive-hero {
		flex-direction: column;
	}

	.wl-archive-search-box {
		width: 100%;
	}
}

/* Desktop only — hide drawer controls */
@media (min-width: 769px) {
	.wl-sidebar-drawer-toggle {
		display: none;
	}

	.wl-drawer-close {
		display: none;
	}

	.wl-drawer-overlay {
		display: none;
	}
}
