/* =========================================
   1. ОБЩИЕ НАСТРОЙКИ
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }
body { background-color: #0a0a0a; color: white; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* =========================================
   2. HEADER
   ========================================= */
.header {
    position: absolute; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 50px; z-index: 100; color: white;
}
.logo-text { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.nav a { margin: 0 25px; font-size: 12px; letter-spacing: 1px; font-weight: 400; color: #ccc; transition: color 0.3s; }
.nav a:hover { color: white; }
.header-right { display: flex; align-items: center; gap: 20px; font-size: 18px; color: #ccc; }
.header-right i:hover { color: white; cursor: pointer; }

.auth-btn {
    background: #ff8c00; color: #000; border: none;
    padding: 8px 16px; border-radius: 20px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.3s;
}
.auth-btn:hover { background: #fff; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #ccc; }
.logout-btn { background: transparent; border: 1px solid #444; color: #ccc; padding: 5px 10px; border-radius: 15px; font-size: 10px; cursor: pointer; }

/* =========================================
   3. HERO (Главный экран с видео)
   ========================================= */
.hero {
    height: 100vh; position: relative;
    display: flex; justify-content: center; align-items: center;
    text-align: center; color: white; overflow: hidden;
}
.hero-video {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    z-index: 0; object-fit: cover;
}
.hero-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 1;
}
.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
}
.subtitle { font-size: 12px; letter-spacing: 5px; margin-bottom: 20px; text-transform: uppercase; color: #ddd; }
.hero h1 { font-size: 120px; font-weight: 400; letter-spacing: 15px; line-height: 1; margin-bottom: 40px; margin-left: 15px; }
.scroll-down { color: #ff8c00; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 5px; transition: opacity 0.3s; }
.scroll-down:hover { opacity: 0.7; }

/* =========================================
   4. ФИЛЬТРЫ
   ========================================= */
.filter-section { padding: 40px 0 20px 0; background-color: #0a0a0a; display: flex; justify-content: center; }
.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.filter-btn {
    background: transparent; border: 1px solid #444; color: #ccc;
    padding: 8px 20px; border-radius: 20px; cursor: pointer;
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s;
}
.filter-btn:hover { border-color: #ff8c00; color: white; }
.filter-btn.active { background: #ff8c00; border-color: #ff8c00; color: black; font-weight: 600; }

/* =========================================
   5. HEX GRID (СОТЫ)
   ========================================= */
.hex-section { padding: 50px 0 100px 0; background-color: #0a0a0a; display: flex; flex-direction: column; align-items: center; overflow: visible; min-height: 600px; }
.hex-row { display: flex; justify-content: center; width: 100%; position: relative; z-index: 1; }
.hex-item {
    position: relative; background-color: #111; background-size: cover; background-position: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex; justify-content: center; align-items: center; text-align: center; color: white;
    transition: transform 0.3s ease, filter 0.3s, z-index 0s;
    cursor: pointer; margin: 0 3px; border: none;
}
.hex-item:hover { transform: scale(1.05); z-index: 10; filter: brightness(1.3); }
.hex-content { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: transparent; padding: 5px; }
.hex-item .fa-plus { font-size: 24px; color: #ff8c00; margin-bottom: 10px; display: block; }
.join-text { font-size: 12px; font-weight: 600; color: white; text-transform: uppercase; letter-spacing: 1px; text-align: center; padding: 0 10px; line-height: 1.3; }
.hex-item:hover .fa-plus { color: #fff; }
.hex-item:hover .join-text { color: #ff8c00; }

/* Стили для текста специалиста (имя и профессия) */
.hex-item h3 { 
    font-size: 14px; 
    letter-spacing: 2px; 
    margin-bottom: 5px; 
    font-weight: 600; 
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hex-item .profession { 
    font-size: 10px; 
    color: #ff8c00; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* =========================================
   6. НОВЫЕ СЕКЦИИ (О платформе, Как это работает)
   ========================================= */
.info-section, .how-section { padding: 120px 20px; background-color: #0a0a0a; text-align: center; }
.info-section h2, .how-section h2 { font-size: 32px; letter-spacing: 5px; margin-bottom: 40px; text-transform: uppercase; }
.info-content { max-width: 800px; margin: 0 auto; }
.info-content p { font-size: 16px; line-height: 1.8; color: #aaa; margin-bottom: 20px; text-align: left; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; max-width: 1000px; margin: 0 auto; }
.step { background: #111; padding: 30px; border-radius: 12px; border: 1px solid #222; transition: transform 0.3s, border-color 0.3s; }
.step:hover { transform: translateY(-5px); border-color: #ff8c00; }
.step-icon { font-size: 32px; color: #ff8c00; margin-bottom: 20px; }
.step h3 { font-size: 18px; margin-bottom: 15px; }
.step p { font-size: 14px; line-height: 1.6; color: #888; }

/* =========================================
   7. FOOTER
   ========================================= */
.footer { background-color: #000; color: #666; padding: 80px 50px 30px; font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 60px; }
.footer h4 { color: white; margin-bottom: 20px; text-transform: uppercase; }
.footer .col a { display: block; margin-bottom: 12px; color: #888; }
.footer .col a:hover { color: white; }
.socials i { font-size: 20px; margin-right: 20px; cursor: pointer; color: #888; display: inline-block; }
.socials i:hover { color: white; }
.footer-bottom { border-top: 1px solid #222; padding-top: 30px; text-align: center; color: #555; }

/* =========================================
   8. ПЛАВАЮЩИЕ КНОПКИ
   ========================================= */
.floating-buttons { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 1000; }
.float-btn { width: 60px; height: 60px; border-radius: 50%; background-color: #1a1a1a; color: #fff; border: 1px solid #333; font-size: 24px; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); transition: all 0.3s ease; }
.float-btn:hover { transform: translateY(-5px) scale(1.05); }
.shuffle-float { background-color: #ff8c00; color: #000; border-color: #ff8c00; }
.shuffle-float:hover { background-color: #fff; }

/* =========================================
   9. МОБИЛЬНОЕ МЕНЮ (Бургер)
   ========================================= */
.burger-menu { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.burger-menu span { width: 25px; height: 3px; background-color: white; border-radius: 3px; transition: all 0.3s ease; }
.mobile-menu { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(10, 10, 10, 0.98); backdrop-filter: blur(10px); flex-direction: column; justify-content: center; align-items: center; gap: 30px; z-index: 999; opacity: 0; transition: opacity 0.3s ease; }
.mobile-menu.active { display: flex; opacity: 1; }
.mobile-menu a { font-size: 20px; color: white; text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }
.mobile-menu a:hover { color: #ff8c00; }
.burger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* =========================================
   10. МОДАЛЬНЫЕ ОКНА (Общие стили)
   ========================================= */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.modal.active { display: flex; opacity: 1; }
.modal-content { background-color: #1a1a1a; padding: 40px; border-radius: 15px; border: 1px solid #333; max-width: 400px; width: 90%; text-align: center; position: relative; color: white; transform: scale(0.9); transition: transform 0.3s ease; }
.modal.active .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 15px; right: 20px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s; }
.close-modal:hover { color: #ff8c00; }
.modal-content h2 { font-size: 24px; margin-bottom: 15px; color: #ff8c00; text-transform: uppercase; letter-spacing: 2px; }
.modal-content p { font-size: 14px; color: #aaa; margin-bottom: 30px; line-height: 1.6; }

.modal-contacts { display: flex; flex-direction: column; gap: 15px; }
.contact-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.3s; }
.telegram-btn { background-color: #0088cc; color: white; }
.telegram-btn:hover { background-color: #0077b3; }
.max-btn { background-color: #000; color: white; border: 1px solid #333; }
.max-btn:hover { background-color: #222; }
.phone-btn { background-color: #ff8c00; color: black; }
.phone-btn:hover { background-color: #e67e00; }

/* Стили для кнопки Telegram в модалке */
#telegram-login-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* =========================================
   11. АДАПТИВНОСТЬ (Мобильная версия)
   ========================================= */
@media (max-width: 768px) {
    .header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    .nav { display: none; }
    .burger-menu { display: flex; }
    .hero h1 { font-size: 60px; letter-spacing: 8px; margin-bottom: 30px; }
    .subtitle { font-size: 11px; letter-spacing: 3px; }
    .filter-section { padding: 20px 10px; }
    .filter-btn { font-size: 11px; padding: 6px 15px; }
    .info-section, .how-section { padding: 60px 20px; }
    .info-section h2, .how-section h2 { font-size: 22px; }
    .info-content p { font-size: 14px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .floating-buttons { bottom: 20px; right: 20px; gap: 10px; }
    .float-btn { width: 50px; height: 50px; font-size: 20px; }

    /* --- ИСПРАВЛЕНИЕ ШРИФТА В СОТАХ НА МОБИЛЬНЫХ --- */
    .join-text { 
        font-size: 8px; 
        letter-spacing: 0; 
        line-height: 1.1; 
        padding: 0 1px; 
    }
    .hex-item .fa-plus { 
        font-size: 14px; 
        margin-bottom: 4px; 
    }
    .hex-item h3 { 
        font-size: 9px;         
        letter-spacing: 0;      
        line-height: 1.1;       
        margin-bottom: 2px;
        white-space: nowrap;    
        overflow: hidden;       
        text-overflow: ellipsis;
        max-width: 90%;         
    }
    .hex-item .profession { 
        font-size: 7px;       
        letter-spacing: 0;    
        line-height: 1;
    }
}

/* =========================================
   12. АНИМАЦИИ
   ========================================= */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.hero h1 { animation: fadeInUp 1.5s ease-out forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.subtitle { animation: fadeInUp 1.5s ease-out 0.2s forwards; opacity: 0; }
.scroll-down { animation: bounce 2s infinite, fadeInUp 1.5s ease-out 0.5s forwards; opacity: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 140, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 140, 0, 0); } }
.shuffle-float { animation: pulse 2s infinite; }

/* Принудительный скролл */
body.modal-open {
    overflow: hidden;
}
body {
    overflow-y: auto !important; /* Всегда разрешаем скролл */
}

/* Принудительный скролл */
html, body {
    overflow-y: auto !important;
}