* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    border: none;
    background: transparent;
    color: #667eea; /* Сделать неактивную кнопку синим */
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: white;
    color: #667eea;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
}

.lang-btn:not(.active):hover {
    background: rgba(102,126,234,0.08);
    color: #4953a6;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cta-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f8f9fa;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.about p {
    text-align: center;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: #666;
}

.skills {
    text-align: center;
}

.skill-tag {
    display: inline-block;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 500;
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
}

.portfolio h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

/* Project Cards - ИСПРАВЛЕННЫЕ СТИЛИ */
.project-card {
    display: flex;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 4rem 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    min-height: 500px; /* Минимальная высота для карточки */
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    flex: 1;
    position: relative;
    min-height: 500px; /* Фиксированная высота для изображения */
    overflow: hidden;
    background: #f8f9fa; /* Фон на случай если изображение не загрузится */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Изменено с cover на contain чтобы все изображение было видно */
    object-position: center;
    background: white; /* Белый фон вокруг изображения */
    padding: 10px; /* Отступ вокруг изображения */
}

.commercial-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.project-info {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px; /* Такая же высота как у изображения */
}

.project-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.project-subtitle {
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.project-features {
    margin: 1.5rem 0;
}

.project-features h4 {
    margin-bottom: 1rem;
    color: #333;
}

.project-features ul {
    list-style: none;
}

.project-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.project-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.tech-stack {
    margin: 1.5rem 0;
}

.tech-stack span {
    display: inline-block;
    background: #e9ecef;
    padding: 8px 15px;
    border-radius: 20px;
    margin: 5px 5px 5px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-card {
    display: flex;
    flex-direction: column; /* фото над текстом */
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin: 3rem 0;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.project-image {
	width: 100%;
	position: relative;
	overflow: hidden;
	background: #f8f9fa;
	/* гарантируем приятное соотношение сторон для изображений */
	aspect-ratio: 16 / 9;
}


.btn {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-right: 10px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #007bff;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Стили для архитектуры и планов */
.project-architecture, .future-plans {
    margin: 1.5rem 0;
}

.project-architecture h4, .future-plans h4 {
    margin-bottom: 1rem;
    color: #333;
}

.project-architecture ul, .future-plans ul {
    list-style: none;
}

.project-architecture li, .future-plans li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.2rem;
}

.project-architecture li:before {
    content: "⚡";
    position: absolute;
    left: 0;
}

.future-plans li:before {
    content: "🔄";
    position: absolute;
    left: 0;
}

.project-status {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.status-progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.commercial-notice {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #fff3cd;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #ffeaa7;
}

.project-grade {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #e8f5e9;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.performance-metrics {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.performance-metrics h4 {
    margin-bottom: 1.2rem;
    text-align: center;
    color: #333;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.3rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
}

.project-update {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #e3f2fd;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #90caf9;
    color: #1976d2;
}

/* Адаптивность для метрик */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
}

/* Contacts Section */
.contacts {
    background: #333;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.contacts h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #667eea;
}

/* Модальное окно - ОБНОВЛЕННОЕ */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 95%;
    max-height: 95%;
    overflow: auto;
    position: relative;
    padding: 2rem;
    transform: scale(0.7);
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    background: none;
    border: none;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ff6b6b;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
}

/* Галерея в модальном окне - ОБНОВЛЕННАЯ */
.demo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.demo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Чтобы все изображение было видно */
    object-position: center;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 5px;
}

.demo-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.demo-description {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Модальное окно для полноразмерного изображения */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .project-image {
        min-height: 300px;
        flex: none;
    }
    
    .project-info {
        min-height: auto;
        padding: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        max-width: 98%;
        max-height: 98%;
        padding: 1rem;
    }
    
    .demo-gallery {
        grid-template-columns: 1fr;
    }
    
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
}