.page-wrapper { min-width: 320px; box-sizing: border-box; }
body.home .page-inner-container,
body.home .page-col-full {
		max-width: 100%;
}

@media only screen and (max-width: 1520px) {
	.featured-large-title { font-size: 32px; }
	.page-col { width: 40%; }
	.page-col-sidebar { width: 30%; }
}
@media only screen and (max-width: 1340px) {
	body.home .page-row { display: block; }
	.page-col-featured { width: 40%; float: left; box-sizing: border-box; }
	.page-col { width: 60%; float: left; padding-right: 0; }
	.page-col-sidebar { width: 100%; float: left; }
	.page-col-sidebar .sidebar-content { max-width: 420px; margin: 0 auto; }
	
	.page-grid { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
	
	/* blog home */
	.blog-card-title { font-size: 18px; }
	.blog-card-excerpt { font-size: 14px; }
	
	/* single */
	body.single .page-row { margin-top: 0; }
	.header-single { display: block; aspect-ratio: 0; }
	.header-single-content { background: none; box-shadow: none; padding-bottom: 20px; backdrop-filter: none; -webkit-backdrop-filter: none; }
	.header-single-thumb { position: static; width: 100%; height: 300px; border-radius: 30px; }
	.header-single-title { font-size: 32px; }	
}
@media only screen and (max-width: 1340px) and (min-width: 1024px) {
	/* featured block */
	.featured-card { aspect-ratio: 2/3; }
	.featured-large-title { font-size: 24px; }
	/* highlights block */
	.highlights-card-inner { padding-left: 0; }
	.highlights-card-left { float: none; margin-left: 0; }
	.highlights-card-thumb { width: 100%; }  
	.highlights-card-title { width: 100%; margin-top: 15px; }
}
@media only screen and (max-width: 1200px) {
	.page-col-center { width: 65%; }
	.page-col-sidebar-center { width: 35%; }
	.page-grid-center { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); }
	/* Latest posts layout - на экранах меньше 1200px переключаемся на вертикальное расположение */
	body.home .page-inner-container,
	body.home .page-col-full {
		max-width: 100%;
	}
	.latest-posts-layout { flex-direction: column; }
	.latest-posts-featured { flex: 1 1 100% !important; max-width: 100% !important; width: 100% !important; }
	.latest-posts-grid { flex: 1 1 100% !important; max-width: 100% !important; width: 100% !important; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
	
}
@media only screen and (max-width: 1023px) {
	.page-col-featured { width: 100%; padding-right: 0; }
	.page-col { width: 100%; padding-right: 0; }
	.page-col-sidebar { width: 100%; }
	/* featured block */
	.featured-card { aspect-ratio: 3/2; }
	
	body.home .page-row,
	body.blog .page-row,
	body.archive .page-row,
	body.category .page-row,
	body.tag .page-row,
	body.single .page-row,
	body.search .page-row,
	body.page .page-row,
	body.error404 .page-row	{ display: block; }
	.page-col-center { width: 100%; padding-right: 0; }
	.page-col-sidebar-center { width: 100%; }
	.page-col-sidebar-center .sidebar-content { max-width: 420px; margin: 0 auto; }
	.page-grid-center { grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 15px; }
	
	body.home.paged .page-col-featured { display: none; }
}
@media only screen and (max-width: 820px) {
	
}
@media only screen and (max-width: 719px) {
	/* Latest posts layout - мобильные */
	.latest-posts-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, auto); }
	.latest-posts-featured .featured-card { aspect-ratio: 16/9; }
	.latest-posts-featured .featured-large-title { font-size: 28px; }
	.latest-posts-grid .featured-card-small { aspect-ratio: 16/9; height: auto; }
	.featured-card-title-small { font-size: 18px; }
	.grid { width: 100%; margin: 0 0 10px; }
	.entry { font-size: 15px; }
	.entry h1 { font-size: 30px; letter-spacing: -0.7px; }
	.entry h2 { font-size: 26px; letter-spacing: -0.5px; }
	.entry h3 { font-size: 24px; letter-spacing: -0.3px; }
	.entry h4 { font-size: 22px; letter-spacing: -0.3px; }
	.entry h5 { font-size: 18px; }
	.entry h6 { font-size: 16px; text-transform: uppercase; }
	.entry-header .entry-title { font-size: 28px; }
	
	.site-title { padding: 10px 0; margin-left: 20px; }
	.site-title a { flex-wrap: wrap; gap: 8px; }
	.site-title a img { max-height: 40px; }
	.site-description { display: none; }
	
	.page-wrapper { padding: 0; }
	.page-inner { padding: 15px; }
	.page-sidebar { min-height: 53px; border-bottom: 1px solid rgba(0,0,0,0.06); border-radius: 0; box-shadow: none; position: relative; padding: 0; top: auto!important; left: auto; bottom: auto; right: auto; width: 100%; }
	/* Скрываем theme-toggle в sidebar на мобильных */
	.page-sidebar #theme-toggle { display: none; }
	.page-header { padding: 0; display: block; position: relative; top: auto!important; left: auto; bottom: auto; right: auto; height: auto; box-shadow: none; }
	
	/* Размещаем theme-toggle внизу menu-overlay-content */
	.menu-overlay-content {
		display: flex;
		flex-direction: column;
		position: relative;
	}
	
	.menu-overlay-content .main-menu {
		flex: 1;
		overflow-y: auto;
		padding-bottom: 80px; /* Отступ снизу для theme-toggle, чтобы не перекрывался с меню */
	}
	
	/* Размещаем theme-toggle внизу menu-overlay-content */
	.menu-overlay-content #theme-toggle {
		position: absolute;
		bottom: 20px;
		left: 50%;
		transform: translateX(-50%);
		display: block;
		width: auto;
		min-width: 200px;
		max-width: calc(100% - 40px);
		padding: 12px;
		border-radius: 16px;
		z-index: 10000;
		margin: 0;
	}
	
	.menu-overlay-content #theme-toggle i {
		top: 17px;
		right: 17px;
	}
	
	.canvas-bottom { display: none; }
	.canvas-wrapper { padding: 0; top: 0!important; }
	.canvas-inner { border-radius: 0; border: 0; }
	.canvas-inner:after { display: none; }
	
	.page-sidebar .social-links { margin: 10px 20px 0; width: auto; }
	.page-sidebar .social-links li { float: left; width: auto; margin-right: 6px; }
	.page-sidebar .social-links .social-tooltip { margin: 0; font-size: 16px; padding: 8px; }
	.page-sidebar .social-links .social-tooltip:hover:after,
	.page-sidebar .social-links .social-tooltip:hover:before { display: none; }
	
	.sharrre-header { margin: 10px 20px 0; width: auto; }
	.sharrre-header .sharrre { float: left; width: auto; margin-right: 6px; }
	.sharrre-header .sharrre .box { margin: 0; font-size: 16px; padding: 8px; }
	.sharrre-header .sharrre .box .share { height: 16px; }
	.sharrre-header .sharrre .box .share i:before { position: relative; top: -2px; }
	.sharrre-footer .sharrre .share span { display: none; }
	
	.featured-card { aspect-ratio: 5/4; }
	.featured-large-title { font-size: 22px; }
	.featured-card-avatar,
	.featured-card-divider { display: none; }
	
	.header-single-thumb { height: 200px; }
	.header-single-title { font-size: 22px; }
	
	#footer { margin: 0; }
	#footer .pad { padding: 0; }
	#back-to-top { margin-left: -20px; width: 40px; height: 20px; }
	#back-to-top i { font-size: 26px; }
}

@media only screen and (max-width: 479px) {
	/* featured block */
	.featured-card { aspect-ratio: 4/5; }
	/* highlights block */
	.highlights-card-inner { padding-left: 0; }
	.highlights-card-left { float: none; margin-left: 0; }
	.highlights-card-thumb { width: 100%; }  
	.highlights-card-title { width: 100%; margin-top: 15px; }
	
	.page-card-latest .themeform.searchform { position: static; padding: 0 30px 20px; }
	
	.header-single-content { padding-left: 20px; padding-right: 20px; }
	.header-single-meta { font-size: 10px; gap: 12px; }
	.header-single-meta .header-single-date-published,
	.header-single-meta .header-single-date-updated { flex-direction: column; align-items: flex-start; gap: 4px; }
	.header-single-meta .meta-label { font-size: 9px; }
	
	.entry, 
	.entry-header, 
	.entry-footer { padding-left: 20px; padding-right: 20px; }
	.entry-header { padding-top: 20px; }
	.entry-header .entry-title { font-size: 22px; }
	
	.page-grid-center { grid-template-columns: 1fr; gap: 15px; }
	
	.sharrre-footer .sharrre .count { display: none; }
	
	#footer-bottom { font-size: 13px; }
	
}

