/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse at top right, rgba(6, 182, 212, 0.18) 0%, transparent 50%),
        linear-gradient(135deg, rgba(11, 17, 32, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%),
        var(--color-bg-dark);
    color: var(--color-text-onDark);
    overflow: hidden;
}
.hero:not(.hero--slider) { padding-block: clamp(3rem, 8vw, 6rem); }

/* ============================================================
   HERO-СЛАЙДЕР
   ============================================================ */
.hero--slider {
    min-height: clamp(520px, 75vh, 720px);
    display: grid;
}
.hero__slides {
    position: relative;
    width: 100%;
    height: 100%;
    grid-area: 1 / 1;
}
.hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 600ms ease, visibility 0s linear 600ms;
    padding-block: clamp(3rem, 8vw, 6rem);
    display: flex;
    align-items: center;
}
.hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 600ms ease, visibility 0s linear 0s;
    position: relative;  /* чтобы хост-элемент знал высоту */
}
@media (prefers-reduced-motion: reduce) {
    .hero__slide { transition: none; }
}

.hero__slide-bg {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 65%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
    mask-image: linear-gradient(to right, transparent 0%, black 50%);
}

/* Стрелки */
.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px; height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast);
    backdrop-filter: blur(8px);
}
.hero__arrow:hover {
    background: rgba(6, 182, 212, 0.25);
    border-color: var(--color-accent);
    color: #fff;
}
.hero__arrow--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.hero__arrow--next { right: clamp(0.5rem, 2vw, 1.5rem); }
@media (min-width: 768px) {
    .hero__arrow { display: inline-flex; }
}

/* Точки */
.hero__dots {
    position: absolute;
    left: 50%;
    bottom: clamp(1rem, 3vw, 2rem);
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.hero__dot {
    width: 10px; height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: width var(--t), background var(--t);
}
.hero__dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero__dot.is-active {
    width: 28px;
    background: var(--color-accent);
}

/* Прогресс-бар */
.hero__progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 4;
}
.hero__progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    transition: width 100ms linear;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}
@media (prefers-reduced-motion: reduce) {
    .hero__progress-bar { transition: none; }
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.02) 0,
            rgba(255, 255, 255, 0.02) 2px,
            transparent 2px,
            transparent 12px);
    pointer-events: none;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-7);
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero__content { max-width: 64ch; min-width: 0; }
.hero__eyebrow {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: rgba(6, 182, 212, 0.18);
    color: var(--color-accent);
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--space-4);
}
.hero__title {
    font-size: var(--fs-hero);
    line-height: 1.12;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    /* Длинные русские слова целиком: не ломаем посимвольно */
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: manual;
}
.hero__title em {
    color: var(--color-accent);
    font-style: normal;
}
.hero__lead {
    font-size: var(--fs-md);
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
    max-width: 56ch;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}
.hero__stat-num {
    font-size: var(--fs-h2);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-2);
}
.hero__stat-label {
    color: var(--color-text-light);
    font-size: var(--fs-sm);
}

@media (min-width: 992px) {
    .hero__inner { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
}

/* ============================================================
   ПРЕИМУЩЕСТВА
   ============================================================ */
.features__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    margin-bottom: var(--space-4);
    font-size: var(--fs-xl);
}

/* ============================================================
   ПОПУЛЯРНЫЕ УСЛУГИ — карточки с темной плашкой
   ============================================================ */
.services-popular__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.services-popular__head-text { max-width: 64ch; }

/* Группы услуг по категориям */
.services-group { margin-bottom: var(--space-7); }
.services-group:last-child { margin-bottom: 0; }
.services-group__title {
    margin-bottom: var(--space-4);
    font-size: var(--fs-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.services-group__title::before,
.services-group__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
.services-group__pill {
    padding: var(--space-1) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Якорное меню по категориям (на /services) */
.services-anchor {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}
.services-anchor__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-alt);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--color-text);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.services-anchor__item:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.services-anchor__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--color-bg);
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-text-muted);
}
.services-anchor__item:hover .services-anchor__count {
    background: var(--color-accent);
    color: #fff;
}

/* ============================================================
   ЭТАПЫ РАБОТЫ
   ============================================================ */
.stages__list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    counter-reset: stages;
}
.stages__item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    transition: transform var(--t), box-shadow var(--t);
}
.stages__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stages__num {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-weight: 800;
    font-size: var(--fs-md);
    margin-bottom: var(--space-4);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}
.stages__title {
    font-size: var(--fs-md);
    margin-bottom: var(--space-2);
}
.stages__text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
@media (min-width: 560px) { .stages__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .stages__list { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   FAQ
   ============================================================ */
.faq__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.faq__item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-5);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq__item[open] {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}
.faq__q {
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    padding: var(--space-2) 0;
    position: relative;
    padding-right: 32px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
    content: "+";
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    display: grid; place-items: center;
    color: var(--color-accent);
    font-size: 1.5rem;
    line-height: 1;
    transition: transform var(--t-fast);
}
.faq__item[open] .faq__q::after {
    content: "−";
}
.faq__a {
    color: var(--color-text-muted);
    line-height: 1.6;
    padding: var(--space-2) 0 var(--space-3);
    animation: fade-in-down var(--t) ease-out forwards;
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CTA-БЛОК
   ============================================================ */
.cta {
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 5vw, 3.5rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    align-items: center;
}
.cta__title {
    font-size: var(--fs-h3);
    color: #fff;
    margin-bottom: var(--space-2);
}
.cta__text {
    color: rgba(255, 255, 255, 0.9);
    max-width: 50ch;
}
.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.cta .btn {
    background: #fff;
    color: var(--color-text);
}
.cta .btn:hover {
    background: var(--color-bg-dark);
    color: #fff;
}
.cta .btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.cta .btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}
@media (min-width: 768px) {
    .cta { grid-template-columns: 1.4fr 1fr; }
    .cta__actions { justify-content: flex-end; }
}
/* ============================================================
   НОВОСТИ И КЕЙСЫ (ГОРИЗОНТАЛЬНЫЕ КАРТОЧКИ)
   ============================================================ */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding-top: 20px;
}

.reel-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: flex-start;
    border: 1px solid rgba(0,0,0,0.03);
}

.reel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.reel-card__body {
    flex: 1;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
}

.reel-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-bg-dark);
}

.reel-card__desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reel-card__btn {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-bg-dark);
}

.reel-card__media {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.reel-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-card__play {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: grid;
    place-items: center;
    color: #fff;
    transition: background 0.3s ease;
}

.reel-card:hover .reel-card__play {
    background: rgba(6, 182, 212, 0.4);
}

