/* Breakpoints mirror the supplied HTML references: 1100 / 900 / 768 / 480 */

/* =========================================================
   1100px — LARGE TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1100px) {

	.footer-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.sticky-share {
		display: none !important;
	}

	.resource-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Homepage recent posts */
	.sd-home-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Homepage trending */
	.sd-home-trending-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}


/* =========================================================
   900px — TABLET
   ========================================================= */

@media (max-width: 900px) {

	.hero-grid {
		grid-template-columns: 1fr;
	}

	.article-grid {
		grid-template-columns: 1fr;
	}

	.category-grid {
		grid-template-columns: 1fr;
	}

	.cat-hero-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.cat-hero-badge {
		display: none;
	}

	.article-title {
		font-size: 24px;
	}

	.grid-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Homepage recent posts */
	.sd-home-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Homepage trending */
	.sd-home-trending-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Keep homepage cards inside their grid */
	.sd-home-post-card,
	.sd-home-trending-card {
		min-width: 0;
		width: 100%;
	}

}


/* =========================================================
   768px — MOBILE / SMALL TABLET
   ========================================================= */

@media (max-width: 768px) {

	.nav-links {
		display: none;
	}

	.hamburger {
		display: flex;
		align-items: center;
	}

	.grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.grid-6 {
		grid-template-columns: repeat(3, 1fr);
	}

	.grid-3,
	.grid-cards {
		grid-template-columns: 1fr;
	}

	.seo-grid {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.slider-grid {
		grid-template-columns: 1fr;
	}

	.resource-grid {
		grid-template-columns: 1fr;
	}

	.cat-hero {
		padding: 24px 20px;
	}

	.cat-hero-title {
		font-size: 28px;
	}

	.article-featured-img {
		height: 220px;
	}

	.pillar-nav-inner {
		-webkit-overflow-scrolling: touch;
	}

	section,
	.mb-10 {
		margin-bottom: var(--theme-mobile-spacing);
	}


	/* ---------------------------------------------------------
	   Homepage Recent Blog Posts
	   --------------------------------------------------------- */

	.sd-home-post-grid {
		grid-template-columns: 1fr;
		width: 100%;
	}

	.sd-home-post-card {
		width: 100%;
		min-width: 0;
	}

	.sd-home-post-card__media {
		width: 100%;
		height: 200px;
		min-height: 200px;
		flex-basis: 200px;
	}

	.sd-home-post-card__content {
		width: 100%;
		min-width: 0;
		padding: 16px;
	}


	/* ---------------------------------------------------------
	   Homepage Trending Blogs
	   --------------------------------------------------------- */

	.sd-home-trending-grid {
		grid-template-columns: 1fr;
		width: 100%;
	}

	.sd-home-trending-card {
		width: 100%;
		min-width: 0;
	}

	.sd-home-trending-card__media {
		width: 100%;
		height: 200px;
		min-height: 200px;
		flex-basis: 200px;
	}

	.sd-home-trending-card__content {
		width: 100%;
		min-width: 0;
		padding: 16px;
	}

	.sd-home-trending-card__meta {
		flex-wrap: wrap;
	}


	/* ---------------------------------------------------------
	   Prevent text/content from forcing horizontal overflow
	   --------------------------------------------------------- */

	.sd-home-post-card *,
	.sd-home-trending-card * {
		max-width: 100%;
		min-width: 0;
		word-wrap: break-word;
		overflow-wrap: break-word;
	}

}


/* =========================================================
   480px — SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

	.grid-6 {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.featured-title {
		font-size: 18px;
	}

	.container {
		padding: 0 14px;
	}

	.article-title {
		font-size: 21px;
	}


	/* Homepage Recent Blog Posts */

	.sd-home-post-card__media {
		height: 190px;
		min-height: 190px;
		flex-basis: 190px;
	}

	.sd-home-post-card__content {
		padding: 15px;
	}

	.sd-home-post-card__title {
		font-size: 16px;
	}

	.sd-home-post-card__excerpt {
		font-size: 13px;
	}


	/* Homepage Trending Blogs */

	.sd-home-trending-card__media {
		height: 190px;
		min-height: 190px;
		flex-basis: 190px;
	}

	.sd-home-trending-card__content {
		padding: 15px;
	}

	.sd-home-trending-card__title {
		font-size: 15px;
	}

	.sd-home-trending-card__excerpt {
		font-size: 12px;
	}

}


/* =========================================================
   GLOBAL OVERFLOW PROTECTION
   ========================================================= */

/* Never allow horizontal overflow on small screens */
html,
body {
	overflow-x: hidden;
}

img,
video,
iframe {
	max-width: 100%;
}


/* =========================================================
   HOMEPAGE CARD OVERFLOW PROTECTION
   ========================================================= */

.sd-home-post-grid,
.sd-home-trending-grid {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.sd-home-post-card,
.sd-home-trending-card {
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.sd-home-post-card__media,
.sd-home-trending-card__media {
	max-width: 100%;
	box-sizing: border-box;
}

.sd-home-post-card__media img,
.sd-home-trending-card__media img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
}


/* =========================================================
   TOUCH TARGET SIZING
   ========================================================= */

@media (max-width: 768px) {

	.nav-link,
	.pillar-btn,
	.faq-btn,
	.share-btn,
	.social-btn,
	.carousel-btn,
	.page-btn {
		min-height: 40px;
	}

}
/* ── SINGLE POST MOBILE ── */

@media (max-width: 768px) {

	.sd-single-page {
		width: 100%;
		max-width: 100%;
		padding-top: 18px;
		padding-left: 16px;
		padding-right: 16px;
	}

	.sd-article-layout {
		width: 100%;
		max-width: 100%;
	}

	.sd-single-article {
		width: 100%;
	}

	.article-featured-img {
		height: 210px;
		margin-bottom: 18px;
		border-radius: 12px;
	}

	.article-title {
		font-size: 26px;
		line-height: 1.25;
		letter-spacing: -0.015em;
		margin-bottom: 9px;
	}

	.article-meta {
		gap: 7px 10px;
		margin-bottom: 12px;
		font-size: 11px;
	}

	.share-row {
		gap: 7px;
		margin-bottom: 18px;
	}

	.share-btn {
		width: 29px;
		height: 29px;
		font-size: 12px;
	}

	.pillar-nav {
		margin-bottom: 18px;
		border-radius: 10px;
	}

	.pillar-btn {
		padding: 9px 13px;
		font-size: 11px;
	}

	.tldr-box {
		padding: 16px;
		margin-bottom: 24px;
		border-radius: 10px;
	}

	.article-body {
		max-width: 100%;
		font-size: 16px;
		line-height: 1.7;
	}

	.article-body h2 {
		font-size: 22px;
		margin-top: 30px;
	}

	.article-body h3 {
		font-size: 19px;
		margin-top: 24px;
	}

	.article-body p {
		margin-bottom: 18px;
	}

	.schema-faq {
		margin-top: 30px;
	}

	.schema-faq-question {
		padding: 15px 16px;
		font-size: 15px;
	}

	.schema-faq-answer {
		padding: 16px;
		font-size: 14px;
	}

	#sd-comments {
		margin-top: 30px;
		padding-top: 22px;
	}

}