/**
 * Rich content pages (About, Contacts, FAQ, legal).
 * Surface: tile background + card blocks — как checkout / «Мой аккаунт».
 * Loaded only on Template Name: Rich Content Page.
 */

/* ---------- Фон страницы (кирпичная кладка — account_page_tile_brick.png) ---------- */
body.budbe-rich-content-page {
	background-color: #dcddd6;
	background-image: url('../images/account_page_tile_brick.png'), url('../images/account_page_tile_brick.png');
	background-size: 102px 162px, 102px 162px;
	background-position: 0 0, 51px 81px;
	background-repeat: repeat;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

body.budbe-rich-content-page .budbe-main-content {
	flex: 1 0 auto;
}

@media (max-width: 768px) {
	body.budbe-rich-content-page {
		background-size: 85px 135px, 85px 135px;
		background-position: 0 0, 42.5px 67.5px;
	}
}

@media (max-width: 480px) {
	body.budbe-rich-content-page {
		background-size: 68px 108px, 68px 108px;
		background-position: 0 0, 34px 54px;
	}
}

/* ---------- Layout ---------- */
.budbe-content-page-main {
	background: transparent;
	padding: clamp(16px, 3vw, 28px) 0 clamp(32px, 5vw, 56px);
}

.budbe-content-page {
	max-width: min(100%, 920px);
	margin-left: auto;
	margin-right: auto;
}

/* Карточка секции — как шаг checkout / блок ЛК */
.budbe-content-page__header,
.budbe-content-page__section,
.budbe-content-page__faq-item {
	background: var(--secondary-color);
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
	padding: clamp(16px, 3vw, 28px);
	margin-bottom: clamp(14px, 2.5vw, 20px);
	box-sizing: border-box;
}

.budbe-content-page__section--unified {
	margin-bottom: clamp(14px, 2.5vw, 20px);
}

.budbe-content-page__section--unified .budbe-content-page__title {
	margin-bottom: clamp(20px, 3vw, 28px);
}

.budbe-content-page__block + .budbe-content-page__block {
	margin-top: clamp(20px, 3vw, 28px);
	padding-top: clamp(20px, 3vw, 28px);
	border-top: 1px solid rgba(49, 83, 58, 0.18);
}

.budbe-content-page__block .budbe-content-page__section-title {
	margin-bottom: clamp(10px, 2vw, 14px);
}

.budbe-content-page__schedule {
	margin: 0;
}

.budbe-content-page--unified .budbe-content-page__rows {
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
}

.budbe-content-page__section--unified .budbe-content-page__block--schedule {
	margin-top: clamp(12px, 2vw, 16px);
	padding-top: 0;
	border-top: none;
}

.budbe-content-page__section--unified .budbe-content-page__block--schedule + .budbe-content-page__block {
	border-top: none;
	padding-top: 0;
}

.budbe-content-page__section--unified .budbe-content-page__footnotes {
	margin-top: clamp(20px, 3vw, 28px);
	padding-top: clamp(16px, 2.5vw, 20px);
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 0;
	border-top: 1px solid rgba(49, 83, 58, 0.18);
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

.budbe-content-page__header {
	margin-bottom: clamp(14px, 2.5vw, 20px);
}

.budbe-content-page__body {
	max-width: none;
}

.budbe-content-page__section {
	border-bottom: none;
	padding-bottom: clamp(16px, 3vw, 28px);
}

.budbe-content-page__section:last-of-type {
	margin-bottom: clamp(14px, 2.5vw, 20px);
}

/* ---------- Типографика (как storefront / ЛК) ---------- */
.budbe-content-page__title {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	color: var(--primary-color);
	font-size: clamp(22px, 4.5vw, 32px);
	line-height: 1.25;
	margin: 0 0 clamp(16px, 2.5vw, 20px);
	text-wrap: balance;
}

.budbe-content-page__section-title {
	font-family: inherit;
	font-weight: 700;
	color: var(--primary-color);
	font-size: clamp(18px, 4vw, 22px);
	line-height: 1.3;
	margin: 0 0 clamp(12px, 2vw, 16px);
	text-wrap: balance;
}

.budbe-content-page__intro {
	max-width: none;
}

.budbe-content-page__text {
	color: #333333;
	font-size: 16px;
	line-height: 1.55;
	margin: 0 0 1em;
}

.budbe-content-page__text:last-child {
	margin-bottom: 0;
}

/* ---------- Список внутри секции (как fieldset ЛК) ---------- */
.budbe-content-page__section-list {
	margin-top: clamp(8px, 1.5vw, 12px);
}

.budbe-content-page__list-intro {
	font-weight: 600;
	color: var(--primary-color);
	margin-bottom: 0.65em;
}

.budbe-content-page__list {
	list-style: none;
	margin: 0 0 1em;
	padding: clamp(14px, 2.5vw, 18px);
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	border: 1px solid rgba(49, 83, 58, 0.25);
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: clamp(8px, 1.5vw, 10px);
}

.budbe-content-page__list-item {
	position: relative;
	padding-left: 1.35em;
	color: #333333;
	font-size: 16px;
	line-height: 1.55;
}

.budbe-content-page__list-item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--primary-color);
}

.budbe-content-page__section-list + .budbe-content-page__section-text {
	margin-top: clamp(8px, 1.5vw, 12px);
}

/* ---------- Key–value rows (Contacts) ---------- */
.budbe-content-page__rows {
	margin: 0;
	padding: clamp(14px, 2.5vw, 18px);
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	border: 1px solid rgba(49, 83, 58, 0.25);
	display: flex;
	flex-direction: column;
	gap: clamp(10px, 2vw, 14px);
}

.budbe-content-page__row {
	display: grid;
	grid-template-columns: minmax(7rem, 9.5rem) 1fr;
	gap: clamp(8px, 2vw, 16px);
	align-items: baseline;
	margin: 0;
}

.budbe-content-page__row-label,
.budbe-content-page__row-value {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
}

.budbe-content-page__row-label {
	font-weight: 700;
	color: var(--primary-color);
}

.budbe-content-page__row-value {
	color: #333333;
}

/* ---------- Ссылки (primary #31533a, hover #2a4730 — как ЛК / storefront) ---------- */
.budbe-content-page__text a,
.budbe-content-page__row-value a,
.budbe-content-page__footnotes-text a,
.budbe-content-page__intro a {
	color: var(--primary-color);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.budbe-content-page__text a:hover,
.budbe-content-page__text a:focus-visible,
.budbe-content-page__row-value a:hover,
.budbe-content-page__row-value a:focus-visible,
.budbe-content-page__footnotes-text a:hover,
.budbe-content-page__footnotes-text a:focus-visible,
.budbe-content-page__intro a:hover,
.budbe-content-page__intro a:focus-visible {
	color: #2a4730;
}

.budbe-content-page__rows + .budbe-content-page__section-text {
	margin-top: clamp(12px, 2vw, 16px);
}

/* ---------- Location + map (Contacts) ---------- */
.budbe-content-page__location {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(14px, 2.5vw, 24px);
	align-items: stretch;
	margin-top: clamp(4px, 1vw, 8px);
}

.budbe-content-page__location-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.budbe-content-page__map {
	min-height: 220px;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(49, 83, 58, 0.25);
	background: rgba(255, 255, 255, 0.35);
}

.budbe-content-page__map--consent-pending {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--secondary-color, #f5f5f0);
}

.budbe-contacts-map-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: clamp(16px, 3vw, 24px);
	text-align: center;
	max-width: 28rem;
}

.budbe-contacts-map-placeholder__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: #555555;
}

.budbe-contacts-map-placeholder__show {
	cursor: pointer;
	font-size: 14px;
	padding: 10px 18px;
}

.budbe-content-page__map--embed iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 220px;
	border: 0;
}

/* ---------- Footnotes (Contacts) ---------- */
.budbe-content-page__footnotes {
	margin-top: clamp(8px, 2vw, 12px);
	padding: clamp(14px, 2.5vw, 18px) clamp(16px, 3vw, 24px);
}

.budbe-content-page__footnotes-list {
	margin: 0;
	padding-left: 1.25em;
	display: flex;
	flex-direction: column;
	gap: 0.65em;
}

.budbe-content-page__footnotes-item {
	color: #555555;
}

.budbe-content-page__footnotes-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

/* ---------- FAQ ---------- */
.budbe-content-page__faq {
	margin-top: clamp(8px, 2vw, 16px);
	padding-top: 0;
}

.budbe-content-page__faq > .budbe-content-page__section-title {
	margin-bottom: clamp(14px, 2.5vw, 20px);
}

.budbe-content-page__faq-list {
	display: flex;
	flex-direction: column;
	gap: clamp(14px, 2.5vw, 20px);
	margin-top: 0;
}

.budbe-content-page__faq-item {
	margin-bottom: 0;
	padding: clamp(16px, 3vw, 22px);
}

.budbe-content-page__faq-item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(10px, 2vw, 14px);
}

.budbe-content-page__faq-item summary::-webkit-details-marker {
	display: none;
}

.budbe-content-page__faq-item summary::after {
	content: '+';
	flex-shrink: 0;
	font-weight: 700;
	font-size: clamp(18px, 3.5vw, 22px);
	line-height: 1.35;
	color: var(--primary-color);
}

.budbe-content-page__faq-item[open] summary::after {
	content: '−';
}

.budbe-content-page__faq-item:not([open]) .budbe-content-page__faq-answer {
	display: none;
}

.budbe-content-page__faq-question {
	font-family: inherit;
	font-weight: 700;
	color: var(--primary-color);
	font-size: clamp(16px, 3vw, 18px);
	line-height: 1.35;
	margin: 0;
	text-wrap: balance;
}

.budbe-content-page__faq-answer {
	margin-top: clamp(10px, 2vw, 14px);
	padding-top: clamp(10px, 2vw, 14px);
	border-top: 1px solid rgba(49, 83, 58, 0.18);
}

.budbe-content-page__faq-answer .budbe-content-page__text {
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
}

/* Georgian: longer words — allow breaks on narrow screens */
.budbe-content-page[lang='ka'] .budbe-content-page__title,
.budbe-content-page[lang='ka'] .budbe-content-page__section-title,
.budbe-content-page[lang='ka'] .budbe-content-page__faq-question {
	overflow-wrap: anywhere;
	word-break: normal;
	hyphens: auto;
}

@media (max-width: 768px) {
	.budbe-content-page__location {
		grid-template-columns: 1fr;
	}

	.budbe-content-page__map {
		min-height: 200px;
	}
}

@media (max-width: 480px) {
	.budbe-content-page-main {
		padding-top: 16px;
	}

	.budbe-content-page__header,
	.budbe-content-page__section,
	.budbe-content-page__faq-item {
		padding: clamp(14px, 4vw, 18px);
	}
}

@media (max-width: 360px) {
	.budbe-content-page__title {
		font-size: clamp(20px, 6vw, 22px);
	}

	.budbe-content-page__section-title {
		font-size: clamp(17px, 4.8vw, 18px);
	}

	.budbe-content-page__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* ---------- Terms tables (§11 design system) ---------- */
.budbe-content-page__table-wrap {
	overflow-x: auto;
	margin: 16px 0 20px;
	-webkit-overflow-scrolling: touch;
}

.budbe-content-page__table {
	width: 100%;
	min-width: 280px;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid rgba(49, 83, 58, 0.18);
	border-radius: 12px;
	overflow: hidden;
	background: var(--secondary-color, #f5f5f0);
	font-size: 14px;
	line-height: 1.45;
}

.budbe-content-page__table-caption {
	caption-side: top;
	padding: 0 0 10px;
	font-weight: 600;
	color: var(--primary-color, #31533a);
	text-align: left;
}

.budbe-content-page__table th,
.budbe-content-page__table td {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(49, 83, 58, 0.12);
	vertical-align: top;
	text-align: left;
}

.budbe-content-page__table thead th {
	background: rgba(49, 83, 58, 0.08);
	color: var(--primary-color, #31533a);
	font-weight: 600;
}

.budbe-content-page__table tbody tr:last-child th,
.budbe-content-page__table tbody tr:last-child td {
	border-bottom: none;
}

.budbe-content-page__table td a {
	color: var(--primary-color, #31533a);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.budbe-content-page__table td a:hover,
.budbe-content-page__table td a:focus-visible {
	opacity: 0.85;
}

.budbe-content-page__section-text + .budbe-content-page__table-wrap,
.budbe-content-page__table-wrap + .budbe-content-page__section-text {
	margin-top: 12px;
}
