/* =========================================
   1. БАЗОВІ НАЛАШТУВАННЯ
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", sans-serif;
	min-height: 100vh;
	display: flex;
    flex-direction: column;
}

@font-face {
    font-family: "e-Ukraine";
    src: url('fonts/e-Ukraine-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* =========================================
   2. ХЕДЕР (HEADER) ТА НАВІГАЦІЯ
   ========================================= */
.main-header {
    background-color: #ffffff;
    border-bottom: 3px solid #09aad9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: flex-start; /* На ПК все зліва */
    user-select: none;

    /* Відступи для ПК */
    padding: 0 63px;

    position: relative; /* Щоб мобільне меню позиціонувалось відносно хедера */
    z-index: 1000;
}

/* Група лого і тексту */
.header-left {
    display: flex;
    align-items: center;
    margin-right: 30px; /* Відступ до меню посилань */
}

.logo {
    height: 24px;
    margin-right: 10px;
}

.h1-header {
    font-family: "e-Ukraine", sans-serif;
    font-size: 18px;
    color: #1a2335;
    margin: 0;
    white-space: nowrap;
}

/* --- НАВІГАЦІЯ (DESKTOP) --- */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px; /* Відстань між посиланнями */
}

.main-nav a {
    text-decoration: none;
    color: #262626;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    padding-bottom: 3px;
}

.main-nav a:hover {
    border-bottom: 2px solid #000; /* Підкреслення при наведенні як у MS */
}

/* --- КНОПКА БУРГЕР (Схована на ПК) --- */
.burger-menu {
    display: none; /* На ПК не показуємо */
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

/* Малюємо лінії бургера через CSS */
.burger-menu span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #262626;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out; /* Плавна анімація */
}

/* Початкові позиції ліній */
.burger-menu span:nth-child(1) { top: 0px; }
.burger-menu span:nth-child(2) { top: 9px; }
.burger-menu span:nth-child(3) { top: 18px; }

/* =========================================
   3. HERO SLIDER
   ========================================= */
.hero-slider {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
    z-index: 1; /* Нижче ніж меню */
}

.hero-track {
    display: flex;
    height: 100%;
    /* Додаємо плавний перехід для JS: */
    transition: transform 0.8s ease-in-out;

    /* Твої GPU-прискорювачі залишаємо, вони супер: */
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.hero-slide {
    width: 33.333%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding-left: 63px;
}

.hero-content {
    background-color: #ffffff;
    padding: 40px;
    max-width: 450px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.hero-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 32px;
    font-family: "e-Ukraine", sans-serif;
}

.hero-content p {
    color: #666;
    font-size: 18px;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #0067b8;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 2px;
    transition: background 0.3s;
    
    /* ДОДАНО ДЛЯ ВИПРАВЛЕННЯ КНОПКИ */
    border: none; 
    cursor: pointer;
    font-family: inherit; /* Щоб підтягнувся Segoe UI */
    font-size: 15px;
}

.btn:hover { 
    background-color: #005da6; 
}

/*@keyframes slideShow {*/
/*    0%, 30% { margin-left: 0; }*/
/*    33%, 63% { margin-left: -100%; }*/
/*    66%, 96% { margin-left: -200%; }*/
/*    100% { margin-left: 0; }*/
/*}*/

/* =========================================
   4. ЗАГОЛОВКИ ТА КАРТКИ
   ========================================= */
.h2-oncards {
    font-family: "e-Ukraine", sans-serif;
    font-size: 28px;
    color: #1a2335;
    margin-top: 60px;
    margin-bottom: 20px;
    margin-left: 63px;
}

.cards-section {
    background-color: #ffffff;
    padding: 0 63px;
    margin-bottom: 60px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 100%;
}

.card {
    background: #ffffff;
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}



.card-content {
    background: #ffffff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: "Segoe UI Semibold", sans-serif;
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
}

.card-text {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
}

.card-btn {
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
    background-color: #0067b8;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    font-family: "Segoe UI", sans-serif;
    font-size: 15px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}
.card-btn:hover {
    background-color: #00599f;
}

/* =========================================
   5. ВЕЛИКИЙ БАНЕР
   ========================================= */
.big-card-container {
    width: auto;
    margin-left: 63px;
    margin-right: 63px;
    margin-bottom: 60px;
}

.b-card {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding-left: 8%;
}

.b-card-content {
    background-color: #ffffff;
    padding: 40px;
    max-width: 450px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.b-card-content h2 {
    font-size: 30px;
    margin-top: 0;
    margin-bottom: 15px;
}

.b-btn {
    display: inline-block;
    background-color: #0067b8;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.h1-header-u {
    font-family: "e-Ukraine-Light", sans-serif;
    font-size: 15px;
}
.b-btn:hover {
    background-color: #00599f;
}

@font-face {
    font-family: "e-Ukraine-Light"; /* Це ім'я ти придумуєш сам, щоб потім його викликати */
    src: url('fonts/e-Ukraine-UltraLight.otf') format('opentype'); /* Точний шлях до файлу */
    font-weight: 100; /* Light зазвичай це 300, але це просто для довідки браузеру */
    font-style: normal;
}

/* =========================================
   6. ФУТЕР
   ========================================= */
.main-footer {
    background-color: #f2f2f2;
    padding: 30px 63px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Щоб на мобільному переносилось */
    font-size: 12px;
    color: #616161;
}

.footer-links a {
    color: #616161;
    text-decoration: none;
    margin-right: 20px;
}
.footer-links a:hover { text-decoration: underline; }

   /* =========================================
   7. МОБІЛЬНА ВЕРСІЯ (ОНОВЛЕНА АНІМАЦІЯ)
   ========================================= */
@media (max-width: 768px) {

    /* --- ХЕДЕР --- */
    .main-header {
        padding: 0 20px;
        justify-content: space-between;
    }

    /* --- БУРГЕР МЕНЮ (НОВА АНІМАЦІЯ) --- */
    .burger-menu {
        display: block;
        z-index: 1001; /* Щоб бургер був над меню */
    }

    /* Налаштування ліній */
    .burger-menu span {
        /* Додаємо трохи іншу плавність (cubic-bezier) для ефекту "живої" анімації */
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    /* 1. ВЕРХНЯ ЛІНІЯ: Опускається в центр і крутиться */
    .burger-menu.active span:nth-child(1) {
        top: 9px; /* Центр */
        transform: rotate(45deg);
    }

    /* 2. СЕРЕДНЯ ЛІНІЯ: Просто зникає (зменшується в нуль), нікуди не летить */
    .burger-menu.active span:nth-child(2) {
        transform: scale(0); /* Зменшується в точку */
        opacity: 0;
    }

    /* 3. НИЖНЯ ЛІНІЯ: Піднімається в центр і крутиться */
    .burger-menu.active span:nth-child(3) {
        top: 9px; /* Центр */
        transform: rotate(-45deg);
    }

    /* --- ВИПАДАЮЧЕ МЕНЮ (СУПЕР ПЛАВНЕ) --- */
    .main-nav {
        position: absolute;
        top: 54px;
        left: 0;
        width: 100%;
        background-color: #f2f2f2;
        border-bottom: 1px solid #ddd;

        /* СЕКРЕТ ПЛАВНОСТІ: */
        max-height: 0;      /* Спочатку висота 0 */
        opacity: 0;         /* Прозоре */
        visibility: hidden; /* Невидиме (щоб не клікалось) */
        overflow: hidden;

        /* Анімуємо висоту і прозорість одночасно */
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
    }

    /* КОЛИ АКТИВНЕ */
    .main-nav.active {
        max-height: 500px;  /* Ставимо із запасом, щоб влізли всі посилання */
        opacity: 1;         /* Повна видимість */
        visibility: visible;

        /* При відкритті прибираємо затримку visibility */
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0; /* Прибираємо зайві відступи */
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
        opacity: 0; /* Посилання спочатку невидимі */
        transform: translateY(-10px); /* Трохи зсунуті вгору */
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Маленький бонус: посилання з'являються по черзі (каскадом) */
    .main-nav.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.1s; /* Чекають поки відкриється меню */
    }

    .main-nav a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
        width: 100%;
    }

    .main-nav a:hover {
        border-bottom: none;
        background-color: #e6e6e6;
    }

    /* --- ІНШИЙ АДАПТИВ (Залишаємо як було) --- */
    .hero-slider { height: auto; }
    .hero-slide {
        flex-direction: column;
        justify-content: flex-end;
        padding: 0;
        padding-top: 250px;
        border-bottom: 3px solid #09aad9;
    }
    .hero-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 30px 20px;
        text-align: center;
    }

    .h2-oncards {
        margin-left: 20px;
        margin-top: 40px;
        font-size: 24px;
        text-align: center;
    }
    .cards-section { padding: 0 20px; }
    .cards-grid { gap: 20px; }

    .big-card-container { margin-left: 20px; margin-right: 20px; }
    .b-card {
        height: auto;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0;
        padding-top: 200px;
    }
    .b-card-content {
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 30px 20px;
    }

    .b-btn, .btn, .card-btn {
        display: block;
        text-align: center;
        width: 100%;
        margin-top: 15px;
    }

    .main-footer {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .footer-links a {
        display: block;
        margin-bottom: 10px;
    }
}