/* Обнуление */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior:smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: white;
    scroll-padding-top: 80px; /* Чтобы контент не перекрывался навигацией */
}

/* === ШАПКА САЙТА === */
.name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logoimg {
  height: 2.2rem;
}

.site-header {
  background-color: white;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.containerhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

/* Логотип */
.logoimg {
  height: 2.2rem;
  margin-right: 8px;
}

.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: black;
  white-space: nowrap;
}

.phone-link {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: black;
  transition: color 0.3s ease;
}

/* Навигация (desktop) */
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.nav a:hover {
    color: #007BFF;
}

/* Контакты (desktop) */
.header-contacts img {
  height: 2.2rem;
  transition: transform 0.3s ease;
}

.header-contacts img:hover {
    transform: scale(1.2);
}

.phone-link:hover {
    color: #007BFF;
}

/* Эффект при наведении */
.header-contacts p:hover {
    color: #007BFF; /* Синий акцент при наведении */
}

.icon-container a {
  margin-right: 8px;
}

.header-contacts img {
  height: 2.2rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.contact-row a {
  display: flex;
  align-items: center;
}


/* Бургер-кнопка */
.burger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

/* === Мобильная версия === */
@media (max-width: 768px) {
  .burger {
    display: block;
    margin-left: auto;
  }

  .nav,
  .header-contacts {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: white;
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid #ccc;
  }

  .nav.active,
  .header-contacts.active {
    display: flex;
  }

  .nav a,
  .phone-link {
    padding: 5px 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logoimg {
    height: 2rem;
  }

  .phone-link {
    font-size: 0.95rem;
  }
}

/* Hero Section */
.hero {
    padding-top: 5.5vh;
    padding-bottom: 5vh;
    background-color: white;
    display: flex;
    flex-wrap: nowrap; /* Не позволяем перенос */
    position: relative;
    min-height: 55vh;
    overflow: hidden;
}

.text-hero {
    z-index: 2; /* поверх картинки */
    background-color: #0c1530;
    color: white;
    padding: 40px 5vw;
    width: 50%;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92vh;
    box-sizing: border-box; /* Важно! */
    position: relative; /* обязательно, чтобы z-index работал */
}

.image-block {
    width: 60%; /* немного больше, чтобы подлезла под текст */
    margin-left: -10%; /* картинка "залезает" под текст */
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    z-index: 1; /* ниже текста */
}

.slash {
    font-weight: bold;
    font-size: 40px;
    color: red;
    margin: 0;
    line-height: 1;
}

.text-hero h1 {
    font-size: 42px;
    font-weight: bold;
    margin-top: -30px;
    margin-left: 10px;
    line-height: 1.4;
}

.image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
    }

    .text-hero {
        width: 100%;
        padding: 40px 20px;
        clip-path: none;
        min-height: auto;

        /* Убираем правый отступ */
    }

    .text-hero h1 {
        font-size: 24px;
        padding-right: 0;
    }

    .slash {
        font-size: 30px;
    }

    .image-block {
        width: 110%;
        min-height: 300px;
        /* display: none; */
    }
}
/* Разделы */
section {
    padding: 60px 0px;
}
section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* О компании */
.about, .facts {
    background-color: #fff;
}

/* Преимущества */
.advantages ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.advantages li {
    background: #e9ecef;
    padding: 15px;
    border-radius: 5px;
}

/* Контакты */
.contacts {
    background-color: #f1f1f1;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    animation: bounce 2s infinite;
    transition: opacity 0.3s;
}

.scroll-down:hover {
    opacity: 0.8;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}

/* === О КОМПАНИИ === */
.about {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 30px;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas: 
        "section-title section-title"
        "about-section1 about-section2"
        "about-section1 building-container" /* Продолжение текста слева, изображение справа */
        "header-clients header-clients"
        "partners partners";
    gap: 20px;
    align-items: start;
    width: 90%;
    max-width: 1220px;
    margin: 0 auto;
}

.building-container {
    grid-area: building-container;
    margin-top: -30px; /* Поднимаем изображение вверх */
    padding-left: 20px;
    align-self: start; /* Выравнивание по верху */
}

.building-container img {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
}

.about-section:nth-of-type(1) {
    align-items: start;
    grid-area: about-section1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
}

/* Изменения для второго about-section */
.about-section:nth-of-type(2) {
    grid-area: about-section2;
    display: grid;
    grid-template-columns: auto; /* Только одна колонка для иконки и текста */
    gap: 10px;
    align-items: start;
}

.header-clients {
    grid-area: header-clients;
    align-self: start;
}

.icon-container {
    align-self: start;
    gap: 8px;
}

.icon {
    max-width: 50px;
    height: auto;
}

.text-block {
    align-self: start;
    max-width: 100%;
}

.partners {
    grid-area: partners;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: center;
}

.partner-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    background-color: #f0f0f0;
    padding: 40px;
    border-radius: 8px;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.text-block span {
    color: blue;
}

/* Цифры и факты */
.stats-section {
    background-color: white;
}

.section-title {
    font-size: 2.2rem;
    position: relative;
    grid-area: section-title;
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}


.section-title::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;   
    transform: translateY(-50%);
    width: 5px;
    height: 100%;
    background-color: #e74c3c;
}

.stats-grid {
    align-items: start;
    grid-template-columns: 1fr 1fr 1.2fr;
    width: 90%;
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-areas: 
        "section-title section-title section-title"
        "fact1 fact2 licenses-section"
        "fact3 fact4 licenses-section"
        "fact5 fact6 licenses-section";
    gap: 30px;
    margin-bottom: 50px;
    grid-template-rows: auto auto auto;
}

.stat-item:nth-of-type(1) {
    grid-area: fact1;
}

.stat-item:nth-of-type(2) {
    grid-area: fact2;
}

.stat-item:nth-of-type(3) {
    grid-area: fact3;
}

.stat-item:nth-of-type(4) {
    grid-area: fact4;
}

.stat-item:nth-of-type(5) {

    grid-area: fact5;
}

.stat-item:nth-of-type(6) {
    grid-area: fact6;
}

.stat-item {
    /* background-color: #f0f0f0; */
    padding: 10px;
    /* border-radius: 8px; */
    /* box-shadow: 0 5px 15px rgba(0,0,0,0.05); */
    display: grid;
    grid-template-areas:
        "stat-icon stat-number"
        ". stat-description";
    grid-template-columns: 0.1fr 1fr;
    gap: 0px 5px;
    align-items: start;
    max-height: 0px;
}

.stat-item .icon-container {
    grid-area: stat-icon;
    margin-top: 18px;
    margin-right: 0px;
}

.stat-item .icon-container img {
    width: 900px;
}

.stat-number {
    text-align: left;
    grid-area: stat-number;
    font-size: 3.5rem;
    /* font-weight: 700; */
    color: #194f9a;
    margin-bottom: 0px;
}

.stat-description {
    grid-area: stat-description;
    margin-top: -15px;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.7;
    /* color: #555; */
}

.licenses-section {
    grid-area: licenses-section;
    background-color: #edf0fa;
    display: grid;
    grid-template-areas: 
        "license-icon1 license-title"
        "license-icon2 license-item1"
        "license-icon3 license-item2";
    grid-template-columns: 50px 1fr;
    gap: 0 20px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.licenses-section .icon-container:nth-of-type(1) {
    grid-area: license-icon1;
    
}

.icon-container2 {
    grid-area: license-icon2;
}

.licenses-section3 {
    grid-area: license-icon3;
}

.licenses-section .icon-container2 img, .licenses-section .icon-container3 img {
    width: 70%;
}

.licenses-title {
    grid-area: license-title;
    font-size: 1.7rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: #21559e;
}

.license-item {
    margin-bottom: 25px;
    margin-left: -10px;
    padding-left: 10px;
    border-left: 3px solid #e74c3c;
}

.license-item:nth-of-type(1) {
    grid-area: license-item1;
}

.license-item:nth-of-type(2) {
    grid-area: license-item2;
}

.license-item:last-child {
    margin-bottom: 0;
}

.license-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.license-details {
    color: #666;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr; /* одна колонка */
        grid-template-areas:
            "section-title"
            "fact1"
            "fact2"
            "fact3"
            "fact4"
            "fact5"
            "fact6"
            "licenses-section";
        gap: 20px;
    }

    .stat-item {
        grid-template-areas:
            "stat-icon stat-number"
            "stat-description stat-description";
        grid-template-columns: 40px 1fr; /* иконка и текст */
        max-height: none; /* чтобы не обрезать */
    }

    .stat-item .icon-container img {
        width: 40px; /* уменьшить иконки */
        height: auto;
    }

    .stat-number {
        font-size: 2rem; /* уменьшить цифры */
    }

    .stat-description {
        margin-top: 5px;
        font-size: 1rem;
        line-height: 1.4;
    }

    .licenses-section {
        grid-template-columns: 40px 1fr;
        grid-template-areas:
            "license-icon1 license-title"
            "license-icon2 license-item1"
            "license-icon3 license-item2";
        padding: 20px;
    }

    .licenses-section .icon-container img,
    .icon-container2 img,
    .icon-container3 img {
        width: 30px; /* иконки в лицензиях тоже меньше */
    }

    .licenses-title {
        font-size: 1.3rem;
    }
}

.activity-title {
    font-size: 2.2rem;
    position: relative;
    text-align: left;
}

.activity-title::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;   
    transform: translateY(-50%);
    width: 5px;
    height: 100%;
    background-color: #e74c3c;
}

/* Направления работ */
.services-section {
    background-color: #ffffff;
    max-width: 1220px;
    margin: 0 auto; /* ЭТО центрирует блок */
    padding: 0 10px;
    padding-bottom: 100px;
}


.services-grid {
justify-items: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 10px;
}


.service-card {
    padding: 20px;
    background: 
        linear-gradient(#edf0fa, #fafafa);
    border-radius: 5%;
    /* display: grid;
    grid-template-rows: 100px, 600px, 100px; */
}

.service-card h3 {
    color: #194f9a;
    font-size: 24px;
    padding: 10px 0px;
}

.service-icon {
    height: 70px;
}

.service-image img {
    width: 400px;
    margin-left: -20px;
}

@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }


    .service-card {
        width: 100%; /* карточка занимает всю ширину контейнера */
        max-width: 700px; /* максимум, чтобы не растягивалась слишком */
        padding: 15px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .service-icon {
        height: 50px; /* чуть меньше иконки */
        margin-bottom: 10px;
    }

    .service-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .service-card p {
        font-size: 14px;
        line-height: 1.4;
    }

    .service-image img {
        width: 100%; /* картинка адаптивная */
        margin-left: 0; /* убрать отступ */
        border-radius: 10px;
        margin-top: 20px;
        max-width: 700px;
    }
}

/* Примеры работ */
.portfolio {
    max-width: 1220px;
    background-color: #ffffff;
    justify-content: center;
    margin: 0 auto; /* <== добавь это для центрирования */
    padding: 0 20px; /* отступы, чтобы контент не прилипал к краю экрана */
    box-sizing: border-box;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr)); /* адаптивная ширина */
    gap: 20px;
}


.project-card {
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
}

.portfolio-grid > .project-card:first-of-type {
    grid-column: span 3;
    
}

.project-card:hover {
    transform: translateY(-5px);
}

.hidden-projects {
  display: none;
}

.hidden-projects.show {
  display: contents;
}

.show-more-btn {
    margin: 30px auto;
    display: block;
    padding: 12px 25px;
    font-size: 16px;
    background-color: #21559e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    grid-column: span 3;
}

.show-more-btn:hover {
  background-color: #183d74;
}


.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-card h3 {
    margin: 15px 10px 5px;
    font-size: 1.2rem;
}

.project-card p {
    margin: 0 0 15px;
    color: #666;
}

@media (max-width: 767px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px; /* добавить отступы по краям, чтобы не было впритык к краю экрана */
    }

    .portfolio-grid > .project-card:first-of-type {
        grid-column: auto;
    }

    .project-card {
        width: 100%; /* занять всю ширину */
        max-width: none; /* убрать ограничение */
        margin: 0; /* убрать авто-отступы */
    }

    .project-card img {
        object-position: right;
        height: 180px;
        width: 100%;
        object-fit: cover;
    }

    .project-card h3 {
        font-size: 1.1rem;
        margin: 12px 0 5px;
    }

    .project-card p {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .show-more-btn {
        grid-column: auto;
        width: 100%;
        margin: 20px 10px;
        padding: 12px 20px;
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: 1% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.modal h3 {
    font-size: 28px;
    color: #1e1e1e;
    text-align: center;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-slider {
    border-radius: 12px;
    overflow: hidden;
    height: 360px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slider-track img {
    width: 100%;
    flex-shrink: 0;
    object-fit:fill;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: #21559e;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    border-radius: 50%;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}


.modal-info {
    align-items: start;
    margin-top: 50px;
    text-align: left;
    font-size: 18px;
    gap: 20px 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: 
    "icon1 info1"
    "icon2 info2";
}

.modal-info img {
    width: 36px;
    margin-top: 4px;
}

.modal-info .where {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #21559e;
    font-weight: 500;
}

.modal-info img:nth-child(1) {
    grid-area: icon1;
}

.modal-info .whatdoing-title {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.modal-info .whatdoing {
    margin-top: -5px;
    margin-bottom: 10px;
}


.modal-info img:nth-child(2) {
    grid-area: icon2;
}

.modal-info ul {
    margin-left: 2px;
    padding-left: 20px;
}

.modal-info li::marker {
    color: red;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.modal .close:hover {
    color: #000;
}

.modal-content {
    animation: fadeInUp 0.4s ease forwards;
}

.contacts {
  padding: 60px 0;
max-width: 1220px;
    justify-content: center;
    margin: 0 auto; /* <== добавь это для центрирования */
    padding: 0 20px; /* отступы, чтобы контент не прилипал к краю экрана */
    background-color: white;
}

.contacts .container {
  margin: 0 auto;
  padding: 0 20px;
}



.contacts-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  margin: 10px 0;
}

.contacts-text a {
  color: #007B9E;
  text-decoration: none;
}

.contacts-text a:hover {
  text-decoration: underline;
}

/* Футер */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    height: 50px;
}

@media (max-width: 767px) {
  .contacts-text p {
    font-size: 1rem;      /* чуть меньше размер шрифта */
    line-height: 1.4;
    margin: 8px 0;
  }

  .contacts-text a {
    font-size: 1rem;
    word-break: break-word; /* чтобы телефон или email не ломались */
  }

  .container {
    padding: 0 15px; /* отступы по бокам */
  }

  footer {
    padding: 15px 10px;
    height: auto; /* чтобы футер подстраивался под контент */
    font-size: 0.9rem;
  }
}


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