/* === БАЗОВЫЕ СБРОСЫ И ШРИФТЫ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background: #f8faff;
    color: #1a2a3a;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Глобальная защита от переполнения */
img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === ЦВЕТОВАЯ ПАЛИТРА === */
:root {
    --green: #2a7a4a;
    --green-light: #e6f2ec;
    --green-dark: #1f5f3a;
    --blue: #1a4c7a;
    --blue-light: #e3edf7;
    --blue-dark: #0f3a5f;
    --white: #ffffff;
    --gray-bg: #f4f8fc;
    --shadow: 0 12px 30px rgba(26, 76, 122, 0.10);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* === КНОПКИ === */
.btn {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 14px 36px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(42, 122, 74, 0.25);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42, 122, 74, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 76, 122, 0.2);
}

/* Стиль для одиночных кнопок в hero (слайды 2 и 3) */
.btn-hero {
    background: var(--green);
    color: white;
    padding: 14px 36px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(42, 122, 74, 0.25);
    border: 1px solid transparent;
}

.btn-hero:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42, 122, 74, 0.45);
}

/* === ШАПКА === */
header {
    background: var(--blue);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 20, 40, 0.15);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--white);
}
.logo-text span {
    color: #ffffff;
}

nav {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
    padding: 4px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: #7fc9a0;
    transition: var(--transition);
    border-radius: 4px;
}

nav a:hover {
    color: var(--white);
}

nav a:hover::after {
    width: 100%;
}

/* === HERO СЛАЙДЕР === */
.hero {
    padding: 0;
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 44, 66, 0.7) 0%, rgba(26, 76, 122, 0.4) 100%);
}

.hero-slide .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 620px;
    color: var(--white);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.3s forwards;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-content h1 span {
    color: #7fc9a0;
    position: relative;
}

.hero-content .tagline {
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.5s forwards;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: 28px;
    max-width: 520px;
    opacity: 0.95;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.7s forwards;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* === КНОПКИ В HERO === */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    min-height: 64px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.9s forwards;
}

.hero-slide:not(.active) .hero-buttons {
    animation: none;
    opacity: 0;
    transform: translateY(30px);
}

.hero-slide.active .hero-buttons {
    animation: fadeUp 0.8s 0.9s forwards;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.hero-buttons .btn svg {
    flex-shrink: 0;
}

.btn-vk { background: #0077FF; color: white; }
.btn-vk:hover {
    background: #0066dd;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 119, 255, 0.45);
}

.btn-tg { background: #229ED9; color: white; }
.btn-tg:hover {
    background: #1a8bbf;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.45);
}

.btn-phone { background: var(--green); color: white; }
.btn-phone:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(42, 122, 74, 0.45);
}

/* Анимация для контента при переключении слайдов */
.hero-slide:not(.active) .hero-content h1,
.hero-slide:not(.active) .hero-content .tagline,
.hero-slide:not(.active) .hero-content p {
    animation: none;
    opacity: 0;
    transform: translateY(30px);
}

.hero-slide.active .hero-content h1 { animation: fadeUp 0.8s 0.3s forwards; }
.hero-slide.active .hero-content .tagline { animation: fadeUp 0.8s 0.5s forwards; }
.hero-slide.active .hero-content p { animation: fadeUp 0.8s 0.7s forwards; }

.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 5;
}

.hero-dots button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.hero-dots button.active {
    background: var(--green);
    border-color: var(--green);
    transform: scale(1.2);
}

.hero-dots button:hover {
    background: rgba(255,255,255,0.3);
}

/* === ОБЩИЕ ЗАГОЛОВКИ === */
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 16px;
    text-align: center;
}

.section-title span { color: var(--green); }

.section-sub {
    text-align: center;
    font-size: 1.15rem;
    color: #1f405e;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* === СЕКЦИИ С ФОНОМ И СЛАЙДЕРОМ === */
.section-slider {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.section-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
}

.section-slider .slide.active { opacity: 1; }

.section-slider .slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
}

.section-slider .container {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 24px;
}

.section-slider .content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.section-slider .text-content,
.section-slider .slide-image {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-slider .slide.active .text-content,
.section-slider .slide.active .slide-image {
    opacity: 1;
    transform: translateY(0);
}

.section-slider .slide.active .text-content { transition-delay: 0.1s; }
.section-slider .slide.active .slide-image { transition-delay: 0.2s; }

.section-slider .slide:not(.active) .text-content,
.section-slider .slide:not(.active) .slide-image {
    opacity: 0;
    transform: translateY(15px);
    transition-delay: 0s;
}

.section-slider .text-content {
    background: rgba(255,255,255,0.92);
    padding: 40px;
    border-radius: 32px;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow);
    min-width: 0;
}

.section-slider .text-content h2 {
    color: var(--blue);
    font-size: 2rem;
    margin-bottom: 20px;
}

.section-slider .text-content h2 span { color: var(--green); }

.section-slider .text-content ul {
    list-style: none;
    padding: 0;
    columns: 2;
    column-gap: 20px;
}

.section-slider .text-content ul li {
    padding: 8px 0;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 10px;
    break-inside: avoid;
    border-bottom: 1px solid rgba(26, 76, 122, 0.05);
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.section-slider .text-content ul li::before {
    content: "✦";
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
}

.section-slider .slide-image {
    background: rgba(255,255,255,0.15);
    border-radius: 32px;
    padding: 20px;
    backdrop-filter: blur(4px);
    min-width: 0;
}

.section-slider .slide-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.section-slider .slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

.section-slider .slider-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.section-slider .slider-dots button.active {
    background: var(--green);
    border-color: var(--green);
    transform: scale(1.15);
}

/* === БЛОК "ДЛЯ КОГО" === */
.for-whom {
    padding: 70px 0;
    background: var(--white);
}

.whom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.whom-card {
    background: var(--gray-bg);
    padding: 30px 24px;
    border-radius: 28px;
    transition: var(--transition);
    border: 1px solid rgba(26, 76, 122, 0.05);
    box-shadow: var(--shadow);
    text-align: center;
}

.whom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(26, 76, 122, 0.12);
    background: var(--white);
}

.whom-card .whom-icon {
    color: var(--green);
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.whom-card h3 {
    color: var(--blue);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.whom-card p {
    color: #1f3345;
    font-size: 0.98rem;
    opacity: 0.9;
}

/* === ФУТЕР === */
footer {
    background: var(--blue);
    color: white;
    padding: 50px 0 25px;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.8fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
    opacity: 0.7;
    max-width: 300px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.7;
    color: white;
}

.footer-social a:hover {
    background: var(--green);
    border-color: var(--green);
    opacity: 1;
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-links h4,
.footer-contacts h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--white);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
    padding-left: 6px;
}

.footer-contacts .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-contacts .contact-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.footer-contacts .contact-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    word-break: break-word;
}

.footer-contacts .contact-item a:hover { color: var(--white); }
.footer-contacts .contact-item span { color: rgba(255, 255, 255, 0.7); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    opacity: 0.5;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--white);
    opacity: 1;
}

/* === АНИМАЦИИ === */
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===================================================== */
/* ============ ПЛАНШЕТЫ (до 992px) ==================== */
/* ===================================================== */
@media (max-width: 992px) {
    .section-slider .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .section-slider .text-content {
        padding: 28px;
    }
    .section-slider .text-content ul {
        columns: 1;
    }
    .hero-content h1 {
        font-size: 2.6rem;
    }
    .hero-content {
        min-height: 300px;
    }
    .whom-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================================== */
/* ============ МОБИЛЬНЫЕ (до 768px) =================== */
/* ===================================================== */
@media (max-width: 768px) {

    .container {
        padding: 0 16px;
    }

    /* --- HEADER --- */
    .header-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        text-align: center;
    }
    .logo {
        justify-content: center;
    }
    nav {
        justify-content: center;
        gap: 14px;
    }
    nav a {
        font-size: 0.9rem;
    }
    .logo img { height: 38px; }
    .logo-text { font-size: 1.3rem; }

    /* --- HERO: активный слайд в потоке, остальные — абсолютные --- */
    .hero {
        height: auto;
        min-height: 0;
        padding: 0;
        overflow: hidden;
    }
    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 60px 0 80px;
        display: flex;
        align-items: center;
    }
    .hero-slide.active {
        position: relative;
        opacity: 1;
    }
    .hero-slide:not(.active) {
        opacity: 0;
        pointer-events: none;
    }
    .hero-content {
        min-height: 0;
        max-width: 100%;
    }
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    .hero-content .tagline {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 22px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
    }
    .hero-buttons .btn {
        justify-content: center;
        width: 100%;
        white-space: normal;
        text-align: center;
    }
    .btn-hero {
        width: 100%;
        text-align: center;
        display: block;
        padding: 14px 24px;
    }
    .hero-dots {
        bottom: 18px;
    }
    .hero-dots button {
        width: 11px;
        height: 11px;
    }

    /* --- SECTION SLIDER: активный слайд в потоке --- */
    .section-slider {
        min-height: 0;
        height: auto;
        display: block;
        overflow: hidden;
        padding-bottom: 70px; /* место для точек */
    }
    .section-slider .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 40px 0 20px;
        background-attachment: scroll;
        background-size: cover;
        background-position: center;
    }
    .section-slider .slide.active {
        position: relative;
        opacity: 1;
    }
    .section-slider .slide:not(.active) {
        opacity: 0;
        pointer-events: none;
    }
    .section-slider .container {
        padding: 0 16px;
    }
    .section-slider .content-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .section-slider .text-content {
        padding: 22px 18px;
        border-radius: 20px;
    }
    .section-slider .text-content h2 {
        font-size: 1.35rem;
        margin-bottom: 14px;
    }
    .section-slider .text-content ul {
        columns: 1;
    }
    .section-slider .text-content ul li {
        font-size: 0.92rem;
        padding: 7px 0;
    }
    .section-slider .slide-image {
        padding: 10px;
        border-radius: 20px;
    }
    .section-slider .slide-image img {
        border-radius: 14px;
    }
    .section-slider .slider-dots {
        bottom: 24px;
    }

    /* --- БЛОК "ДЛЯ КОГО" --- */
    .for-whom {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-sub {
        font-size: 1rem;
        margin-bottom: 28px;
    }
    .whom-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .whom-card {
        padding: 24px 20px;
    }

    /* --- ФУТЕР --- */
    footer {
        padding: 40px 0 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-brand {
        grid-column: 1;
    }
    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===================================================== */
/* ============ МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px) ========== */
/* ===================================================== */
@media (max-width: 480px) {
    .hero-slide {
        padding: 45px 0 70px;
    }
    .hero-content h1 {
        font-size: 1.7rem;
    }
    .hero-content .tagline {
        font-size: 1rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .hero-buttons .btn {
        padding: 11px 18px;
        font-size: 0.9rem;
    }
    .hero-buttons .btn svg {
        width: 16px;
        height: 16px;
    }

    .section-slider .slide {
        padding: 30px 0 15px;
    }
    .section-slider .text-content {
        padding: 18px 14px;
        border-radius: 16px;
    }
    .section-slider .text-content h2 {
        font-size: 1.2rem;
    }
    .section-slider .text-content ul li {
        font-size: 0.88rem;
    }
    .section-slider .slide-image {
        padding: 8px;
        border-radius: 16px;
    }
    .section-slider .slide-image img {
        border-radius: 10px;
    }

    .section-title {
        font-size: 1.5rem;
    }
    .section-sub {
        font-size: 0.92rem;
    }
    .whom-card h3 {
        font-size: 1.15rem;
    }
    .logo-text {
        font-size: 1.15rem;
    }
    nav a {
        font-size: 0.85rem;
    }
    nav {
        gap: 10px;
    }
}