* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #e63946;
    --primary-dark: #a4161a;
    --primary-light: #f28482;
    --secondary: #2a2d43;
    --dark: #121212;
    --light: #f8f9fa;
    --gray: #adb5bd;
    --card-bg: #1c1c1c;
    --section-bg: #0d0d0d;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

/* Кнопки */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Шапка - новая структура */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
}

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

.logo {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* Герой секция */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)),
    url('/storage/themes/qnzts/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
    font-weight: 900;
}

.hero p {
    font-size: 20px;
    color: var(--gray);
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Секция галереи - новая структура */
.gallery-section {
    background-color: var(--section-bg);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary);
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 18px;
}

/* Новая структура галереи - Masonry сетка */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    grid-gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(0.8);
}

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

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item-medium {
    grid-column: span 2;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 20px 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 14px;
    color: var(--gray);
}

/* Секция особенностей */
.features-section {
    background-color: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(230, 57, 70, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(230, 57, 70, 0.1);
}

.feature-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray);
}

/* Секция членства */
.membership-section {
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)),
    url('/storage/themes/qnzts/images/membership-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.membership-card {
    background-color: rgba(28, 28, 28, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 50px 40px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(230, 57, 70, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.membership-card h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.membership-card p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 40px;
}

.membership-benefits {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
}

/* Секция CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Подвал */
footer {
    background-color: var(--section-bg);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(230, 57, 70, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-about p {
    color: var(--gray);
    margin-bottom: 20px;
}

.footer-links h3, .footer-social h3 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after, .footer-social h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    border-radius: 50%;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
}

.social-icon:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 14px;
}

/* Модальное окно для изображений */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 1100px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--card-bg);
        padding: 100px 30px 30px;
        transition: var(--transition);
        z-index: 1000;
        border-left: 1px solid rgba(230, 57, 70, 0.2);
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav .nav-link {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 18px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 18px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .gallery-masonry {
        grid-template-columns: 1fr;
    }

    .gallery-item-large, .gallery-item-medium {
        grid-column: span 1;
    }

    .membership-card {
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-btns {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-padding {
        padding: 60px 0;
    }
}