/* =============================================================
   Mobile / responsive overrides.
   Theme is mobile-first; this file holds the breakpoint adjustments
   and mobile-specific behavior (sticky CTA, drawer, swipeable carousels).
   ============================================================= */

@media (max-width: 1024px) {
	.lhm-routine { grid-template-columns: 1fr; }
	.lhm-sleep   { grid-template-columns: 1fr; }
	.lhm-meals-output { grid-template-columns: 1fr; }
	.lhm-nursery {
		grid-template-columns: 1fr;
		grid-template-areas: "palette" "room" "actions" "suggestions";
	}
	.lhm-nursery-palette { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 8px; }
	.lhm-nursery-item { flex: 0 0 auto; white-space: nowrap; }

	.archive-layout, .lhm-single-layout { grid-template-columns: 1fr; }
	.archive-sidebar, .lhm-single-sidebar { order: 2; }
}

@media (max-width: 820px) {
	.primary-menu { display: none; }
	.mobile-menu-toggle { display: inline-flex; }
	.header-cta { display: none; }
	.footer-bottom .lhm-container { grid-template-columns: 1fr; text-align: center; }
	.footer-legal-nav .legal-menu { justify-content: center; }

	.lhm-section { padding: var(--lhm-space-7) 0; }
	.lhm-hero { padding: 80px 0 60px; }
	.lhm-hero-heading { font-size: clamp(1.8rem, 8vw, 2.6rem); }

	.lhm-quick-grid { grid-template-columns: repeat(2, 1fr); }
	.lhm-eeat-grid  { grid-template-columns: 1fr; }
	.lhm-essentials-grid { grid-template-columns: 1fr 1fr; }

	.lhm-wellness-grid th, .lhm-wellness-grid td { padding: 2px; font-size: .8rem; }
	.lhm-wellness-cell { height: 36px; }

	.lhm-compare-rail { display: none; }

	/* Mobile swipeable carousels */
	.lhm-quick-grid,
	.lhm-essentials-grid,
	.lhm-learning-grid {
		scroll-snap-type: x mandatory;
	}
}

@media (max-width: 540px) {
	body.lhm-body { font-size: 16px; }
	.lhm-container { padding-left: 16px; padding-right: 16px; }
	.lhm-quiz-card, .lhm-tracker, .lhm-meals, .lhm-postpartum, .lhm-wellness, .lhm-nursery, .lhm-sleep, .lhm-milestones, .lhm-compare { padding: var(--lhm-space-4); }
	.lhm-quick-grid { grid-template-columns: 1fr 1fr; }
	.lhm-essentials-grid { grid-template-columns: 1fr; }
	.lhm-hero-ctas .lhm-btn { width: 100%; }
	.lhm-product-procon { grid-template-columns: 1fr; }
	.lhm-mobile-sticky-cta { left: 8px; right: 8px; bottom: 8px; }
	.lhm-tracker-buttons { grid-template-columns: 1fr 1fr; }

	/* Drawer-style mobile menu always available */
	.mobile-menu-drawer { width: 100vw; }
}

/* Print styles for printable routines + planners */
@media print {
	.site-header, .site-footer, .lhm-mobile-sticky-cta, .lhm-compare-rail,
	.lhm-quick-grid, .lhm-hero-ambient { display: none !important; }
	.lhm-section { padding: 8mm 0; background: #fff !important; }
	.lhm-routine, .lhm-meals, .lhm-wellness, .lhm-tracker { box-shadow: none; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
	*, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
