/**
 * Основные стили темы
 *
 * @package medexpress-by-fin-code
 */

/* ============================================
   Боковое меню (всегда видно слева)
   ============================================ */

.me-sidebar {
	position: fixed;
	left: 0;
	top: 0;
	width: 280px;
	height: 100vh;
	background: #fff;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	overflow-y: auto;
	transition: transform 0.3s ease;
}

.me-sidebar__inner {
	padding: 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.me-sidebar__logo {
	margin-bottom: 2rem;
}

.me-sidebar__logo-link {
	display: block;
	font-size: 1.5rem;
	font-weight: bold;
	text-decoration: none;
	color: #333;
}

.me-sidebar-nav {
	flex: 1;
}

.me-sidebar-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.me-sidebar-menu li {
	margin-bottom: 0.5rem;
}

.me-sidebar-menu a {
	display: block;
	padding: 0.75rem 1rem;
	color: #333;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.me-sidebar-menu a:hover,
.me-sidebar-menu a:focus,
.me-sidebar-menu .current-menu-item > a {
	background-color: #f0f0f0;
	color: #0073aa;
}

.me-sidebar__footer {
	margin-top: auto;
	padding-top: 2rem;
	border-top: 1px solid #eee;
}

.me-sidebar__toggle {
	display: none;
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1001;
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.me-sidebar__overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.me-sidebar__toggle-icon {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	position: relative;
}

.me-sidebar__toggle-icon::before,
.me-sidebar__toggle-icon::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 2px;
	background: currentColor;
	left: 0;
	transition: transform 0.3s ease;
}

.me-sidebar__toggle-icon::before {
	top: -8px;
}

.me-sidebar__toggle-icon::after {
	bottom: -8px;
}

.me-sidebar.is-open + .me-sidebar__toggle .me-sidebar__toggle-icon {
	background: transparent;
}

.me-sidebar.is-open + .me-sidebar__toggle .me-sidebar__toggle-icon::before {
	transform: rotate(45deg);
	top: 0;
}

.me-sidebar.is-open + .me-sidebar__toggle .me-sidebar__toggle-icon::after {
	transform: rotate(-45deg);
	bottom: 0;
}

/* ============================================
   Контент (с отступом для бокового меню)
   ============================================ */

.me-site {
	display: flex;
	min-height: 100vh;
}

.me-content {
	flex: 1;
	margin-left: 280px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

.me-header {
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	padding: 1rem 2rem;
}

.me-header__inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* ============================================
   Main
   ============================================ */

.me-main {
	flex: 1;
	padding: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

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

.me-footer {
	background: #333;
	color: #fff;
	padding: 3rem 2rem 1.5rem;
	margin-top: auto;
}

.me-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.me-footer__content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.me-footer__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.me-footer__nav li {
	margin-bottom: 0.5rem;
}

.me-footer__nav a {
	color: #fff;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

.me-footer__nav a:hover {
	opacity: 1;
}

.me-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
}

.me-footer__widget-area .widget {
	margin-bottom: 1.5rem;
}

.me-footer__widget-area .widget-title {
	color: #fff;
	margin-bottom: 1rem;
	font-size: 1.1rem;
}

.me-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 1.5rem;
	text-align: center;
}

.me-footer__copyright {
	opacity: 0.7;
	font-size: 0.9rem;
}

/* ============================================
   Мобильные устройства
   ============================================ */

@media (max-width: 768px) {
	.me-sidebar {
		transform: translateX(-100%);
	}

	.me-sidebar.is-open {
		transform: translateX(0);
	}

	.me-sidebar__toggle {
		display: block;
	}

	.me-sidebar__overlay {
		display: block;
	}

	.me-sidebar.is-open ~ .me-sidebar__overlay {
		opacity: 1;
		pointer-events: auto;
	}

	.me-sidebar__overlay {
		pointer-events: none;
	}

	.me-content {
		margin-left: 0;
	}

	.me-main {
		padding: 1rem;
	}

	.me-footer {
		padding: 2rem 1rem 1rem;
	}

	.me-footer__content,
	.me-footer__widgets {
		grid-template-columns: 1fr;
	}
}

/* ============================================
   Страницы и посты
   ============================================ */

.me-page {
	margin-bottom: 2rem;
}

.me-page__header {
	margin-bottom: 2rem;
}

.me-page__title {
	font-size: 2.5rem;
	margin: 0 0 1rem;
}

.me-page__content {
	line-height: 1.8;
}

.me-page__content p {
	margin-bottom: 1.5rem;
}

.me-page__content h2,
.me-page__content h3,
.me-page__content h4 {
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.me-page__links {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.me-post {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #eee;
}

.me-post:last-child {
	border-bottom: none;
}

.me-post__header {
	margin-bottom: 1rem;
}

.me-post__title {
	font-size: 2rem;
	margin: 0 0 0.5rem;
}

.me-post__title a {
	color: inherit;
	text-decoration: none;
}

.me-post__title a:hover {
	color: #0073aa;
}

.me-post__meta {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1rem;
}

.me-post__meta span {
	margin-right: 1rem;
}

.me-post__thumbnail {
	margin-bottom: 1.5rem;
}

.me-post__thumbnail img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.me-post__content {
	line-height: 1.8;
}

.me-post__footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.me-posts {
	margin-bottom: 3rem;
}

.me-no-posts {
	text-align: center;
	padding: 3rem;
	color: #666;
}

/* ============================================
   Кнопки
   ============================================ */

.me-button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background: #0073aa;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.me-button:hover {
	background: #005a87;
	color: #fff;
}

/* ============================================
   Утилиты
   ============================================ */

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999999;
}

.skip-link:focus {
	left: 6px;
	top: 7px;
	width: auto;
	height: auto;
	padding: 8px 16px;
	background: #000;
	color: #fff;
	text-decoration: none;
}
