/* Основные стили и переменные */
:root {
    --main-bg-color: #f5f5f5;
    --main-text-color: #333;
    --header-bg-color: #4a4a4a;
    --accent-color: #ef4a03;
    --link-hover-color: #cccccc;
    --padding-section: 60px 20px;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Open Sans', sans-serif;
        letter-spacing: 1.8px;
    margin: 0;
    line-height: 1.6;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    scroll-behavior: smooth;
}

/* Hero Section (новый раздел для зафиксированного фона) */
#hero {
    background-image: url('img/sheeps1.jpg');
    background-attachment: fixed; /* Фиксирует фоновое изображение */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    padding: 20px;
}

/* Header (Шапка) */
header {
    background-color: rgba(0, 0, 0, 0.75); /* 0.85 - це рівень прозорості */
    color: white;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* Ефект розмиття */
}

header h1, header p {
    margin: 0;
}

header p {
    color: var(--accent-color);
}

header h1 {
    font-size: 1.5em;
    letter-spacing: 1px; /* Добавлено */
}

.logo-img {
    height: 80px; 
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease-in-out;
    position: relative; /* Добавлено для подчеркивания */
}

/* Эффект подчеркивания при наведении */
nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Main Content (Основной контент) */
.page-section {
    padding: var(--padding-section);
    max-width: 1200px;
    margin: auto;
}

h2 {
    text-align: center;
    color: var(--header-bg-color);
    margin-bottom: 40px;
    font-size: 2.2em;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 2px; /* Добавлено */
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* Стили для секций */
#about {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-top: -60px; /* Поднимает блок над "hero" */
    position: relative; /* Создает новый контекст наложения */
    z-index: 1;
}

#about img {
    display: none; /* Скрываем старое изображение, так как оно теперь в "hero" */
}

#products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease-in-out;
}

.product-item:hover {
    transform: translateY(-10px);
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.product-item h3 {
    color: var(--accent-color);
}

#documents .documents-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.documents-gallery img {
    max-width: 200px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.documents-gallery img:hover {
    transform: scale(1.05);
}

/* Контакты */
.contact-info {
    text-align: center;
}

.contact-info .social-links a {
    margin: 0 10px;
    font-size: 2.5em;
    color: var(--header-bg-color);
    transition: color 0.3s ease-in-out;
}

.contact-info .social-links a:hover {
    color: var(--accent-color);
}

.contact-info .social-links i {
    transition: transform 0.3s ease-in-out;
}

.contact-info .social-links a:hover i {
    transform: scale(1.2);
}

form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

form label {
    font-weight: bold;
    margin-bottom: 5px;
}

textarea {
    resize: vertical;
}

form input, form textarea {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
}

form input[type="submit"], form button[type="reset"] {
    cursor: pointer;
    background-color: var(--header-bg-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
}

form input[type="submit"]:hover, form button[type="reset"]:hover {
    background-color: var(--accent-color);
}

/* Footer (Подвал) */
footer {
    background-color: var(--header-bg-color);
    color: white;
    text-align: center;
    padding: 40px 20px;

}
.footer-content h4 {
    letter-spacing: 2px;
}
.webmaster-link {
    font-size: xx-small;
    color: var(--main-bg-color);
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    header {
        position: relative;
        flex-direction: column;
        text-align: center;
    }
    nav a {
        display: block;
        margin: 10px 0;
    }
    .menu-toggle {
        display: block;
        align-self: flex-end;
    }
    #main-nav {
        display: none;
        width: 100%;
        text-align: center;
    }
    #main-nav.active {
        display: block;
    }
}