:root {
    --accent-color: #e67e22;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

.dark-theme {
    --primary-color: #3a8bb9;
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --header-bg: rgba(30, 30, 30, 0.98);
    --footer-bg: #0a0a0a;
    --border-color: #404040;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

.light-theme {
    --primary-color: #2a6d8c;
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fb;
    --bg-card: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #666666;
    --header-bg: rgba(255, 255, 255, 0.98);
    --footer-bg: #1a2b3c;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

/* ===== Шапка ===== */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    backdrop-filter: blur(5px);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo__icon {
    color: var(--accent-color);
    font-size: 2rem;
}

.logo__accent {
    color: var(--accent-color);
}

.header__controls {
    display: flex;
    align-items: center;
}

.theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-toggle__icon {
    font-size: 14px;
    z-index: 2;
}

.theme-toggle__icon--light { color: #f39c12; }
.theme-toggle__icon--dark { color: #f1c40f; }

.theme-toggle__slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.light-theme .theme-toggle__slider {
    transform: translateX(32px);
}

/* ===== Секция галереи ===== */
.gallery-section {
    padding: 60px 0 80px;
    background-color: var(--bg-primary);
}

.gallery__title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.gallery__title::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--accent-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

.gallery__description {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 40px;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Сетка: 4 карточки в ряд на HD */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

/* Карточка компактная */
.gallery-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px var(--shadow-color);
}

.gallery-card__image-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.gallery-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card__image-wrapper:hover .gallery-card__image {
    transform: scale(1.03);
}

.gallery-card__content {
    padding: 15px;
    position: relative;
    flex-grow: 1;
}

.gallery-card__step {
    position: absolute;
    top: -12px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid var(--bg-card);
}

.gallery-card__title {
    font-size: 1.1rem;
    margin: 5px 0 8px 0;
    color: var(--text-primary);
    font-weight: 600;
    padding-right: 35px;
}

.gallery-card__description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Кнопка CTA */
.gallery-cta {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn--primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn--primary:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

/* ===== Модальное окно ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal__content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.modal__close:hover {
    color: var(--accent-color);
}

/* ===== Футер ===== */
.footer {
    background-color: var(--footer-bg);
    color: var(--text-secondary);
    padding: 25px 0;
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer__links {
    display: flex;
    gap: 20px;
}

.footer__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer__link:hover {
    color: var(--accent-color);
}

.footer__socials {
    display: flex;
    gap: 18px;
}

.footer__socials a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: var(--transition);
}

.footer__socials a:hover {
    color: var(--accent-color);
}

/* ===== Адаптив ===== */
@media screen and (max-width: 1100px) {
    .gallery-grid {
        gap: 15px;
    }
    .gallery-card__title {
        font-size: 1rem;
    }
    .gallery-card__description {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .gallery-section {
        padding: 50px 0;
    }
}

@media screen and (max-width: 550px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .footer__container {
        flex-direction: column;
        text-align: center;
    }
    .footer__links {
        justify-content: center;
    }
    .gallery__title {
        font-size: 1.6rem;
    }
    .logo__text {
        font-size: 1.2rem;
    }
    .theme-toggle {
        width: 54px;
        height: 28px;
    }
    .theme-toggle__slider {
        width: 20px;
        height: 20px;
    }
    .light-theme .theme-toggle__slider {
        transform: translateX(28px);
    }
}

.logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.9;
}
