/* Загальні стилі */
body {
    font-family: "Times New Roman", sans-serif;
    margin: 0 15%;
    padding: 0;
    min-height: 100vh;
    font-size: 1.2vw;
    text-align: justify; /* вирівнювання по ширині */
}
/*main {*/
/*    background: #ffffff; !* білий фон для всього сайту *!*/
/*}*/

.content-block {
    background: white;
    padding: 0 20px;
    overflow: hidden;
}
.margen {
    margin-top: 40px;
}
footer, footer div {
    background: #222 !important;
    color: #fff;
    /*padding: 40px 20px;*/
}



h1 {
    white-space: nowrap;
    font-size: clamp(14px, 3.5vw, 32px); /* автоматичне масштабування */
    background: #ffffff; /* білий фон для всього сайту */
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3; /* прозорість фону */
    z-index: -1;
}


a {
    color: inherit;
    text-decoration: none;
}

/* Логотип у хедері */
header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 0;
}

header .logo img {
    height: 80px;          /* трохи більше, ніж зараз */
    max-width: 100%;
    object-fit: contain;   /* не спотворювати */
    /*filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); !* легка тінь *!*/
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05); /* ефект при наведенні */
}


/* Рядок 1 — top-bar */
.top-bar {
    background-color: #f0f0f0;
    display: flex;
    justify-content: space-between;
    padding: 5px 20px;
    font-size: 100%;
    color: #333;
}

.top-bar .col {
    flex: 1;
    display: flex;
    align-items: center;
}

.top-bar .social-icons {
    justify-content: flex-end;
    gap: 10px;
}

.top-bar .social-icons a {
    color: #333;
    font-size: 16px;
}

/* Рядок 2 — middle-bar */
.middle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}



.middle-bar .phone a {
    font-size: 80%;
    font-weight: bold;
    color: #0057b8;
}

/* Рядок 3 — навігація */
.nav-bar {
    background-color: #ffffff;
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    /*justify-content: space-evenly;*/
    /*padding: 10px 10px 10px 0;*/
    border-radius: 10px;
    border: 1px solid #2c2c30;
    /*margin-bottom: 60px;*/
}

/* Скидаємо відступи та марджини у li, щоб не зсувались */
.nav-bar ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-bar ul li {
    padding: 0;
    margin: 0;
    display: flex; /* Важливо */
    align-items: stretch; /* Щоб li займав повну висоту */
}

/* Розділювачі | між пунктами */
.nav-bar ul.nav-left li:nth-child(2)::after,
.nav-bar ul.nav-left li:nth-child(3)::after,
.nav-bar ul.nav-left li:nth-child(4)::after,
.nav-bar ul.nav-left li:nth-child(5)::after,
.nav-bar ul.nav-left li:nth-child(6)::after {
    content: "|";
    margin-left: 1.1vw;
    margin-right: 1.5vw;
    color: rgba(2, 14, 66, 0.87);
    opacity: 0.8;
    align-self: center;
}


/* Пункти меню */
.nav-bar a {
    color: #2c2c30;
    font-weight: bold;
    font-size: 1vw;
    transition: 0.3s;
    display: flex;
    align-items: center;
    padding: 5% 5%;
    height: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.nav-bar a:hover {
    text-decoration: underline;
}

/* Перша кнопка — синя, по всій висоті li */
.nav-bar ul.nav-left li:first-child a {
    background-color: #0079fd;
    color: #ffffff;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.3s;
    width: 100%;
    justify-content: center;
    margin-right: 5vw;
}

.nav-bar ul.nav-left li:first-child a:hover {
    background-color: #005bb5;
    text-decoration: none;
}

/* Відступ для правого меню */
.nav-right {
    margin-left: 50px;
    display: flex;
    align-items: center;
}


/* === СЕКЦІЯ КАЛЕНДАР === */
.calendar-form {
    margin: 30px 0 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-form input[type="text"] {
    padding: 8px 12px;
    font-size: 16px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.calendar-form button {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.calendar-form button:hover {
    background-color: #005fa3;
}

.calendar-table {
    background-color: white; /* явний білий фон для таблиці */
    border-collapse: collapse;
    width: 100%;
    /*background: white;*/
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    table-layout: fixed;
}


.calendar-table th:nth-child(1),
.calendar-table td:nth-child(1) {
    width: 10%; /* Дата */
}

.calendar-table th:nth-child(2),
.calendar-table td:nth-child(2) {
    width: 40%; /* Фото */
}

.calendar-table th:nth-child(3),
.calendar-table td:nth-child(3) {
    width: 30%; /* Назва */
}

.calendar-table th:nth-child(4),
.calendar-table td:nth-child(4) {
    width: 20%; /* Кнопка */
}



.calendar-table th {
    background-color: #007acc;
    color: white;
    padding: 2px;
    font-weight: normal;
    text-align: center;
}

.calendar-table td {
    padding: 2px;
    border-top: 8px solid rgba(31, 81, 229, 0.5);
    text-align: center;
    vertical-align: middle;
    font-size: 100%;
    /*background-color: rgba(255, 255, 255, 0.95);*/
}

.calendar-table img {
    width: 70%; /* розмір малюнку */
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.calendar-table a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 100%;
}

.calendar-table a:hover {
    background-color: #1e7e34;
}

.register-form button {
    display: flex;              /* дозволяє працювати з вирівнюванням */
    flex-direction: column;     /* вертикальне розташування вмісту */
    justify-content: center;    /* центр по вертикалі */
    align-items: center;        /* центр по горизонталі */
    padding: 12px 16px;
    font-size: 16px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.social-icons {
    display: flex;
    gap: 10px;           /* відстань між іконками */
    /*justify-content: flex-end; !* вирівнювання праворуч *!*/
    align-items: center;
    margin-top: 5px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;         /* ширина іконки */
    height: 32px;        /* висота іконки */
    color: #333;         /* колір іконки */
    background-color: #fff; /* фон іконки */
    border-radius: 50%;  /* круглі іконки */
    transition: 0.3s;    /* плавна анімація при ховері */
    text-decoration: none;
}

.social-icons a:hover {
    color: #fff;             /* колір іконки при наведенні */
    background-color: #007acc; /* фон при наведенні */
    transform: scale(1.1);   /* трохи збільшити іконку */
}


#bg-video {
    position: fixed;   /* щоб завжди було на фоні */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* заповнює весь екран */
    z-index: -1;       /* позаду всіх елементів */
    opacity: 0.8;      /* прозорість */
}















@media (max-width: 870px) {
    body {
        font-family: Arial, sans-serif;
        margin: 0 5%;
        padding: 0;
        min-height: 100vh;
        font-size: 4vw;
    }

    .calendar-table td {
        font-size: 70%;
    }

    .calendar-table a {
        font-size: 70%;
    }

    .nav-bar {

        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .nav-bar li a {
        display: inline-block;
        max-width: 180px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }


    .top-bar {
        font-size: 10px;
    }

    /* 6 пунктів навігації */
    .nav-bar ul.nav-left {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        width: 100%;
        order: 1;
    }

    .nav-bar ul.nav-left li {
        justify-content: center;
    }


    .nav-bar ul.nav-left li:not(:first-child)::after {
        content: none;
    }

    .nav-bar ul.nav-left li:not(:last-child)::after {
        content: none;
    }

    .nav-bar ul.nav-left li:not(:first-child) a {
        font-size: 80%;
        padding: 10px;
        text-align: center;
        width: 100%;
        justify-content: center;
    }

    /* Кнопка — окремо знизу */
    .nav-bar ul.nav-left li:first-child {
        width: 100%;
        margin-top: 10px;
        grid-column: 1 / -1; /* розтягується на всі колонки */
        order: 2;
    }

    .nav-bar ul.nav-left li:first-child a {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }

    /* Праве меню ховаємо */
    .nav-right {
        display: none;
    }
}
/* Стиль кнопки Google Sign-In */
.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: WHITE;
    background-image: none;
    border: 1px solid #747775;
    border-radius: 20px;
    box-sizing: border-box;
    color: #1f1f1f;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    max-width: 400px;
    min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 12px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    flex-grow: 1;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: #ffffff61;
    border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents,
.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: #303030;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: #303030;
    opacity: 8%;
}
/*розмір малюнку в новинах*/
.grid .card img {
    width: 400px;
    height: 230px;
    object-fit: cover; /* обрізає зайве, щоб зберегти пропорції */
    border-radius: 8px;
}
/*розмір малюнку в новинах*/
.grid img {
    width: 400px;
    height: 230px;
    object-fit: cover; /* обрізає зайве, щоб зберегти пропорції */
    border-radius: 8px;
}
.grid .card {
    display: flex;
    gap: 15px; /* зменшений відступ між картинкою та текстом */
    padding: 10px; /* менші відступи всередині картки */
    border-bottom: 1px solid #ddd; /* горизонтальний роздільник */
}

/*.grid .card:last-child {*/
/*    border-bottom: none; !* у останньої картки роздільник не потрібен *!*/
/*}*/

/* Пагінація */
.pagination {
    text-align: center;
    margin-top: 90px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 50px 4px;
    border-radius: 6px;
    background: #007bff;
    color: white;
    text-decoration: none;
}

.pagination a.active {
    background: #333;
}