/**
 * Responsive breakpoints + mobile hardening.
 */

html {
	overflow-x: clip;
}

body.beastro-theme {
	overflow-x: clip;
}

body.beastro-theme img,
body.beastro-theme svg,
body.beastro-theme video,
body.beastro-theme iframe {
	max-width: 100%;
	height: auto;
}

/* Keep container capped — never stretch edge-to-edge on wide screens */
body.beastro-theme .beastro-container,
html body .beastro-container {
	width: min(100%, var(--astro-container, 1280px));
	max-width: var(--astro-container, 1280px);
	margin-inline: auto;
	padding-inline: var(--astro-container-pad, 40px);
	box-sizing: border-box;
}

/* WD content shell full-bleed — gutters live on .beastro-container */
body.beastro-theme .wd-content-layout.container,
body.beastro-theme .content-layout-wrapper.container,
body.beastro-theme main.wd-content-layout.container,
html body .wd-content-layout.container,
html body .content-layout-wrapper.container,
html body main.wd-content-layout.container {
	max-width: none;
	width: 100%;
	padding: 0;
	box-sizing: border-box;
}

body.beastro-theme .beastro-container--wide,
html body .beastro-container--wide {
	width: min(100%, var(--astro-container-wide, 1380px));
	max-width: var(--astro-container-wide, 1380px);
}

body.beastro-theme .beastro-container--narrow,
html body .beastro-container--narrow {
	width: min(100%, var(--astro-content-narrow, 820px));
	max-width: var(--astro-content-narrow, 820px);
}

/* Tablet */
@media (min-width: 768px) {
	.beastro-hero__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.beastro-zodiac-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--astro-space-grid);
	}

	.beastro-consultations-grid,
	.beastro-guide-grid,
	.beastro-calendar-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--astro-space-grid);
	}

	.beastro-newsletter__grid {
		grid-template-columns: 1.1fr 1fr;
	}

	.beastro-filter-nav {
		flex-wrap: wrap;
		overflow: visible;
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.beastro-zodiac-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--astro-space-grid);
	}

	.beastro-consultations-grid,
	.beastro-guide-grid,
	.beastro-calendar-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.beastro-hero__visual {
		min-height: 28rem;
	}
}

/* Large desktop — controlled width, not sparse */
@media (min-width: 1280px) {
	.beastro-hero {
		min-height: 720px;
		padding-top: 6.5rem;
		padding-bottom: 5.5rem;
	}
}

/* Phones + small tablets */
@media (max-width: 767px) {
	.beastro-filter-nav {
		gap: 0.4rem;
		margin-bottom: 1.25rem;
	}

	.beastro-filter-nav__link {
		font-size: 0.8rem;
		padding: 0.3rem 0.7rem;
	}

	.beastro-article__tools,
	.beastro-btn-group,
	.beastro-purchase-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.beastro-article__tools .beastro-share {
		width: 100%;
	}

	.beastro-article__tools .beastro-share__btn,
	.beastro-article__tools .beastro-btn {
		flex: 1 1 auto;
	}

	.beastro-article__tools .beastro-article__back-link {
		margin-left: 0;
	}

	.beastro-article__aside {
		order: 0;
	}

	.beastro-single-danismanlik .beastro-article__aside {
		order: 0;
	}

	.beastro-toc {
		position: static;
	}

	.beastro-calendar-card__layout {
		grid-template-columns: 1fr;
	}

	.beastro-calendar-card__date {
		width: 100%;
		min-height: 3.25rem;
		flex-direction: row;
		gap: 0.5rem;
		justify-content: flex-start;
		padding: 0.5rem 0.75rem;
	}

	.beastro-post-nav__grid {
		grid-template-columns: 1fr;
	}

	.beastro-post-nav__next {
		text-align: left;
	}

	.beastro-account-upgrade {
		flex-direction: column;
		align-items: stretch;
	}

	.beastro-membership-grid,
	.beastro-contact-layout {
		grid-template-columns: 1fr;
	}

	.beastro-site-footer__grid {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.beastro-site-footer__legal {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.beastro-astrolog-hero .beastro-portrait {
		max-width: 320px;
	}

	.beastro-astrologer__image {
		max-width: 240px;
	}
}

/* Small phones — ensure touch targets & no overflow */
@media (max-width: 479px) {
	.beastro-btn-group {
		flex-direction: column;
		align-items: stretch;
	}

	.beastro-btn {
		width: 100%;
	}

	.beastro-zodiac-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.85rem;
	}

	.beastro-zodiac-card {
		min-height: 0;
		padding: 1.35rem 0.7rem 1.2rem;
	}

	.beastro-zodiac-card__icon {
		width: 4rem;
		height: 4rem;
		margin-bottom: 0.75rem;
	}

	.beastro-zodiac-card__icon svg {
		width: 2.25rem;
		height: 2.25rem;
	}

	.beastro-zodiac-card__name {
		font-size: 1.1rem;
	}

	.beastro-hero > .beastro-hero__grid > .beastro-hero__content .beastro-hero__title {
		font-size: clamp(2.1rem, 9vw, 2.75rem);
	}

	.beastro-hero__title {
		font-size: clamp(1.75rem, 8vw, 2.35rem);
	}

	.beastro-hero__visual {
		min-height: 16rem;
		order: -1;
	}

	.beastro-hero__image {
		max-width: min(100%, 420px);
		animation: none;
	}

	.beastro-hero__actions {
		width: 100%;
	}

	.beastro-btn--hero {
		width: 100%;
	}

	.beastro-section {
		padding-block: 3.25rem;
	}
}

/* Narrow phones — 390 / 360 */
@media (max-width: 390px) {
	.beastro-consultation-card__actions {
		flex-direction: column;
	}

	.beastro-consultation-card__actions .beastro-btn,
	.beastro-consultation-card__actions .beastro-add-to-cart {
		flex: 1 1 auto;
		width: 100%;
	}
}

/* Archive page section rhythm */
.beastro-section.beastro-article__hero,
.beastro-archive__header {
	padding-block: var(--astro-space-page);
}

.beastro-section + .beastro-section {
	scroll-margin-top: 1rem;
}

/* Prevent horizontal scroll from filter / account chips */
.beastro-filter-nav,
body.beastro-theme.woocommerce-account .woocommerce-MyAccount-navigation ul {
	max-width: 100%;
}
