/* ==============================================
  ОПТИМІЗОВАНИЙ БАЗОВИЙ ФАЙЛ (header-footer.css)
==============================================
*/

/* --- 1. Глобальні змінні та базові стилі --- */
:root {
    --primary-color: #007bff;
    --primary-color-hover: #0056b3;
    --text-color-dark: #212529;
    --text-color-light: #6c757d;
    --bg-color-light: #f8f9fa;
    --bg-color-white: #ffffff;
    --bg-color-dark: #1c1c1e;
    --border-color: #e0e0e0;

    --font-family-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

body {
    background-color: var(--bg-color-light);
    font-family: var(--font-family-base);
    color: var(--text-color-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 2. Хедер та нова адаптивна навігація --- */
.header {
    background-color: var(--bg-color-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
}

/* --- Нова навігація --- */
.nav-toggle {
    display: block; /* За замовчуванням кнопка видима */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-color-dark);
    z-index: 1001;
}

.main-nav {
    display: none; /* За замовчуванням навігація прихована */
}

/* --- 3. Футер --- */
.footer {
    background-color: var(--bg-color-dark);
    color: #a9a9b3;
    padding: 60px 0 20px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 220px;
}

.footer-logo {
    font-size: 28px;
    color: var(--bg-color-white);
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-column h4 {
    font-size: 18px;
    color: var(--bg-color-white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    line-height: 1.7;
    font-size: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul a {
    color: #a9a9b3;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-column ul a:hover {
    color: var(--bg-color-white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3a3a3c;
    font-size: 14px;
    color: #888;
}


/* --- 4. Адаптивні стилі для Хедера (Навігація) --- */
@media (max-width: 767px) {
    .main-nav {
        display: block; /* Робимо видимим для позиціонування */
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100%;
        background-color: #222;
        padding: 80px 30px 30px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
    }

    .nav-open .main-nav {
        transform: translateX(0);
    }
    
    .main-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .main-nav a {
        text-decoration: none;
        color: #f0f0f0;
        font-size: 20px;
        font-weight: 600;
        padding: 10px 0;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        color: var(--primary-color);
    }
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .main-nav {
        display: block;
    }

    .main-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 25px;
    }

    .main-nav a {
        text-decoration: none;
        color: var(--text-color-light);
        font-weight: 600;
        padding: 5px 0;
        border-bottom: 2px solid transparent;
        transition: color 0.3s, border-bottom-color 0.3s;
    }

    .main-nav a:hover,
    .main-nav a.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }
}