/* static/style.css */
:root {
    --main-color: #FF8C00; /* Основний помаранчевий колір */
    --main-hover-color: #FFA500; /* Світліший відтінок для наведення */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --bg-dark: #20232a; /* Темний фон, як у банера, для контрасту */
    --bg-light: #ffffff;
    --border-color: #eee;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

header {
    background-color: var(--main-color);
    color: var(--text-light);
    padding: 1rem 0;
    text-align: center;
    position: relative;
}

.banner-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.lang-button-container-banner {
    position: absolute;
    bottom: 0px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.0);
    padding: 12px 8px;
    border-radius: 8px;
}

.lang-button-container-banner button {
    background-color: var(--main-color);
    color: var(--text-light);
    border: none;
    padding: 8px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.lang-button-container-banner button:hover {
    background-color: var(--main-hover-color);
    transform: translateY(-1px);
}

.lang-button-container-banner button.active-lang-btn {
    background-color: var(--bg-light);
    color: var(--main-color);
    border: 1px solid var(--main-color);
}

h1 {
    color: var(--main-color);
    text-align: center;
    margin-top: 20px;
    position: relative;
}

nav {
    background-color: var(--main-color);
    padding: 0.8rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    margin: 0 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

nav a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

nav a:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
}

.container {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
}

.tab-content {
    background-color: var(--bg-light);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.tab-content.active {
    display: block;
}

section h2 {
    color: var(--main-color);
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

section h3 {
    color: var(--main-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

section ul {
    list-style: none;
    padding: 0;
}

section ul li {
    background-color: #f9f9f9;
    margin-bottom: 10px;
    padding: 10px;
    border-left: 5px solid var(--main-color);
    border-radius: 4px;
	overflow: hidden;
}

.download-link {
    display: block;
    text-align: center;
    margin: 30px 0;
}

.download-link img {
    width: 200px;
    transition: transform 0.3s;
}

.download-link img:hover {
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 0.9em;
}

/* ========================================= */
/* СТИЛІ LIGHTBOX / MODAL */
/* ========================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content-img {
    max-width: 90vw;
    max-height: 80vh;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

#imageCaption {
    margin-top: 10px;
    color: #ccc;
    text-align: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    z-index: 2000;
    user-select: none;
}

.prev { left: 10px; }
.next { right: 10px; }

/* ========================================= */
/* СТИЛІ ДЛЯ ПОШУКУ В НОВИНАХ (НОВЕ)         */
/* ========================================= */

.news-search-wrapper {
    display: flex;
    justify-content: flex-end; /* Вирівнювання вправо */
    margin-bottom: 25px;
    width: 100%;
}

#newsSearchInput {
    width: 250px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#newsSearchInput:focus {
    border-color: var(--main-color);
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.1);
}


/* Щоб списки мали нормальні відступи, коли картинка обтікає текст */
/* Це змушує список починатися під картинкою або мати правильні відступи */
.news-content ul {
    display: block;
    margin: 15px 0;
    padding-left: 10px;
}

.news-content li {
    margin-bottom: 5px;
}

/* ========================================= */
/* СТИЛИ ДЛЯ БЛОКА CTA */
/* ========================================= */

.cta-block {
    text-align: center;
    padding: 30px 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.download-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.qr-code-img {
    width: 140px;
    border: 5px solid #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ========================================= */
/* СТИЛІ ДЛЯ ДВОКОЛОНКОВОЇ РОЗМІТКИ */
/* ========================================= */

.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.main-content-column { flex: 2; min-width: 0; }
.media-gallery-column { flex: 1.5; max-width: 450px; }

.video-preview-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    margin-bottom: 20px;
}

.video-preview-box iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    border-radius: 8px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.screenshot-thumb {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
}

/* ========================================= */
/* СТИЛІ ДЛЯ НОВИН ТА КОМЕНТАРІВ */
/* ========================================= */
#newsFeedContainer {
    min-height: 600px; /* Резервируем место, чтобы футер не прыгал вверх */
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease; /* Плавное появление контента */
}

/* Стилизуем лоадер, чтобы он тоже занимал место и не давал контенту схлопываться */
.loader {
    padding: 20px;
    text-align: center;
    color: #888;
    width: 100%;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    padding: 15px;
    border-left: 5px solid var(--main-color);
}

.news-date { color: #888; font-size: 0.9em; margin-bottom: 10px; }
.news-title { margin-top: 0; color: #333; }

.comment-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--main-color);
}

.comment-author { font-weight: bold; }
.comment-date { font-style: italic; color: #888; margin-left: 10px; font-size: 0.85em; }

.add-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.add-comment-form button {
    background: var(--main-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    align-self: flex-start;
}

/* АДАПТИВНІСТЬ */
@media (max-width: 800px) {
    .content-wrapper { flex-direction: column; }
    nav a { display: block; margin: 5px 0; }
    .news-search-wrapper { justify-content: center; }
    #newsSearchInput { width: 100%; }
    .screenshots-grid { grid-template-columns: repeat(2, 1fr); }
    .lang-button-container-banner {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }
}

.honeypot-field {
    display: none !important;
}