/**
 * Global components — beastro-* namespace.
 */

/* --------------------------------------------------------------------------
   Base skin (scoped to body.beastro-theme)
   -------------------------------------------------------------------------- */
body.beastro-theme {
	background-color: #071521 !important;
	color: var(--astro-text-secondary);
	font-family: var(--astro-font-body);
	font-size: var(--astro-fs-body);
	line-height: var(--astro-lh-body);
	-webkit-font-smoothing: antialiased;
	--wd-main-bgcolor: #071521;
	--wd-container-w: var(--astro-container);
}

body.beastro-theme .website-wrapper,
body.beastro-theme .main-page-wrapper,
body.beastro-theme .wd-page-content,
body.beastro-theme .wd-page-wrapper,
body.beastro-theme #main-content {
	background-color: #071521 !important;
}

body.beastro-theme h1,
body.beastro-theme h2,
body.beastro-theme h3,
body.beastro-theme h4,
body.beastro-theme h5,
body.beastro-theme h6,
body.beastro-theme .beastro-heading {
	font-family: var(--astro-font-heading);
	color: var(--astro-text-primary);
	font-weight: 600;
	line-height: var(--astro-lh-heading);
	letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   Crumb bar — under header (scrolls with page, not sticky)
   -------------------------------------------------------------------------- */
.beastro-crumb-bar {
	background: var(--astro-bg-secondary);
	border-bottom: 1px solid var(--astro-divider);
	position: relative;
	z-index: 5;
	min-height: var(--astro-crumb-bar-height);
	/* Stay in normal flow below sticky-prepared header spacer */
	clear: both;
	isolation: isolate;
}

.beastro-crumb-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	min-height: var(--astro-crumb-bar-height);
	padding-block: 0.45rem;
}

.beastro-crumb-bar__label {
	margin: 0;
	flex: 0 1 auto;
	max-width: 42%;
	font-family: var(--astro-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--astro-text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.beastro-crumb-bar__label--empty {
	display: block;
	min-width: 0;
}

.beastro-crumb-bar .beastro-breadcrumbs,
.beastro-breadcrumbs--bar {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	justify-content: flex-end;
}

.beastro-crumb-bar .beastro-breadcrumbs__list {
	justify-content: flex-end;
	flex-wrap: nowrap;
	overflow: hidden;
	font-size: 0.8125rem;
}

.beastro-crumb-bar .beastro-breadcrumbs__item {
	white-space: nowrap;
}

.beastro-crumb-bar .beastro-breadcrumbs__item:not(:last-child)::after {
	color: var(--astro-text-muted);
	opacity: 0.7;
}

.beastro-crumb-bar .beastro-breadcrumbs a {
	color: var(--astro-gold);
}

.beastro-crumb-bar .beastro-breadcrumbs a:hover,
.beastro-crumb-bar .beastro-breadcrumbs a:focus-visible {
	color: var(--astro-gold-light);
}

.beastro-crumb-bar .beastro-breadcrumbs [aria-current="page"] {
	color: var(--astro-text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 14rem;
	display: inline-block;
	vertical-align: bottom;
}

@media (max-width: 767px) {
	.beastro-crumb-bar__inner {
		gap: 0.35rem 0.75rem;
	}

	.beastro-crumb-bar__label {
		max-width: 36%;
		font-size: 0.65rem;
		letter-spacing: 0.05em;
	}

	.beastro-crumb-bar .beastro-breadcrumbs__list {
		font-size: 0.72rem;
	}

	.beastro-crumb-bar .beastro-breadcrumbs [aria-current="page"] {
		max-width: 7.5rem;
	}
}

body.beastro-theme h1 {
	font-size: var(--astro-fs-h1-page);
}

body.beastro-theme.beastro-front-page h1,
body.beastro-theme .beastro-hero__title {
	font-size: var(--astro-fs-h1);
}

body.beastro-theme h2 {
	font-size: var(--astro-fs-h2);
}

body.beastro-theme h3 {
	font-size: var(--astro-fs-h3);
}

body.beastro-theme a {
	color: var(--astro-gold-light);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--astro-duration) var(--astro-ease);
}

body.beastro-theme a:hover,
body.beastro-theme a:focus-visible {
	color: var(--astro-gold);
}

body.beastro-theme :focus-visible {
	outline: 2px solid var(--astro-lavender);
	outline-offset: 3px;
}

/* Subtle star-field atmosphere (lightweight CSS, no image required) */
body.beastro-skin-dark {
	background-color: var(--astro-bg-primary);
	background-image:
		var(--beastro-stars-fine),
		radial-gradient(ellipse 70% 50% at 15% 20%, rgba(136, 124, 168, 0.1), transparent 60%),
		radial-gradient(ellipse 55% 40% at 85% 75%, rgba(197, 166, 107, 0.07), transparent 55%),
		linear-gradient(180deg, var(--astro-bg-primary) 0%, var(--astro-bg-primary) 100%);
	background-size: 320px 320px, auto, auto, auto;
	background-attachment: fixed, fixed, fixed, fixed;
}

/* Starry night sky — shared stage (homepage “Bugünün Gökyüzü” + sky calendar) */
.beastro-sky-stage,
.beastro-section--stars,
.beastro-hero--stars {
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

.beastro-sky-stage::before,
.beastro-section--stars::before,
.beastro-hero__stars {
	content: "";
	display: block;
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		var(--beastro-stars-fine),
		var(--beastro-stars-bright),
		radial-gradient(ellipse 65% 45% at 18% 22%, rgba(136, 124, 168, 0.16), transparent 62%),
		radial-gradient(ellipse 50% 40% at 82% 68%, rgba(197, 166, 107, 0.1), transparent 58%),
		radial-gradient(ellipse 40% 55% at 55% 90%, rgba(111, 143, 140, 0.08), transparent 55%);
	background-size:
		280px 280px,
		420px 420px,
		auto,
		auto,
		auto;
	background-position:
		0 0,
		40px 60px,
		center,
		center,
		center;
	opacity: 0.9;
}

.beastro-sky-stage::after,
.beastro-section--stars::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: var(--beastro-stars-bright);
	background-size: 520px 520px;
	background-position: 120px 80px;
	opacity: 0.55;
	animation: beastro-star-twinkle 7s ease-in-out infinite alternate;
}

.beastro-sky-stage > .beastro-container,
.beastro-section--stars > .beastro-container,
.beastro-hero--stars > .beastro-container {
	position: relative;
	z-index: 1;
}

/* Semi-transparent navy panel over star field (shared surface values) */
.beastro-sky-stage__panel {
	position: relative;
	z-index: 1;
	background-color: var(--beastro-sky-panel-bg, rgba(20, 43, 58, 0.9));
	background-image: none;
	border: 1px solid var(--beastro-sky-panel-border, rgba(232, 224, 210, 0.1));
	border-radius: var(--beastro-sky-panel-radius, 14px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: clamp(1.2rem, 2.8vw, 2rem) clamp(1rem, 2.4vw, 1.85rem);
	box-sizing: border-box;
}

.beastro-hero__stars {
	z-index: 2;
	opacity: 0.7;
	background-size:
		240px 240px,
		380px 380px,
		auto,
		auto,
		auto;
	animation: beastro-star-drift 48s linear infinite;
}

@keyframes beastro-star-twinkle {
	0% {
		opacity: 0.35;
	}
	100% {
		opacity: 0.7;
	}
}

@keyframes beastro-star-drift {
	0% {
		background-position:
			0 0,
			40px 60px,
			center,
			center,
			center;
	}
	100% {
		background-position:
			240px 120px,
			-80px 200px,
			center,
			center,
			center;
	}
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
/*
 * WoodMart wraps page content in `.container`. Prefer Beastro gutters:
 * make the WD content shell full-bleed, keep padding 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 {
	max-width: none;
	width: 100%;
	padding: 0;
	box-sizing: border-box;
}

.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;
}

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

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

.beastro-section {
	padding-block: var(--astro-space-section);
	position: relative;
}

.beastro-section--alt {
	background-color: var(--astro-bg-secondary);
}

.beastro-section__header {
	text-align: center;
	max-width: 40rem;
	margin-inline: auto;
	margin-bottom: var(--astro-space-block);
}

.beastro-eyebrow {
	display: inline-block;
	font-family: var(--astro-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--astro-gold);
	margin-bottom: 0.75rem;
}

.beastro-section__title {
	font-size: var(--astro-fs-h2);
	margin: 0 0 0.75rem;
}

.beastro-section__lead {
	margin: 0;
	color: var(--astro-text-secondary);
	font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.beastro-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--astro-input-height, 52px);
	padding: 0.85rem 1.6rem;
	font-family: var(--astro-font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	box-sizing: border-box;
	border-radius: var(--astro-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition:
		background-color var(--astro-duration) var(--astro-ease),
		color var(--astro-duration) var(--astro-ease),
		border-color var(--astro-duration) var(--astro-ease),
		transform var(--astro-duration) var(--astro-ease),
		box-shadow var(--astro-duration) var(--astro-ease);
}

.beastro-btn:hover,
.beastro-btn:focus-visible {
	text-decoration: none;
}

.beastro-btn--primary {
	background-color: var(--astro-btn-primary-bg);
	color: var(--astro-btn-primary-text);
	border-color: var(--astro-gold);
}

.beastro-btn--primary:hover,
.beastro-btn--primary:focus-visible {
	background-color: var(--astro-gold-light);
	color: var(--astro-btn-primary-text);
	box-shadow: 0 0 0 1px var(--astro-glow-gold);
}

.beastro-btn--secondary {
	background-color: transparent;
	color: var(--astro-btn-secondary-text);
	border-color: var(--astro-btn-secondary-border);
}

.beastro-btn--secondary:hover,
.beastro-btn--secondary:focus-visible {
	background-color: color-mix(in srgb, var(--astro-gold) 12%, transparent);
	color: var(--astro-gold-light);
}

.beastro-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: var(--astro-gold-light);
	padding-inline: 0.5rem;
}

.beastro-btn--ghost:hover,
.beastro-btn--ghost:focus-visible {
	color: var(--astro-gold);
}

.beastro-btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	align-items: center;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.beastro-card {
	background-color: var(--astro-surface);
	border: 1px solid var(--astro-divider);
	border-radius: var(--astro-radius-md);
	padding: var(--astro-space-card);
	transition:
		border-color var(--astro-duration) var(--astro-ease),
		transform var(--astro-duration) var(--astro-ease),
		box-shadow var(--astro-duration) var(--astro-ease);
}

.beastro-card:hover,
.beastro-card:focus-within {
	border-color: color-mix(in srgb, var(--astro-gold) 55%, var(--astro-divider));
	box-shadow: 0 0 0 1px var(--astro-glow-gold), 0 14px 28px rgba(0, 0, 0, 0.28);
	transform: translateY(-4px);
}

.beastro-card--active,
.beastro-card.is-active {
	border-color: var(--astro-lavender);
	box-shadow: 0 0 0 1px var(--astro-lavender), 0 12px 32px var(--astro-glow-lavender);
}

.beastro-card__title {
	font-family: var(--astro-font-heading);
	font-size: var(--astro-fs-card-title);
	font-weight: 600;
	color: var(--astro-text-primary);
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.beastro-card__meta {
	font-size: var(--astro-fs-small);
	color: var(--astro-text-muted);
	margin: 0 0 0.75rem;
}

.beastro-card__text {
	margin: 0 0 1rem;
	color: var(--astro-text-secondary);
}

.beastro-card__link {
	font-weight: 600;
	font-size: var(--astro-fs-small);
	color: var(--astro-gold);
	text-decoration: none;
}

.beastro-card__link:hover,
.beastro-card__link:focus-visible {
	color: var(--astro-gold-light);
}

/* --------------------------------------------------------------------------
   Badge / pill (sparingly)
   -------------------------------------------------------------------------- */
.beastro-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.6rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: var(--astro-radius-sm);
	background-color: color-mix(in srgb, var(--astro-lavender) 30%, var(--astro-surface));
	color: var(--astro-text-primary);
	border: 1px solid var(--astro-lavender);
}

.beastro-badge--gold {
	background-color: color-mix(in srgb, var(--astro-gold) 22%, var(--astro-surface));
	border-color: var(--astro-gold);
	color: var(--astro-gold-light);
}

.beastro-badge--petrol {
	background-color: color-mix(in srgb, var(--astro-petrol) 28%, var(--astro-surface));
	border-color: var(--astro-petrol);
	color: var(--astro-text-primary);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.beastro-form-row {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.beastro-label {
	font-size: var(--astro-fs-small);
	font-weight: 600;
	color: var(--astro-text-primary);
}

.beastro-input,
.beastro-textarea,
.beastro-select {
	min-height: var(--astro-input-height, 52px);
	width: 100%;
	padding: 0.75rem 1rem;
	background-color: var(--astro-surface);
	border: 1px solid var(--astro-divider);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-text-primary);
	font-family: var(--astro-font-body);
	font-size: 1rem;
	box-sizing: border-box;
	transition: border-color var(--astro-duration) var(--astro-ease);
}

.beastro-textarea {
	min-height: 7rem;
	resize: vertical;
}

.beastro-input:focus,
.beastro-textarea:focus,
.beastro-select:focus {
	border-color: var(--astro-lavender);
	outline: none;
	box-shadow: 0 0 0 2px var(--astro-glow-lavender);
}

.beastro-input::placeholder,
.beastro-textarea::placeholder {
	color: var(--astro-text-muted);
}

.beastro-form-error {
	color: var(--astro-error);
	font-size: var(--astro-fs-small);
}

.beastro-form-success {
	color: var(--astro-success);
	font-size: var(--astro-fs-small);
}

.beastro-field-help {
	margin: 0.35rem 0 0;
	font-size: var(--astro-fs-small);
	color: var(--astro-text-muted);
	line-height: 1.45;
}

.beastro-place-autocomplete {
	position: relative;
	width: 100%;
}

.beastro-place-autocomplete__list {
	position: absolute;
	z-index: 40;
	left: 0;
	right: 0;
	top: calc(100% + 0.25rem);
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	max-height: 14rem;
	overflow-y: auto;
	overflow-x: hidden;
	background: var(--astro-surface);
	border: 1px solid var(--astro-divider);
	border-radius: var(--astro-radius-sm);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.beastro-place-autocomplete__option {
	display: block;
	width: 100%;
	padding: 0.7rem 0.95rem;
	cursor: pointer;
	color: var(--astro-text-primary);
	font-size: 0.95rem;
	line-height: 1.35;
	box-sizing: border-box;
}

.beastro-place-autocomplete__option:hover,
.beastro-place-autocomplete__option.is-active {
	background: rgba(167, 139, 250, 0.14);
	color: var(--astro-text-primary);
}

.beastro-place-autocomplete__label {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.beastro-place-autocomplete__status {
	margin: 0.4rem 0 0;
	font-size: var(--astro-fs-small);
	color: var(--astro-text-muted);
}

.beastro-place-autocomplete__status.is-error {
	color: var(--astro-error);
}

.beastro-form-row--place {
	position: relative;
	z-index: 2;
}

/* --------------------------------------------------------------------------
   Icon circle (line-art containers)
   -------------------------------------------------------------------------- */
.beastro-icon-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--astro-gold) 45%, var(--astro-divider));
	color: var(--astro-gold-light);
	background: color-mix(in srgb, var(--astro-gold) 10%, var(--astro-surface-elevated));
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--astro-gold) 8%, transparent);
}

.beastro-icon-circle svg {
	width: 1.55rem;
	height: 1.55rem;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */
.beastro-divider {
	border: 0;
	height: 1px;
	background: var(--astro-divider);
	margin: var(--astro-space-block) 0;
}

/* --------------------------------------------------------------------------
   Screen-reader / a11y
   -------------------------------------------------------------------------- */
.beastro-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.beastro-decorative[aria-hidden="true"] {
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Reveal motion
   -------------------------------------------------------------------------- */
[data-beastro-reveal] {
	opacity: 0;
	transform: translateY(1rem);
	transition:
		opacity calc(var(--astro-duration) * 1.4) var(--astro-ease),
		transform calc(var(--astro-duration) * 1.4) var(--astro-ease);
}

[data-beastro-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.beastro-card,
	.beastro-btn,
	body.beastro-theme a,
	[data-beastro-reveal] {
		transition: none;
	}

	[data-beastro-reveal] {
		opacity: 1;
		transform: none;
	}

	.beastro-card:hover,
	.beastro-card:focus-within {
		transform: none;
	}

	.beastro-sky-stage::after,
	.beastro-section--stars::after,
	.beastro-hero__stars {
		animation: none;
	}
}
