﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    color: #222;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}


.header {
    background: #0b3c6d;
    padding: 15px 0;
    position: relative;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap; /* ключ */
}


.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Збільшений логотип */
.logo {
    width: 90px; /* збільшено з 60px */
    height: auto;
}

.brand-text {
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
}



.btn {
    background: #f9b233;
    color: #000;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.btn-large {
    padding: 12px 24px;
}
.hero-admin {
    margin-bottom: 20px; /* відступ між кнопкою і заголовком */
}


/* USER INFO */
.user-box {
    margin-left: auto;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.user-status {
    white-space: nowrap;
    font-size:18px;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f9b233;
}

/* HERO */
.hero {
    position: relative;
    z-index: 1;
    height: 60vh; /* висота хедера/hero */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Фото з оригінальним розміром, але на весь хедер */
.hero-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
       /* FIX для CKEditor */
.ck-content {
    font-weight: normal;
}

.ck-content ul {
    list-style-type: disc !important;
    margin-left: 24px !important;
    padding-left: 24px !important;
}

.ck-content ol {
    list-style-type: decimal !important;
    margin-left: 24px !important;
    padding-left: 24px !important;
}

.ck-content li {
    display: list-item !important;
}
.ck-content u,
.ck-content span[style*="text-decoration"] {
    text-decoration: underline !important;
}
.hero-img {
    height: 100%; /* підлаштовуємо під висоту hero */
    width: auto;  /* зберігаємо пропорції */
    object-fit: contain; /* не розтягуємо */
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    opacity: 0.9; /* трохи прозорості */
}

/* Градієнт для видимості тексту та кнопок */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(11, 60, 109, 0.35),
        rgba(11, 60, 109, 0.10)
    );
    z-index: 1;
}

/* Текст по центру */
.hero-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 90%;
    padding: 20px;
    transform: translateY(-140px);
}

.hero-text h1 {
    font-size: 36px;
    line-height: 1.2;
    margin: 0 auto;
}

.hero-text h1 span {
    color: #fec358;
    font-size: 32px;
}
/* Опис */
.hero-text p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.95;
}


/* FEATURES */
.features {
    background: #f4f4f4;
    padding: 50px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.specialties {

    padding-bottom: 40px;
    text-align: center;
    background: #f4f4f4;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.specialty-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: 0.25s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.specialty-card:hover {
    transform: translateY(-5px);
}

.spec-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0b3c6d;
}

.spec-more {
    text-decoration: none;
    font-weight: bold;
    color: #f9b233;
    font-size: 19px;
}

.spec-more:hover {
    text-decoration: underline;
}

/* ADVANTAGES */
.advantages {
    background: #f4f4f4;
    padding: 30px 0;
    text-align: center;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.advantages-grid div {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    font-size:18px;
}

/* NEWS */
.news {
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.news-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #f9b233;
    max-width: 100%;
    overflow: hidden;
}
.news-card h4,
.news-card a {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.news-card h4 {
    font-size: 20px;
    margin-bottom: 6px;
}

.news-card span {
    font-size: 20px;
    font-weight: bold;
    color: #555;
}

.news-card a {
    text-decoration: none;
    color: #222;
}

.news-card a:hover {
    color: #0b3c6d;
}

/* FOOTER */
.footer {
    background: #0b3c6d;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.home-layout {
    background: #f4f4f4;
    padding: 60px 0;
}

.home-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    gap: 24px;
}

.home-main {
    display: flex;
    flex-direction: column;
    gap: 60px;
}
 .left-sidebar,
.news-sidebar {
    padding: 10px;
}
/* SIDEBAR NEWS */

.news-sidebar {
    align-self: start;   /* ⬅ не тягнеться по висоті */
    width: 320px;       /* ⬅ фіксована ширина по контенту */
    max-width: 100%;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    overflow: hidden;
}

.news-sidebar h2 {
    margin-bottom: 20px;
}

/* ЛІВЕ МЕНЮ */
.left-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: fit-content;
}

.left-sidebar h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #0b3c6d;
    border-bottom: 2px solid #0b3c6d;
    padding-bottom: 8px;
}

.left-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-menu li {
    margin-bottom: 8px;
}

.left-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #0b3c6d;
    text-decoration: none;
    font-weight: 500;
    background: #f3f7fb;
    transition: all 0.2s ease;
}

.left-menu a:hover {
    background: #f9b233;
    color: #000;
    transform: translateX(4px);
}

/* LEFT EXTRA LINKS */

.left-links {
    margin-top: 20px;
}

.side-btn {
    display: block;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 12px;
    color: #fff;
    transition: 0.2s;
}

.side-btn.red {
    background: #d9534f;
}

.side-btn.blue {
    background: #3b6ea5;
}

.side-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.side-links-title {
    margin: 20px 0 10px;
    font-size: 22px;
    color: #333;
}

.side-banner {
    display: block;
    margin-bottom: 12px;
}

.side-banner img {
    width: 100%;
    border-radius: 6px;
    transition: 0.2s;
}

.side-banner img:hover {
    transform: scale(1.03);
}

/* NAV STYLE */
.nav {

    display: flex;
    flex-wrap: wrap; /* ключ */
    justify-content: center;
    gap: 6px;
    z-index: 9999;

}

.nav a {
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
    color: #e6edf5;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.nav a:hover {
    background: #f9b233;
    color: #000;
}

/* BURGER BUTTON */
.burger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}


.news-date{
    font-size: 20px;
    font-weight: bold;
}

.hero-datetime {
    margin-top: 18px;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #ffffff;
    opacity: 0.95;
}

/* 404 PAGE */
.error-404 {
    background: #f4f4f4;
    padding: 100px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-box {
    background: #fff;
    padding: 60px 40px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-box h1 {
    font-size: 80px;
    color: #0b3c6d;
    margin-bottom: 10px;
}

.error-box h2 {
    font-size: 26px;
    margin-bottom: 20px;
}

.error-box p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #555;
}


@media (min-width: 1200px) {

    .home-layout .container {
        max-width: 1600px;   /* або 1700px якщо хочеш ще ширше */
        width: 96%;
    }

}
/* SMALL DESKTOP / LAPTOP — всі 3 колонки, але компактніше */
@media (max-width: 1200px) and (min-width: 901px) {

    .home-grid {
        grid-template-columns: 240px minmax(0, 1fr) 240px;
        gap: 16px;
    }

    .news-sidebar {
        width: auto;        /* ⬅ не фікс */
        padding: 18px;
    }

    .left-sidebar {
        padding: 18px;
        width: auto;
    }

}

/* MOBILE — новини вниз */

@media (max-width: 900px) {

    .home-grid {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        order: 2;
        margin-top: 40px;
    }
}
/* RESPONSIVE */
@media (max-width: 768px) {
      .burger {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;              /* ⬅ під хедером */
        left: 0;
        width: 100%;
        background: #0b3c6d;

        flex-direction: column;
        align-items: center;

        max-height: 0;
        overflow-y: auto;      /* ⬅ скрол якщо багато пунктів */
        transition: max-height 0.3s ease;

        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        z-index: 9999;
    }

    .nav.active {
        max-height: calc(100vh - 80px); /* ⬅ автоматична висота */
        padding: 10px 0;
    }

    .nav a {
        width: 100%;
        text-align: center;
        padding: 14px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
     /* hero повертаємо до життя */
    .hero {
        position: relative;
        min-height: 42vh;
        height: auto;
        overflow: hidden;
    }

    .hero-image {
        position: relative; /* ⬅ ключ */
        height: 42vh;
        width: 100%;
    }

    /* Фото */
    .hero-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;  /* ⬅ фото заповнює */
        transform: none;
        opacity: 0.95;
    }

    /* затемнення */
    .hero-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    /* ТЕКСТ */
    .hero-text {
    position: relative;
    z-index: 2;
    max-width: 100%;
    padding: 18px 14px 40px;
    text-align: center;
    transform: none;   /* ⬅ ВАЖЛИВО */
    }

    .hero-text h1 {
        font-size: 24px;
        line-height: 1.25;
        margin: 0 auto;
        max-width: 95%;
        word-break: break-word;
    }

    .hero-text h1 span {
        display: block;
        font-size: 28px;
        line-height: 1.25;
        word-break: break-word;
    }

    .hero-admin {
        margin-bottom: 12px;
    }

        /* USER MOBILE FIX */
    .user-box {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .user-status {
        white-space: normal;   /* ⬅ дозволяємо перенос */
        font-size: 15px;
    }

    .btn-logout {
        padding: 6px 14px;
        font-size: 14px;
    }

     .error-box {
        padding: 40px 20px;
    }

    .error-box h1 {
        font-size: 60px;
    }

}

