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

:root {
    --color-bg-dark: #0d1b0f;
    --color-bg-card: #1a2f1f;
    --color-primary: #2d7a4a;
    --color-primary-light: #4a9b67;
    --color-accent: #1f5a35;
    --color-text: #e8f0eb;
    --color-text-secondary: #a8b8ac;
    --color-border: #2a4a32;
    --color-hover: #3d9a5a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #132018 100%);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    padding: 2.5rem 2rem;
    border-bottom: 2px solid var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(45, 122, 74, 0.2);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary-light);
    font-weight: 700;
}

header p {
    color: rgba(232, 240, 235, 0.85);
    font-size: 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-text);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    aspect-ratio: 16 / 9;
}

.gallery-item:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 10px 25px rgba(45, 122, 74, 0.25);
    transform: translateY(-6px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 122, 74, 0.8) 0%, rgba(31, 90, 53, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    text-align: center;
    padding: 2rem;
    gap: 1rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-title {
    font-weight: 700;
    font-size: 1.3rem;
}

.overlay-text {
    font-size: 0.9rem;
    color: rgba(232, 240, 235, 0.8);
}

.item-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(45, 122, 74, 0.7);
    color: var(--color-primary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-item:hover .item-number {
    background: var(--color-primary-light);
    color: var(--color-bg-dark);
}

footer {
    background: var(--color-accent);
    color: var(--color-text-secondary);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

footer p {
    margin: 0.5rem 0;
}

/* Адаптивный дизайн для планшета */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.7rem;
    }

    .gallery-row {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.2rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 10;
    }

    .overlay-title {
        font-size: 1.1rem;
    }

    .overlay-text {
        font-size: 0.8rem;
    }
}

/* Адаптивный дизайн для мобильного */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .container {
        padding: 1rem;
    }

    .filter-bar {
        gap: 0.7rem;
        margin-bottom: 1.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .gallery-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 11;
    }

    .gallery-overlay {
        padding: 1.5rem;
        gap: 0.6rem;
    }

    .overlay-title {
        font-size: 1rem;
    }

    .overlay-text {
        font-size: 0.75rem;
    }

    .item-number {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
}

/* Адаптивный дизайн для маленького экрана */
@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .container {
        padding: 0.8rem;
    }

    .filter-bar {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .gallery {
        gap: 1rem;
    }

    .gallery-row {
        gap: 0.8rem;
    }

    .gallery-item {
        aspect-ratio: 16 / 12;
    }

    .gallery-overlay {
        padding: 1rem;
    }

    .overlay-title {
        font-size: 0.9rem;
    }

    .overlay-text {
        font-size: 0.7rem;
    }

    .item-number {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        top: 0.8rem;
        right: 0.8rem;
    }

    footer {
        padding: 1rem;
        font-size: 0.8rem;
    }

    footer p {
        margin: 0.3rem 0;
    }
}