/* === Общие стили === */

/* База для адаптива (mobile-first):
   - по умолчанию стили для мобильных
   - далее расширяем на 480 / 768 / 1024+ */
:root{
    --container-pad: 16px;
}

*, *::before, *::after{
    box-sizing: border-box;
}

img, svg, video{
    max-width: 100%;
    height: auto;
}
body {
    background-color: #F2FFE3;
    color: #0B1910;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wrap {
    max-width: 1200px;
    width: 100%;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);

    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;

    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 40px 0;
    display: flex;
}

.second {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 0;
    padding: 40px 0;
}

.faq {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 0;
    padding: 40px 0;
}

.footer {
    min-height: 0;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.threeblock_wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.info_block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

/* === Текстовые стили === */

h1 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    /* от 28px на мобильных до 44px на десктопе */
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.15;
    text-align: center;
    margin-top: 32px;
}

h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    font-size: clamp(22px, 4.5vw, 36px);
    line-height: 1.2;
    text-align: center;
    margin-top: 24px;
}

h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 3.6vw, 24px);
    line-height: 1.25;
}

h4{
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    font-size: 20px;
    text-align: left;
    margin-top: 20px;
}

p {
    margin-top: 0px;
    margin-bottom: 16px;
}


.big_number {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: bold;
    font-size: 40px;
    line-height: 52px;
    margin: 20px 0px;
}

.subtitle {
    text-align: center;
}


/* === Хэдер === */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    background-color: rgba(242, 255, 227, 0.5);
    backdrop-filter: blur(10px); /* Apply a 10px blur to the backdrop */
    -webkit-backdrop-filter: blur(10px); /* For Safari compatibility */
    z-index: 20;
    max-width: 100%;
    position: sticky;
    top: 0;
}


.logo_link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo_link img {
    display: block;
}
.nav_block {
    display: flex;
    flex-wrap: wrap;
    gap: 24px; /* расстояние между ссылками */

}
 
.nav_link {
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    color: #0B1910;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav_link:hover {
    color: #284028;
}


/* === Общие карточки и контейнеры === */
.container, .box, .card {
    width: 100%;

    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* === Картинки === */

.step_image {
    width: 100%;
    max-width: 290px;
    border-radius: 16px;
}


/* === Кнопки === */

.buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.btn, button, .back {
    display: inline-block;
    background: #0B1910;
    color: #F2FFE3;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn:hover, button:hover, .back:hover {
    background: #284028;
}

.btn.secondary {
    background: #D9EFD6;
    color: #0B1910;
}

/* === Метаданные и отступы === */
.meta {
    margin: 0px 0 48px;
}

.section {
    margin: 24px 0;
}

/* === Модальные окна === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
}

.modal .card, .modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: min(480px, calc(100% - 32px));
    text-align: center;
}

/* === Стили отчёта (result_full) === */

.counter_block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    justify-content: space-between;
}



.card {
    padding: 20px;
    max-width: 860px;
}

.critical {
    padding: 20px;
}

.label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.label.critical {
    background: #fdcece;
    color: #942323;
}

.title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
}

.desc {
    color: #2b2b2b;
    line-height: 1.55;
}

/* === Спиннер === */
.spinner {
    border: 6px solid #F2FFE3;
    border-top: 6px solid #0B1910;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Upload Area === */
.upload-area {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='20' ry='20' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    border-radius: 20px;
    padding: 24px;
    text-align: center;

    width: 100%;
    max-width: 800px;
    margin: 24px auto;

    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.3s ease;
    position: relative;
}


.upload-area.dragover {
    background: #D9EFD6;
    border-color: #284028;
}

.upload-area h1 {
    font-size: 22px;
    margin-bottom: 16px;
}

.upload-area p {
    font-size: 15px;
    color: #333;
    margin-bottom: 24px;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-btn {
    display: inline-block;
    background: #D9EFD6;
    color: #0B1910;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: rgb(92, 130, 92);
}

/* === Spinner Overlay === */
.spinner-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.spinner-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    border: 6px solid #F2FFE3;
    border-top: 6px solid #0B1910;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* === FAQ (аккордеон) === */

.faq{
    min-height: 0;
    padding: 24px 0;
}

.faq_wrap{
    /* не растягиваем строку слишком широко */
    max-width: 860px;
}

.faq_list{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.faq_item{
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
}

.faq_item summary{
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 600;
    line-height: 1.25;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq_item summary::-webkit-details-marker{
    display: none;
}

.faq_item summary::after{
    content: "▾";
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.faq_item[open] summary::after{
    transform: rotate(180deg);
}

.faq_answer{
    padding: 0 18px 16px 18px;
    border-top: 1px solid rgba(11,25,16,0.10);
}

.faq_answer p{
    margin: 12px 0 0 0;
    line-height: 1.55;
    opacity: 0.9;
}

/* небольшой фокус для доступности */
.faq_item summary:focus-visible{
    outline: 2px solid rgba(40,64,40,0.55);
    outline-offset: 3px;
    border-radius: 14px;
}


/* === Адаптивные брейкпоинты === */

/* 480px+ (обычные телефоны) */
@media (min-width: 480px){
    :root{ --container-pad: 20px; }

    .counter_block{
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

    header{ padding: 16px 20px; }

    .info_block{ 
        align-items: center; 
        text-align: center;
    }
}

/* 768px+ (планшеты) */
@media (min-width: 768px){
    :root{ --container-pad: 24px; }


    /* FAQ */
    .faq_list{ gap: 14px; }
    .faq_item summary{
        padding: 18px 22px;
        font-size: 18px;
    }
    .faq_answer{
        padding: 0 22px 18px 22px;
    }

    .threeblock_wrap{
        flex-direction: row;
        gap: 60px;
        justify-content: center;
    }

    .upload-area{
        padding: 40px;
        margin: 60px auto;
    }

    header{ padding: 20px 20px; }

    .hero{ min-height: 40vh; }
    .second{ min-height: 40vh; }
    .howto {min-height: 40vh;}
    .faq{ min-height: 40vh; }
    .footer{ min-height: 20vh; }

    .info_block{ 
        align-items: left; 
        text-align: left;
    }
}

/* 1024px+ (ноутбуки/десктоп) */
@media (min-width: 1024px){
    :root{ --container-pad: 28px; }
}


.hero{ min-height: 60vh; }
.second{ min-height: 60vh;}
.howto {min-height: 60vh;}
.faq{ min-height: 60vh; }
.footer{ min-height: 30vh; }