/*
Theme Name: My Space Three Columns Pro
Theme URI: https://rc-rls.com.ua/
Author: AI Collaborator
Description: Адаптивна 3-колоночна тема з вибором фону зіркового неба, JS-анімацією мерцання зірок, хедером, футером та підтримкою 2 мов.
Version: 1.2.1
License: GNU General Public License v2 or later
Text Domain: my-space-three-columns-pro
*/

* {
    box-sizing: border-box;
}

body {
    background-color: #060709 !important;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

/* Canvas підкладка для JS-зірок */
#starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Основне сполучення сторінки */
.site {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* ШАПКА (HEADER) */
header.site-header {
    background: rgba(10, 12, 18, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.inside-header {
    max-width: 1400px;
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-branding img {
    max-width: 250px;
    height: auto;
    display: block;
}

.header-right-block {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Навігаційне меню */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #00a2e8 !important;
}

.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(15, 18, 25, 0.95);
    flex-direction: column;
    min-width: 200px;
    padding: 10px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.main-navigation li {
    position: relative;
}

.main-navigation li:hover > ul {
    display: flex;
}

/* Перемикач мов */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
}

.language-switcher a {
    color: #88a0b5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.language-switcher a:hover,
.language-switcher .current-lang {
    color: #00a2e8;
}

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

/* 3-КОЛОНОЧНИЙ МАКЕТ (CSS GRID) */
.content-area {
    max-width: 1400px;
    width: 100%;
    margin: 10px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 30px;
    flex: 1;
}

main.site-main {
    background-color: rgba(255, 255, 255, 0.96);
    color: #1a1a1a;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    min-width: 0;
}

main.site-main h1, main.site-main h2, main.site-main a {
    color: #0066cc;
}

/* Бокові колонки (Сайдбари) */
aside.sidebar {
    background: transparent !important;
    color: #ffffff !important;
}

.sidebar h2.widget-title, .sidebar h2 {
    font-size: 17px;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(0, 162, 232, 0.5);
    padding-bottom: 8px;
}

.sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar li {
    margin-bottom: 12px;
}

.sidebar a {
    color: #b0c4de !important;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar a:hover {
    color: #ffffff !important;
}

/* ПІДВАЛ (FOOTER) */
footer.site-footer {
    background: rgba(10, 12, 18, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 25px 20px;
    color: #88a0b5;
    font-size: 14px;
    margin-top: auto;
}

/* АДАПТИВНІСТЬ ДЛЯ МОБІЛЬНИХ ПРИСТРОЇВ */
@media (max-width: 1100px) {
    .content-area {
        grid-template-columns: 240px 1fr;
    }
    .sidebar-right {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .menu-toggle {
        display: block;
    }
    .main-navigation ul {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: rgba(15, 18, 25, 0.98);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 15px;
    }
    .main-navigation.toggled ul {
        display: flex;
    }
    .header-right-block {
        flex-direction: row-reverse;
    }
}
/* Убираем расталкивание по вертикали */
.site {
    justify-content: flex-start !important;
}

/* Жесткий сброс отступов и выравнивание блока под шапку */
body {
    padding-top: 0 !important;
}

.site {
    min-height: auto !important;
    display: block !important;
}

header.site-header {
    position: relative !important;
    top: 0 !important;
    margin-bottom: 0 !important;
}

.content-area {
    margin: 20px auto !important;
    padding-top: 0 !important;
}