/*
 * Theme Name:  Revision Child
 * Theme URI:   https://revision.codesupply.co/
 * Description: Revision Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    revision
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

/* Footer logo — ограничение размера до адекватного */
.cs-footer__logo img {
	max-width: 140px;
	max-height: 48px;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Hero Section — уменьшенный заголовок на мобилке */
@media (max-width: 767.98px) {
	.cs-hero-type-1 .cs-hero__content .cs-hero__heading {
		font-size: var(--cs-heading-4-font-size);
	}
}

/* Subscribe CTA button - same style as header button */
.cs-subscribe__cta {
	margin-top: 1.5rem;
}
.cs-subscribe__cta-button {
	padding: 0.625rem 1.125rem;
}

/* Code block copy icon + tooltip */
.entry-content .cs-code-block-wrapper {
	position: relative;
	overflow: visible;
}
.entry-content .cs-code-block-wrapper pre {
	overflow-x: auto;
}
.entry-content .cs-code-copy-btn {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #fff;
	background: #4f48db;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	z-index: 10;
}
.entry-content .cs-code-copy-btn:hover {
	background: #3f38bb;
}
.entry-content .cs-code-copy-btn:active {
	transform: scale(0.95);
}
.entry-content .cs-code-copy-btn svg {
	flex-shrink: 0;
}
.entry-content .cs-code-copy-tooltip {
	position: absolute;
	top: 0.5rem;
	right: calc(100% + 8px);
	padding: 0.4rem 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: #fff;
	background: rgba(45, 45, 50, 0.95);
	border-radius: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateX(6px);
	transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
	pointer-events: none;
	z-index: 100;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.entry-content .cs-code-copy-tooltip.cs-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
}
/* Share: иконки в одну строку */
.cs-share {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.cs-share__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}
.cs-share__icon svg,
.cs-share__icon img {
	width: 1.5rem;
	height: 1.5rem;
}

/* About Company block at end of articles */
.cs-about-company {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}
.cs-about-company__inner {
	background: var(--cs-color-highlight-background);
	background: color-mix(in srgb, var(--cs-color-accent) 10%, var(--cs-layout-background));
	border-radius: 16px;
	padding: 1.75rem 2rem;
}
.cs-about-company__title {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	font-weight: 700;
	text-align: left;
}
.cs-about-company__title a {
	color: var(--cs-color-primary);
	text-decoration: none;
	transition: opacity 0.2s;
}
.cs-about-company__title a:hover {
	opacity: 0.8;
}
/* Логотип слева, текст справа */
.cs-about-company__content {
	display: flex;
	flex-direction: row;
	gap: 2rem;
	align-items: center;
}
.cs-about-company__logo-col {
	flex-shrink: 0;
	order: 1;
}
.cs-about-company__text-col {
	flex: 1;
	min-width: 0;
	order: 2;
}
.cs-about-company__logo-link {
	display: block;
	text-decoration: none;
	color: var(--cs-color-primary);
}
.cs-about-company__logo-link img {
	max-width: 120px;
	max-height: 80px;
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
}
.cs-about-company__logo-text {
	font-size: 1.25rem;
	font-weight: 700;
}
.cs-about-company__description {
	margin: 0 0 1rem;
	color: var(--cs-color-primary);
	font-size: 0.9375rem;
	line-height: 1.55;
}
.cs-about-company__social {
	margin-top: 1rem;
}
.cs-about-company__social .cs-social {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.cs-about-company__social .cs-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cs-color-primary);
	color: var(--cs-color-primary-contrast);
	transition: opacity 0.2s, transform 0.15s;
}
.cs-about-company__social .cs-social__link:hover {
	opacity: 0.85;
	transform: scale(1.05);
}
.cs-about-company__social .cs-social__link svg {
	width: 20px;
	height: 20px;
}
.cs-about-company__social .cs-social__link svg path {
	fill: currentColor !important;
}
/* Адаптация для мобильных: логотип слева, текст справа сохраняется */
@media (max-width: 768px) {
	.cs-about-company__inner {
		padding: 1.25rem 1.5rem;
		border-radius: 12px;
	}
	.cs-about-company__content {
		gap: 1.25rem;
	}
	.cs-about-company__logo-link img {
		max-width: 100px;
		max-height: 60px;
	}
	.cs-about-company__description {
		font-size: 0.875rem;
	}
	.cs-about-company__title {
		font-size: 1.25rem;
		margin-bottom: 0.5rem;
	}
}
@media (max-width: 576px) {
	/* На узких экранах — колонка: логотип сверху, текст снизу */
	.cs-about-company__content {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}
}
@media (max-width: 480px) {
	.cs-about-company__inner {
		padding: 1rem 1.25rem;
		border-radius: 10px;
	}
	.cs-about-company__logo-link img {
		max-width: 80px;
		max-height: 50px;
	}
	.cs-about-company__social .cs-social__link {
		width: 36px;
		height: 36px;
	}
	.cs-about-company__social .cs-social__link svg {
		width: 18px;
		height: 18px;
	}
}
/* Тёмная тема: используются переменные --cs-color-* из темы */

/* ========================================
   Карусель баннеров (Sidebar)
   Стиль Feature Posts, sticky в сайдбаре
   ======================================== */
.cs-widget-banner-carousel {
	display: block !important;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: 1.25rem;
	margin-bottom: 1.375rem;
	overflow: hidden;
}
.cs-sticky-sidebar-disabled .cs-widget-banner-carousel,
.cs-stick-to-top .cs-widget-banner-carousel,
.cs-stick-to-bottom .cs-widget-banner-carousel {
	margin-bottom: 3.25rem;
}
@media (max-width: 1247.98px) {
	.cs-sticky-sidebar-enabled .cs-widget-banner-carousel {
		margin-bottom: 3.25rem;
	}
}

.cs-banner-carousel {
	position: relative;
	margin-top: 0;
	margin-bottom: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	border-radius: var(--cs-thumbnail-border-radius);
	overflow: hidden;
}
.cs-banner-carousel__slider {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	aspect-ratio: 1;
	max-height: 400px;
	overflow: hidden;
	display: block;
}
.cs-banner-carousel__wrapper {
	margin: 0;
	padding: 0;
	list-style: none;
	position: relative;
	width: 100%;
	height: 100%;
	min-width: 0;
	z-index: 1;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	transition-property: transform;
	transition-timing-function: ease;
}
.cs-banner-carousel__item {
	position: relative;
	flex-shrink: 0;
	flex-grow: 0;
	width: 100%;
	min-width: 100%;
	height: 100%;
	transition-property: transform;
	backface-visibility: hidden;
	transform: translateZ(0);
}
.cs-banner-carousel__link {
	display: block;
	position: relative;
	width: 100%;
	max-width: 100%;
	text-decoration: none;
	border-radius: var(--cs-thumbnail-border-radius);
	overflow: hidden;
}
.cs-banner-carousel__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	vertical-align: top;
}
.cs-banner-carousel__pagination {
	position: absolute;
	bottom: 0.5rem;
	left: 0;
	right: 0;
	z-index: 7;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
	transition: 0.3s opacity;
}
.cs-banner-carousel__pagination.swiper-pagination-bullets {
	width: auto;
}
.cs-banner-carousel__pagination-bullet {
	display: flex;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	justify-content: center;
	align-items: center;
	background: rgba(255, 255, 255, 0.6);
	opacity: 1;
	transition: 0.25s;
	cursor: pointer;
}
.cs-banner-carousel__pagination-bullet-active {
	background: #fff;
	width: 5px;
	height: 5px;
}
.cs-banner-carousel__pagination-bullet:after {
	display: none;
}
@media (hover: hover) {
	.cs-banner-carousel__pagination-bullet:hover {
		opacity: 0.9;
	}
}

/* Адаптив карусели баннеров — картинки не вылезают (1–4 баннера) */
.cs-widget-banner-carousel,
.cs-widget-banner-carousel .cs-banner-carousel,
.cs-widget-banner-carousel .cs-banner-carousel__slider,
.cs-widget-banner-carousel .cs-banner-carousel__wrapper,
.cs-widget-banner-carousel .cs-banner-carousel__item,
.cs-widget-banner-carousel .cs-banner-carousel__link {
	box-sizing: border-box;
}
@media (max-width: 1247.98px) {
	.cs-widget-banner-carousel,
	.cs-banner-carousel,
	.cs-banner-carousel__slider {
		width: 100%;
		max-width: 100%;
	}
}
@media (max-width: 767.98px) {
	.cs-offcanvas .cs-widget-banner-carousel,
	.cs-sidebar__area .cs-widget-banner-carousel {
		width: 100%;
		max-width: 100%;
		overflow: hidden;
	}
	.cs-banner-carousel {
		overflow: hidden;
	}
	.cs-banner-carousel__slider {
		width: 100%;
		aspect-ratio: 1;
		max-height: 320px;
		overflow: hidden;
	}
	.cs-banner-carousel__wrapper {
		height: 100%;
	}
	.cs-banner-carousel__item {
		height: 100%;
	}
	.cs-banner-carousel__link {
		display: block;
		height: 100%;
	}
	.cs-banner-carousel__img {
		width: 100%;
		height: 100%;
		object-fit: contain;
		display: block;
	}
}
@media (max-width: 479.98px) {
	.cs-banner-carousel__pagination {
		bottom: 0.375rem;
	}
	.cs-banner-carousel__pagination-bullet {
		width: 4px;
		height: 4px;
	}
	.cs-banner-carousel__pagination-bullet-active {
		width: 4px;
		height: 4px;
	}
}
.cs-banner-carousel-widget-help {
	font-size: 0.875rem;
	color: #666;
}
.cs-banner-carousel-widget-help a {
	text-decoration: underline;
}

/* Floating tooltip (appended to body, never clipped) */
.cs-code-copy-tooltip.cs-tooltip-floating {
	position: fixed;
	right: auto;
	top: auto;
	opacity: 1;
	visibility: visible;
	padding: 0.4rem 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: #fff;
	background: rgba(45, 45, 50, 0.95);
	border-radius: 8px;
	pointer-events: none;
	z-index: 99999;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
