/* Базовые сбросы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Шапка - темная */
header {
    background: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #ccc;
}

/* Основной контент - секции чередуются */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Темные секции */
.section-dark {
    background: #2a2a2a;
    color: #fff;
}

.section-dark h2 {
    color: #fff;
}

.section-dark .stat-item {
    background: #333;
    color: #fff;
}

.section-dark .stat-label {
    color: #ccc;
}

.section-dark .client-item {
    background: #333;
}

/* Светлые секции */
.section-light {
    background: #fff;
    color: #333;
}

.section-light h2 {
    color: #333;
}

.section-light .stat-item {
    background: #f5f5f5;
}

/* Герой-секция (первая - темная) с фоновым изображением */
.hero {
    position: relative;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/city-702522_960_720.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-static-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: #fff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.slider-container {
    margin-top: 2rem;
}

.slide {
    display: none;
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide.active {
    display: block;
    animation: fadeIn 1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slider-dots {
    margin-top: 2rem;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
}

/* Заголовки секций */
h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
}

/* Счетчики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: #999;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    line-height: 1.4;
}

.stats-row-2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Секция тендеров (темная) с фоновым изображением */
#tenders.section-dark {
    position: relative;
    background-color: #2a2a2a;
    overflow: hidden;
}

#tenders.section-dark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/tender-1024x682.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
}

#tenders.section-dark .container {
    position: relative;
    z-index: 2;
}

.tenders-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

.tenders-content p {
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.tenders-email {
    display: inline-block;
    padding: 1rem 2rem;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.tenders-email:hover {
    background: #555;
}

/* Клиенты (светлая секция) — все логотипы одного размера */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    align-items: center;
}

.client-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.client-item img {
    width: 160px;
    height: 100px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s;
    display: block;
}

.client-item:hover img {
    filter: grayscale(0);
}

/* Контакты (темная секция) с картой */
#contact.section-dark {
    position: relative;
    background-color: #2a2a2a;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ccc;
}

/* Стили для карты */
.map-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    border: 2px solid #444;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: none;
}

/* Футер - темный */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info img {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
    display: block;
}

.footer-info p {
    color: #ccc;
}

.footer-contacts p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
}

/* Кнопка наверх */
.to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.to-top:hover {
    background: #555;
}

/* Адаптивность */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .stats-grid,
    .stats-row-2,
    .clients-grid,
    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slide {
        font-size: 2rem;
    }
    
    .hero-static-text {
        font-size: 1rem;
    }
    
    .hero {
        min-height: 500px;
        padding: 3rem 1rem;
    }
    
    .map-container iframe {
        min-height: 300px;
    }
}