/**
 * Sports Hero Builder - Responsive Stylesheet
 *
 * Handles large desktop, desktop, tablet, and mobile breakpoints.
 *
 * @package SportsHeroBuilder
 */

/* ==========================================================================
   Large Desktop Screens (1440px and above)
   ========================================================================== */

@media (min-width: 1440px) {
	.shb-card--main .shb-content-wrap {
		padding: 40px;
	}

	.shb-card--main .shb-title {
		font-size: 2.6rem;
		line-height: 1.15;
	}

	.shb-card--support .shb-title {
		font-size: 1.35rem;
		line-height: 1.25;
	}

	.shb-excerpt {
		font-size: 1.05rem;
		max-width: 85%;
	}
}

/* ==========================================================================
   Small Desktop & Laptop (1024px - 1199px)
   ========================================================================== */

@media (max-width: 1199px) and (min-width: 1025px) {
	.shb-card--main .shb-content-wrap {
		padding: 26px;
	}

	.shb-card--support .shb-content-wrap {
		padding: 16px;
	}

	.shb-card--main .shb-title {
		font-size: 1.9rem;
	}

	.shb-card--support .shb-title {
		font-size: 1.1rem;
	}

	.shb-excerpt {
		font-size: 0.9rem;
		-webkit-line-clamp: 2;
	}
}

/* ==========================================================================
   Tablet Landscape & Portrait (768px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
	/* Style A: Editorial Stack switches to Main on top, 2 side-by-side below */
	.shb-style-editorial .shb-editorial-wrap {
		flex-direction: column;
		height: auto;
	}

	.shb-style-editorial .shb-col-main {
		flex: 0 0 auto;
		width: 100%;
		height: 440px;
	}

	.shb-style-editorial .shb-col-support {
		flex-direction: row;
		width: 100%;
		height: 280px;
	}

	.shb-style-editorial .shb-col-support .shb-card--support {
		flex: 1 1 calc(50% - (var(--shb-gap, 16px) / 2));
		height: 100%;
	}

	/* Style B: Grid switches to 2 columns */
	.shb-style-grid .shb-grid-wrap {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto auto;
		height: auto;
	}

	.shb-style-grid .shb-grid-item--primary {
		grid-column: 1 / 3;
		grid-row: 1 / 2;
		height: 440px;
	}

	.shb-style-grid .shb-grid-item--sub-1 {
		grid-column: 1 / 3;
		grid-row: 2 / 3;
		height: 260px;
	}

	.shb-style-grid .shb-grid-item--sub-2 {
		grid-column: 1 / 2;
		grid-row: 3 / 4;
		height: 240px;
	}

	.shb-style-grid .shb-grid-item--sub-3 {
		grid-column: 2 / 3;
		grid-row: 3 / 4;
		height: 240px;
	}

	/* Tablet Content Spacing */
	.shb-card--main .shb-content-wrap {
		padding: 24px;
	}

	.shb-card--support .shb-content-wrap {
		padding: 18px;
	}
}

/* ==========================================================================
   Mobile Devices (767px and below)
   ========================================================================== */

@media (max-width: 767px) {
	.shb-hero-container {
		overflow-x: hidden;
	}

	/* Style A Mobile: Vertical Stack */
	.shb-style-editorial .shb-editorial-wrap {
		flex-direction: column;
		height: auto;
		gap: var(--shb-gap, 12px);
	}

	.shb-style-editorial .shb-col-main {
		width: 100%;
		height: 380px;
	}

	.shb-style-editorial .shb-col-support {
		flex-direction: column;
		width: 100%;
		height: auto;
		gap: var(--shb-gap, 12px);
	}

	.shb-style-editorial .shb-col-support .shb-card--support {
		width: 100%;
		height: 230px;
		flex: 0 0 auto;
	}

	/* Style B Mobile: Clean Vertical Stack */
	.shb-style-grid .shb-grid-wrap {
		display: flex;
		flex-direction: column;
		height: auto;
		gap: var(--shb-gap, 12px);
	}

	.shb-style-grid .shb-grid-item--primary {
		width: 100%;
		height: 380px;
	}

	.shb-style-grid .shb-grid-item--sub-1,
	.shb-style-grid .shb-grid-item--sub-2,
	.shb-style-grid .shb-grid-item--sub-3 {
		width: 100%;
		height: 220px;
	}

	/* Content padding on mobile */
	.shb-card--main .shb-content-wrap {
		padding: 20px 16px;
	}

	.shb-card--support .shb-content-wrap {
		padding: 16px 14px;
	}

	/* Hide supporting card excerpts on mobile to avoid overcrowding */
	.shb-card--support .shb-excerpt {
		display: none;
	}

	.shb-card--main .shb-title {
		font-size: 1.45rem;
		line-height: 1.2;
		margin-bottom: 8px;
	}

	.shb-card--support .shb-title {
		font-size: 1.1rem;
		line-height: 1.25;
		margin-bottom: 6px;
	}

	.shb-card--main .shb-excerpt {
		font-size: 0.88rem;
		line-height: 1.4;
		margin-bottom: 10px;
		-webkit-line-clamp: 2;
	}

	.shb-meta {
		font-size: 0.76rem;
		gap: 4px;
	}

	.shb-action-wrap {
		margin-top: 12px;
	}

	.shb-read-more {
		padding: 7px 14px;
		font-size: 0.8rem;
	}

	/* Mobile touch: disable persistent hover transforms */
	@media (hover: none) {
		.shb-card:hover {
			transform: none;
			box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
		}

		.shb-card:hover .shb-image {
			transform: none;
		}

		.shb-card:hover .shb-overlay {
			opacity: 0.85;
		}
	}
}

/* ==========================================================================
   Small Mobile Devices (479px and below)
   ========================================================================== */

@media (max-width: 479px) {
	.shb-style-editorial .shb-col-main,
	.shb-style-grid .shb-grid-item--primary {
		height: 340px;
	}

	.shb-style-editorial .shb-col-support .shb-card--support,
	.shb-style-grid .shb-grid-item--sub-1,
	.shb-style-grid .shb-grid-item--sub-2,
	.shb-style-grid .shb-grid-item--sub-3 {
		height: 200px;
	}

	.shb-card--main .shb-content-wrap {
		padding: 16px 14px;
	}

	.shb-card--support .shb-content-wrap {
		padding: 14px 12px;
	}

	.shb-card--main .shb-title {
		font-size: 1.28rem;
	}

	.shb-card--support .shb-title {
		font-size: 1.02rem;
	}

	.shb-badge {
		font-size: 0.68rem;
		padding: 3px 8px;
	}

	.shb-meta-readtime {
		display: none; /* Hide reading time on extra narrow screens for brevity */
	}
}
