* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
a{
    text-decoration: none;
}
body {
    background: #0B0E19;
    color: #f9fafb;
}

/* ===== NAVBAR ===== */
nav {
    background: #121826;
    border-bottom: 1px solid #1f2937;
    padding: 18px 40px;

    position: sticky; /* Делает элемент "липким" */
    top: 0;           /* Прижимает к самому верху экрана */
    z-index: 1000;    /* Чтобы меню было поверх остальных элементов */
}

/* Container */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}


.sitename{
    font-size: x-large;
    font-weight: 800;
    color: #4E80EE;
}
/* ===== MENU DESKTOP ===== */
.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    color: #f9fafb;
    transition: 0.3s;
    padding-bottom: 5px;
}

.nav-links a:hover {
    border-bottom: 2px solid #1f2937;
    color: #4E80EE;
}

.nav-links a.active {
    border-bottom: 2px solid #1f2937;
    color: #4E80EE;
}

/* ===== BURGER ===== */
.burger {
    display: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.burger span {
    position: absolute;
    height: 2px;
    width: 100%;
    background: #f9fafb;
    transition: 0.4s;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 9px; }
.burger span:nth-child(3) { top: 18px; }

/* Animation X */
.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}



.text{
    display: flex;
    justify-self: center;
    flex-direction: column;
    text-align: center;
    justify-self: center;
    align-items: center;
    margin: 10vh auto;
    width: 70%;
}
.contacter{
    font-size: 4rem;
    margin-bottom: 20px;
}
.info{
    font-size: 1.3rem;
    color: #b2b2b3;
}


/* ===== CARDS ===== */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    justify-self: center;
    justify-content: center;
    gap: 40px;
    margin-top: 5vh;
}

/* .card {
    width: 80vw;
    height: 70vh;
    background: #1f2937;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
} */
/* Контейнер для сетки */
.grid-container {
    display: grid;
    grid-template-columns: 1fr; /* Одна колонка = столбик */
    gap: 50px;                  /* Расстояние между карточками */
    max-width: 80vw;           /* Ограничиваем общую ширину */
    margin: 0 auto;             /* Центрируем на странице */
}

/* Сама карточка (немного подправим для адаптивности) */
.card {
    background-color: #121a2d;
    border: 1px solid #1e2a44;
    border-radius: 16px;
    padding: 32px;
    color: white;
}

.card:hover {
    border-color: #4E80EE;
    transition: 0.3s;
}

.card-top {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.image-container {
    flex: 4;
    
}

.image-container img {
    width: 40vw;
    height: 35vh;
    border-radius: 12px;
    display: block;
    object-fit: cover;
}

.features {
    flex: 6;
}

.features h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #a0aabf;
    font-size: 1rem;
    line-height: 1.5rem;
}

/* Синие кружочки */
.features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background-color: #4E80EE;
    border-radius: 50%;
}

.card-bottom {
    max-width: 50%;
}

.icon {
    font-size: 32px;
    color: #4E80EE;
    margin-bottom: 15px;
}

.card-bottom h2 {
    font-size: 2rem;
    margin: 10px 0;
}

.card-bottom p {
    color: #a0aabf;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

.cta {
    color: #4E80EE;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: opacity 0.2s;
}

.cta:hover {
    opacity: 0.8;
}




/* SECOND ROW */


/* CONTENT AFTER BACKGROUND*/
.content {
    height: 200px;
    margin: 100px 0 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}



.first-row{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-content: center;
}
.block{
    background-color: #1B1F33;
    height: 150px;
    margin: 0 3vw 0 3vw;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid transparent;
    transition: 0.3s ease;
}
.block:hover{
    transform: scale(1.05);
    border: 2px solid #4E80EE;
}
.block h1{
    color: #4E80EE;
    margin-bottom: 10px;
    font-size: 3rem;
}





/* =======  SECOND ROW  =========*/
.second-row{
    background-color: #121826;
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    padding: 20px 15px;
    justify-content: center;
    justify-items: center;
}
.second-text{
    text-align: center;
    height: 20%;
    width: 97%;
    margin-bottom: 100px;
}
.services-title{
    font-size: 2.9rem;
    padding-top: 20px;
    margin-bottom: 20px;
}
.services{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 3vw 10vh 3vw;
    width: 95%;
    height: auto;
    gap: 30px;
    justify-content: center;
}
.block-second{
    background-color: #1B1F33;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    justify-content: center;
    text-align: center;
    border: 2px solid transparent;
    transition: 0.3s ease;
}
.block-second:hover{
    transform: scale(1.05);
    border: 2px solid #4E80EE;
}
h3{
    margin-top: 20px;
    margin-bottom: 10px;
}

.description{
    color: rgb(156, 163, 175);
    font-size: 1rem;
    line-height: 1.5rem;
}




/*      LAST ROW        */


.last-row{
    height: 50vh;
    margin-bottom: 100px;
    /* Добавляем Flexbox */
    display: flex;
    flex-direction: column; /* Элементы будут друг под другом */
    align-items: center;    /* Центрирование по горизонтали */
    justify-content: center; /* Центрирование по вертикали */
    
    /* Текст внутри тоже должен быть отцентрован */
    text-align: center;
}
.last-button{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: larger;
    font-weight: 700;
    background-color: #4E80EE;
    color: #f9fafb;
    border: none;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    height: 10vh;
    cursor: pointer;
}
.last-button:hover{
    opacity: 0.8;
    transition: 0.3s;
}
.last-text{
    margin-top: 20px;
    margin-bottom: 40px;
    color: rgb(156, 163, 175);
    font-size: 1.3rem;
}
.last-titre{
    font-size: 3rem;
    font-weight: 800;
}






/* =======  FOOTER  ========*/
.footer {
    margin-top: 0;
    background: linear-gradient(180deg, #0c1b2e 0%, #071426 100%);
    color: #a8b3c2;
    padding: 60px 80px 30px;

}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 220px;
}

.logotype {
    color: #4E80EE;
    font-size: 28px;
    margin-bottom: 20px;
}

.footer h3 {
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 20px;
}

.footer p {
    margin: 8px 0;
    line-height: 1.6;
}

.phone {
    color: #4E80EE;
    text-decoration: none;
    font-size: 20px;
}

.phone:hover {
    text-decoration: underline;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 50px 0 30px;
}

.footer-bottom {
    text-align: center;
    color: #7c8aa0;
    font-size: 16px;
}


/* ===== MOBILE ===== */
@media (max-width: 768px) {

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 260px;
    background: #121826;
    border-left: 1px solid #1f2937;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: 0.4s ease;
    transform: none;
    left: auto;
}

.nav-links.active {
    right: 0;
}

.burger {
    display: block;
}

.grid-container{
    max-width: 92vw;
}

.text{
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-self: center;
    align-self: center;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    max-width: 600px;
    width: 90%;
    padding: 0 10px;
}
.contacter{
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 20px;
}
.info{
    font-size: 1.1rem;
    color: #b2b2b3;
}



/* Главный фокус здесь: заставляем карточку игнорировать промежуточные div */
.card {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

/* Эти два правила заставляют браузер считать детей card-top и card-bottom 
    прямыми детьми самой .card. Тогда свойство order сработает правильно! */
.card-top, .card-bottom {
    display: contents; 
}

/* Теперь расставляем порядок элементов */
.image-container {
    order: 1; /* 1. Картинка в самом верху */
    margin-bottom: 25px;
}

.image-container img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Иконка, заголовок и описание из card-bottom */
.card-bottom svg {
    order: 2; /* 2. Иконка под картинкой */
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.card-bottom h2 {
    order: 3; /* 3. Заголовок */
    font-size: 1.8rem;
    margin: 10px 0;
}

.card-bottom p {
    order: 4; /* 4. Описание */
    max-width: 100%;
    margin-bottom: 20px;
}

.cta {
    order: 5; /* 5. Ссылка "Demander un devis" */
    margin-bottom: 30px;
}

/* Список преимуществ из card-top */
.features {
    order: 6; /* 6. Список уходит в самый низ */
    border-top: 1px solid rgba(255,255,255,0.1); /* Небольшой разделитель для красоты */
    padding-top: 20px;
}

.features h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Исправляем размер кружочков, чтобы они не были на пол-экрана */
.features li::before {
    width: 10px;
    height: 10px;
    top: 8px;
    transform: none;
}





/*   SECOND    */

.services {
    grid-template-columns: 1fr; /* block-second тоже в столбик */
    gap: 20px;
}

.second-row {
    height: auto; /* убрать фиксированную высоту */
    padding: 0;
}




.last-row{
    text-align: center;
    
}
.last-titre{
    font-size: 3rem;
    width: 90%;
}
.last-text{
    width: 90%;
}

/* FOOTER */
.footer {
    margin-top: 0;
    color: #a8b3c2;
    padding: 20px;

}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}




.phone {
    font-size: 1.1rem;
}


.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px 0 30px;
}

.footer-bottom {
    text-align: center;
}
}