/*
 * GARAGE 11 — components.css
 * Кнопки, карточки, галерея, шаги, отзывы, FAQ, контакты, форма, лайтбокс.
 */

/* --- Кнопки --------------------------------------------------------------- */
.wp-block-button__link,
.g11-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.wp-block-button__link,
.g11-btn--primary {
	background: linear-gradient(120deg, var(--wp--preset--color--accent), var(--wp--preset--color--accent-deep));
	color: #04131a;
	box-shadow: 0 10px 30px rgba(23, 195, 232, 0.28);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.g11-btn--primary:hover,
.g11-btn--primary:focus-visible {
	transform: translateY(-2px);
	color: #04131a;
	box-shadow: 0 14px 38px rgba(23, 195, 232, 0.4);
}

.g11-btn--ghost {
	background: transparent;
	border-color: var(--wp--custom--line);
	color: var(--wp--preset--color--contrast);
}

.g11-btn--ghost:hover,
.g11-btn--ghost:focus-visible {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* Кнопка-ссылка «Позвонить» из шорткода стоит отдельным блоком. */
.g11-hero__phone {
	margin: 0;
}

.g11-hero__phone .g11-btn {
	margin-top: 4px;
}

/* --- Карточки услуг ------------------------------------------------------- */
.g11-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 26px;
	border-radius: var(--wp--custom--radius);
	border: 1px solid var(--wp--custom--line);
	background: linear-gradient(160deg, rgba(23, 195, 232, 0.06), rgba(255, 255, 255, 0.015));
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.g11-card:hover {
	transform: translateY(-4px);
	border-color: rgba(23, 195, 232, 0.45);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.g11-card h3 {
	margin: 0;
	font-size: 1.15rem;
}

.g11-card p {
	color: var(--wp--preset--color--muted);
	font-size: 0.92rem;
}

.g11-card .g11-card__price {
	margin-top: auto;
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	color: var(--wp--preset--color--contrast);
}

.g11-card__link {
	margin: 0;
}

.g11-card__link a {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.g11-card__link a::after {
	content: " →";
}

/* --- Преимущества --------------------------------------------------------- */
.g11-feature {
	padding: 24px;
	border-radius: var(--wp--custom--radius-small);
	border: 1px solid var(--wp--custom--line-soft);
	background: rgba(255, 255, 255, 0.02);
}

.g11-feature__num {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	color: var(--wp--preset--color--gold);
}

.g11-feature h3 {
	margin: 10px 0 8px;
	font-size: 1.02rem;
}

.g11-feature p {
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
}

/* --- Галерея работ -------------------------------------------------------- */
.g11-gallery {
	position: relative;
	margin: 0;
}

.g11-gallery__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
	grid-template-columns: 1fr;
}

.g11-gallery__track > li {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius-small);
	border: 1px solid var(--wp--custom--line-soft);
	background: #000;
}

.g11-gallery__image {
	margin: 0;
}

.g11-gallery__image picture {
	display: block;
}

.g11-gallery__image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.5s ease, opacity 0.3s ease;
}

.g11-gallery__track > li:hover .g11-gallery__image img {
	transform: scale(1.05);
	opacity: 0.85;
}

/* Режим слайдера включает JS: горизонтальная лента со снапом. */
.g11-gallery.is-slider .g11-gallery__track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-padding-inline: 8px;
}

.g11-gallery.is-slider .g11-gallery__track::-webkit-scrollbar {
	display: none;
}

.g11-gallery.is-slider .g11-gallery__track:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

.g11-gallery.is-slider .g11-gallery__track > li {
	flex: 0 0 min(84vw, 460px);
	scroll-snap-align: start;
}

/* --- Шаги процесса -------------------------------------------------------- */
.g11-step {
	padding: 24px;
	border-left: 2px solid var(--wp--preset--color--accent);
	border-radius: 0 var(--wp--custom--radius-small) var(--wp--custom--radius-small) 0;
	background: rgba(255, 255, 255, 0.02);
}

.g11-step__num {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.8rem;
	color: var(--wp--preset--color--accent);
}

.g11-step h3 {
	margin: 8px 0;
	font-size: 1.05rem;
}

.g11-step p {
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
}

/* --- Отзывы --------------------------------------------------------------- */
.g11-review {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 26px;
	border-radius: var(--wp--custom--radius);
	border: 1px solid var(--wp--custom--line-soft);
	background: var(--wp--preset--color--surface-soft);
}

.g11-review__stars {
	margin: 0;
	color: var(--wp--preset--color--gold);
	letter-spacing: 0.18em;
}

.g11-review__quote {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 0.98rem;
	color: var(--wp--preset--color--contrast);
}

.g11-review__quote p {
	margin: 0;
}

.g11-review__author {
	display: grid;
	gap: 2px;
	margin: auto 0 0;
	font-size: 0.82rem;
	color: var(--wp--preset--color--muted);
}

.g11-review__author strong {
	color: var(--wp--preset--color--contrast);
	font-size: 0.9rem;
}

/* --- FAQ ------------------------------------------------------------------ */
.g11-faq {
	display: grid;
	gap: 10px;
}

.g11-faq__item {
	padding: 18px 20px;
	border: 1px solid var(--wp--custom--line-soft);
	border-radius: var(--wp--custom--radius-small);
	background: rgba(255, 255, 255, 0.02);
}

.g11-faq__item summary {
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-weight: 700;
	font-size: 0.98rem;
	list-style: none;
}

.g11-faq__item summary::-webkit-details-marker {
	display: none;
}

.g11-faq__item summary::after {
	content: "+";
	color: var(--wp--preset--color--accent);
	font-size: 1.3rem;
	line-height: 1;
}

.g11-faq__item[open] summary::after {
	content: "−";
}

.g11-faq__item p {
	margin-top: 12px;
	color: var(--wp--preset--color--muted);
	font-size: 0.92rem;
}

/* --- Контакты ------------------------------------------------------------- */
.g11-contacts__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.g11-contacts__list li {
	display: grid;
	gap: 2px;
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wp--custom--line-soft);
}

.g11-contacts__list li > span:first-child {
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.g11-contacts__list strong,
.g11-contacts__list a {
	color: var(--wp--preset--color--contrast);
	font-size: 1.02rem;
	font-weight: 600;
	text-decoration: none;
}

.g11-contacts__list a:hover,
.g11-contacts__list a:focus-visible {
	color: var(--wp--preset--color--accent);
}

.g11-map {
	min-height: 300px;
	display: grid;
	place-content: center;
	gap: 6px;
	text-align: center;
	padding: 24px;
	border-radius: var(--wp--custom--radius);
	border: 1px dashed var(--wp--custom--line);
	color: var(--wp--preset--color--muted);
	background:
		linear-gradient(90deg, rgba(23, 195, 232, 0.06) 1px, transparent 1px) 0 0 / 40px 40px,
		linear-gradient(0deg, rgba(23, 195, 232, 0.06) 1px, transparent 1px) 0 0 / 40px 40px,
		var(--wp--preset--color--surface-soft);
}

.g11-map__label {
	margin: 0;
	font-size: 0.8rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.g11-map__note {
	margin: 0;
	max-width: 34ch;
	font-size: 0.82rem;
}

/* --- Форма заявки --------------------------------------------------------- */
.g11-form {
	display: grid;
	gap: 16px;
}

.g11-field {
	display: grid;
	gap: 6px;
}

.g11-field label {
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.g11-field__hint {
	text-transform: none;
	letter-spacing: 0;
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.g11-field input,
.g11-field select,
.g11-field textarea {
	width: 100%;
	font: inherit;
	font-size: 0.95rem;
	padding: 14px 16px;
	border-radius: var(--wp--custom--radius-small);
	border: 1px solid var(--wp--custom--line);
	background: var(--wp--preset--color--surface-soft);
	color: var(--wp--preset--color--contrast);
}

.g11-field textarea {
	resize: vertical;
	min-height: 96px;
}

.g11-field input::placeholder,
.g11-field textarea::placeholder {
	color: #5f6b7c;
}

.g11-field input:focus,
.g11-field select:focus,
.g11-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px rgba(23, 195, 232, 0.18);
}

.g11-field--check {
	grid-template-columns: auto 1fr;
	align-items: start;
	gap: 10px;
}

.g11-field--check input {
	width: 20px;
	height: 20px;
	margin-top: 3px;
	accent-color: var(--wp--preset--color--accent);
}

.g11-field--check label {
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}

.g11-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

.g11-form .g11-btn {
	justify-self: start;
}

.g11-form__status {
	margin: 0;
	font-size: 0.82rem;
	color: var(--wp--preset--color--muted);
}

.g11-form.is-sent .g11-form__status {
	color: var(--wp--preset--color--accent);
}

.g11-form.is-error .g11-form__status {
	color: #ff8a8a;
}

.g11-field.has-error input,
.g11-field.has-error select,
.g11-field.has-error textarea {
	border-color: #ff8a8a;
}

/* --- Лайтбокс ------------------------------------------------------------- */
.g11-lightbox {
	padding: 0;
	border: 1px solid var(--wp--custom--line);
	border-radius: var(--wp--custom--radius);
	background: #05060a;
	color: var(--wp--preset--color--contrast);
	max-width: min(1100px, 94vw);
}

.g11-lightbox::backdrop {
	background: rgba(4, 5, 9, 0.86);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.g11-lightbox img {
	max-height: 78vh;
	width: auto;
	margin: 0 auto;
}

.g11-lightbox__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--wp--custom--line);
	background: rgba(10, 11, 15, 0.8);
	color: var(--wp--preset--color--contrast);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

/* --- Точки перелома галереи ---------------------------------------------- */
@media (min-width: 480px) {
	.g11-gallery__track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.g11-gallery__track {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.g11-gallery__track > li:first-child {
		grid-column: span 2;
	}

	.g11-gallery__track > li:first-child .g11-gallery__image img {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 479px) {
	.g11-review {
		padding: 20px;
	}

	.g11-gallery__nav-button {
		width: 38px;
		height: 38px;
		margin-inline: 4px;
	}

	.g11-gallery__nav-button svg {
		width: 16px;
		height: 16px;
	}
}

/* --- Стрелки слайдера галереи -------------------------------------------- */
.g11-gallery__nav {
	display: none;
	gap: 8px;
}

.g11-gallery.is-slider .g11-gallery__nav {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex;
	justify-content: space-between;
	transform: translateY(-50%);
	pointer-events: none;
}

.g11-gallery__nav-button {
	pointer-events: auto;
	width: 44px;
	height: 44px;
	margin-inline: 8px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(10, 11, 15, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.g11-gallery__nav-button svg {
	width: 18px;
	height: 18px;
	display: block;
}

.g11-gallery__nav-button:hover:not(:disabled),
.g11-gallery__nav-button:focus-visible {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.g11-gallery__nav-button:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Кнопка паузы/воспроизведения автопрокрутки. */
.g11-gallery__toggle {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 4;
	display: none;
	width: 36px;
	height: 36px;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(10, 11, 15, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.g11-gallery.is-slider .g11-gallery__toggle {
	display: grid;
}

.g11-gallery__toggle svg {
	width: 14px;
	height: 14px;
	display: block;
}

.g11-gallery__toggle:hover,
.g11-gallery__toggle:focus-visible {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* В режиме слайдера первый кадр не растягивается на две колонки. */
.g11-gallery.is-slider .g11-gallery__track > li:first-child {
	grid-column: auto;
}

.g11-gallery.is-slider .g11-gallery__track > li:first-child .g11-gallery__image img {
	aspect-ratio: 4 / 3;
}

.g11-gallery__track > li {
	cursor: zoom-in;
}

/* --- Мобильное меню (core/navigation overlay) ---------------------------- */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast);
	padding: 20px clamp(16px, 4vw, 24px) 32px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	height: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start !important;
	width: 100%;
	max-width: none;
	margin: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 2px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	font-size: 1.05rem;
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--custom--line-soft);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--accent);
}

/* Пункты меню в оверлее — на всю ширину, слева. */
.wp-block-navigation__responsive-container.has-modal-open ul,
.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation__container {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item {
	width: 100%;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item {
	justify-content: flex-start !important;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item__content {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation__responsive-container-content {
	padding: 0 clamp(16px, 4vw, 24px);
}

/* Ссылка на карту в блоке контактов. */
.g11-map a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.g11-map a:hover,
.g11-map a:focus-visible {
	color: var(--wp--preset--color--contrast);
}
