/* Основные переменные для светлой и темной темы */
:root {
    --bg-color: #f4f4f9;
    --text-color: #333333;
    --header-bg: #2c3e50;
    --header-text: #ffffff;
    --card-bg: #ffffff;
    --accent-color: #e74c3c;
    --link-color: #3498db;
    --footer-bg: #1a252f;
}

/* Темная тема */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1f1f1f;
    --card-bg: #1e1e1e;
    --accent-color: #c0392b;
    --link-color: #5dade2;
    --footer-bg: #0a0a0a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.btn {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c0392b;
}

/* Главный блок (Hero) */
.hero {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 8px;
    color: #fff;
    max-width: 800px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Контентная часть */
.content-section {
    padding: 40px 20px;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--accent-color);
}

/* Сетка карточек */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Страница "О проекте" */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    margin-top: 20px;
}

.sources-list {
    margin: 10px 0 20px 20px;
}

.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.caption {
    text-align: center;
    font-size: 0.9rem;
    color: gray;
    margin-top: 10px;
}

/* Подвал */
footer {
    background-color: var(--footer-bg);
    color: #bbb;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
}
