/* Цветовая палитра */
:root {
    --primary: #004b89;
    --accent: #e38a1f;
    --light: #f5f5f5;
}

/* Общие стили */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Шапка */
.site-header {
    background-color: var(--primary);
    color: #fff;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
}

.site-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.site-nav li + li {
    margin-left: 1rem;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
    background-color: var(--accent);
    color: #fff;
}

/* Геройская секция */
.hero {
    background-image: url('images/img1.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin: 0;
}

/* Секции */
section {
    padding: 3rem 0;
}

.about {
    background-color: var(--light);
}

.about p {
    max-width: 800px;
}

/* Отзывы */
.reviews-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.review {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    flex: 1 1 250px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.review span {
    display: block;
    margin-top: 0.5rem;
    color: #555;
    font-style: italic;
}

/* Новости превью */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.news-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 300px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.news-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-item h3 {
    margin: 1rem;
    font-size: 1.2rem;
}

.news-item p {
    margin: 0 1rem 1rem;
    flex-grow: 1;
}

.news-item .button {
    margin: 0 1rem 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    align-self: flex-start;
    transition: background-color 0.2s;
}

.news-item .button:hover {
    background-color: var(--accent);
}

/* Страница новостей */
.news-page h1 {
    margin-bottom: 2rem;
}

.news-article {
    margin-bottom: 3rem;
}

.news-article h2 {
    margin-bottom: 0.5rem;
}

.news-article .date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-article img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.news-article p {
    margin-bottom: 1rem;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* Подвал */
.site-footer {
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .site-nav li {
        margin: 0.5rem 0;
    }
    .news-item {
        flex: 1 1 100%;
    }
    .reviews-grid {
        flex-direction: column;
    }
}