/* ============================================================
   responsive.css — mobile-first breakpoints.
   Loaded after core/components/downloader so it can override.
   ========================================================== */

/* ----- Mobile-first default; progressively enhance upward ----- */

/* 640px and up */
@media (min-width: 640px) {
	.container { padding-inline: var(--space-6); }
	.downloader { padding: var(--space-8); }
	.how-card { padding: var(--space-8); }
	.feature-card-grid { grid-template-columns: repeat(2, 1fr); }
	.tool-card-grid { grid-template-columns: repeat(2, 1fr); }
	.related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 768px and up */
@media (min-width: 768px) {
	:root { --header-height: 72px; }
	.feature-card-grid { grid-template-columns: repeat(3, 1fr); }
	.tool-card-grid { grid-template-columns: repeat(3, 1fr); }
	.related-grid { grid-template-columns: repeat(3, 1fr); }
	.trust-strip__list { grid-template-columns: repeat(4, 1fr); }
	.hero__inner { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
	.downloader__result-media[data-multiple] { grid-template-columns: repeat(3, 1fr); }
	.search-form__input { font-size: var(--fs-base); }
}

/* 1024px and up */
@media (min-width: 1024px) {
	.feature-card-grid { grid-template-columns: repeat(4, 1fr); }
	.tool-card-grid { grid-template-columns: repeat(4, 1fr); }
	.related-grid { grid-template-columns: repeat(4, 1fr); }
	.site-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
	.downloader { padding: var(--space-10); }
}

/* 1280px+ */
@media (min-width: 1280px) {
	:root { --wide-width: 1280px; }
	.how-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
	.hero__title { font-size: 3rem; }
}

/* 1440px+ */
@media (min-width: 1440px) {
	:root { --wide-width: 1400px; }
}

/* ----- Mobile-specific (≤ 767px) ----- */
@media (max-width: 767px) {
	.site-nav { display: none; }
	.menu-toggle { display: inline-flex; }
	.hero { padding-block: var(--space-10); }
	.hero__inner { grid-template-columns: 1fr; gap: var(--space-8); text-align: center; }
	.hero__trust { justify-content: center; grid-template-columns: 1fr 1fr; }
	.trust-list__item { justify-content: center; }
	.how-grid { grid-template-columns: 1fr; }
	.feature-card-grid,
	.tool-card-grid,
	.related-grid { grid-template-columns: 1fr; }
	.trust-strip__list { grid-template-columns: 1fr 1fr; }
	.site-footer__inner { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }
	.site-footer__legal-inner { flex-direction: column; text-align: center; gap: var(--space-2); }
	.downloader__meta-list { grid-template-columns: 1fr; }
	.downloader__result-actions { flex-direction: column; }
	.downloader__result-actions .button { width: 100%; }
	.button { width: 100%; }
	.button-lg { width: 100%; }
	.search-form__row { flex-direction: column; }
	.error-404__actions { flex-direction: column; }
	.error-404__actions .button { width: 100%; }
	.ad-slot { padding: var(--space-3); }
	.ad-slot--header { display: none; } /* mobile: drop header ads to save LCP */
}

/* ----- Extra small (≤ 360px) ----- */
@media (max-width: 360px) {
	.container { padding-inline: var(--space-3); }
	.hero__title { font-size: 1.75rem; }
	.trust-strip__list { grid-template-columns: 1fr; }
}

/* ----- Print ----- */
@media print {
	.site-header, .site-footer, .ad-slot, .menu-toggle, .theme-toggle,
	.mobile-nav, .downloader, .site-actions { display: none !important; }
	body { color: #000; background: #fff; }
	a { color: #000; text-decoration: underline; }
	.container { max-width: 100%; }
}

/* ----- High contrast ----- */
@media (forced-colors: active) {
	.button { border: 1px solid ButtonBorder; }
	.card { border: 1px solid CanvasText; }
	.downloader { border: 1px solid CanvasText; }
}
