/* --- 1. VARIABLES & RESET --- */
:root {
    --bg-color: #0f172a;       /* Темно-синий фон */
    --card-bg: #1e293b;        /* Цвет карточек */
    --primary: #38bdf8;        /* Голубой акцент */
    --secondary: #818cf8;      /* Фиолетовый акцент */
    --text-main: #f8fafc;      /* Белый текст */
    --text-muted: #94a3b8;     /* Серый текст */
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 2. LAYOUT UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

/* --- 3. NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95); /* Чуть темнее для читаемости */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 20px 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    z-index: 1001; /* Чтобы лого было поверх меню */ 
/*	background-image: url(../img/finobyte_white_new.svg); */
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Бургер меню (по умолчанию скрыто на ПК) */
.burger {
    display: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001; /* Чтобы кнопка была поверх открытого меню */
}

/* --- 4. HERO SECTION --- */
.hero {
    min-height: 100vh; /* min-height лучше для мобильных */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 40%);
    padding-top: 80px; /* Компенсация фикс. меню */
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: inline-block;
}

/* Контейнер кнопок (Базовый для ПК) */
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* --- 5. BUTTONS --- */
.btn-primary {
    background: var(--gradient);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    /* margin-left убрал, так как используем gap в родителе */
    transition: var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
}

/* --- 6. SERVICES (GRID) --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* --- 7. CONTACT FORM --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.info-list {
    list-style: none;
    margin-top: 30px;
}

.info-list li {
    margin-bottom: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #334155;
    padding: 10px 0;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
    z-index: 2;
    position: relative;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 10px;
    color: #94a3b8;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* Анимация лейблов */
.form-group.focused label {
    top: -20px;
    font-size: 0.85rem;
    color: #38bdf8;
}

.form-group.focused input,
.form-group.focused textarea {
    border-color: #38bdf8;
}

/* Фикс для Textarea label */
.form-group textarea + label {
    top: -25px !important;
    font-size: 0.85rem !important;
    color: #38bdf8 !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

.form-group textarea {
    margin-top: 10px !important;
}

/* --- 8. AJAX MESSAGES --- */
#form-response {
    display: none;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.success-msg {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
}

.error-msg {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #f87171;
}

/* --- 9. ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- 10. FOOTER --- */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Скрываем значок Google */
.grecaptcha-badge { 
    visibility: hidden; 
}

/* =========================================
   11. MOBILE RESPONSIVE (Все исправления здесь)
   ========================================= */
@media screen and (max-width: 768px) {
    
    /* 1. Навигация (Слайд-меню) */
    .burger {
        display: block; /* Показываем бутерброд */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%; /* Ширина шторки меню */
        background-color: var(--card-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateX(100%); /* Спрятано справа */
        transition: transform 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        z-index: 1000;
    }

    /* Класс, который добавляет JS при клике */
    .nav-links.active {
        transform: translateX(0); /* Выезжает */
    }

    /* 2. Hero Секция */
    .hero h1 { 
        font-size: 2.5rem; 
    }
    .hero p { 
        font-size: 1rem; 
        padding: 0 15px;
    }

    /* 3. Кнопки (Hero Buttons) - ИСПРАВЛЕНИЕ */
    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 15px !important;
    }

    .hero-btns a {
        display: block;
        width: 100%;
        max-width: 320px; /* Чтобы не были слишком широкими */
        margin: 0;
        box-sizing: border-box;
    }
    
    /* 4. Сетка и Форма */
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
}
