/* =========================================
   1. CORE STYLES (COPY FROM MAIN)
   ========================================= */
:root {
    --primary: #3b82f6;
    --accent: #fbbf24;
    --bg-main: #020204;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --font-head: 'Syncopate', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* BACKGROUND */
.global-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -5; pointer-events: none; overflow: hidden;
    background: 
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 90%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
}
.noise {
    position: absolute; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
}

/* PRELOADER */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: 0.5s;
}
.loader-content { text-align: center; }
.loader-title { font-family: var(--font-head); font-weight: 700; letter-spacing: 4px; display: block; margin-bottom: 20px; }
.loader-track { width: 200px; height: 2px; background: rgba(255,255,255,0.1); margin: 0 auto; overflow: hidden; }
.loader-bar { width: 0%; height: 100%; background: var(--primary); animation: loading 1s ease-in-out forwards; }
@keyframes loading { to { width: 100%; } }

/* =========================================
   2. NAVBAR & WIDGETS
   ========================================= */

/* LANGUAGE WIDGET */
.lang-widget {
    position: fixed; top: 35px; right: 40px; z-index: 1001;
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 50px;
    cursor: pointer; transition: 0.4s; overflow: hidden;
}
.lang-widget img { width: 20px; height: 20px; border-radius: 50%; }
.lang-full { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; transition: 0.4s; }
.lang-short { font-size: 0.8rem; font-weight: 800; transition: 0.4s; opacity: 0; max-width: 0; transform: translateX(20px); }

/* Scrolled Lang */
.lang-widget.scrolled { top: 20px; right: 20px; padding: 6px 14px; background: rgba(0,0,0,0.8); }
.lang-widget.scrolled .lang-full { opacity: 0; max-width: 0; margin: 0; display: none; }
.lang-widget.scrolled .lang-short { opacity: 1; max-width: 30px; transform: translateX(0); }

/* NAVBAR MAIN STRUCTURE */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 30px 0; transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.nav-inner { 
    display: flex; justify-content: space-between; align-items: center; 
    transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* NAVBAR SCROLLED STATE (Capsule) */
.navbar.scrolled { padding: 15px 0; }
.navbar.scrolled .nav-inner {
    background: rgba(10, 10, 12, 0.8); 
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 50px;
    padding: 10px 30px; 
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* --- LEFT GROUP (Back Button + Logo) --- */
.nav-left { 
    display: flex; 
    align-items: center; 
    gap: 20px; /* Відступ між кнопкою і логотипом */
}

/* 1. BACK LINK STYLE */
.back-link {
    display: flex; align-items: center;
    color: var(--text-muted); text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px; 
    border-radius: 50px;
    
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden; white-space: nowrap;
}

.back-link i { font-size: 1.1rem; flex-shrink: 0; }

.back-text {
    margin-left: 10px; opacity: 1; max-width: 100px; 
    transition: all 0.4s ease;
}

/* Hover for Back Link */
.back-link:hover {
    background: white; color: black; border-color: white;
}

/* 2. LOGO IMAGE STYLE (Виправлено) */
.nav-left img {
    height: 45px;       /* Нормальний розмір лого */
    width: auto;        /* Пропорційна ширина */
    display: block;
    object-fit: contain;
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- SCROLLED BEHAVIOR FOR LEFT GROUP --- */

/* Button becomes a circle */
.navbar.scrolled .back-link {
    padding: 0; width: 40px; height: 40px;
    justify-content: center;
    background: transparent; border-color: rgba(255, 255, 255, 0.2);
}

/* Text hides */
.navbar.scrolled .back-text {
    margin-left: 0; opacity: 0; max-width: 0;
}

/* Hover becomes blue when scrolled */
.navbar.scrolled .back-link:hover {
    background: var(--primary); color: white; border-color: var(--primary);
}

/* Logo shrinks */
.navbar.scrolled .nav-left img {
    height: 32px; /* Менший розмір логотипу в капсулі */
}


/* --- MENU & RIGHT SIDE --- */
.nav-menu { display: flex; gap: 30px; }
.nav-menu a { 
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase; 
    color: #ccc; letter-spacing: 1px; transition: 0.3s;
}
.nav-menu a:hover { color: white; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.btn-hub {
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 20px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 700; background: rgba(255,255,255,0.05);
    transition: 0.3s;
}
.btn-hub:hover { background: white; color: black; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 25px; height: 2px; background: white; }
/* =========================================
   3. APPLY PAGE CONTENT
   ========================================= */
.apply-section { padding: 150px 0 100px; }

.hero-text { text-align: center; margin-bottom: 60px; }
.status-pill {
    display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 16px; border-radius: 50px; font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 20px;
}
.pulse { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); }
.hero-text h1 { font-family: var(--font-head); font-size: 3.5rem; line-height: 1; margin-bottom: 15px; }
.gradient-text { background: linear-gradient(135deg, #fff, var(--primary)); -webkit-background-clip: text; color: transparent; }
.hero-text p { color: var(--text-muted); font-size: 1.1rem; }

/* GRID */
.apply-grid {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start;
}

/* Requirements Box */
.requirements-box {
    background: rgba(20, 20, 25, 0.6); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; padding: 40px;
    position: sticky; top: 120px; /* Липне при скролі */
}
.requirements-box h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 30px; }
.req-list li { display: flex; gap: 15px; margin-bottom: 25px; }
.check {
    width: 24px; height: 24px; background: rgba(59, 130, 246, 0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 0.8rem; flex-shrink: 0;
}
.req-list strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.req-list small { color: var(--text-muted); font-size: 0.85rem; }

.info-alert {
    margin-top: 30px; padding: 20px; background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2); border-radius: 10px; display: flex; gap: 15px;
}
.info-alert i { color: var(--accent); margin-top: 3px; }
.info-alert p { font-size: 0.85rem; line-height: 1.4; }

/* Form Wrapper */
.form-wrapper {
    background: white; border-radius: 16px; overflow: hidden; position: relative; min-height: 600px;
}
.form-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main); z-index: 2; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.5s;
}
.spinner {
    width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
iframe { width: 100%; height: 1400px; display: block; }

/* =========================================
   4. FOOTER (FULL)
   ========================================= */
.footer { background: #000; padding-top: 80px; border-top: 1px solid rgba(255,255,255,0.1); overflow: hidden; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.f-col h4 { font-family: var(--font-head); margin-bottom: 25px; color: white; }
.f-col a { display: block; color: var(--text-muted); margin-bottom: 10px; transition: 0.3s; }
.f-col a:hover { color: white; padding-left: 5px; }
.brand p { margin: 20px 0; max-width: 300px; color: var(--text-muted); }
.socials a { display: inline-block; font-size: 1.2rem; margin-right: 15px; }
.recruiting { color: #4ade80; display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.pulse-dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; }

.giant-text-container { text-align: center; line-height: 0.8; margin-bottom: -2vw; }
.giant-text {
    font-family: var(--font-head); font-size: 18vw; font-weight: 800; color: #08080a;
    -webkit-text-stroke: 1px #222; user-select: none;
}
.footer-bottom { border-top: 1px solid #222; padding: 25px 0; text-align: center; color: #444; font-size: 0.8rem; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Mobile */
@media (max-width: 900px) {
    .apply-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2.5rem; }
    .nav-menu { display: none; }
    .burger { display: flex; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .nav-menu.active {
        display: flex; flex-direction: column; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: #020204; justify-content: center; align-items: center; z-index: 100;
    }
}