/* --- БАЗОВІ НАЛАШТУВАННЯ --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth; /* Плавна прокрутка */
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #fcfcfc;
}

/* --- ОНОВЛЕНА ШАПКА --- */
header {
    background-color: #2c3e50;
    color: white;
    /* Змінюємо фіксовану висоту на auto + min-height, щоб нічого не обрізало */
    height: auto;
    min-height: 80px;
    padding: 10px 2rem; /* Додали відступи зверху і знизу */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- КОНТЕЙНЕР ЛОГОТИПА --- */
.logo-container {
    display: flex;
    /* ГОЛОВНА ЗМІНА: row ставить елементи в ряд (текст збоку, а не знизу) */
    flex-direction: row; 
    align-items: center;
    gap: 15px; /* Відступ між логотипом і текстом */
}

/* Сам логотип */
.logo {
    height: 70px; /* Трішки зменшив, щоб було акуратно */
    width: 70px;
    object-fit: contain; /* Щоб картинку не розтягувало і не обрізало */
    background: transparent;
    border-radius: 0; /* Прибираємо заокруглення країв блоку, бо лого і так кругле */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

/* --- СОЦМЕРЕЖІ --- */
.socials {
    display: flex;
    /* Тексти ставимо стовпчиком, але збоку від лого */
    flex-direction: column; 
    gap: 2px;
}

.socials a {
    color: #bdc3c7;
    font-size: 0.85rem; /* Трішки збільшив шрифт */
    text-decoration: none;
    font-weight: 500;
}

.socials a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- МЕНЮ --- */
.menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.menu li {
    position: relative;
    display: flex;
    align-items: center;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    transition: 0.3s;
    border-radius: 4px;
}

.menu a:hover {
    background-color: #34495e;
}

/* --- ВИПРАВЛЕНЕ ВИПАДАЮЧЕ МЕНЮ --- */
.dropdown {
    height: 100%; /* На всю висоту шапки */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 999;
    top: 100%; /* Рівно під кнопкою */
    left: 0;
    border-radius: 0 0 4px 4px;
    border-top: 3px solid #3498db;
    padding-top: 5px; 
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    display: block;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

/* Відкриваємо меню при наведенні */
.dropdown:hover .dropdown-content {
    display: block;
}

/* --- ГОЛОВНА СЕКЦІЯ (HERO) --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), #3498db;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* --- ЗАГАЛЬНІ СЕКЦІЇ --- */
.container {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

/* Цей код виправляє проблему, коли шапка закриває заголовок при переході */
.category-block, section {
    scroll-margin-top: 90px;
}

h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: inline-block;
    border-bottom: 3px solid #3498db;
}

.subtitle {
    margin-bottom: 3rem;
    color: #7f8c8d;
}

.bg-light { background-color: #f0f2f5; }
.bg-dark { background-color: #2c3e50; color: white; }
.bg-dark h2 { color: white; border-color: white; }

/* --- ТОВАРИ --- */
.category-block {
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 20px 0;
}

.comparison {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.photo-box {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.photo-box img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.photo-box span {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 40px auto;
    width: 80%;
}

/* --- КНОПКИ --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover { background-color: #c0392b; }

.btn-outline {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.btn-outline:hover { background-color: #e74c3c; color: white; }

/* --- 3D МОДЕЛЬ ТА АВТОР --- */
.model-showcase img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.author-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    text-align: left;
    margin-top: 20px;
}

.author-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
}

footer {
    background-color: #1a252f;
    color: #7f8c8d;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* --- МОБІЛЬНА ВЕРСІЯ --- */
@media (max-width: 768px) {
    header {
        height: auto;
        flex-direction: column;
        padding: 10px;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .menu li {
        width: 100%;
        justify-content: center;
    }

    .menu a { width: 100%; }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        background-color: #f1f1f1;
        top: 0;
    }
    
    .comparison, .author-content {
        flex-direction: column;
        text-align: center;
    }
}