/**
 * Expert Service — мобильная адаптация (подключается после основного CSS).
 * Телефоны и узкие экраны: типографика, отступы, шапка, услуги, портфолио, CTA, FAQ, подвал.
 */

/* База: предотвращаем нежелательное масштабирование шрифтов в WebKit */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* Планшеты и узкие ноутбуки: убираем гигантскую высоту аккордеона услуг */
@media (max-width: 1024px) {
	.conceptual-accordion {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
	}
}

/* Узкие экраны и телефоны */
@media (max-width: 768px) {
	:root {
		--container-pad-x: 1.15rem;
	}

	body {
		overflow-x: hidden;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.container {
		padding-left: var(--container-pad-x);
		padding-right: var(--container-pad-x);
	}

	/* --- Шапка: перенос, меньше отступы, читаемые ссылки --- */
	.header {
		flex-wrap: wrap;
		align-items: center;
		padding: 0.75rem var(--container-pad-x);
		gap: 0.65rem 0.5rem;
		row-gap: 0.75rem;
	}

	.logo {
		flex: 1 1 auto;
		min-width: 0;
		font-size: clamp(0.95rem, 3.5vw, 1.1rem);
		line-height: 1.2;
	}

	.logo a {
		word-break: break-word;
	}

	.custom-logo-link img.custom-logo {
		max-height: 36px;
	}

	.header-actions {
		flex-shrink: 0;
	}

	.nav-links {
		order: 3;
		flex: 1 1 100%;
		width: 100%;
		justify-content: center;
		gap: 0.5rem 0.85rem;
		font-size: 0.65rem;
		letter-spacing: 0.04em;
	}

	.nav-links ul,
	.nav-links .menu {
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.5rem 0.85rem;
	}

	.nav-links a {
		display: inline-block;
		padding: 0.35rem 0.15rem;
		min-height: 44px;
		line-height: 1.3;
		box-sizing: border-box;
	}

	.btn-talk {
		padding: 0.55rem 0.95rem;
		font-size: 0.65rem;
		letter-spacing: 0.04em;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* --- Герой --- */
	.hero-section {
		min-height: 0;
		padding: 1.25rem 0 2rem;
	}

	.hero-grid {
		gap: 1.5rem;
	}

	.hero-tag {
		font-size: 0.65rem;
		padding: 0.35rem 0.75rem;
		margin-bottom: 1rem;
	}

	.hero-title {
		font-size: clamp(1.45rem, 5.2vw, 2.15rem);
		line-height: 1.12;
		margin-bottom: 1.15rem;
		max-width: none;
		letter-spacing: -0.02em;
	}

	.hero-desc {
		font-size: 0.95rem;
		line-height: 1.55;
		margin-bottom: 1.5rem;
		max-width: none;
	}

	.hero-cta {
		width: 100%;
		max-width: 100%;
		justify-content: space-between;
		padding: 0.55rem 0.55rem 0.55rem 1.15rem;
		min-height: 52px;
	}

	.hero-cta-texts {
		margin-right: 1rem;
		min-width: 0;
	}

	.hero-cta-phone {
		font-size: 0.95rem;
	}

	.hero-cta-label {
		font-size: 0.62rem;
	}

	.hero-cta-icon {
		width: 44px;
		height: 44px;
		flex-shrink: 0;
	}

	.hero-visual {
		height: min(52vw, 280px);
		min-height: 200px;
		border-radius: 12px;
	}

	.page-jump-nav {
		margin-bottom: 1.5rem;
		padding-bottom: 0.75rem;
	}

	.page-jump-nav-list {
		font-size: 0.62rem;
		gap: 0.35rem 0.75rem;
		justify-content: flex-start;
	}

	.page-jump-nav a {
		min-height: 40px;
		display: inline-flex;
		align-items: center;
	}

	/* --- Секции: заголовки --- */
	.sh-full .section-title,
	.portfolio-header .section-title,
	.blog-header-left .section-title,
	.faq-header .section-title,
	.achievements-header .section-title {
		font-size: clamp(1.45rem, 4.5vw, 1.95rem);
		line-height: 1.15;
	}

	.sh-full p,
	.achievements-header p,
	.faq-header p {
		font-size: 0.95rem;
		line-height: 1.55;
	}

	.services-conceptual {
		padding: 3rem 0 3.5rem;
	}

	.services-header-modern {
		margin-bottom: 2rem;
	}

	/* --- Аккордеон услуг: вертикаль, без гигантской высоты --- */
	.conceptual-accordion {
		flex-direction: column;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		gap: 0.65rem;
	}

	.c-card,
	.c-card.active {
		flex: none !important;
		width: 100% !important;
		min-height: 200px;
		max-height: 360px;
		border-radius: 14px;
	}

	.c-card-content {
		padding: 1.1rem 1rem;
		align-items: flex-end;
		gap: 0.75rem;
	}

	.c-card-text h3 {
		font-size: 1.15rem;
	}

	.c-card-text p {
		font-size: 0.88rem;
		line-height: 1.45;
	}

	.c-card.active .c-card-num {
		font-size: 1.75rem;
	}

	.c-card-vtitle {
		font-size: 0.72rem;
		bottom: 1rem;
		max-width: 90%;
		white-space: normal;
		text-align: center;
		line-height: 1.25;
	}

	/* --- CTA --- */
	.cta-editorial {
		padding: 3rem 0;
	}

	.cta-ed-title {
		font-size: clamp(1.45rem, 5vw, 2.1rem);
		margin-bottom: 1.25rem;
	}

	.cta-ed-desc {
		font-size: 0.95rem;
		margin-bottom: 2rem;
		padding: 0 0.25rem;
	}

	.btn-primary-ed {
		padding: 1rem 1.5rem;
		font-size: 0.78rem;
		width: 100%;
		max-width: 320px;
		justify-content: center;
		text-align: center;
	}

	.cta-ed-features {
		font-size: 0.72rem;
		gap: 0.75rem 1rem;
		text-align: center;
	}

	/* --- Достижения --- */
	.achievements-section {
		padding: 3rem 0;
	}

	.achievements-grid {
		gap: 2rem;
	}

	.achievements-header .section-title {
		font-size: clamp(1.4rem, 4vw, 1.85rem);
	}

	.achieve-val {
		font-size: 1.85rem;
	}

	.achieve-title {
		font-size: 0.85rem;
	}

	.achieve-desc {
		font-size: 0.88rem;
	}

	.achieve-item {
		grid-template-columns: 48px 1fr;
		gap: 1rem;
	}

	.achieve-icon {
		width: 48px;
		height: 48px;
	}

	.achieve-icon svg {
		width: 24px;
		height: 24px;
	}

	/* --- Портфолио: подписи и адрес не ломают вёрстку --- */
	.portfolio-section {
		padding: 3rem 0;
	}

	.portfolio-header {
		margin-bottom: 1.5rem;
	}

	.portfolio-interactive {
		gap: 1.5rem;
	}

	.portfolio-list-item {
		padding: 0.75rem 0;
	}

	.portfolio-list-item h3 {
		font-size: 1rem;
		line-height: 1.35;
		padding-right: 0.5rem;
		word-break: break-word;
	}

	.portfolio-preview {
		height: min(55vw, 320px);
		min-height: 220px;
		border-radius: 10px;
	}

	.portfolio-preview-overlay {
		padding: 1rem 1rem 1.25rem;
	}

	.portfolio-tag {
		font-size: 0.65rem;
		padding: 0.3rem 0.55rem;
		margin-bottom: 0.75rem;
	}

	.portfolio-address {
		font-size: 0.68rem;
		line-height: 1.35;
		margin-bottom: 0.65rem;
		word-break: break-word;
	}

	.portfolio-desc {
		font-size: 0.82rem;
		line-height: 1.5;
		max-width: 100%;
		display: -webkit-box;
		-webkit-line-clamp: 6;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* --- Блог --- */
	.blog-section {
		padding: 3rem 0;
	}

	.blog-card-title {
		font-size: 1.05rem;
	}

	.blog-card-excerpt {
		font-size: 0.88rem;
	}

	/* --- SEO блок --- */
	.seo-text-title {
		font-size: clamp(1.35rem, 4vw, 1.75rem);
	}

	.seo-text {
		font-size: 0.92rem;
		line-height: 1.65;
	}

	/* --- FAQ --- */
	.faq-section {
		padding: 3rem 0;
	}

	.faq-question {
		font-size: 0.95rem;
		padding: 1.15rem 0;
		line-height: 1.35;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.faq-answer-inner {
		font-size: 0.92rem;
		padding-right: 0;
		padding-bottom: 1.25rem;
	}

	/* --- Подвал --- */
	.footer {
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
		padding: 1.25rem var(--container-pad-x);
		font-size: 0.8rem;
		line-height: 1.45;
	}

	.footer-main {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.85rem;
	}

	.footer-contact-muted {
		font-size: 0.72rem;
		line-height: 1.5;
	}

	.footer-legal {
		font-size: 0.72rem;
		line-height: 1.55;
	}

	.footer-right {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem 1rem;
		align-items: center;
	}

	.header-phone {
		font-size: 0.65rem;
	}
}

/* Очень узкие экраны */
@media (max-width: 380px) {
	.hero-title {
		font-size: 1.35rem;
	}

	.sh-full .section-title,
	.portfolio-header .section-title {
		font-size: 1.35rem;
	}

	.btn-talk {
		font-size: 0.58rem;
		padding: 0.5rem 0.65rem;
	}
}

/* Внутренние страницы (style.css): услуги, хаб, запись блога */
@media (max-width: 768px) {
	.page-hero--compact .page-hero-title,
	.page-hero-title {
		font-size: clamp(1.4rem, 5vw, 1.85rem) !important;
		line-height: 1.15;
	}

	.page-hero-lead {
		font-size: 0.92rem !important;
		line-height: 1.5;
	}

	.service-page-hero {
		grid-template-columns: 1fr !important;
		gap: 1rem;
		margin-bottom: 2rem;
		min-height: 0;
	}

	.service-page-hero-visual {
		min-height: 180px;
		order: -1;
		border-radius: 8px;
	}

	.service-page-title {
		font-size: clamp(1.35rem, 4.5vw, 1.85rem);
		word-break: break-word;
	}

	.service-page-lead {
		font-size: 0.95rem;
		max-width: none;
	}

	.service-page-hero-cta {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.service-block-title {
		font-size: 1.1rem;
	}

	.service-block-text,
	.service-page-content {
		font-size: 0.95rem;
	}

	.service-page-bottom-cta {
		padding: 1.75rem 1rem;
	}

	.service-page-bottom-cta-title {
		font-size: 1.15rem;
	}

	.service-hub-grid {
		gap: 1rem;
	}

	.service-hub-card-title {
		font-size: 1.05rem;
		line-height: 1.3;
	}

	.service-hub-card-excerpt {
		font-size: 0.88rem;
	}

	.entry-content,
	.post-content {
		font-size: 0.95rem;
		line-height: 1.65;
	}

	.breadcrumb {
		font-size: 0.8rem;
		line-height: 1.4;
		margin-bottom: 1rem;
	}

	.breadcrumb-list {
		flex-wrap: wrap;
		gap: 0.25rem 0.5rem;
	}
}
