/* ==========================================================================
   SeedsVision — base styles
   ========================================================================== */

:root {
	--color-bg: #ffffff;
	--color-fg: #111111;
	--color-fg-muted: #5b5b5b;
	--color-bar: #000000;
	--color-bar-fg: #ffffff;
	--color-border: #e6e6e6;
	--color-hover: #f4f4f4;
	--color-accent: #14432b;

	/* Brand palette */
	--color-green: #15402a;          /* dark forest green — newsletter band, green buttons */
	--color-green-dark: #0c2a1b;     /* footer */
	--color-green-fg: #ffffff;
	--color-green-fg-muted: rgba(255, 255, 255, 0.66);
	--color-yellow: #f4b400;         /* CTA / register button */
	--color-yellow-hover: #dca300;
	--color-yellow-fg: #1a1a1a;

	--color-placeholder: #d7d7d7;

	--container-max: 1440px;
	--container-pad: 40px;

	--header-h: 80px;
	--topbar-h: 36px;

	--font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--radius-sm: 4px;
	--radius-pill: 999px;

	--shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12);
	--transition: 150ms ease;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

/*
 * The HTML `hidden` attribute must always beat layout rules that force
 * `display: flex` / `display: grid`. An author `display: flex` on a class
 * outranks the UA stylesheet's `[hidden] { display: none }` no matter the
 * specificity, so without this an overlay like `.variety-lightbox[hidden]`
 * covers the whole page and JS toggling `el.hidden` does nothing at all.
 */
[hidden] {
	display: none !important;
}

body {
	margin: 0;
	font-family: var(--font-base);
	font-size: 15px;
	line-height: 1.5;
	color: var(--color-fg);
	background: var(--color-bg);
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover,
a:focus-visible {
	text-decoration: underline;
}

button {
	font-family: inherit;
	cursor: pointer;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-pad);
	width: 100%;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Gray image placeholder (swap for real assets later) */
.placeholder-img {
	display: block;
	background: var(--color-placeholder);
	border-radius: var(--radius-sm);
}
.placeholder-img--on-dark {
	background: rgba(255, 255, 255, 0.16);
}

.skip-link {
	position: absolute;
	left: -9999px;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
	background: #fff;
	padding: 8px 12px;
	z-index: 1000;
	border: 2px solid var(--color-fg);
}

.site-wrap {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
}

/* ==========================================================================
   Language switcher (header globe icon)
   ========================================================================== */

.lang-switcher {
	position: relative;
	display: inline-flex;
}

.lang-switcher__list {
	position: absolute;
	right: 0;
	top: 100%;
	min-width: 160px;
	background: #fff;
	color: var(--color-fg);
	box-shadow: var(--shadow-pop);
	border-radius: var(--radius-sm);
	padding: 6px 0;
	display: none;
	z-index: 50;
}

.lang-switcher[data-open="true"] .lang-switcher__list {
	display: block;
}

.lang-switcher__item {
	display: block;
	padding: 8px 14px;
	font-size: 14px;
}

.lang-switcher__item:hover,
.lang-switcher__item:focus-visible {
	background: var(--color-hover);
	text-decoration: none;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	background: #fff;
	border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: var(--header-h);
}

.site-branding {
	flex-shrink: 0;
}

.site-branding__placeholder {
	width: 132px;
	height: 44px;
}

.site-branding__logo {
	display: inline-flex;
}

.site-branding__logo img {
	display: block;
	width: auto;
	height: 48px;
	max-height: 48px;
}

.site-branding__logo:hover {
	text-decoration: none;
}

.custom-logo-link img {
	display: block;
	max-height: 44px;
	width: auto;
}

/* Hamburger (mobile only) */

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	padding: 0;
	color: var(--color-fg);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before { position: absolute; top: -7px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 7px; left: 0; }

.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Primary nav */

.site-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

/* Auth / user blocks live inside the mobile drawer (hidden on desktop) */
.site-nav__auth,
.site-nav__user {
	display: none;
}

/* Off-canvas backdrop (only rendered/visible on mobile) */
.nav-overlay {
	display: none;
}

/* Logged-in user block inside the mobile drawer */
.nav-user {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.nav-user__avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-green);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	user-select: none;
}

.nav-user__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nav-user__name {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-fg);
}

.nav-user__role {
	font-size: 13px;
	color: var(--color-fg-muted);
}

.nav-user__links {
	display: flex;
	flex-direction: column;
}

.nav-user__link {
	display: block;
	padding: 12px 0;
	font-size: 15px;
	color: var(--color-fg);
}

.nav-user__link:hover {
	color: var(--color-green);
	text-decoration: none;
}

.nav__menu {
	display: flex;
	align-items: center;
	gap: 28px;
}

.nav__item,
.menu-item {
	position: relative;
}

.nav__link,
.menu-item > a {
	font-size: 15px;
	color: var(--color-fg);
	padding: 8px 0;
	display: inline-block;
	transition: color var(--transition);
}

.nav__link:hover,
.menu-item > a:hover,
.current-menu-item > a {
	color: var(--color-green);
	text-decoration: none;
	border-bottom: 2px solid var(--color-green);
	padding-bottom: 6px;
}

/* Header actions */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.icon-btn {
	background: transparent;
	border: 0;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-fg);
	border-radius: var(--radius-pill);
	transition: background var(--transition);
}

.icon-btn:hover,
.icon-btn:focus-visible {
	background: var(--color-hover);
}

/* User menu (avatar) */

.user-menu {
	position: relative;
}

.user-menu__toggle {
	position: relative;
	background: transparent;
	border: 0;
	padding: 0;
	border-radius: 50%;
}

.user-menu__badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #000;
	color: #fff;
	border: 2px solid #fff;
	border-radius: var(--radius-pill);
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
}

.user-menu__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #b8b8b8;
	color: #fff;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	user-select: none;
}

.user-menu__dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 220px;
	background: #fff;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-pop);
	padding: 6px 0;
	display: none;
	z-index: 50;
}

.user-menu[data-open="true"] .user-menu__dropdown {
	display: block;
}

.user-menu__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 18px;
	font-size: 14px;
	color: var(--color-fg);
	transition: background var(--transition);
}

.user-menu__link:hover,
.user-menu__link:focus-visible {
	background: var(--color-hover);
	text-decoration: none;
}

.user-menu__count {
	flex-shrink: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #000;
	color: #fff;
	border-radius: var(--radius-pill);
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
}

.user-menu__divider {
	height: 1px;
	background: var(--color-border);
	margin: 6px 0;
}

/* Auth links (logged-out state) */

.auth-links {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	font-size: 15px;
}

.auth-links__login {
	color: var(--color-fg);
	padding: 6px 2px;
	white-space: nowrap;
}

.auth-links__login:hover {
	color: var(--color-green);
	text-decoration: none;
}

.auth-links__register {
	white-space: nowrap;
}

/* External header (auth pages) */

.site-header__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-right: auto;
	font-size: 15px;
	color: var(--color-fg);
	white-space: nowrap;
}

.site-header__back:hover {
	color: var(--color-green);
	text-decoration: none;
}

.site-header__back-icon {
	flex-shrink: 0;
}

.site-header__help {
	font-size: 15px;
	color: var(--color-fg-muted);
	white-space: nowrap;
}

.site-header--external .site-branding {
	margin-right: 8px;
}

/* ==========================================================================
   Buttons (shared component)
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 400;
	font-family: inherit;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background var(--transition), color var(--transition), border-color var(--transition);
	text-decoration: none;
	line-height: 1.2;
}

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

.btn--block { width: 100%; }

.btn--sm {
	padding: 9px 18px;
	font-size: 14px;
}

.btn--primary {
	background: #000;
	color: #fff;
	border-color: #000;
}
.btn--primary:hover { background: #222; border-color: #222; }
.btn--primary:disabled { background: #888; border-color: #888; cursor: not-allowed; }

.btn--outline {
	background: #fff;
	color: #000;
	border-color: #000;
}
.btn--outline:hover { background: #f4f4f4; }

.btn--yellow {
	background: var(--color-yellow);
	color: var(--color-yellow-fg);
	border-color: var(--color-yellow);
	font-weight: 500;
}
.btn--yellow:hover { background: var(--color-yellow-hover); border-color: var(--color-yellow-hover); }

.btn--green {
	background: var(--color-green);
	color: #fff;
	border-color: var(--color-green);
}
.btn--green:hover { background: #1d5536; border-color: #1d5536; }

/* ==========================================================================
   Search — "found in other sections" suggestions
   ========================================================================== */
.search-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 24px; }
.search-suggest__label { font-size: 14px; color: var(--color-fg-muted); }
.search-suggest__chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 14px; color: var(--color-fg); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-pill); transition: border-color var(--transition); }
.search-suggest__chip:hover { border-color: var(--color-green); color: var(--color-green); text-decoration: none; }
.search-suggest__count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-yellow); color: var(--color-yellow-fg); font-size: 12px; font-weight: 600; }

/* ==========================================================================
   Index placeholder
   ========================================================================== */

.index-placeholder {
	min-height: 60vh;
}

/* ==========================================================================
   Footer CTA (newsletter band)
   ========================================================================== */

.footer-cta {
	background: var(--color-green);
	color: var(--color-green-fg);
	margin-top: auto;
	padding: 64px 0;
	text-align: center;
}

.footer-cta__inner {
	max-width: 760px;
}

.footer-cta__title {
	margin: 0 auto 16px;
	max-width: 680px;
	font-size: 26px;
	line-height: 1.3;
	font-weight: 600;
}

.footer-cta__text {
	margin: 0 auto 28px;
	max-width: 620px;
	font-size: 15px;
	color: var(--color-green-fg-muted);
}

.footer-cta__form {
	display: flex;
	gap: 12px;
	max-width: 520px;
	margin: 0 auto;
}

/* Subscription confirmation (replaces the form after a successful subscribe). */
.footer-cta__thanks {
	margin: 0 auto;
	max-width: 620px;
	font-size: 16px;
	font-weight: 600;
	color: var(--color-yellow);
}
.footer-cta__error {
	margin: 0 auto 16px;
	max-width: 520px;
	font-size: 14px;
	color: #ffd0d0;
}
.footer-cta__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.footer-cta__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 18px;
	font-family: inherit;
	font-size: 15px;
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--radius-sm);
}

.footer-cta__input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.footer-cta__input:focus {
	outline: none;
	border-color: var(--color-yellow);
}

.footer-cta__submit {
	flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--color-green-dark);
	color: var(--color-green-fg);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	justify-content: space-between;
	padding-top: 56px;
	padding-bottom: 48px;
}

.site-footer__brand {
	flex: 1 1 280px;
	max-width: 360px;
}

.site-footer__logo {
	display: inline-block;
	width: 120px;
	margin-bottom: 22px;
}

.site-footer__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.site-footer__contacts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
	color: var(--color-green-fg-muted);
}

.site-footer__contacts a:hover {
	color: #fff;
	text-decoration: none;
}

.site-footer__columns {
	flex: 2 1 520px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px 40px;
}

.footer-col {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.footer-col a {
	font-size: 14px;
	color: var(--color-green-fg);
}

.footer-col a:hover {
	color: var(--color-yellow);
	text-decoration: none;
}

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-top: 22px;
	padding-bottom: 22px;
}

.site-footer__copyright {
	margin: 0;
	font-size: 13px;
	color: var(--color-green-fg-muted);
}

.site-footer__legal .footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.footer__menu-link,
.footer__menu .menu-item > a {
	color: var(--color-green-fg);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.footer__menu-link:hover,
.footer__menu .menu-item > a:hover {
	color: var(--color-yellow);
}

/* ==========================================================================
   Search — header bar + form + results page
   ========================================================================== */

/* Collapsible header bar (sits below the header's own bottom border) */
.search-bar {
	border-bottom: 1px solid var(--color-border);
	background: #fff;
}

.search-bar__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.search-bar .search-form {
	width: 100%;
	max-width: 720px;
}

.search-bar__close {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	flex-shrink: 0;
}

/* Shared form layout */
.search-form {
	display: flex;
	align-items: stretch;
	gap: 12px;
}

.search-field {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: #fff;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.search-field:focus-within {
	border-color: var(--color-yellow);
	box-shadow: 0 0 0 1px var(--color-yellow);
}

.search-field__icon {
	position: absolute;
	left: 14px;
	color: var(--color-fg-muted);
	pointer-events: none;
}

/* Clickable magnifier (wired by main.js) — submits the search (#13). */
.search-field__icon--clickable {
	pointer-events: auto;
	cursor: pointer;
	border-radius: 4px;
}
.search-field__icon--clickable:hover,
.search-field__icon--clickable:focus-visible {
	color: var(--color-fg);
	outline: none;
}

/* Multi-select checkbox grid (e.g. "Основні культури" — обрати декілька). */
.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px 18px;
}
.checkbox--inline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
}
.checkbox--inline input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 0;
}

.search-field__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	color: var(--color-fg);
	padding: 12px 14px 12px 42px;
}

.search-field__input:focus {
	outline: none;
}

.search-field__input::placeholder {
	color: var(--color-fg-muted);
}

/* Hide the native clear/cancel decorations in favour of our own button */
.search-field__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.search-field__clear {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: var(--color-fg-muted);
	padding: 6px;
	margin-right: 6px;
	border-radius: var(--radius-pill);
	transition: color var(--transition);
}

.search-field__clear:hover {
	color: var(--color-fg);
}

/* Content-type dropdown */
.search-type {
	position: relative;
	flex-shrink: 0;
}

.search-type__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 100%;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 15px;
	color: var(--color-fg);
	white-space: nowrap;
	transition: border-color var(--transition);
}

.search-type__toggle:hover {
	border-color: #c9c9c9;
}

.search-type__chevron {
	color: var(--color-fg-muted);
	transition: transform var(--transition);
}

.search-type[data-open="true"] .search-type__chevron {
	transform: rotate(180deg);
}

.search-type__list {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-pop);
	padding: 8px 0;
	display: none;
	z-index: 70;
}

.search-type[data-open="true"] .search-type__list {
	display: block;
}

.search-type__option {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	padding: 11px 20px;
	font-size: 15px;
	color: var(--color-fg);
	transition: background var(--transition);
}

.search-type__option:hover,
.search-type__option.is-selected {
	background: var(--color-hover);
}

.search-form__submit {
	flex-shrink: 0;
}

/* Results page */
.search-results {
	padding: 48px 0 72px;
}

.search-results__title {
	margin: 0 0 28px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 600;
}

.search-results__bar {
	margin-bottom: 24px;
}

.search-results__bar .search-form {
	max-width: 520px;
}

.search-results__bar .search-field {
	flex: 1 1 320px;
}

.search-results__count {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--color-fg);
}

.search-results__list {
	display: flex;
	flex-direction: column;
}

.search-result {
	padding: 24px 0;
	border-top: 1px solid var(--color-border);
}

.search-result__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.search-result__avatar {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
}

.search-result__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.search-result__byline {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.search-result__source {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-fg);
}

.search-result__meta {
	font-size: 13px;
	color: var(--color-fg-muted);
}

.search-result__title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
}

.search-result__title a:hover {
	color: var(--color-green);
	text-decoration: none;
}

.search-result__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-fg-muted);
}

.search-results__empty {
	padding: 8px 0 24px;
}

.search-results__empty-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
}

.search-results__empty-text {
	margin: 0;
	font-size: 15px;
	color: var(--color-fg-muted);
}

.search-results__pagination {
	margin-top: 36px;
}

.search-results__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.search-results__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 14px;
	color: var(--color-fg);
}

.search-results__pagination .page-numbers:hover {
	background: var(--color-hover);
	text-decoration: none;
}

.search-results__pagination .page-numbers.current {
	background: var(--color-green);
	border-color: var(--color-green);
	color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	:root {
		--container-pad: 24px;
	}
	.nav__menu {
		gap: 18px;
	}
}

@media (max-width: 900px) {
	.site-header {
		position: sticky;
		top: 0;
		z-index: 1000;
	}
	.site-header__inner {
		gap: 12px;
		min-height: 64px;
	}
	.nav-toggle {
		display: inline-flex;
	}
	.site-branding {
		margin-right: auto;
	}
	.auth-links--desktop {
		display: none;
	}
	/* Account dropdown moves into the drawer on mobile */
	.user-menu {
		display: none;
	}

	/* Nav becomes a left off-canvas drawer */
	.site-nav {
		position: fixed;
		top: 64px;
		left: 0;
		bottom: 0;
		width: min(360px, 86vw);
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: #fff;
		border-top: 1px solid var(--color-border);
		box-shadow: var(--shadow-pop);
		padding: 8px 0 24px;
		z-index: 999;
		overflow-y: auto;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 240ms ease, visibility 240ms ease;
	}
	.nav-open .site-nav {
		transform: translateX(0);
		visibility: visible;
	}
	.site-nav .nav__menu,
	.site-nav .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.site-nav .nav__link,
	.site-nav .menu-item > a {
		display: block;
		padding: 12px var(--container-pad);
	}
	.site-nav .nav__link:hover,
	.site-nav .menu-item > a:hover,
	.site-nav .current-menu-item > a {
		border-bottom: 0;
		padding-bottom: 12px;
		background: var(--color-hover);
		color: var(--color-green);
	}
	.site-nav__auth {
		display: flex;
		flex-direction: column;
		gap: 10px;
		margin-top: 8px;
		padding: 16px var(--container-pad) 0;
		border-top: 1px solid var(--color-border);
	}

	/* Logged-in user block inside the drawer */
	.site-nav__user {
		display: block;
		margin-top: 8px;
		padding: 16px var(--container-pad) 0;
		border-top: 1px solid var(--color-border);
	}

	/* Dark backdrop behind the drawer */
	.nav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 998;
		opacity: 0;
		pointer-events: none;
		transition: opacity 240ms ease;
	}
	.nav-open .nav-overlay {
		opacity: 1;
		pointer-events: auto;
	}

	.site-footer__inner {
		gap: 32px;
		padding-top: 40px;
		padding-bottom: 36px;
	}
	.site-footer__columns {
		flex-basis: 100%;
	}
}

@media (max-width: 700px) {
	/* Stack the form: field on top, then dropdown + submit. */
	.search-bar__inner {
		padding-right: 44px;
	}
	.search-bar__close {
		right: 0;
		top: 16px;
		transform: none;
	}
	.search-form {
		flex-wrap: wrap;
	}
	.search-field {
		flex: 1 1 100%;
	}
	.search-type {
		flex: 1 1 auto;
	}
	.search-type__toggle {
		width: 100%;
		justify-content: space-between;
	}
	.search-type__list {
		left: 0;
		right: auto;
	}
	.search-results__title {
		font-size: 24px;
	}
	.search-results__bar .search-field {
		flex-basis: 100%;
	}
}

@media (max-width: 600px) {
	.site-header__help {
		display: none;
	}
	.site-header__back span {
		display: none;
	}

	.footer-cta {
		padding: 44px 0;
	}
	.footer-cta__title {
		font-size: 22px;
	}
	.footer-cta__form {
		flex-direction: column;
	}
	.footer-cta__submit {
		width: 100%;
	}
	.site-footer__columns {
		grid-template-columns: repeat(2, 1fr);
	}
	.site-footer__bottom-inner {
		justify-content: flex-start;
	}
	.site-footer__legal .footer__menu {
		flex-direction: column;
		gap: 14px;
	}
}

/* ==========================================================================
   Таблиця «підпис → значення» (.event-info)
   Спільний компонент: сторінки події, організації та сорту. Живе в main.css,
   бо events.css підключається лише на подіях — а каталог сортів
   використовує ті самі класи, і без цих правил dl/dt/dd падали у типові
   стилі браузера: значення йшло окремим рядком з відступом.
   ========================================================================== */
.event-single__section-title {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
}
.event-single__section-title:not(:first-child) {
	margin-top: 36px;
}

.event-info {
	margin: 0;
	border-top: 1px solid var(--color-border);
}
.event-info__row {
	display: grid;
	grid-template-columns: minmax(220px, 0.7fr) 1fr;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--color-border);
}
.event-info__label {
	margin: 0;
	color: var(--color-fg-muted);
	font-size: 15px;
}
.event-info__value {
	margin: 0;
	font-weight: 600;
	font-size: 15px;
}
.event-info__value a {
	color: var(--color-green);
	text-decoration: underline;
	font-weight: 600;
}

@media (max-width: 720px) {
	.event-info__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* --------------------------------------------------------------------------
   Full-screen loading overlay (завантаження файлів / імпорт)

   Живе в main.css, а не в testing.css: оверлей показують і сторінки
   тестувань, і рядок сорту в /org/catalog/ (там testing.css не підключений).
   -------------------------------------------------------------------------- */

body.has-test-modal {
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Full-screen loading overlay (file upload / import)
   -------------------------------------------------------------------------- */

.test-loading-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.test-loading-overlay[hidden] {
	display: none;
}

.test-loading-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.test-loading-spinner {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	border: 4px solid rgba(20, 28, 22, 0.12);
	border-top-color: var(--color-yellow);
	animation: sv-spin 0.8s linear infinite;
}

.test-loading-text {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-fg);
}

@keyframes sv-spin {
	to {
		transform: rotate(360deg);
	}
}
