/**
 * STW General Theme - Responsive Styles
 * Comprehensive responsive breakpoints for all screen sizes
 */

/* Extra Large Screens (1400px and up) */
@media screen and (min-width: 1400px) {
	.sidebar-layout .content-area {
		flex: 1 1 75%;
	}
	
	.sidebar-layout .sidebar-area {
		flex: 0 0 25%;
	}
}

/* Large Screens (1200px to 1399px) */
@media screen and (max-width: 1399px) and (min-width: 1200px) {
	.sidebar-layout .content-area {
		flex: 1 1 70%;
	}
	
	.sidebar-layout .sidebar-area {
		flex: 0 0 30%;
	}
}

/* Medium-Large Screens (1024px to 1199px) */
@media screen and (max-width: 1199px) and (min-width: 1024px) {
	.sidebar-layout .content-area {
		flex: 1 1 65%;
	}
	
	.sidebar-layout .sidebar-area {
		flex: 0 0 35%;
	}
}

/* Tablet Landscape (768px to 1023px) */
@media screen and (max-width: 1023px) and (min-width: 768px) {
	.sidebar-layout .content-area {
		flex: 1 1 60%;
	}
	
	.sidebar-layout .sidebar-area {
		flex: 0 0 40%;
	}
	
	.wp-block-group[style*="padding-right:2rem"] {
		padding-right: 1.5rem !important;
	}
	
	.wp-block-group[style*="padding-left:2rem"] {
		padding-left: 1.5rem !important;
	}
}

/* Tablet Portrait (600px to 767px) */
@media screen and (max-width: 767px) and (min-width: 600px) {
	.sidebar-layout {
		flex-direction: column;
	}
	
	.sidebar-layout .content-area,
	.sidebar-layout .sidebar-area {
		flex: 1 1 100%;
		width: 100%;
	}
	
	.sidebar-left .sidebar-area,
	.sidebar-left .content-area,
	.sidebar-right .sidebar-area,
	.sidebar-right .content-area {
		order: unset;
	}
	
	.sidebar-layout .content-area {
		order: 1;
	}
	
	.sidebar-layout .sidebar-area {
		order: 2;
	}
	
	.wp-block-columns {
		flex-direction: column;
	}
	
	.wp-block-column {
		flex-basis: 100% !important;
		width: 100%;
	}
}

/* Mobile Large (480px to 599px) */
@media screen and (max-width: 599px) and (min-width: 480px) {
	.sidebar-layout {
		flex-direction: column;
	}
	
	.sidebar-layout .content-area,
	.sidebar-layout .sidebar-area {
		flex: 1 1 100%;
		width: 100%;
		padding: 1rem !important;
	}
	
	.wp-block-group[style*="padding-right:2rem"] {
		padding-right: 1rem !important;
	}
	
	.wp-block-group[style*="padding-left:2rem"] {
		padding-left: 1rem !important;
	}
	
	.wp-block-navigation__responsive-container-open {
		display: block;
	}
}

/* Mobile Small (320px to 479px) */
@media screen and (max-width: 479px) {
	.sidebar-layout {
		flex-direction: column;
	}
	
	.sidebar-layout .content-area,
	.sidebar-layout .sidebar-area {
		flex: 1 1 100%;
		width: 100%;
		padding: 0.75rem !important;
	}
	
	.wp-block-group[style*="padding-right:2rem"],
	.wp-block-group[style*="padding-right:1.5rem"],
	.wp-block-group[style*="padding-right:1rem"] {
		padding-right: 0.75rem !important;
	}
	
	.wp-block-group[style*="padding-left:2rem"],
	.wp-block-group[style*="padding-left:1.5rem"],
	.wp-block-group[style*="padding-left:1rem"] {
		padding-left: 0.75rem !important;
	}
	
	.wp-block-navigation {
		width: 100%;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 0.75rem;
	}
	
	h1 {
		font-size: 1.75rem;
	}
	
	h2 {
		font-size: 1.5rem;
	}
	
	h3 {
		font-size: 1.25rem;
	}
}

/* Extra Small Screens (below 320px) */
@media screen and (max-width: 319px) {
	.wp-block-group[style*="padding"] {
		padding: 0.5rem !important;
	}
	
	body {
		font-size: 14px;
	}
	
	h1 {
		font-size: 1.5rem;
	}
	
	h2 {
		font-size: 1.25rem;
	}
	
	h3 {
		font-size: 1.1rem;
	}
}

/* Navigation Responsive */
@media screen and (max-width: 768px) {
	.wp-block-navigation__responsive-container-open {
		padding: 0.5rem;
	}
	
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		padding: 1rem;
	}
	
	.site-header .wp-block-group[style*="flex"] {
		flex-direction: column;
		gap: 1rem;
	}
}

/* Footer Responsive */
@media screen and (max-width: 768px) {
	.site-footer .wp-block-group[style*="flex"] {
		flex-direction: column;
		gap: 1.5rem;
	}
}

/* Images Responsive */
img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

.wp-block-image.alignfull img,
.wp-block-image.alignwide img {
	width: 100%;
}

/* Cover Block Responsive */
@media screen and (max-width: 768px) {
	.wp-block-cover {
		min-height: 300px !important;
	}
	
	.wp-block-cover__inner-container {
		padding: 1rem;
	}
}

/* Gallery Responsive */
@media screen and (max-width: 600px) {
	.wp-block-gallery.columns-3,
	.wp-block-gallery.columns-4,
	.wp-block-gallery.columns-5 {
		columns: 2;
	}
}

@media screen and (max-width: 400px) {
	.wp-block-gallery.columns-2,
	.wp-block-gallery.columns-3,
	.wp-block-gallery.columns-4,
	.wp-block-gallery.columns-5 {
		columns: 1;
	}
}

/* Table Responsive */
@media screen and (max-width: 600px) {
	.wp-block-table {
		overflow-x: auto;
		display: block;
	}
	
	.wp-block-table table {
		min-width: 500px;
	}
}

/* Buttons Responsive */
@media screen and (max-width: 480px) {
	.wp-block-buttons {
		flex-direction: column;
	}
	
	.wp-block-button {
		width: 100%;
	}
	
	.wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}

/* Query Pagination Responsive */
@media screen and (max-width: 480px) {
	.wp-block-query-pagination {
		flex-direction: column;
		gap: 0.5rem;
	}
}

/* Post Navigation Responsive */
@media screen and (max-width: 600px) {
	.wp-block-post-navigation-link {
		width: 100%;
		text-align: center;
	}
}

/* Comments Responsive */
@media screen and (max-width: 480px) {
	.wp-block-comments .wp-block-group[style*="flex"] {
		flex-direction: column;
	}
	
	.wp-block-avatar img {
		width: 30px;
		height: 30px;
	}
}

/* Print Styles */
@media print {
	.site-header,
	.site-footer,
	.sidebar-area,
	.wp-block-navigation {
		display: none;
	}
	
	.content-area {
		width: 100%;
		flex: 1 1 100%;
	}
	
	body {
		font-size: 12pt;
	}
}
