:root {
    --deep-blue: #10355E;
    --sky-blue: #276AAB;
    --light-blue: #6AAAE4;
    --salmon: #FF5100;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-text: #1A1A1A;
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Alumni Sans", sans-serif;
    background: var(--white);
    color: var(--dark-text);
    min-height: 100vh;
    line-height: 1.4;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--white);
    position: relative;
    background: var(--white);
    padding-bottom: 80px; /* Высота панели корзины */
}

/* Скрытие/показ страниц */
.main-page:not(.hidden) {
    display: block;
}

.main-page.hidden {
    display: none;
}

.anketa-page:not(.active) {
    display: none;
}

.anketa-page.active {
    display: block;
    padding: 0;
}

/* Хедер */
.header {
    background: var(--deep-blue);
    color: var(--white);
    padding: 15px 20px 10px;
    text-align: center;
    position: relative;

}

.header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.header .subtitle {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 300;
}

/* Предупреждение */
.warning-section {
    background: var(--light-gray);
    padding: 10px 20px;
    text-align: center;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    border-bottom: 1px solid #ddd;
}

/* Блок пользователя */
.user-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left; /* если нужно выровнять текст слева */
    padding: 25px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    gap: 15px;
}

.user-greeting {
    flex: 1;
    /* width: auto; */ /* если нужно */
}

.user-greeting h2 {
    font-size: 24px;
    color: var(--deep-blue);
    margin-bottom: 8px;
    font-weight: 600;
}

.user-greeting p {
    font-size: 16px;
    color: var(--dark-text);
    opacity: 0.9;
    line-height: 1.4;
}

.club-name {
    color: var(--salmon);
    font-weight: 600;
}

/* QR-карта */
.qr-card {
    background: #10355E;
    border-radius: 20px;
    padding: 25px 20px;
    width: 280px;
    height: 280px;
    margin: 10px auto;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}



.qr-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.qr-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-icon svg {
    width: 35px;
    height: 35px;
    fill: white;
}

.qr-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-line1 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.qr-line2 {
    font-size: 22px;
    color: white;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.user-cube {
    background: #FF5100;
    border-radius: 12px;
    padding: 5px 7px; /* Больше отступов */
    color: white;
    display: flex;
    align-items: center;
    gap: 5px; /* Расстояние между QR и текстом */
    margin: 0 20px; /* Отступы по бокам как в примере */
}

/* Приветственная секция */
.welcome-section {
    padding: 0 20px 25px;
    background: var(--white);
}

.welcome-text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark-text);
    text-align: left;
}

.assistant-name {
    color: var(--salmon);
    font-weight: 600;
}

/* Слайдер */
.swiper-container {
    width: calc(100% - 40px); /* Чтобы ширина была равна ширине image-links-container (учитывая padding 20px слева/справа в parent) */
    height: 180px; /* Оставляем вашу текущую высоту, но если нужно подогнать под высоту левой/правых — измените на 400px или calc */
    margin: 0 auto 20px; /* Центрируем и добавляем отступ снизу, без боковых margin */
    border-radius: 12px; /* Закругленные края, как у image-link */
    overflow: hidden; /* Чтобы содержимое не вылезало за края */
    position: relative; /* Для правильной работы слайдера */
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 12px; /* Закругление для слайдов, если нужно индивидуально */
    overflow: hidden; /* Опционально */
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.slide-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.slide-content p {
    font-size: 14px;
    opacity: 0.9;
}

/* Блок с картинками-ссылками */
.image-links-section {
    padding: 0 20px 20px; /* Ваш текущий стиль */
    background: white;
}

.image-links-container {
    display: flex;
    gap: 12px;
    height: 400px;
    margin-bottom: 20px;
}

.left-vertical {
    flex: 1;
    height: 100%;
}

.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.image-link {
    display: block;
    height: 100%;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.left-vertical .image-link {
    height: 100%;
}

.right-column .image-link {
    height: calc(50% - 6px);
}

.image-link:hover {
    transform: translateY(-2px);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--light-gray);
}

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

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(16, 53, 94, 0.9), transparent);
    color: var(--white);
    padding: 20px 15px 15px;
    z-index: 2;
    text-align: left;
}

.image-overlay h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.image-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

.left-vertical .image-overlay {
    background: linear-gradient(to top, rgba(255, 81, 0, 0.9), transparent);
}

.right-column .image-link:first-child .image-overlay {
    background: linear-gradient(to top, rgba(39, 106, 171, 0.9), transparent);
}

.right-column .image-link:last-child .image-overlay {
    background: linear-gradient(to top, rgba(16, 53, 94, 0.9), transparent);
}

/* Кнопки */
.buttons-section {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--white);
    border: 2px solid var(--light-blue);
    border-radius: 10px;
    text-decoration: none;
    color: var(--deep-blue);
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--light-blue);
    color: var(--white);
}

.btn-primary {
    background: var(--salmon);
    border-color: var(--salmon);
    color: var(--white);
}

.btn-primary:hover {
    background: #e04800;
    border-color: #e04800;
}

.btn-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Футер */
.footer {
    padding: 15px 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid var(--light-gray);
}

/* Модальное окно QR-кода */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    max-width: 280px;
    width: 90%;
}

.modal-title {
    font-size: 18px;
    color: var(--deep-blue);
    margin-bottom: 15px;
    font-weight: 600;
}

.qrcode-container {
    margin: 15px 0;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--light-gray);
}

.qrcode-container img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.user-id {
    font-size: 13px;
    color: var(--dark-text);
    opacity: 0.7;
    margin-top: 10px;
}

.modal-close {
    background: var(--salmon);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: "Alumni Sans", sans-serif;
    font-size: 15px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: #e04800;
}

/* Стили для страницы анкеты */
.anketa-header {
    background: var(--deep-blue);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.anketa-title {
    font-size: 18px;
    font-weight: 600;
}

.anketa-container {
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Форма анкеты */
.form-section {
    margin-bottom: 25px;
    padding: 0;
}

.section-title {
    font-size: 16px;
    color: var(--deep-blue);
    margin-bottom: 15px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-blue);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--dark-text);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-blue);
    border-radius: 6px;
    font-family: "Alumni Sans", sans-serif;
    font-size: 15px;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sky-blue);
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.required {
    color: var(--salmon);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-item input {
    width: auto;
}

.vacancy-specific {
    display: none;
}

.vacancy-specific.visible {
    display: block;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--salmon);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: "Alumni Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background: #e04800;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.redirect-message {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    display: none;
}

.redirect-message p {
    margin-bottom: 15px;
    font-size: 15px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 20px 15px 20px;
        width: 100%;
        text-align: center;
        overflow: hidden;
    }
    
    .user-section {
        padding: 20px 15px 15px;
    }
    
    .welcome-section {
        padding: 0 15px 20px;
    }
    
    .image-links-section {
        padding: 0 15px 15px;
    }
    
    .buttons-section {
        padding: 0 15px 15px;
    }
    
    .swiper-container {
        width: calc(100% - 30px); /* Адаптация под меньший padding */
        height: 160px;
        margin: 0 auto 15px;
    }
    
    .btn {
        padding: 16px 18px;
        font-size: 16px;
    }
    
    .image-links-container {
        height: 300px;
        gap: 10px;
    }
    
    .image-overlay {
        padding: 15px 12px 12px;
    }
    
    .image-overlay h3 {
        font-size: 16px;
    }
    
    .image-overlay p {
        font-size: 12px;
    }
    
    /* Адаптация QR-карты для мобильных */
    .qr-card {
        max-width: 250px;
        padding: 20px 15px;
    }
    
    .qr-icon {
        width: 60px;
        height: 60px;
    }
    
    .qr-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .qr-line2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .swiper-container {
        width: calc(100% - 20px); /* Ещё меньше для очень маленьких экранов */
        height: 150px; /* Уменьшаем высоту для лучшей посадки */
        margin: 0 auto 50px;
    }
    
    .image-links-container {
        height: 250px;
        gap: 8px;
    }
    
    .left-vertical .image-link,
    .right-column .image-link {
        min-height: 120px;
    }
    
    /* Дополнительная адаптация для очень маленьких экранов */
    .qr-card {
        max-width: 220px;
        padding: 15px 12px;
    }
    
    .qr-icon {
        width: 30px;
        height: 30px;
    }
    
    .qr-line1 {
        font-size: 12px;
    }
    
    .qr-line2 {
        font-size: 12px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Фиксированная панель корзины */
.cart-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    padding-bottom: calc(15px + var(--tg-safe-area-inset-bottom, 0px));
    background: var(--white);
    border-top: 2px solid var(--light-blue);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.cart-panel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-icon-btn, .location-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex: 1;
    position: relative;
    max-width: 80px;
}

.cart-icon-btn:hover, .location-icon-btn:hover {
    background: var(--light-gray);
}

.icon-wrapper {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-label {
    font-size: 12px;
    color: var(--deep-blue);
    font-weight: 500;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: 5px;
    background: var(--salmon);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cart-icon-btn {
    position: relative;
}

/* Состояния активных иконок */
.cart-icon-btn.active .icon-label,
.location-icon-btn.active .icon-label {
    color: var(--salmon);
    font-weight: 600;
}
/*
.cart-panel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
*/
.cart-info {
    flex: 1;
}

.cart-total {
    font-size: 18px;
    font-weight: 600;
    color: var(--deep-blue);
}

.cart-count {
    font-size: 14px;
    color: var(--dark-text);
    opacity: 0.8;
}

.cart-open-btn {
    background: var(--salmon);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: "Alumni Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-open-btn:hover {
    background: #e04800;
}

/* Улучшения для темной темы 
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: var(--white);
    }
    
    .container {
        background: #2d2d2d;
    }
    
    .form-section {
        background: transparent;
    }
}*/
