/* ==========================================================================
   Стилевая система: EspoCRM DevOps (Dark Cyber / Modern Tech UI)
   ========================================================================== */

:root {
    --bg-main: #0b1120;
    --bg-surface: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #3b82f6;       /* Tech Blue */
    --color-primary-glow: rgba(59, 130, 246, 0.4);
    --color-accent: #ea580c;        /* Orange */
    --color-accent-glow: rgba(234, 88, 12, 0.4);
    --color-danger: #ef4444;        /* Alert Red */
    --color-warning: #f59e0b;       /* Warning Orange */
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(59, 130, 246, 0.5);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    max-width: 100vw;
    width: 100%;
}

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

/* ==========================================================================
   Типографика и Утилиты
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.highlight-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-center {
    text-align: center;
}

code {
    font-family: var(--font-mono);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #ea580c;
}

/* Баджи */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-accent {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 8px #3b82f6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #3b82f6; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-align: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-glow {
    animation: btnGlow 3s infinite alternate;
}

@keyframes btnGlow {
    0% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
    100% { box-shadow: 0 0 25px rgba(59, 130, 246, 0.8), 0 0 40px rgba(234, 88, 12, 0.3); }
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
}

/* ==========================================================================
   Навигация (Header)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Главный экран (Hero Section)
   ========================================================================== */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(234, 88, 12, 0.1) 50%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-size: 3.2rem;
    margin: 20px 0;
    font-weight: 800;
    max-width: 900px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-guarantee {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-icon {
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 6px;
}

/* ==========================================================================
   Секции общие
   ========================================================================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    max-width: 700px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-tag {
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Траст блок (Trust Banner) */
.trust-banner {
    background: #1e293b;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
}

.trust-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 600;
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* Фичи карточки (Features) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #fff;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==========================================================================
   Тарифы (Pricing)
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-featured {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(59, 130, 246, 0.08) 100%);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
    transform: scale(1.03);
}

.pricing-featured:hover {
    transform: scale(1.03) translateY(-5px);
}

.featured-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}

.pricing-header {
    text-align: left;
    margin-bottom: 24px;
}

.pricing-title {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.pricing-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    gap: 10px;
}

.pricing-features li::before {
    content: "✓";
    color: #60a5fa;
    font-weight: bold;
}

.pricing-footer {
    margin-top: auto;
}

/* ==========================================================================
   Воронка (Блок-магнит / CTA)
   ========================================================================== */
.cta-funnel-section {
    padding: 40px 0;
}

.funnel-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.15);
}

.funnel-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.funnel-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.funnel-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: #fff;
}

.funnel-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.funnel-btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active {
    border-color: rgba(255, 255, 255, 0.3);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 24px;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Подвал (Footer)
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    background: #080d1a;
}

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

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer-right {
    text-align: right;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Блок доверия (Trust Grid)
   ========================================================================== */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.trust-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    background: var(--bg-card-hover);
}

.trust-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.trust-card:hover .trust-logo-text {
    color: #fff;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

@media (max-width: 992px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .trust-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Кнопка «Наверх»
   ========================================================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* ==========================================================================
   Модальные окна
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 30px 15px;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    margin: auto;
    background: #1e293b;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.15);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #fff;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #fff;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.messenger-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.modal-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 24px;
    line-height: 1.4;
}

/* ==========================================================================
   Адаптивность (Responsive)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 36px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-guarantee {
        justify-content: center;
    }
    
    .pricing-grid,
    .pricing-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .pricing-featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .navbar-content {
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .nav-links {
        display: flex;
        order: 3;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 18px;
        padding: 8px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        font-size: 0.9rem;
    }
    
    .nav-action .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 12px;
    }
    
    .hero-actions .btn {
        width: 100%;
        margin: 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .pricing-card, .feature-card, .trust-card {
        padding: 24px 16px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        text-align: center;
    }

    /* ФИКС ДЛЯ КЛЮЧЕВЫХ ВЫГОД */
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-subtitle {
        display: none;
    }
    
    .nav-action .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .pricing-price {
        font-size: 2rem;
    }
    
    .badge {
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
        text-align: center;
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1.1rem;
    }
    
    .modal-box {
        padding: 24px 16px;
        max-height: 88vh;
    }
    .modal-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    .modal-title {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    .modal-desc {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }
    .messenger-btn {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
    }
}
