html {
  scroll-behavior: smooth;
}
:root {
--main-font: "Ubuntu", sans-serif;

--main-color: #DA552D;
--accent-color: rgb(244, 45, 4);
--dark-color: #19191B; 
}

body {
    font-family: var(--main-font);
    background-color: var(--dark-color);
}

/*MAIN PAGE*/

.main_page {
    background: 
	linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),url("/images/background.jpg") ;
    background-repeat: no-repeat;
    background-size: 100% auto;
    height: 1024px;
    background-attachment:fixed;
    display: block;
}
header {
    height: 100px;
    display: flex;
    justify-content: space-between;
    margin: auto 50px;
    align-items: center;
}
.logo {
    text-decoration: none;
    background-image: url("/images/logoPC.png");
    width: 300px;
    height: 35px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    /*<img class="logo" src="images/logoPC.svg" alt="logo">*/
}
.logo:hover{
    opacity: 0.8;
}
.head_telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    gap: 20px;
    height: 60px;
    width: 100%; /* Добавлено */
    max-width: 400px; /* Добавлено */
    /*background-color: transparent;*/
    border-radius: 1.5px;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
}
.head_telegram:hover{
    /*background-color: rgb(244, 45, 4, 0.5);*/
    background-color: var(--main-color);
    border-color: var(--main-color);
}
.telegram_link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    gap: 20px;
    height: 60px;
    width: 100%; /* Добавлено */
    max-width: 400px; /* Добавлено */
    /*background-color: transparent;*/
    border-radius: 1.5px;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
}
.telegram_link:hover{
    /*background-color: rgb(244, 45, 4, 0.5);*/
    background-color: var(--main-color);
    border-color: var(--main-color);
}
.main_container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    padding: 50px 50px
}
.main_text{
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.main_h1 {
    color: white;
    text-transform: uppercase;
    line-height: 150%;
    font-size: 40px;
    margin: 0 0;
}
.main_h2 {
    color: white;
    font-size: 32px;
    margin: 0 0;
}
.rocket_button {
    height: 60px;
    width: 100%; /* Добавлено */
    max-width: 400px; /* Добавлено */
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: var(--main-color);
    border: 2px solid var(--main-color);
    font-weight: bold;
    border-radius: 8px; 
    color: white;
}
.rocket_button:hover {
border: 2px solid var(--accent-color);
/*background-color: transparent;*/
background-color: rgba(0, 0, 0, 0.5);;
color: var(--accent-color);
cursor: pointer;
}
.marker {
    background-color: var(--main-color);
}

/*STEPS PAGE*/

main {
    background-color: var(--dark-color);
}
.steps_header {
    max-width: 1100px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    text-transform: uppercase;
}
.steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 40px;
justify-items: center;
}
.step {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px; /* Ограничиваем ширину всего шага */
    width: 100%; /* Добавляем для адаптивности */
    /*background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;*/
}
.step_discription {
    width: 100%;
    display: flex;
    flex-direction: row;
    /*align-items:start;*/
    gap: 20px;
    /*justify-content: center;*/
}
.steps_img {
    max-width: 500px;
    max-height: 500px;
    width: 100%;
    border-radius: 10px; 
    object-fit: cover;
}
.steps_h3 {
    color: white;
    margin: 0 0;
    font-size: 20px;
    width: 100%; /* Занимает всю доступную ширину */
    max-width: 100%; /* Не может быть шире родителя */
    word-wrap: break-word; /* Перенос длинных слов */
}
.step_number {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.middle {
    display: flex;
    flex-direction: row;
    justify-content: center;
    text-align: center;
}

/* CASES PAGE */
.cases {
    background-color: var(--dark-color);
    min-height: 870px;
    width: 100%;
    padding: 40px 0;
}

.cases_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Исправленные стили для анимированной карточки */
.flip-card {
    perspective: 1000px;
    width: 280px; /* Фиксированная ширина */
    height: 280px; /* Фиксированная высота */
    border-radius: 10px;
    margin: 0 auto; /* Центрирование */
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.flip-card-front {
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--main-color), #FFE1B2);
    color: white;
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.flip-card-back h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: black;
}

.flip-card-back p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: black;
}
.link_partner {
    color: black;
    font-weight: bold;
}


/* FORM */
.consultation-form {
    background-color: #262626;
    padding: 50px 20px;
    display: flex;
    justify-content: center;
}

.form_container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.steps_h2 {
    color: white;
    text-align: center;
    font-size: 24px;
    line-height: 1.3;
    margin: 0;
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.1);
    color: white;
}

.form-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 10px;
}

.action-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.checkbox-group {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
}
/* Стилизация чекбокса */
.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--main-color);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--main-color);
}

/* Стилизация галочки */
.checkbox-group input[type="checkbox"]:checked::before {
    content: "✓";
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* FOOTER */

footer {
    background-color: var(--dark-color);
    max-height: 338px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}




/* Адаптивные настройки */
@media (max-width: 425px) {
.head_telegram {
    max-width: 200px;
    padding-left: 10px;
}
.main_h1 {
    font-size: 18px;
    }
.main_h2 {
    font-size: 16px;
    }
.steps_h2 {
    font-size: 16px;
    }  
.rocket_button {
    font-size: 14px;
}
.telegram_link {
    font-size: 14px;
}
}
@media (max-width: 768px) {
    .main_page {
    background-color: var(--dark-color);
    height: 600px;
    }
    header {
    margin: auto 20px;
     }
    .main_container {
        column-gap: 20px;
        padding: 20px 20px;
    }
    .logo{
    background-image: url("/images/logoMob.png");
    width: 50px;
    height: 50px;
    }
    .steps {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    .cases_grid {
        grid-template-columns: repeat(1, minmax(240px, 1fr));
        column-gap: 20px;
    }
    .flip-card {
        width: 240px;
        height: 240px;
    }
     .flip-card-back h3 {
        font-size: 16px;
    }
    .flip-card-back p {
        font-size: 12px;
    }
    .steps_h2 {
        font-size: 20px;
    }  
    .steps_h3 {
        font-size: 16px;
    }
    .rocket_button {
        width: 100%;
        justify-content: center;
    }
    .telegram_link {
        width: 100%;
        justify-content: center;
    }
    .main_h1 {
        font-size: 24px;
    }
    .main_h2 {
        font-size: 20px;
    }
}

@media (min-width: 768px) {
    .cases_grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
      .flip-card {
        width: 280px;
        height: 280px;
    }
}



@media (min-width: 1024px) {
    .cases_grid {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
    }
    
    .flip-card {
        width: 300px;
        height: 300px;
    }
}

@media (min-width: 1280px) {
       .cases_grid {
        grid-template-columns: repeat(3, minmax(320px, 1fr));
    }
    .flip-card {
        width: 320px;
        height: 320px;
    }
}
@media (max-width: 1550px) {
     .main_page {
    background-size: cover;
    background-position: center;
     }
}