/**
 * Секция "Мы лечим" - главная страница
 * Соответствует Figma: node-id=4-428
 * Использует переменные из variables.css
 */

.services-section {
	background-color: var(--color-white);
	padding: 60px var(--spacing-4xl);
}

.services-container {
	max-width: var(--container-content-width);
	margin: 0 auto;
	display: flex;
	gap: var(--spacing-3xl);
	align-items: flex-start;
}

/* Контент слева */
.services-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-2xl);
}

.services-title {
	font-family: var(--font-heading);
	font-size: var(--font-size-4xl);
	font-weight: 400;
	line-height: var(--line-height-tight);
	color: var(--color-primary);
	text-transform: uppercase;
	margin: 0;
}

/* Табы категорий */
.services-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-sm);
}

.services-tab {
	padding: 10px var(--spacing-lg);
	background-color: transparent;
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-pill);
	font-family: var(--font-primary);
	font-size: var(--font-size-sm);
	font-weight: 700;
	color: var(--color-primary);
	text-transform: uppercase;
	cursor: pointer;
	transition: all var(--transition-base);
}

.services-tab:hover {
	background-color: rgba(var(--color-primary-rgb), 0.1);
}

.services-tab.active {
	background-color: var(--color-primary);
	color: var(--color-white);
}

/* Списки услуг */
.services-lists {
	position: relative;
}

.services-list {
	display: none;
}

.services-list.active {
	display: block;
}

.services-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--spacing-md);
}

.service-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--spacing-md) var(--spacing-lg);
	background-color: var(--color-bg-lighter);
	border-radius: var(--radius-md);
	font-family: var(--font-primary);
	font-size: var(--font-size-base);
	font-weight: 500;
	color: var(--color-primary);
	text-decoration: none;
	transition: all var(--transition-base);
	min-height: 60px;
}

.service-item-title {
	flex: 1;
	line-height: 1.3;
}

.service-item-arrow {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-primary);
	transition: transform var(--transition-base);
}

.service-item:hover {
	background-color: var(--color-bg-light);
}

.service-item:hover .service-item-arrow {
	transform: translateX(4px);
}

.services-empty {
	font-family: var(--font-primary);
	font-size: var(--font-size-base);
	color: var(--color-text-muted);
	text-align: center;
	padding: var(--spacing-3xl);
}

/* Скрытые элементы (больше 10) */
.service-item--hidden {
	display: none;
}

/* Когда список развернут - показываем все */
.services-list.expanded .service-item--hidden {
	display: flex;
}

/* Кнопка "Показать все" */
.services-show-all {
	font-family: var(--font-primary);
	font-size: var(--font-size-lg);
	font-weight: 500;
	color: var(--color-primary);
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: opacity var(--transition-base);
	align-self: flex-start;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.services-show-all:hover {
	opacity: 0.7;
}

/* Изображение справа */
.services-image {
	width: 420px;
	flex-shrink: 0;
}

.services-image-wrap {
	position: relative;
	display: inline-block;
}

.services-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Пины на изображении */
.services-pin {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 2;
	cursor: pointer;
	opacity: 0.4;
	transition: opacity 0.4s ease, transform 0.4s ease;
	background: none;
	border: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.services-pin.is-active {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1.15);
	z-index: 3;
}

.services-pin:hover {
	opacity: 0.85;
}

.services-pin-dot {
	position: relative;
	display: block;
	width: 14px;
	height: 14px;
	background: var(--color-accent, #F28A2E);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.services-pin.is-active .services-pin-dot::after {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--color-accent, #F28A2E);
	animation: pin-ring 1.5s ease-out infinite;
}

.services-pin-label {
	margin-top: 4px;
	font-family: var(--font-primary);
	font-size: 10px;
	font-weight: 600;
	color: var(--color-primary);
	background: rgba(255, 255, 255, 0.85);
	padding: 1px 6px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.3s, transform 0.3s;
	pointer-events: none;
}

.services-pin.is-active .services-pin-label {
	opacity: 1;
	transform: translateY(0);
}

.services-pin-pulse {
	display: none;
}

@keyframes pin-ring {
	0% { transform: scale(0.8); opacity: 0.6; }
	100% { transform: scale(2); opacity: 0; }
}

/* Режим «Фото категории» */
.services-image--category {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-lg, 12px);
	align-self: stretch;
}

.services-category-photo {
	display: none;
	height: 100%;
}

.services-category-photo.active {
	display: block;
	animation: categoryFadeIn 0.4s ease;
}

.services-category-photo img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}


@keyframes categoryFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Адаптивность */
@media (max-width: 1280px) {
	.services-section {
		padding: var(--spacing-3xl) var(--spacing-2xl);
	}

	.services-image {
		width: 350px;
	}
}

@media (max-width: 1024px) {
	.services-container {
		flex-direction: column-reverse;
	}

	.services-image {
		width: 100%;
		max-width: 400px;
		margin: 0 auto;
	}

	.services-content {
		width: 100%;
	}
}

@media (max-width: 768px) {
	.services-section {
		padding: var(--spacing-2xl) var(--spacing-md);
	}

	.services-title {
		font-size: var(--font-size-2xl);
	}

	.services-tabs {
		gap: var(--spacing-xs);
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: thin;
		scrollbar-color: var(--color-primary) transparent;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 10px;
	}
	
	.services-tabs::-webkit-scrollbar {
		height: 6px;
	}
	
	.services-tabs::-webkit-scrollbar-track {
		background: transparent;
	}
	
	.services-tabs::-webkit-scrollbar-thumb {
		background: var(--color-primary);
		border-radius: 3px;
	}
	
	.services-tabs::-webkit-scrollbar-thumb:hover {
		background: rgba(var(--color-primary-rgb), 0.8);
	}

	.services-tab {
		padding: var(--spacing-xs) var(--spacing-md);
		font-size: var(--font-size-xs);
		white-space: nowrap;
		flex-shrink: 0;
	}

	.services-grid {
		grid-template-columns: 1fr;
	}

	.service-item {
		padding: var(--spacing-14) var(--spacing-md);
		font-size: var(--font-size-sm);
	}

	.services-show-all {
		font-size: var(--font-size-base);
	}

	.services-image {
        display: none;
    }
}

