/* Unified Nova City Styles - Based on Main Page */

/* CSS Variables - Same as main page */
:root {
    --primary-color: #1a5490;
    --secondary-color: #2c5282;
    --accent-color: #d4af37;
    --gold-color: #d4af37;
    --text-light: #ffffff;
    --text-dark: #2d3748;
    --bg-light: #f7fafc;
    --bg-dark: #1a365d;
    --gradient-primary: linear-gradient(135deg, #1a5490 0%, #2c5282 100%);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Высота хедера */
    --header-height: 80px;
    --header-height-mobile: 60px;
    --header-height-small: 50px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* Loading Indicator Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 84, 144, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Header Styles - Unified */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(26, 84, 144, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(26, 84, 144, 0.98);
    box-shadow: var(--shadow-medium);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "🏙️";
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list li {
    margin: 0;
    padding: 0;
    display: block;
    min-height: 0;
}

.nav-list li:empty {
    display: none;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

.nav-link.active {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Button Styles - Unified */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--text-dark);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--text-dark);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    opacity: 0.8;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border-left: 4px solid var(--accent-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer Styles - Unified */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

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

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

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

.infrastructure-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.infra-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.infra-card:nth-child(1) { animation-delay: 0.1s; }
.infra-card:nth-child(2) { animation-delay: 0.2s; }
.infra-card:nth-child(3) { animation-delay: 0.3s; }
.infrastructure-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.infra-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.infra-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.infra-card:hover::before {
    transform: scaleX(1);
}

.infra-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.infra-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.infra-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.infra-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.infra-card p {
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.infra-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-item {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Responsive Infrastructure Cards */
@media (min-width: 768px) {
    .infrastructure-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .infra-card {
        padding: 2rem;
    }
    
    .infra-icon {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .infra-card h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .infrastructure-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .infra-card {
        padding: 1.2rem;
        text-align: center;
    }
    
    .infra-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .infra-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .infra-card p {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .infra-details {
        justify-content: center;
    }
    
    .detail-item {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 767px) {
    .hero-stats {
        gap: 1rem;
        margin: 2rem auto;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Стили для hero изображения - уменьшение в два раза и центрирование */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0;
    max-width: 50%; /* Уменьшаем в два раза */
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    object-fit: cover;
}

/* Адаптивность для изображения */
@media (max-width: 767px) {
    .hero-image {
        max-width: 80%; /* На мобильных немного больше */
        margin: 1.5rem auto 0;
    }
}

/* Убираем артефакты от пустых элементов */
.nav-list li:empty,
.nav-menu li:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Убираем пробелы между inline-block элементами */
.nav-list {
    font-size: 0; /* Убираем пробелы между li */
}

.nav-list li {
    font-size: 16px; /* Восстанавливаем размер шрифта для содержимого */
}

/* Фикс для гибких элементов */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-list li {
    margin: 0;
    padding: 0;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .hero-image {
        max-width: 90%; /* На очень маленьких экранах почти на всю ширину */
    }
}