* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-margin-top: 80px
}
html {
    scroll-behavior: smooth;
    background-image: url(image/forest.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    
  }
body {
    font-family: 'Arial', sans-serif, system-ui, Inter;
    line-height: 1.6;
    color: #333;
}

/* ШАПКА */
.header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #acacac;
    padding: 20px 5%;
    position: fixed;     /* Вместо sticky */
    top: 0;
    left: 0;
    right: 0;
    width: 80%;
    margin: 0 auto;
    z-index: 1000;
    border-radius: 0 0 10px 10px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2c5aa0;
}

.phone {
    font-weight: bold;
    color: #2c5aa0;
}
@media (max-width: 1150px) {
    .phone{
        display: none;
    }
    .logo{
        display: none;
    }
}
@media (max-width: 890px) {
    .header{ 
        display: none};
}

/* ОСНОВНОЙ КОНТЕНТ */
.main-content {
    max-width: 1200px;
    margin: 7% auto 30px auto;
    padding: 0 20px;
    padding-bottom: 5px;
    z-index: 1000;
    background-color: white;
    border-radius: 20px;
}

/* ГЕРОЙ-СЕКЦИЯ */
.hero {
    display: flex;
    gap: 50px;
    padding: 80px 0;
    color: black;
    border-radius: 20px;
    margin: 30px 0;
    padding: 50px;
    position: relative;
    overflow: hidden; /* Важно! Чтобы .ground не вылезал за границы */
}

.hero-text h1 {
    font-size: 38px;
    margin-bottom: 20px;
}

.hero-text h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Прижимаем к правому краю */
    align-items: flex-end;
}

.placeholder-image {
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transform: scale(1);
}

.placeholder-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Адаптивность (по желанию) */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hero_div {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-image {
        display: none; /* Скрываем изображение */
    }
    
    .hero {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .hero-text h1 {
        font-size: 28px;
    }
    
    .hero-text h2 {
        font-size: 20px;
    }
    
    .hero_div {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-button {
        width: 100%;
        max-width: 200px;
    }
    .ground {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .hero-text h1 {
        font-size: 24px;
    }
    
    .hero-text p {
        font-size: 16px;
    }
}

/* О КОМПАНИИ */
.about {
    background-color: #e3f2fd;
    padding: 60px;
    border-radius: 20px;
    margin: 40px 0;
    text-align: center;
}

.about h1 {
    font-size: 36px;
    color: #1976d2;
    margin-bottom: 20px;
}
.about_div{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.about_div h2{
    margin-right: 20px;
}
.meaning_NKO{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 24px;
}
.meaning_NKO p {
    margin-bottom: 10px;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1024px) {
    .about {
        padding: 40px 30px;
    }
    
    .about h1 {
        font-size: 32px;
    }
    
    .about_div {
        gap: 20px;
    }
    
    .meaning_NKO {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .about {
        padding: 30px 20px;
        margin: 30px 0;
    }
    
    .about h1 {
        font-size: 28px;
    }
    
    .about_div {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .about_div h2 {
        text-align: center;
        white-space: normal;
    }
    
    .meaning_NKO {
        width: 100%;
        text-align: center;
    }
    
    .meaning_NKO p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .about h1 {
        font-size: 24px;
    }
    
    .about_div h2 {
        font-size: 20px;
    }
    
    .meaning_NKO {
        font-size: 16px;
        gap: 10px;
    }
    
    .meaning_NKO p {
        padding: 8px 12px;
        font-size: 14px;
    }
}


/* УСЛУГИ */

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.services {
    margin: 60px 0;
    text-align: center;
}

.services h2 {
    color: #333;
    margin-bottom: 40px;
    font-size: 36px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.service-card h3{
    margin-bottom: 20px;
}
.service-card p{
    margin-bottom: 5px;
}

.service-card:hover {
    transform: translateY(-10px);
}
/* Новости */
body {
    margin:0;
    padding:24px;
    background:var(--bg);
    color:#0f172a;
  }

  .news-grid {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap:18px;
    max-width:1100px;
    margin:20px auto;
  }
  .news-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:8px;
    transition:box-shadow .2s;
  }
  .news-card:hover { box-shadow:0 6px 16px rgba(0,0,0,0.12); }

  .news-card-title { font-size:15px; font-weight:600; margin:0; }
  .news-card-excerpt { font-size:13px; color:#444; margin:0 0 8px; }

  .btn {
    background:none; border:none;
    color:#2563eb;
    font-size:13px;
    cursor:pointer;
    display:inline-flex; align-items:center; gap:6px;
    padding:0; margin-top:auto;
  }
  .chev { transition:transform .3s; }

  /* === Popup === */
  .overlay {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    display:flex;
    justify-content:center;
    align-items:flex-start;
    padding:40px 20px;
    opacity:0;
    pointer-events:none;
    transition:opacity .3s;
    z-index:1000;
    overflow:auto;
  }
  .overlay.active {
    opacity:1;
    pointer-events:auto;
  }
  .popup {
    background:#fff;
    border-radius:12px;
    max-width:700px;
    width:100%;
    padding:24px;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
    animation:slideDown .35s ease;
  }
  @keyframes slideDown {
    from { transform:translateY(-30px); opacity:0; }
    to { transform:translateY(0); opacity:1; }
  }
  .popup h2 { margin-top:0; margin-bottom:20px; font-size:18px; }
  .popup p, .popup ul { font-size:14px; line-height:1.5; }
  .popup img{ width: 100%; height: auto; border-radius: 8px; margin: 12px auto; }
  .close-btn {
    background:none; border:none; cursor:pointer;
    font-size:20px; line-height:1;
    color:#555;
    position:absolute; top:20px; right:20px;
  }
/* ПРОЕКТЫ */
.pro-project{
    text-align: center;
}
.project{
    display: flex;
    gap: 50px;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    margin: 30px 0;
    padding: 50px;
}
.project-text h2 {
    font-size: 28px;
    margin-bottom: 40px;
}
.project-text p {
    font-size: 18px;
    margin-bottom: 20px;
}
.project_row{
    gap: 50px;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    margin: 30px 0;
    padding: 50px;
    display: flex;
    flex-direction: row;
}
.project-placeholder-image {
    width: 400px;
    height: 400px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: solid;
    border-color: black;
    border-width: 2px;
}
.project-buttons{
    display: flex;
    text-align: center;
    justify-content: center;
    flex-direction: column;
}
.btf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
  }
  
  .btf:hover {
    background-color: #0056b3;
  }

  .btf i {
    font-size: 32px;
    margin: 0;
    padding: 0;
  }
@media (max-width: 1024px) {
    .project {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
}

@media (max-width: 768px) {
    .project-image {
        display: none; /* Скрываем изображение */
    }
    
    .project {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .project-text h1 {
        font-size: 28px;
    }
    
    .project-text h2 {
        font-size: 20px;
    }
    
    .project_div {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
}

@media (max-width: 480px) {
    .project {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .project-text h1 {
        font-size: 24px;
    }
    
    .project-text p {
        font-size: 16px;
    }
}

/* ПАРТНЕРЫ */
.partner {
    margin: 60px 0;
    text-align: center;
}

.partner h2 {
    color: #333;
    margin-bottom: 40px;
}

.partner-grid {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    padding: 0 20px;
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    min-height: 350px; 
    width: 100%; 
    max-width: 350px;
    text-align: center;
}

.partner-card h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.4;
}

.partner-img {
    max-width: 100%;
    height: 150px;
    width: auto;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.partner-img-embl {
    max-width: 100%;
    height: 150px;
    width: auto;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    transform: scale(2);
    height: 100px;
    width: auto;
}

.partner-card:hover {
    transform: translateY(-10px);
}

@media (max-width: 1024px) {
    .partner-grid {
        gap: 15px;
    }
    
    .partner-card {
        min-height: 300px;
        padding: 25px;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .partner-grid {
        gap: 15px;
    }
    
    .partner-card {
        min-height: 280px;
        padding: 20px;
        max-width: 100%;
    }
    
    .partner-img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .partner {
        margin: 30px 0;
    }
    
    .partner h2 {
        margin-bottom: 20px;
        font-size: 24px;
    }
    
    .partner-grid {
        gap: 15px;
        padding: 0 10px;
    }
    
    .partner-card {
        min-height: 250px;
        padding: 15px;
    }
    
    .partner-card h3 {
        font-size: 14px;
    }
    
    .partner-img {
        height: 100px;
    }
}



/* КОНТАКТЫ */
.contacts {
    background-color: #4caf50;
    color: white;
    padding: 60px;
    border-radius: 20px;
    margin: 60px 0 30px 0; /* Убираем margin-top: auto */
    text-align: center;
}

.contacts h2 {
    margin-bottom: 30px;
}

.contact-info p {
    font-size: 18px;
    margin: 10px 0;
}
.VK{
    transition: transform 0.3s;
    width: 45px;
    height: 45px;
    margin: 0 auto;
}
.VK:hover {
    cursor: pointer;
    transform: translateY(-3px);
}

/* При клике */
/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .advantages {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}