/* =========================
   Переменные (Root)
========================= */
:root {
    --primary-color: #4CAF50;      /* Акцент: яркий зелёный */
    --secondary-color: #2E5339;    /* Тёмный зелёный */
    --accent-green: #386641;       
    --text-dark: #000000;
    --text-light: #FFFFFF;
    --bg-body: #F5F7F4;            
    --bg-section: #FFFFFF;         
    --bg-card: #F2F5F1;            
    --gradient: linear-gradient(135deg, #6A994E, #2E5339);

    /* базовый шрифт */
    --font-family: 'Manrope', sans-serif;
    --font-size-base: 18px;
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-xxl: 2rem;        /* 32px */
    --font-size-xxxl: 3.5rem;     /* 56px */
}

/* =========================
   Общие стили
========================= */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin: 0;
    background-color: var(--bg-body);
    color: var(--text-dark);
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Заголовки и логотип отдельным шрифтом */
h1, h2, h3,
.logo span {
    font-family: 'Space Grotesk', sans-serif;
}

h2 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: var(--secondary-color);
}
h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
}

/* =========================
   Header
========================= */
header {
    background: var(--secondary-color);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 100px;
    padding: 0;
}

header .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    height: 100%;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.logo span {
    font-size: 2rem;
    line-height: 1;
}

nav {
    display: flex;
    gap: 1.5rem;
}
nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
nav a:hover {
    color: var(--primary-color);
}

.header-btn {
    background: #2e7d32;
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: var(--font-size-lg);
    transition: all 0.3s ease;
}
.header-btn:hover {
    background: #359039;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* =========================
   Секции
========================= */
section {
    padding: 2rem;
    background: var(--bg-section);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #E2E7E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Кнопки
========================= */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--font-size-lg);
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn.primary {
    background: var(--gradient);
    color: var(--text-light);
}
.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn.telegram {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 0.6rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.telegram:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

.btn.telegram.pulse::after {
    content: "";
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    animation: pulse 3s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* =========================
   Услуги
========================= */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.service-card i { font-size: 2rem; color: var(--primary-color); }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.service-card h3 {
    margin: 0;
}

.service-card p {
    margin: 0;
}


/* =========================
   Pricing
========================= */
.pricing-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
}

.pricing-text { flex: 1 1 400px; min-width: 300px; }
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.pricing-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.pricing-column h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--secondary-color); }
.pricing-column ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.pricing-column li {
    font-size: 1.1rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.pricing-column li:last-child { border-bottom: none; padding-bottom: 0; }
.pricing-column li i { color: var(--primary-color); min-width: 20px; text-align: center; line-height: 1.5; transition: text-shadow 0.3s ease, color 0.3s ease; }
.pricing-column li:hover i { color: var(--accent-green); text-shadow: 0 0 6px rgba(56,102,65,0.5); }

.pricing-image { flex: 1 1 200px; min-width: 250px; text-align: center; margin-top: 1rem; }
.pricing-image img { max-width: 100%; border-radius: 12px; height: auto; }

/* =========================
   Кейсы
========================= */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.case-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }

/* =========================
   Footer
========================= */
footer {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 1rem;
    text-align: center;
    font-size: var(--font-size-base);
    border-top: 1px solid rgba(255,255,255,0.15);
}
footer a { color: var(--text-light); text-decoration: none; margin-right: 0.3rem; transition: color 0.3s ease; }
footer a:hover { color: var(--primary-color); }
footer i { margin-right: 0.3rem; font-size: 1.5rem; vertical-align: middle; }
.footer-contact { display: inline-flex; align-items: center; gap: 0.4rem; }

/* =========================
   CTA (Плавающая и блок)
========================= */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: pulseCTA 3s infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}
.floating-cta:hover { transform: scale(1.1); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
@keyframes pulseCTA { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

.pulse-ring::after {
    content: "";
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0.4;
    animation: pulseRing 2.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pulseRing { 0% { transform: scale(0.95); opacity: 0.4; } 50% { transform: scale(1.15); opacity: 0; } 100% { transform: scale(0.95); opacity: 0.4; } }

#cta {
    padding: 2rem 1.5rem 1rem 1.5rem;
    background: var(--bg-section);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.cta-container { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; max-width: 700px; margin: 0 auto; text-align: center; }
.cta-text h2 { font-size: 2rem; color: var(--secondary-color); margin-bottom: 1rem; }
.cta-text p { font-size: 1.1rem; }
.cta-note { font-size: 0.95rem; color: #666; margin-top: 0.8rem; }

.nowrap {
    white-space: nowrap;
}

/* =========================
   ДЕСКТОП — что показываем
========================= */
.desktop-nav,
.desktop-btn {
    display: flex;
    gap: 1.5rem;
}

.burger,
.mobile-nav {
    display: none;
}

/* =========================
   МОБИЛЬНАЯ ВЕРСИЯ
========================= */
@media (max-width: 768px) {

    /*  ВАЖНО: скрываем только desktop-меню и desktop-кнопку */
    .desktop-nav,
    .desktop-btn {
        display: none !important;
    }

    /*  BURGER СТАНОВИТСЯ ВИДИМ */
    .burger {
        display: block;
        width: 32px;
        height: 24px;
        position: relative;
        cursor: pointer;
    }

    .burger span,
    .burger::before,
    .burger::after {
        content: "";
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: white;
        transition: .3s;
    }

    .burger span { top: 50%; transform: translateY(-50%); }
    .burger::before { top: 0; }
    .burger::after { bottom: 0; }

    /* КРЕСТИК */
    .burger.active span { opacity: 0; }
    .burger.active::before {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }
    .burger.active::after {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }

    /*  МОБИЛЬНОЕ МЕНЮ */
    .mobile-nav {
        display: none;
        flex-direction: column;
        background: var(--secondary-color);
        padding: 1rem 0;
        gap: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .mobile-nav.active {
        display: flex;
        animation: slideDown .3s ease;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .mobile-nav a {
        color: white;
        padding: 0.7rem 1rem;
        text-align: center;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-nav a:last-child {
        border-bottom: none;
    }

    /* Кнопка */
    .mobile-btn {
        background: #2e7d32;
        margin-top: .6rem;
        border-radius: 50px;
    }
}

/* =========================
   Очень маленькие экраны
========================= */
@media (max-width: 480px) {
    h2 {
        font-size: 2.2rem;
        line-height: 1.3;
        word-break: break-word;
    }
}


/* ======================================
   Промежуточная адаптация (ширина 768–1024px)
   — чтобы кнопка не уезжала вниз
====================================== */
@media (max-width: 1024px) and (min-width: 769px) {

    /* Уменьшаем логотип */
    .logo-img {
        width: 42px;
        height: 42px;
    }
    .logo span {
        font-size: 1.7rem;
    }

    /* Уменьшаем отступы меню */
    .desktop-nav {
        gap: 1rem;
    }
    .desktop-nav a {
        font-size: 1rem;
    }

    /* Уменьшаем кнопку */
    .desktop-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.95rem;
        border-radius: 8px;
        white-space: nowrap;
    }

    /* Не даём контейнеру переносить элементы */
    header .container {
        flex-wrap: nowrap;
    }
}
