:root {
    /* ПАЛІТРА "КОСМІЧНЕ СЯЙВО" */
    --bg-color: #0b0918;          
    --card-bg: linear-gradient(145deg, #1b163a 0%, #100d24 100%);
    --card-bg-darker: rgba(22, 17, 45, 0.8);
    
    --accent-cyan: #00f0ff;       
    --accent-purple: #b300ff;     
    
    --text-main: #e2e8f0;         
    --text-muted: #8b95a5;        
    
    --card-border: 1px solid rgba(179, 0, 255, 0.2);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    
    --header-height-large: 420px;
    --header-height-small: 90px;
    --sidebar-width: 250px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-25 { margin-top: 25px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }

/* =========================================
   БЛОК КОНТАКТІВ
   ========================================= */
.contact-block {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
.contact-text { color: var(--text-muted); font-size: 0.95rem; }
.contact-link { color: var(--accent-cyan); text-decoration: none; font-weight: bold; }

/* =========================================
   ОПТИМІЗАЦІЯ ФОНУ ТА ПРОКРУТКИ
   ========================================= */
html {
    background-color: #01010f;
    overscroll-behavior: none; 
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow-x: hidden;
}

body::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #01010f 0%, #12001c 50%, #4A0056 100%);
    z-index: -2; pointer-events: none;
}

/* =========================================
   ШАПКА
   ========================================= */
.header {
    height: var(--header-height-large); position: fixed; top: 0; width: 100%; z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 0 60px;
    font-size: 4rem; font-weight: 900; color: white; text-shadow: 0 5px 25px rgba(0,0,0,0.5);
    border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan)) 1; 
    transition: all 0.6s ease-out; overflow: hidden; 
}

.header::before {
    content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; 
    background-image: linear-gradient(90deg, rgba(2, 1, 15, 0.5) 0%, rgba(18, 0, 28, 0.3) 50%, rgba(50, 0, 60, 0.5) 100%), var(--header-bg, url('banners_ing/baner3.JPG'));        
    background-size: cover; background-position: var(--header-pos, center 30%); 
    background-repeat: no-repeat; filter: blur(4px); z-index: -1;
    transition: opacity 0.6s ease-out, background-image 1s ease-out; 
}

.header.scrolled {
    height: var(--header-height-small); font-size: 2.2rem; background-color: rgba(13, 10, 32, 0.85); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.header.scrolled::before { opacity: 0; }

.header-socials {
    position: absolute; right: 50px; display: flex; gap: 15px;
    opacity: 0; visibility: hidden; transform: scale(0.8); transition: all 0.4s ease-out;
}
.header.scrolled .header-socials { opacity: 1; visibility: visible; transform: scale(1); }

.header-container { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.main-title { font-size: 4rem; font-weight: 900; transition: all 0.6s ease-out; }

.slogan {
    font-size: 1.3rem; font-weight: 500; color: var(--accent-cyan);
    letter-spacing: 4px; text-transform: uppercase; margin-top: 10px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    max-height: 50px; overflow: hidden; opacity: 1; transform: translateY(0); transition: all 0.6s ease-out;
}

.header.scrolled .main-title { font-size: 2.2rem; }
.header.scrolled .slogan { opacity: 0; visibility: hidden; max-height: 0; margin-top: 0; transform: translateY(-15px); }

.header-socials a {
    color: white; background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease-out; position: relative; z-index: 1;
}
.header-socials a::before {
    content: ''; position: absolute; inset: 2px; background: #0d0a20; border-radius: 50%; z-index: -1; transition: opacity 0.3s ease-out;
}
.header-socials a:hover::before { opacity: 0; }
.header-socials a:hover { box-shadow: 0 0 20px #b300ff99; transform: translateY(-3px); }
.header-socials svg { width: 20px; height: 20px; fill: currentColor; }

/* =========================================
   СТРУКТУРА
   ========================================= */
.wrapper { display: flex; flex: 1; margin-top: var(--header-height-large); transition: margin-top 0.4s ease-out; }

.sidebar {
    width: var(--sidebar-width); height: 100vh; position: fixed; left: 0; top: 0;
    padding-top: calc(var(--header-height-large) + 60px); z-index: 900; transition: padding-top 0.4s ease-out;
}
.header.scrolled ~ .wrapper .sidebar { padding-top: calc(var(--header-height-small) + 60px); }

.menu-list { list-style: none; padding-left: 40px; }
.menu-item { color: var(--text-muted); margin-bottom: 35px; cursor: pointer; font-weight: 700; font-size: 1.3rem; transition: 0.3s ease-out; position: relative; }
.menu-item:hover { color: white; }
.menu-item.active-nav { color: var(--accent-cyan); transform: translateX(10px); }

.main-content { margin-left: var(--sidebar-width); flex: 1; padding: 30px 50px; }

/* ПІДВАЛ БЕЗ ФОНУ */
.footer { margin-top: auto; padding-top: 30px; padding-bottom: 30px; border-top: 1px solid rgba(255, 255, 255, 0.05); text-align: center; }
.copyright { font-size: 1rem; font-weight: 600; color: var(--text-muted); }

/* =========================================
   КОНТЕНТ (КАРТКИ)
   ========================================= */
.dynamic-title {
    font-size: 4.5rem; font-weight: 900; color: white; margin-bottom: 40px;
    opacity: 0; transform: translateX(-40px); transition: 0.7s ease-out;
}
.section.in-view .dynamic-title {
    opacity: 1; transform: translateX(0);
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px rgba(179, 0, 255, 0.4));
}

/* --- ОЦЕ ТІ САМІ ПЛАВНІ АНІМАЦІЇ КАРТКИ --- */
.card {
    background: var(--card-bg); border: var(--card-border); border-radius: 35px;
    padding: 60px; color: white; width: 100%; max-width: 1400px;
    transition: all 0.7s ease-out; /* Плавне розширення картки */
    box-shadow: var(--card-shadow); margin-bottom: 80px; position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.5), transparent); }

.full-text {
    max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; padding-top: 0; border-top: 1px solid transparent;
    transition: max-height 0.9s ease-out, opacity 0.6s ease-out, margin-top 0.5s ease-out, padding-top 0.5s ease-out; /* Плавна поява тексту */
    text-align: justify;
}
.card.expanded .full-text { max-height: 4000px; opacity: 1; margin-top: 30px; padding-top: 30px; border-top-color: rgba(255,255,255,0.1); }
/* ------------------------------------------ */

.card-label { font-size: 2.8rem; margin-bottom: 30px; }
.card-body { font-size: 1.15rem; line-height: 1.6; color: var(--text-main); text-align: justify; text-justify: inter-word; }
.card-body p { margin-bottom: 20px; }
.card-body a { color: var(--accent-cyan); text-decoration: underline; transition: 0.3s ease-out; }
.card-body a:hover { color: var(--accent-purple); text-shadow: 0 0 10px var(--accent-purple); }
.card-body b, .card-body strong { color: var(--accent-cyan); }

.preview-text-large { font-size: 1.4rem; margin-bottom: 25px; font-weight: 500; line-height: 1.5; }

.card-subtitle { font-size: 1.4rem; font-weight: 700; color: var(--accent-cyan); margin: 30px 0 15px 0; border-bottom: 1px solid rgba(0, 240, 255, 0.3); padding-bottom: 8px; display: inline-block; }
.subtitle-large { font-size: 1.6rem; }

.info-list { list-style-type: none; padding-left: 0; margin-bottom: 25px; }
.info-list li { position: relative; padding-left: 20px; margin-bottom: 12px; line-height: 1.5; }
.info-list li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; background-color: var(--accent-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--accent-cyan); }

.highlight-box { background: linear-gradient(90deg, rgba(179, 0, 255, 0.1) 0%, transparent 100%); border-left: 4px solid var(--accent-purple); padding: 20px; border-radius: 0 8px 8px 0; margin: 30px 0; font-weight: 500; color: white; line-height: 1.5; }

.news-date { display: inline-block; background: var(--card-bg-darker); color: var(--accent-cyan); padding: 6px 14px; border-radius: 20px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 16px; border: 1px solid rgba(0, 240, 255, 0.3); }

.stages-container { display: flex; flex-direction: row; gap: 20px; margin-top: 20px; width: 100%; }
.stage-block { flex: 1; margin-bottom: 0; padding: 25px; background: var(--card-bg-darker); border-radius: 12px; border-left: 3px solid var(--accent-purple); box-shadow: inset 0 0 20px rgba(0,0,0,0.3); }
.stage-title { font-size: 1.3rem; color: white; margin-bottom: 10px; }


.olymp-block { flex: 1; margin-bottom: 0; padding: 25px; background: var(--card-bg-darker); border-radius: 12px; border-left: 3px solid var(--accent-purple); box-shadow: inset 0 0 20px rgba(0,0,0,0.3); }
.olymp-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    width: 100%;
}
/* =========================================
   КНОПКИ
   ========================================= */
.card-controls { margin-top: 40px; display: flex; justify-content: flex-end; gap: 20px; }

.toggle-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 160px; height: 55px;
    padding: 0 30px; border-radius: 30px; border: none; background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    color: white; font-weight: 800; font-size: 1.15rem; cursor: pointer; transition: all 0.3s ease-out; /* Швидка реакція кнопок */
    box-shadow: 0 8px 20px rgba(179, 0, 255, 0.3); text-decoration: none; font-family: inherit; position: relative; overflow: hidden;
}
.news-small-btn { min-width: 140px; height: 45px; font-size: 1rem; padding: 0 20px; margin-top: 15px; border-radius: 20px; box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2); margin-bottom: 15px; }
.news-small-btn:hover { box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4); }

.specific-download-btn, .partner-content .toggle-btn { color: #ffffff !important; text-decoration: none !important; }
.partner-content .toggle-btn:hover, .toggle-btn:hover { color: white !important; transform: translateY(-4px); box-shadow: 0 12px 25px rgba(0, 240, 255, 0.5); }
.toggle-btn::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s ease-out; pointer-events: none;
}
.toggle-btn:hover::after { opacity: 1; }

.menu-item, .toggle-btn, .partner-tab, .close-modal, .header-socials a, .main-title, .slogan, .dynamic-title {
    user-select: none; -webkit-user-select: none; outline: none; -webkit-tap-highlight-color: transparent; cursor: default;
}

/* =========================================
   МОДАЛЬНІ ВІКНА
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 4, 15, 0.9); backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease-out; /* Швидке відкриття */
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    position: relative; max-width: 1100px; width: 95%; max-height: 90vh; overflow-y: auto; margin-bottom: 0; padding: 40px 60px;
    transform: translateY(-20px) scale(0.95); transition: all 0.4s ease-out;
}
.news-modal-content { max-width: 1200px; }
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.modal-overlay .modal-content.card::before { display: none !important; }

.close-modal { 
    position: absolute; top: 25px; right: 35px; font-size: 3.5rem; color: var(--accent-cyan); 
    cursor: pointer; font-weight: bold; line-height: 1; transition: 0.3s ease-out; 
    background: none; border: none; padding: 0; outline: none; font-family: inherit; 
}

.close-modal:hover { text-shadow: 0 0 15px var(--accent-cyan); transform: scale(1.05); }
.modal-title { font-size: 2.8rem; margin-bottom: 30px; }

.tech-info-box { background: var(--card-bg-darker); border: 1px dashed rgba(0, 240, 255, 0.4); padding: 35px; border-radius: 25px; margin-top: 50px; }
.tasks-box { text-align: center; margin-bottom: 30px; }
.modal-files-box { margin-top: 25px; margin-bottom: 35px; padding: 30px; }

.status-modal { max-width: 600px; text-align: center; padding: 50px; }
.status-title { font-size: 2.2rem; margin-bottom: 20px; }
.status-desc { font-size: 1.2rem; margin-bottom: 30px; color: var(--text-main); }
.status-btn { min-width: 200px; }
.error-modal-bg { background: linear-gradient(145deg, #2a0808 0%, #1a0505 100%); border: 1px solid #ff3366; box-shadow: 0 10px 40px rgba(255, 51, 102, 0.3); }
.error-text { color: #ff4d6d; }

/* =========================================
   ФОРМА ВВОДУ
   ========================================= */
.reg-form .form-row { display: flex; gap: 30px; margin-bottom: 15px; }
.reg-form .form-row .form-group { flex: 1; }
.reg-form .form-group { margin-bottom: 20px; position: relative; }
.reg-form label { display: block; font-size: 1.1rem; margin-bottom: 8px; color: var(--text-muted); }

.reg-form input[type="text"], .reg-form input[type="email"], .reg-form input[type="date"], .reg-form select, .reg-form textarea {
    width: 100%; padding: 15px; background: var(--card-bg-darker); border: 1px solid rgba(179, 0, 255, 0.2);
    border-radius: 12px; color: white; font-family: inherit; font-size: 1.1rem; transition: 0.3s ease-out;
}

.phone-wrapper { display: flex; align-items: center; background: var(--card-bg-darker); border: 1px solid rgba(179, 0, 255, 0.2); border-radius: 12px; overflow: hidden; transition: 0.3s ease-out; }
.phone-wrapper:focus-within { border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }
.phone-prefix { padding: 15px 12px 15px 15px; color: var(--text-muted); font-size: 1.1rem; font-weight: 600; background: rgba(0, 0, 0, 0.4); border-right: 1px solid rgba(179, 0, 255, 0.2); }
.phone-input { flex: 1; border: none !important; background: transparent !important; padding: 15px; color: white; font-size: 1.1rem; font-family: inherit; outline: none; }
.reg-form input:focus, .reg-form select:focus, .reg-form textarea:focus { outline: none; border-color: var(--accent-cyan); background: rgba(0, 240, 255, 0.03); box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }

.reg-form select {
    appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b300ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 15px center; background-size: 18px; padding-right: 45px; cursor: pointer;
}
.reg-form select option { background: #1b163a; color: white; padding: 10px; }
.reg-form input[type="date"]::-webkit-calendar-picker-indicator { background-color: var(--accent-purple); padding: 6px; border-radius: 6px; cursor: pointer; transition: 0.3s ease-out; }
.reg-form input[type="date"]::-webkit-calendar-picker-indicator:hover { background-color: var(--accent-cyan); box-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }

.file-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.reg-form input[type="file"] { padding: 10px; background: rgba(0, 0, 0, 0.2); border: 1px dashed rgba(179, 0, 255, 0.4); border-radius: 10px; color: white; cursor: pointer; font-size: 0.95rem; transition: 0.3s ease-out; width: 100%; }
.reg-form input[type="file"]:hover { border-color: var(--accent-cyan); background: rgba(0, 240, 255, 0.05); }
.reg-form input[type="file"]::-webkit-file-upload-button, .reg-form input[type="file"]::file-selector-button { background: rgba(179, 0, 255, 0.2); color: white; border: 1px solid rgba(179, 0, 255, 0.5); padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; margin-right: 15px; transition: all 0.3s ease-out; font-family: inherit; }
.reg-form input[type="file"]::-webkit-file-upload-button:hover, .reg-form input[type="file"]::file-selector-button:hover { background: var(--accent-cyan); border-color: var(--accent-cyan); color: #000; box-shadow: 0 0 15px rgba(0, 240, 255, 0.4); }

.checkbox-group { display: flex; align-items: flex-start; gap: 15px; }
.checkbox-group input[type="checkbox"] { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--accent-purple); flex-shrink: 0; cursor: pointer; }
.checkbox-group label { font-size: 1rem; line-height: 1.5; cursor: pointer; margin-bottom: 0; color: var(--text-main); }
.error-msg { color: #ff3366; font-size: 0.9rem; margin-top: 5px; display: none; font-weight: 600; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid .phone-wrapper { border-color: #ff3366; box-shadow: 0 0 8px rgba(255, 51, 102, 0.3); }
.form-group.invalid .error-msg { display: block; }

/* =========================================
   НОВИНИ ЗІ СКРОЛОМ ТА ГАЛЕРЕЯМИ
   ========================================= */
.news-scroll-container {
    max-height: 680px; overflow-y: auto; padding: 15px 25px 60px 25px; 
    margin: -15px -25px -40px -25px; scrollbar-width: thin; scrollbar-color: var(--accent-purple) var(--card-bg-darker);
}
.news-scroll-container::-webkit-scrollbar { width: 8px; }
.news-scroll-container::-webkit-scrollbar-track { background: var(--card-bg-darker); border-radius: 4px; }
.news-scroll-container::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 4px; }
.news-scroll-container::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

.news-item { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(179, 0, 255, 0.15); }
.news-item:last-child { margin-bottom: 20px; padding-bottom: 0; border-bottom: none; }
.news-title { font-size: 1.6rem; margin-bottom: 15px; color: white; font-weight: 700; line-height: 1.4; }
.news-description { font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; color: var(--text-main); }

.news-full-content { display: none; }
.news-image { width: 100%; border-radius: 12px; margin: 25px 0; border: 1px solid rgba(255, 255, 255, 0.1); }

.gallery-images { display: flex; flex-direction: column; gap: 20px; margin: 30px 0; }
.gallery-img { width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); }

.news-media { width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.05); transition: 0.4s ease-out; }
.news-media:hover { transform: translateY(-5px); border-color: rgba(179, 0, 255, 0.4); box-shadow: 0 15px 35px rgba(179, 0, 255, 0.3); }
.split-layout { display: flex; align-items: center; gap: 40px; }
.split-layout .news-content, .split-layout .news-media { flex: 1; }
.split-layout .news-media img { width: 100%; height: auto; display: block; object-fit: cover; }
.split-layout.reverse { flex-direction: row-reverse; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #2a205a; border-radius: 5px; }
::selection { background: var(--accent-purple); color: white; }

/* =========================================
   СЕКЦІЯ ПАРТНЕРИ
   ========================================= */
.partners-window { padding: 20px 0; margin-top: 10px; }
.partners-tabs { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; width: 100%; border-bottom: 1px solid rgba(179, 0, 255, 0.15); padding-bottom: 30px; padding-top: 20px; }
.partner-tab { flex: 1; background: rgba(255, 255, 255, 0.925); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 12px; padding: 15px 20px; cursor: pointer; transition: all 0.4s ease-out; min-width: 250px; display: flex; align-items: center; justify-content: center; gap: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
.partner-tab:hover { border-color: var(--accent-purple); box-shadow: 0 0 15px rgba(179, 0, 255, 0.5); transform: translateY(-3px); }
.partner-tab.active { border-color: var(--accent-cyan); box-shadow: 0 0 20px rgba(0, 240, 255, 0.5); transform: translateY(-3px); }
.partner-tab-name { font-size: 1.25rem; font-weight: 700; color: var(--accent-cyan); text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8); transition: 0.3s ease-out; }
.partner-tab:hover .partner-tab-name { color: #ffffff; text-shadow: 0 0 10px rgba(179, 0, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.8); }
.partner-tab.active .partner-tab-name { color: var(--accent-cyan); text-shadow: 0 0 12px rgba(0, 240, 255, 0.7), 0 2px 5px rgba(0, 0, 0, 0.9); }
.partners-content-area { min-height: 280px; display: flex; flex-direction: column; }
.partner-content { display: none; background: rgba(0, 0, 0, 0.2); padding: 30px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); }
.partner-content.active { display: block; animation: smoothFadeInTab 0.7s ease-out; }
.partner-name { font-size: 1.8rem; color: white; margin-bottom: 15px; font-weight: bold; }
.partner-content p { color: #e2e8f0; font-size: 1.15rem; line-height: 1.6; }
.partner-logo { height: 45px !important; max-width: 100px; width: auto; object-fit: contain; flex-shrink: 0; transition: transform 0.3s ease-out; }
.partner-tab:hover .partner-logo { transform: scale(1.05); }

@keyframes smoothFadeInTab { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Карусель */
.carousel-container { position: relative; width: 100%; margin: 30px 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(179, 0, 255, 0.3); background: var(--card-bg-darker); }
.carousel-slide { display: none; width: 100%; }
.carousel-slide.active { display: block; animation: fadeIn 0.5s ease-out; }
.carousel-slide img { width: 100%; display: block; object-fit: cover; border-radius: 16px; }
.carousel-prev, .carousel-next { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; color: white; background: rgba(13, 10, 32, 0.8); border-radius: 50%; border: 1px solid var(--accent-cyan); display: flex; align-items: center; justify-content: center; z-index: 10; transition: 0.3s ease-out; }
.carousel-prev { left: 15px; } .carousel-next { right: 15px; }
.carousel-dots { text-align: center; position: absolute; bottom: 15px; width: 100%; z-index: 10; }
.dot { cursor: pointer; height: 10px; width: 10px; margin: 0 6px; background-color: rgba(255, 255, 255, 0.4); border-radius: 50%; display: inline-block; transition: 0.3s ease-out; }
.dot.active { background-color: var(--accent-cyan); transform: scale(1.3); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   АДАПТИВНІСТЬ ДЛЯ СМАРТФОНІВ ТА ПЛАНШЕТІВ
   ========================================= */

@media (max-width: 1024px) {
    .header { font-size: 2rem; padding: 0 40px; }
    .dynamic-title { font-size: 3.5rem; }
    .card { padding: 40px; }
    .modal-content { padding: 30px 40px; }
}

@media (max-width: 900px) {
    .main-content { margin-left: 0; padding: 20px; }
    .sidebar { display: none; } 
    .split-layout, .split-layout.reverse { flex-direction: column; gap: 20px; }
    .split-layout .news-media { width: 100%; }
    .stages-container { flex-direction: column; }
    .olymp-wrapper { flex-direction: column; gap: 15px; }
    .reg-form .form-row { flex-direction: column; gap: 0; }
    .file-tasks { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height-large: 75px; --header-height-small: 75px; }
    
    body { background-attachment: scroll !important; }

    .header.scrolled + .wrapper, 
    .header.scrolled ~ .wrapper,
    .wrapper { margin-top: calc(var(--header-height-large) + 30px) !important; }

    .header { 
        position: fixed !important; height: var(--header-height-large) !important;
        padding: 0 15px !important; justify-content: space-between !important; flex-direction: row !important;
        background: #0d0a20 !important; box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
        backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    }
    .header::before { display: none !important; } 

    /* Всі анімації вимикаємо для телефону для швидкодії, окрім розгортання карток */
    .header, .main-title, .toggle-btn, .modal-content {
        transition: none !important; animation: none !important; transform: none !important;
    }

    .header-container { flex: 0 1 auto; }
    .main-title { font-size: 1.4rem !important; text-align: left; }
    .slogan { display: none !important; } 

    .header-socials { 
        position: relative !important; right: auto !important; gap: 12px !important; opacity: 1 !important; visibility: visible !important;
        transform: none !important; margin-right: 5px;
    }
    .header-socials a { width: 40px !important; height: 40px !important; }
    .header-socials svg { width: 20px !important; height: 20px !important; }

    .dynamic-title { 
        font-size: 2.2rem; text-align: center; opacity: 1 !important; margin-bottom: 25px; 
        background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%) !important;
        -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; filter: drop-shadow(0 0 10px rgba(179, 0, 255, 0.4)) !important;
    }

    .card-body, .full-text, .news-description, .partner-content p { text-align: left !important; text-justify: auto !important; }
    
    .card-label { font-size: 1.8rem; text-align: center; margin-bottom: 20px; }
    .card { padding: 25px 15px; border-radius: 20px; margin-bottom: 50px; }
    .card-controls { justify-content: center; flex-wrap: wrap; }
    
    .toggle-btn { min-width: 100%; margin-bottom: 10px; height: 50px; font-size: 1.1rem; } 
    .news-small-btn { min-width: 100%; margin-left: 0; }
    
    .specific-download-btn { font-size: 0.95rem !important; padding: 0 15px !important; }

    .news-scroll-container { max-height: none !important; overflow-y: visible !important; padding: 0; margin: 0; }
    .news-item.split-layout { display: flex; flex-direction: column; }
    .news-content { display: contents; } 
    .news-date { order: 1; align-self: flex-start; margin-bottom: 5px; }
    .news-title { order: 2; margin-bottom: 10px; font-size: 1.4rem; }
    .news-description { order: 3; margin-bottom: 15px; }
    .news-media { order: 4; margin: 0 0 15px 0 !important; width: 100%; }
    .read-more-news { order: 5; } 
    .news-full-content { order: 6; }

    .modal-overlay { align-items: stretch !important; background: var(--bg-color) !important; padding: 0 !important; }
    .modal-content { 
        margin: 0 !important; width: 100% !important; height: 100dvh !important; max-height: 100dvh !important;
        border-radius: 0 !important; border: none !important; padding: 70px 15px 40px !important; 
        overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; 
    }

    .close-modal { 
        position: fixed !important; top: 15px !important; right: 20px !important; background: transparent !important; border: none !important; 
        width: auto !important; height: auto !important; display: block !important; font-size: 3.5rem !important; color: var(--accent-cyan) !important;
        text-shadow: 0 0 20px #000, 0 0 10px #000 !important; z-index: 99999 !important; 
    }
    
    .partners-content-area { min-height: auto; }
    .partner-tab { min-width: 100%; flex: 1 1 100%; padding: 15px; justify-content: flex-start; } 
    .partner-tab-name { font-size: 1.1rem; }
    .partner-logo { height: 40px !important; } 
}

@media (max-width: 480px) {
    .main-title, .header.scrolled .main-title { font-size: 1.25rem !important; }
    .dynamic-title { font-size: 1.8rem; }
    .preview-text-large { font-size: 1.05rem; }
    .card-body { font-size: 1rem; }
    
    .reg-form input[type="text"], .reg-form input[type="email"], 
    .reg-form input[type="date"], .reg-form select, .reg-form textarea,
    .phone-input, .phone-prefix { padding: 12px; font-size: 1rem; }
}