/* ============================================
   LAYOUT.CSS - Структура страницы, сетка, контейнеры
   ============================================ */

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-navbar);
    transition: all 0.3s ease;
}

@supports not (backdrop-filter: blur(10px)) {
    .navbar {
        background: rgba(255, 255, 255, 0.98);
    }
    
    [data-theme="dark"] .navbar {
        background: rgba(15, 23, 42, 0.98);
    }
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
}

.nav-container {
    width: 100%;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
}

.nav-logo {
    margin-left: 0;
    padding-right: 2.5rem;
}

.nav-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    padding-top: 0.1rem;
    margin: 0;
    transition: color 0.3s ease;
}

.nav-logo a,
.nav-logo a:focus,
.nav-logo a:active {
    outline: none;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
}

.nav-menu {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 4rem;
    margin-left: 8rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    padding-bottom: 0.3rem;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.nav-link:focus,
.nav-link:active {
    outline: none;
    box-shadow: none;
}

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

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 0;
    margin-left: 2.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--spacing-2xl) 0;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    opacity: 0;
    animation: none;
    will-change: auto;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.hero-text {
    animation: fadeInUp 1.2s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    animation: titleFadeInUp 1s ease-out;
}

.hero-title .title-line {
    display: block;
    animation: slideInFromLeft 0.8s ease-out both;
    will-change: transform, opacity;
    backface-visibility: hidden;
    color: #000000;
    transition: color 0.3s ease;
}

.hero-title .title-line:nth-child(2) {
    animation-delay: 0.15s;
    color: var(--accent-color);
}

[data-theme="dark"] .hero-title .title-line {
    color: #FFFFFF;
}

[data-theme="dark"] .hero-title .title-line:nth-child(2) {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 1.2s ease-out 0.4s both;
    transition: color 0.3s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease-out 0.6s both;
}

.hero-image {
    animation: fadeInRight 0.6s ease-out 0.4s both;
    width: 100%;
    max-width: 100%;
}

/* Desktop: text first (left), image second (right) */
@media (min-width: 769px) {
    .hero-content {
        display: grid;
    }
    
    .hero-image {
        order: 2;
    }
    
    .hero-text {
        order: 1;
    }
}

/* ===== SECTIONS ===== */
section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

/* ===== GRID LAYOUTS ===== */
.links-grid,
.social-grid,
.news-grid,
.gallery-grid {
    display: grid;
    gap: var(--spacing-lg);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes titleFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

