/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Общий контейнер страницы */
.page-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Контейнер для фона */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    min-height: calc(100% + 2em); /* Увеличиваем высоту на размер отступа */
}

/* Фоновое изображение */
.background-image {
    width: 100%;
    height: 100%;
    background-image: url('../media/2. Фон/Фон.svg');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: repeat-y;
    background-attachment: scroll;
}

/* Шапка */
.header {
    position: relative;
    width: 100%;
    height: 120px;
    z-index: 10;
    padding: 30px;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    display: inline-block;
}

.logo img {
    width: 228px;
    height: 65px;
    max-width: 228px;
    max-height: 65px;
}

/* Контент страницы */
.content {
    position: relative;
    z-index: 1;
}

/* Секция с текстами */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 10px 20px;
}

.hero-text {
    text-align: center;
    max-width: 1200px;
}

.main-title {
    font-family: 'Golos Text', sans-serif;
    font-weight: 600; /* SemiBold */
    font-size: 48px;
    line-height: 1.2;
    color: #000;
    margin-bottom: 2em; /* 2 строки пропуска */
}

.subtitle {
    font-family: 'Golos Text', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 32px;
    line-height: 1.3;
    color: #000;
    margin: 0;
}

/* Секция с белой карточкой */
.white-card-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    margin-top: 2em; /* Отступ сверху примерно в 2 строки */
    margin-bottom: 2em; /* Отступ снизу для последней секции */
}

.white-card {
    position: relative;
    width: 1200px;
    height: 381px;
    background-color: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.white-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #F5222D 16%, #B271F3 47%, #E2E6E9 99%);
    border-radius: 26px;
    z-index: -1;
}

/* Контент карточки */
.card-content {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    box-sizing: border-box;
}

/* Левая секция */
.left-section {
    width: 770px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Стили для заголовка историй на главной странице */
.white-card-section .stories-title {
    font-family: 'Golos Text', sans-serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    color: #000;
    margin: 0 0 1em 0;
    text-align: left;
    width: 100%;
    padding-left: 20%;
}

/* Стили для описания историй на главной странице */
.white-card-section .stories-description {
    font-family: 'Golos Text', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: #000;
    margin: 0 0 2em 0;
    text-align: left;
    width: 100%;
    padding-left: 20%;
}

/* Стили для кнопки на главной странице */
.white-card-section .submit-button {
    display: inline-block;
    background-color: #F40B17;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Golos Text', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.2;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    margin-left: 20%;
}

.submit-button:hover {
    background-color: #d40913;
}

/* Правая секция */
.right-section {
    width: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .stories-logo {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }
    
    /* Четвертая секция с карточками */
    .cards-section {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 20px;
        margin-top: 2em;
        margin-bottom: 2em;
    }
    
    .cards-container {
        display: flex;
        gap: 15px;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        max-width: 1200px;
    }
    
    .card {
        width: calc((100% - 30px) / 3); /* Динамическая ширина: (общая ширина - отступы) / 3 карточки */
        height: 334px;
        background-color: #fff;
        border-radius: 24px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 20px;
        box-sizing: border-box;
    }
    
    .card-pill {
        background-color: #F40B17;
        color: white;
        font-family: 'Golos Text', sans-serif;
        font-weight: 400;
        font-size: 18px;
        line-height: 1.2;
        padding: 6px 16px;
        border-radius: 9999px;
        margin-bottom: 1em; /* Одна строка */
        white-space: nowrap;
    }
    
    .card-title {
        font-family: 'Golos Text', sans-serif;
        font-weight: 600;
        font-size: 24px;
        line-height: 1.2;
        color: #000;
        text-align: center;
        margin: 0 0 2em 0; /* Две строки */
    }
    
    .card-buttons {
        display: grid;
        grid-template-columns: max-content;
        gap: 1em; /* Одна строка */
        justify-content: center;
        width: fit-content;
        margin: 0 auto;
    }
    
    .card-button {
        display: inline-block;
        background-color: #404D59;
        color: white;
        text-decoration: none;
        padding: 12px 24px;
        border-radius: 12px;
        font-family: 'Golos Text', sans-serif;
        font-weight: 500; /* Medium */
        font-size: 18px;
        line-height: 1.2;
        transition: background-color 0.3s ease;
        white-space: nowrap;
        text-align: center;
        box-sizing: border-box;
        width: 100%;
        min-width: max-content;
    }
    
    .card-button:hover {
        background-color: #2d363f;
    }
    
    /* Пятая секция с партнерами */
    .partners-section {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 20px;
        margin-top: 2em;
        margin-bottom: 2em;
    }
    
    .partners-card {
        width: 1200px;
        height: 381px;
        background-color: #fff;
        border-radius: 24px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px;
        box-sizing: border-box;
    }
    
    .partners-title {
        font-family: 'Golos Text', sans-serif;
        font-weight: 600;
        font-size: 48px;
        line-height: 1.2;
        color: #000;
        text-align: center;
        margin: 0 0 2em 0;
    }
    
    .partners-logos {
        display: flex;
        gap: 80px;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .partner-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: opacity 0.3s ease;
    }
    
    .partner-logo:hover {
        opacity: 0.8;
    }
    
    .partner-img {
        max-width: 100%;
        height: auto;
    }
    
    /* Размеры логотипов для ПК */
    .partner-logo:nth-child(1) .partner-img {
        width: 117px;
        height: 80px;
    }
    
    .partner-logo:nth-child(2) .partner-img {
        width: 54px;
        height: 96px;
    }
    
    .partner-logo:nth-child(3) .partner-img {
        width: 151px;
        height: 80px;
    }

/* Адаптивность для разных размеров экрана */
@media (max-width: 1920px) {
    .header {
        padding: calc(30px * 100vw / 1920);
        height: calc(120px * 100vw / 1920);
    }
    
    .logo img {
        width: calc(228px * 100vw / 1920);
        height: calc(65px * 100vw / 1920);
    }
    
    .hero-section {
        padding: calc(20px * 100vw / 1920) calc(20px * 100vw / 1920) calc(10px * 100vw / 1920) calc(20px * 100vw / 1920);
    }
    
    .white-card-section {
        padding: calc(10px * 100vw / 1920) calc(20px * 100vw / 1920);
        margin-top: calc(2em * 100vw / 1920); /* Отступ сверху примерно в 2 строки */
        margin-bottom: calc(2em * 100vw / 1920); /* Отступ снизу для последней секции */
    }
    
    .white-card {
        width: calc(1150px * 100vw / 1920);
        height: calc(381px * 100vw / 1920);
        border-radius: calc(24px * 100vw / 1920);
        max-width: calc(100vw - 40px); /* Ограничиваем ширину */
    }
    
    .white-card::before {
        top: calc(-2px * 100vw / 1920);
        left: calc(-2px * 100vw / 1920);
        right: calc(-2px * 100vw / 1920);
        bottom: calc(-2px * 100vw / 1920);
        border-radius: calc(26px * 100vw / 1920);
    }
    
    .background-container {
        min-height: calc(100% + calc(2em * 100vw / 1920)); /* Увеличиваем высоту на размер отступа */
    }
    
    .card-content {
        padding: calc(40px * 100vw / 1920);
    }
    
    .left-section {
        width: calc(770px * 100vw / 1920);
    }
    
    .right-section {
        width: calc(380px * 100vw / 1920);
    }
    
    .white-card-section .stories-title {
        font-size: calc(28px * 100vw / 1920);
        padding-left: 20%;
    }
    
    .white-card-section .stories-description {
        font-size: calc(16px * 100vw / 1920);
        padding-left: 20%;
    }
    
    .white-card-section .submit-button {
        font-size: calc(18px * 100vw / 1920);
        padding: calc(12px * 100vw / 1920) calc(24px * 100vw / 1920);
        border-radius: calc(12px * 100vw / 1920);
        margin-left: 20%;
    }
    
    .cards-section {
        padding: calc(10px * 100vw / 1920) calc(20px * 100vw / 1920);
        margin-top: calc(2em * 100vw / 1920);
        margin-bottom: calc(2em * 100vw / 1920);
    }
    
    .cards-container {
        gap: calc(15px * 100vw / 1920);
    }
    
    .card {
        width: calc(380px * 100vw / 1920);
        height: calc(334px * 100vw / 1920);
        border-radius: calc(24px * 100vw / 1920);
        padding: calc(40px * 100vw / 1920) calc(20px * 100vw / 1920);
    }
    
    .card-pill {
        font-size: calc(18px * 100vw / 1920);
        padding: calc(6px * 100vw / 1920) calc(16px * 100vw / 1920);
        border-radius: 9999px;
    }
    
    .card-title {
        font-size: calc(24px * 100vw / 1920);
    }
    
    .card-button {
        font-size: calc(18px * 100vw / 1920);
        padding: calc(12px * 100vw / 1920) calc(24px * 100vw / 1920);
        border-radius: calc(12px * 100vw / 1920);
        width: 100%;
        min-width: max-content;
    }
    
    .partners-section {
        padding: calc(10px * 100vw / 1920) calc(20px * 100vw / 1920);
        margin-top: calc(2em * 100vw / 1920);
        margin-bottom: calc(2em * 100vw / 1920);
    }
    
    .partners-card {
        width: calc(1150px * 100vw / 1920);
        height: calc(381px * 100vw / 1920);
        border-radius: calc(24px * 100vw / 1920);
        padding: calc(40px * 100vw / 1920);
    }
    
    .partners-title {
        font-size: calc(48px * 100vw / 1920);
        margin: 0 0 calc(2em * 100vw / 1920) 0;
    }
    
    .partners-logos {
        gap: calc(80px * 100vw / 1920);
    }
    
    .partner-logo:nth-child(1) .partner-img {
        width: calc(117px * 100vw / 1920);
        height: calc(80px * 100vw / 1920);
    }
    
    .partner-logo:nth-child(2) .partner-img {
        width: calc(54px * 100vw / 1920);
        height: calc(96px * 100vw / 1920);
    }
    
    .partner-logo:nth-child(3) .partner-img {
        width: calc(151px * 100vw / 1920);
        height: calc(80px * 100vw / 1920);
    }
}

@media (max-width: 768px) {
    
    .header {
        height: 80px;
        padding: 20px;
    }
    
    .logo img {
        width: 118px;
        height: 34px;
        max-width: 118px;
        max-height: 34px;
    }
    
    .main-title {
        font-size: 24px;
        margin-bottom: 1.5em;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .hero-section {
        padding: 15px 15px 5px 15px;
        align-items: flex-start;
    }
    
    .white-card-section {
        padding: 5px 30px;
        margin-top: 1.5em; /* Отступ сверху примерно в 2 строки для мобильных */
        margin-bottom: 1.5em; /* Отступ снизу для последней секции на мобильных */
    }
    
    .white-card {
        width: 100%;
        height: auto; /* Адаптивная высота */
        min-height: 200px;
        border-radius: 16px;
    }
    
    .white-card::before {
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        border-radius: 17px;
    }
    
    .background-container {
        min-height: calc(100% + 1.5em); /* Увеличиваем высоту на размер отступа для мобильных */
    }
    
    .card-content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        height: auto; /* Адаптивная высота */
    }
    
    .left-section {
        width: 100%;
        order: 2; /* Текст снизу */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .right-section {
        width: 100%;
        order: 1; /* Логотип сверху */
    }
    
    .white-card-section .stories-title {
        font-size: 18px; /* Как у card-title в мобильной версии */
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    .white-card-section .stories-description {
        font-size: 14px; /* Увеличенный размер для лучшей читаемости */
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    .white-card-section .submit-button {
        font-size: 16px;
        padding: 10px 20px;
        border-radius: 8px;
        align-self: center;
        margin-left: 0;
    }
    
    .stories-logo {
        max-width: 80%;
        max-height: 120px;
    }
    
    .cards-section {
        padding: 5px 30px;
        margin-top: 1.5em;
        margin-bottom: 1.5em;
    }
    
    .cards-container {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .card {
        width: 100%;
        height: auto;
        min-height: 280px;
        border-radius: 16px;
        padding: 30px 20px;
    }
    
    .card-pill {
        font-size: 14px;
        padding: 5px 12px;
        border-radius: 9999px;
        margin-bottom: 0.8em;
    }
    
    .card-title {
        font-size: 18px;
        margin: 0 0 1.5em 0;
    }
    
    .card-buttons {
        gap: 0.8em;
        justify-content: center;
        width: fit-content;
        margin: 0 auto;
    }
    
    .card-button {
        font-size: 16px;
        padding: 10px 20px;
        border-radius: 8px;
        white-space: normal;
        text-align: center;
        width: 100%;
        min-width: max-content;
    }
    
    .partners-section {
        padding: 5px 30px;
        margin-top: 1.5em;
        margin-bottom: 1.5em;
    }
    
    .partners-card {
        width: 100%;
        height: auto;
        min-height: 300px;
        border-radius: 16px;
        padding: 30px 20px;
    }
    
    .partners-title {
        font-size: 24px;
        margin: 0 0 1.5em 0;
    }
    
    .partners-logos {
        flex-direction: column;
        gap: 40px;
    }
    
    .partner-logo:nth-child(1) .partner-img {
        width: 80px;
        height: 55px;
    }
    
    .partner-logo:nth-child(2) .partner-img {
        width: 40px;
        height: 70px;
    }
    
    .partner-logo:nth-child(3) .partner-img {
        width: 100px;
        height: 55px;
    }
}
