@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
    margin: 0;
    padding: 0;
    background: black;
    font-family: 'Press Start 2P', cursive;
}
.navbar {
    background: #222;
    padding: 10px;
    text-align: center;
    position: relative;
    z-index: 1000;
}
.menu {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
}

.menu a:hover {
    color: #ffcc00;
}

a.main_page {
    color: green;
}

a.main_page:hover {
    color: green;
}
.burger {
    display: none;
    cursor: pointer;
    font-size: 20px;
    color: white;
    background: none;
    border: none;
    position: absolute;
    right: 15px;
    top: 10px;
}
@media (max-width: 600px) {
    .menu {
        display: none;
        flex-direction: column;
        background: #222;
        position: absolute;
        width: 100%;
        left: 0;
        top: 40px;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    }
    .menu a {
        display: block;
        padding: 20px;
        font-size: 18px;
    }
    .burger {
        display: block;
    }
}
.container {
    text-align: center;
    color: white;
    position: relative;
    margin: 100px auto;
    width: 90%;
    max-width: 800px;
}
.content-box {
    background: rgba(34, 34, 34, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    line-height: 1.6;
}
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
text-align: center;
width: 150px;                      /* Задаємо фіксовану ширину для контейнера */
word-wrap: break-word;              /* Переносити довгі слова */
white-space: normal;                /* Текст переноситься, якщо він великий */
}
.gallery-item a {
    text-decoration: none;
    display: block;
    text-align: center;
}
.gallery-item a img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}
.gallery-item a:hover img {
    transform: scale(1.1);
}
.gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}
.gallery img:hover {
    transform: scale(1.1);
}

.gallery-caption {
margin-top: 5px;
font-size: 12px;                    /* Зменшуємо шрифт для компактності */
color: white;
word-wrap: break-word;              /* Переносить текст на новий рядок, якщо він великий */
white-space: normal;                /* Нормальний режим для переносу тексту */
max-width: 100%;                    /* Запобігає виходу тексту за межі контейнера */
text-align: center;                 /* Вирівнювання тексту по центру */
}

.content-box h1 {
    margin-bottom: 20px;
    font-size: 24px;
}
.content-box p {
    font-size: 16px;
    margin-bottom: 20px;
}
.btn {
    background: #ffcc00;
    border: 4px solid black;
    padding: 15px 30px;
    cursor: pointer;
    display: inline-block;
    font-size: 18px;
    transition: 0.3s;
}
.btn:hover {
    background: #ff9900;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    animation: moveStars 30s linear infinite;
}
@keyframes moveStars {
    from { background-position: 0 0; }
    to { background-position: -1000px 1000px; }

}
.footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 14px;
}

.no-results {
    padding: 10px;
    color: red;
    font-size: 18px;
}

/* Стиль для заголовку статті */
.article h2 {
    font-size: 18px; /* Зменшуємо шрифт заголовку */
    margin-bottom: 10px;
}

/* Стиль для тексту статті */
.article p {
    font-size: 14px; /* Зменшуємо шрифт тексту */
    margin-bottom: 10px;
}

#search-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#search-input {
    padding: 10px;
    width: 300px;
    font-size: 16px;

}

#articles {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-item {
    text-align: center;
}

.gallery-item a {
    display: block;
    text-align: center;
    color: white;
    text-decoration: none;
}

.gallery-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.gallery-caption {
    margin-top: 10px;
}
#search-container {
margin-bottom: 20px;
display: flex;
justify-content: center;
z-index: 1; /* додаємо високий z-index, щоб пошукове поле було поверх фону */
position: relative; /* додаємо позицію, щоб працював z-index */
}

#articles {
display: flex;
justify-content: center;
z-index: 1; /* додаємо високий z-index, щоб пошукове поле було поверх фону */
position: relative; /* додаємо позицію, щоб працював z-index */
}