/* =============================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================= */

/* ---- Общий контейнер секции с фоном ---- */

.section { position: relative; padding: 72px 0; }


.section__bg { position: absolute; inset: 0; z-index: 0; }
.section__bg img { width: 100%; height: 100%; object-fit: cover; }
.section--bg > .container { position: relative; z-index: 1; }

/* ---- Hero ---- */

.hero {
    position: relative;
    background: var(--text-main);
    color: #fff;
    overflow: hidden;
}

.hero__wrapper {
    padding-left: 32px;
    border-left: 1px solid var(--accent);
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(15,17,20,0.92) 0%, rgba(15,17,20,0.6) 55%, rgba(15,17,20,0.25) 100%);
}

.hero__container { position: relative; z-index: 2; }

.hero__content { max-width: 837px; padding: 64px 0 56px; }

.hero__title { font-size: 52px; font-weight: 700; line-height: 1.15; color: #fff; }
.hero__title-accent { color: var(--accent); }

.hero__description {
    margin-top: 20px;
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
    max-width: 678px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.hero__btn { height: 52px; padding: 0 28px; }

.hero__stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 131px;
    background: #46414099;
    border-width: 1px 0px 1px 0px; /* Убраны запятые */
    border-style: solid;
    border-image-source: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.2) 100%);
    border-image-slice: 1;
}

.hero__stat { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 20px 0; position: relative; 
    border-right: 1px solid;

border-image-source: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.8) 100%);
border-image-slice: 1;


}

.hero__stat-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero__stat:last-child {
    border: none;
}

.hero__stat::after {
    display: block;
    content: '';
    position: absolute;
    right: -2.5px;
    bottom: -2.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
}

.hero__stat:last-child::after  {
    display: none;
}

.hero__stat-icon { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.hero__stat-text { display: flex; flex-direction: column; }
.hero__stat-value { font-size: 24px; font-weight: 700; color: var(--accent); }
.hero__stat-label { font-size: 14px; color: rgba(255, 255, 255, 0.7); }

/* ---- Услуги (переиспользуемый интро-блок) ---- */

.services {
    padding: 72px 0;
    background: var(--bg-grad);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
    padding: 20px;
    min-height: 240px;
    background: #fff;
    border-bottom: 2px solid #F4B042;
    border-radius: 6px;
    transition: box-shadow 0.2s;
}

.service-card::before {
    display: block;
    position: absolute;
    content: '';
    background-image: url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 23.5V5C0 2.23858 2.23858 0 5 0H24L0 23.5Z" fill="%23F4B042"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    width: 24px;
    height: 24px;
    left: 1px;
    top: 1px;
    z-index: 3;
}

.service-card::after {
    display: block;
    position: absolute;
    content: '';
    background: linear-gradient(180deg, rgba(236, 235, 237, 0.8) 37.5%, rgba(236, 235, 237, 0.16) 42.92%);
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.service-card--link:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }

.service-card__icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.service-card__icon img { 
    width: 100%; height: 100%; object-fit: cover;
    position: absolute;
    left: 0;
    top: 0; 

}
.service-card__title { font-size: 17px; font-weight: 700; color: var(--text-main); position: relative; z-index: 3; }
.service-card__desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; position: relative; z-index: 3; }

.service-card__toggle {
    position: relative;
    z-index: 3;
}

.service-card__action {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main); position: relative; z-index: 3;
}

.service-card--link:hover .service-card__action { color: var(--accent); }

/* Категория: раскрывающийся список */
.service-card__head { display: flex; flex-direction: column; gap: 12px; }

.service-card__list {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
    margin-top: 4px;
}

/* ---- Общая панель grid-аккордеона ---- */
.services__panel {
    grid-column: 1 / -1;
    background: #FFFFFF99;

    border: 2px solid #FFFFFF;
    box-shadow: 0px 0px 16px -1px #0000001A 0px 0px 3px 0px #0000001A;

    border-radius: 6px;
    padding: 32px 20px;
}

.services__panel .service-card__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
}

.service-card__item-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    width: max-content;
}

a.service-card__item-inner:hover { color: var(--accent); }

.service-card__check { width: 18px; height: 18px; flex-shrink: 0; }
.service-card__item-text { flex: 1; }
.service-card__item-arrow { flex-shrink: 0; color: var(--accent); }

.service-card__toggle {
    margin-top: 8px;
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 20px;
    border-radius: 6px;
    background: #FFFFFF99;
border: 2px solid #FFFFFF;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.service-card__toggle:hover { opacity: 0.9; }

/* ---- Swiper пагинация ---- */

.swiper-pagination {
    position: static !important;
    margin-top: 20px;
    display: none;
}

.swiper-pagination-bullet-active { background: var(--accent) !important; }

.service-card__toggle-arrow {
    transform: rotate(90deg);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.service-card--category.is-open .service-card__toggle-arrow { transform: rotate(-90deg); }

/* Перекрытие неактивных карточек при открытой категории */
.services__grid.has-active .service-card:not(.is-open) {
    opacity: 0.85;
}

/* ---- О компании ---- */

.about__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 56px 24px;
    align-items: center;
	position: relative;
}

.about__inner .line {
	position: absolute;
	display: flex;
	align-items: center;
	background: linear-gradient(90deg, #F4B042 0%, rgba(244, 176, 66, 0.6) 86.55%, rgba(244, 176, 66, 0.2) 100%);
	height: 2px;
	width: 249px;
	right: 0;
	top: -55px;
}

.about__inner .line:before {
	display: block;
	content: '';
	width: 6px;
	height: 6px;
	background-color: var(--accent);
	border-radius: 50%;
}

.about__inner .heading {
    grid-column: 1 / 3;
    text-align: center;
    justify-self: center;
    margin-bottom: 0;
}

/* Blockquote в wysiwyg */
.about__text blockquote {
    margin: 24px 0 0;
    padding: 20px 24px;
    border-bottom: 2px solid #F4B042;
    background: #FFFFFF99;
    border-radius: 0 8px 8px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
	box-shadow: 0px 0px 16px -1px #0000001A,  0px 0px 3px 0px #0000001A;
}

.about__text p {
    font-size: 16px;
}

.about__text { margin: 24px 0; }
.about__btn { width: 100%; max-width: 274px; height: 54px; }
.about__media img { width: 100%; border-radius: 16px; display: block;
height: 524px; object-fit: cover; align-self: center; border: 6px solid #FFFFFF99; }

/* ---- Объекты ---- */

.cases__footer { display: flex; justify-content: center; margin-top: 32px; }
.cases__btn { height: 48px; padding: 0 32px; }

/* ============================================
   ПЛАНШЕТ  ≤ 1080px
   ============================================ */

@media (max-width: 1080px) {
    .section { padding: 56px 0; }
    .services { padding: 56px 0; }

    .hero__content { padding: 48px 0 40px; }
    .hero__title { font-size: 36px; }
    /* .hero__stats { grid-template-columns: repeat(2, 1fr); } */

    .services__grid { grid-template-columns: repeat(2, 1fr); }

    .about__inner { grid-template-columns: 1fr; gap: 32px; }
    .about__media { order: 3; }

    .about__inner .heading {
        grid-column: 1;
    }

    .about__text {
        margin-top: 0;
    }

    .hero__stat-value {
        font-size: 18px;
    }
	
	.about__inner .line {
		top: -35px;
	}
}

/* ============================================
   МОБАЙЛ  ≤ 768px
   ============================================ */

@media (max-width: 768px) {
    .section { padding: 44px 0; }
    .services { padding: 44px 0; }

    .hero__wrapper {
        padding-left: 6px;
    }

    .hero__content { padding: 36px 0 32px; }
    .hero__title { font-size: 28px; }
    .hero__actions { flex-direction: column; }
    .hero__btn { width: 100%; }
    .hero__stats { grid-template-columns: 1fr; margin-bottom: 48px; }

    .hero__stat::after {
        right: initial;
        left: -2.5px;
    }

    .hero__stat {
        border-right: none;
        border-bottom: 1px solid;
        border-image-source: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.8) 100%);
    }

    .about__btn {
        max-width: 100%;
    }

    .about__media img {
        height: 300px;
    }
	
	.about__inner .line {
		top: -20px;
		width: 121px;
	}

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

    /* Мобайл: позиционирование панели через order */
    .js-service-card  { order: var(--card-order, 0); }
    .services__panel  { order: var(--panel-order, 999); }

    .services__panel .service-card__list { grid-template-columns: 1fr; }

    .heading__arrows { display: none; }

    .swiper-pagination { display: flex; justify-content: center; }
}
