

/* Variables */
:root {
    --bg-dark: #455A44;
    --card-light: #E8F5E9;
    --accent-lime: #9CCC65;
    --btn-green: #8BC34A;
    --text-black: #212121;
    --text-gray: #616161;
    --footer-link: #CFD8DC;
    --footer-text: #B0BEC5;
    --card-border: #2E7D32;
    --shadow-green: rgba(46, 125, 50, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: "Playpen Sans", cursive;
    background: #f3f3f3;
    color: var(--text-black);
    min-height: 100vh;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 16px 24px;
}

.header {
    margin: 0 auto;
    padding: 10px 10px;
}

.header-img {
    width: 200px;
    height: 100px;
    object-fit: contain;
}

/* Hero секция */
.hero {
    margin-top: 15px;
}

/* Контейнер для формы и телефона — теперь розовый, как левая форма */
.hero-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
    background: #ffe7ea;
    border-radius: 20px;
    padding: 20px 5px;
    box-shadow: 0 4px 16px rgba(221, 191, 195, 1);
    flex-wrap: wrap;
}

/* Левая форма — прозрачная внутри */
.hero-form {
    background: transparent;
    border-radius: 20px;
    width: 60%;
    max-width: 600px;
}

.hero-headline {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-black);
    text-align: center;
}

/* Стили для формы */
label {
    font-weight: 600;
    color: black;
    display: block;
    
}

input, textarea {
    width: 100%;
    margin: 8px 0 16px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4b6741;
    box-shadow: 0 0 0 2px rgba(75, 103, 65, 0.2);
}

/* Кнопки-пресеты */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.preset-btn {
    background: #ffcfd5;
    border: 1px solid #ddbfc3;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: #ddbfc3;
    color: white;
    border: 2px solid #982030;
}

/* Телефон справа */










/* Превью открытки */
.hero-preview {

    width: 340px;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 30px 50px rgba(0,0,0,0.3), 0 0 0 8px #333, 0 0 0 10px #555;
    flex-shrink: 0;
}

/* Картинка */
.preview-image {
    
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 10px 0;
    max-height: 280px;
}

.preview-image img {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

/* Заголовок */
.preview-title {
    color: #d32f2f;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
     margin: 0 0 10px 0;
    padding: 5px;
    word-break: break-word;
    background: transparent;
}

/* Нижняя часть с кнопками - прижимаем к низу */
.preview-bottom {
    
    text-align: center;
    padding-top: 20px;
}

/* Кнопки */
.preview-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 0;
}









/* Плавное появление шрифтов */
.preview-title,
.preview-text {
    transition: font-family 0.1s ease, color 0.1s ease;
    will-change: font-family, color;
}

/* Для всех шрифтов, которые могут загружаться */
.font-card {
    transition: all 0.2s ease;
}

/* Предзагрузка шрифтов - скрываем "скачок" текста */
.font-card {
    font-display: swap;
}
















.preview-spacer {
    flex: 1;
}



/* Текст поздравления в превью - без скролла */
.preview-text {
    color: black;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0);
    border-radius: 12px;
    word-break: break-word;
    /* Убираем max-height и overflow-y */
}




/* ========== АДАПТАЦИЯ КНОПОК ДЛЯ ВСЕХ ЭКРАНОВ ========== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 160px;
        min-width: 160px;
        padding: 16px 0;
        font-size: 20px;
    }
    
   
}

/* Планшеты и большие телефоны (до 768px) */
@media (max-width: 768px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
    
  
}

/* Телефоны (480px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
   .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
}

/* Большие телефоны (до 480px) */
@media (max-width: 480px) {
    .preview-btn-yes,
    .preview-btn-no {
        max-width: 140px;
        min-width: 140px;
        padding: 14px 0;
        font-size: 20px;
    }
}

/* Маленькие телефоны (375px - 479px) */
@media (max-width: 479px) and (min-width: 376px) {
   .preview-btn-yes,
    .preview-btn-no {
        max-width: 130px;
        min-width: 130px;
        padding: 13px 0;
        font-size: 18px;
    }

    
 
}

/* Маленькие телефоны (до 375px) */
@media (max-width: 375px) {
        .preview-btn-yes,
    .preview-btn-no {
        max-width: 100px;
        min-width: 100px;
        padding: 10px 0;
        font-size: 15px;
    }
 .preview-btn-no {
     border: 1px solid black;
}

    
   
}

/* Очень маленькие телефоны (до 320px) */
@media (max-width: 320px) {
     .preview-btn-yes,
    .preview-btn-no {
        max-width: 100px;
        min-width: 100px;
        padding: 10px 0;
        font-size: 15px;
    }
 .preview-btn-no {
     border: 1px solid black;
}


}













/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.reactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.reaction-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.reaction-card:hover {
    border-color: #8BC34A;
    transform: scale(1.05);
}

.reaction-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.reaction-card span {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}

.reaction-text {
    height: 80px;
    overflow: hidden;
    padding: 10px;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Навигация по шагам */
.steps-navigation {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 5px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 0.8;
}

.step-circle {
    width: 40px;
    height: 40px;
    background-color: #982030;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(221, 191, 195, 1);
}

.step-item.active .step-circle {
    background-color: #982030;
    box-shadow: 0 4px 12px rgba(221, 191, 195, 1);
    transform: scale(1.05);
}

.step-item.completed .step-circle {
    background-color: #982030;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-label {
    font-size: 14px;
    color: #982030;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-item.active .step-label {
    color: #982030;
    font-weight: 700;
}

.step-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.step-item.active .step-title {
    color: #000;
    font-weight: 600;
}

/* Футер */
.footer {
    margin-top: auto;
    padding: 40px 16px;
    text-align: center;
    background-color: #982030;
    border-radius: 20px 20px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.footer-links a {
    color: white;
    font-size: 14px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-info {
    color: var(--footer-text);
    font-size: 13px;
    line-height: 1.5;
}

.footer-info p {
    margin: 4px 0;
    color: #e2576a;
}

/* Стили для выбора картинки */
.image-presets {
    margin: 10px 0;
}

.preset-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
   
}

.image-option {
    width: 80px;
    height: 80px;
    border: 1px solid black;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.image-option:hover {
    transform: scale(1.05);
    border-color: #982030;
}

.image-option input[type="radio"] {
    display: none;
}

.image-option input[type="radio"]:checked + img {
    border: 3px solid #982030;
}

.image-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Картинка в превью */
/*.preview-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    max-height: 350px;
    min-height: 150px;
    background: transparent;
}*/



/* Загрузка своей картинки */
.upload-section {
    margin: 10px 0;
    padding: 8px;
    background: #ffcfd5;
    border-radius: 8px;
}

.upload-section label {
    display: block;
    font-weight: 600;
    color: black;
    margin-bottom: 5px;
}

.custom-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.custom-upload input[type="file"] {
    padding: 10px;
    border: 2px dashed black;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 15px;
}

.file-name {
    display: block;
    font-size: 10px;
    color: #313131;
    font-style: italic;
    padding: 1px 0;
}

.upload-hint {
    font-size: 10px;
    color: #313131;
    margin-bottom: 8px;
}

/* Навигационные кнопки */
.form-navigation {
    display: flex;
    
    gap: 15px;
    margin-top: 10px;
    justify-content: space-between;
    
}

.btn-back {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 150px;
    max-width: 160px;
   
    
}

.btn-back:hover {
    background: #e0e0e0;
    transform: translateX(-3px);
}

.btn-cta {
    flex: 1;
    background: #982030;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 40px;
    text-decoration: none;
    text-align: center;
    border: none;
    box-shadow: 0 2px 8px rgba(221, 191, 195, 1);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
    min-width: 150px;
    max-width: 160px;
    
}

.btn-cta:hover {
    opacity: 0.9;
    transform: translateX(3px);
}

/* Адаптация для мобильных устройств */












@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        align-items: center;
        gap: 0px;
    }

    .hero-form {
        width: 90%;
    }

    .hero-preview {
        width: 300px;
        min-height: 500px;
        margin-top: 20px;
        
    }

    .preview-title {
        font-size: 24px;
    }

    .steps-navigation {
        gap: 5px;
        flex-direction: column;
        align-items: center;
    }

    .step-item {
        width: 100%;
        max-width: 250px;
    }

    /* Адаптация для кнопок выбора стиля */
    .button-styles-section {
        margin: 10px 0px;
    }
    
    .button-styles-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .style-btn {
        min-width: auto;
        padding: 5px 15px;
        font-size: 10px;  /* ← исправлено: было 5px */
        width: 100%;
        white-space: normal;
        word-break: break-word;
    }

















}












@media (max-width: 576px) {
    .form-navigation {
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .btn-back, .btn-cta {
        width: 100%;
        max-width: 190px;
        transform: none !important;
        
    }

    .btn-back:hover, .btn-cta:hover {
        transform: none !important;
    }

    .button-styles-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .style-btn {
        padding: 8px 12px;
        font-size: 10px;
        white-space: normal;
        word-break: break-word;
    }

  
}








/* ===== ВЫБОР ФОНА ===== */
.background-section {
    margin: 5px 0;
}

.background-section label {
    font-weight: 600;
    color: black;
    display: block;
    margin-bottom: 5px;
}

.background-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0px;
}

.background-option {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid black;
    transition: all 0.3s ease;
}

.background-option.selected {
    border: 3px solid black;  /* жирная обводка */
    box-shadow: 0 0 0 2px white, 0 0 0 4px #982030;
    transform: scale(1.02);
}

.background-option:hover {
    transform: scale(1.05);
}

.background-option input[type="radio"] {
    display: none;
}

.background-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-items {
    color: #999;
    font-style: italic;
}





/* ===== ВЫБОР ШРИФТА ===== */
/* Компактные кнопки выбора шрифта */
.fonts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.font-card {
    padding: 8px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.font-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.font-card.selected {
    border-color: #982030;
    background: #ffe7ea;
}

/* КВАДРАТНЫЕ КНОПКИ ДЛЯ ЦВЕТА */
.colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0;
}

.color-card {
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid black;
}

.color-card:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.color-card.selected {
    
    transform: scale(1.05);

    border: 3px solid #982030;  /* жирная обводка */
    box-shadow: 0 0 0 2px white, 0 0 0 4px #982030;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #ddd;
}

.color-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.color-hex {
    font-size: 12px;
    font-family: monospace;
    color: #999;
}














/* ===== ВЫБОР СТИЛЯ КНОПОК ===== */
.button-styles-section {
    margin: 10px 0 10px;
}

.button-styles-section label {
    font-weight: 600;
    color: black;
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.button-styles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Стили для кнопок выбора стиля */
.style-btn {
    flex: 1;
    min-width: 110px;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    border: 2px solid #E8ECEF;
    background: white;
    color: #333;
}

.style-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
    border-color: #D1D9E0;
}

.style-btn.active {
    border-color: #982030;
    background: #FFF8F8;
    color: #982030;
    box-shadow: 0 4px 12px rgba(152, 32, 48, 0.15);
}

/* Специфические цвета для активного состояния */
.style-btn[data-style="classic"].active {
    border-color: #c02a2a;
    background: #fff0f0;
    color: #c02a2a;
}

.style-btn[data-style="gradient"].active {
    border-color: #8B0000;
    background: linear-gradient(135deg, #fff5f5, #fff0f0);
    color: #8B0000;
}

.style-btn[data-style="minimal"].active {
    border-color: #4CAF50;
    background: #f0fff0;
    color: #4CAF50;
}
/* ========== СТИЛИ ДЛЯ КАЖДОГО ВАРИАНТА (согласованы с общим дизайном) ========== */

/* 1. Классический (как основные кнопки на сайте) */
.style-classic .demo-yes {
    background: #c02a2a;
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(192, 42, 42, 0.3);
}
.style-classic .demo-no {
    background: transparent;
    color: #2C3E2C;
    border: 2px solid #B0BEC5;
}

/* 2. Градиентный (элегантный переход) */
.style-gradient .demo-yes {
    background: linear-gradient(115deg, #c02a2a, #8B1E2A);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(139, 30, 42, 0.25);
}
.style-gradient .demo-no {
    background: linear-gradient(115deg, #5F6A6F, #2C3E50);
    color: white;
    border: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 3. Минималистичный (плоские, но сочные) */
.style-minimal .demo-yes {
    background: #4CAF50;
    color: white;
    border: none;
}
.style-minimal .demo-no {
    background: #F44336;
    color: white;
    border: none;
}

/* 4. Теневой (объемный, как у модальных карточек) */
.style-shadow .demo-yes {
    background: #8BC34A;
    color: #1F3A1F;
    border: none;
    box-shadow: 0 5px 0 #558B2F;
    transform: translateY(-2px);
}
.style-shadow .demo-no {
    background: #ECEFF1;
    color: #455A64;
    border: none;
    box-shadow: 0 5px 0 #B0BEC5;
    transform: translateY(-2px);
}

/* 5. Свечение (акцент с неоном) */
.style-glow .demo-yes {
    background: #982030;
    color: white;
    border: none;
    box-shadow: 0 0 0 2px rgba(152, 32, 48, 0.3), 0 0 0 4px rgba(152, 32, 48, 0.1);
}
.style-glow .demo-no {
    background: #37474F;
    color: #ECEFF1;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Название и описание стиля */
.style-name {
    font-size: 15px;
    font-weight: 700;
    color: #1F2A1E;
    margin-bottom: 6px;
}

.style-desc {
    font-size: 11px;
    color: #7B8A7B;
    line-height: 1.3;
}













/* Запрещаем переключение шрифта до загрузки */
.preview-title,
.preview-text {
    transition: font-family 0.1s ease, color 0.1s ease;
    will-change: font-family, color;
}

/* Системные шрифты как fallback, чтобы не было прыжка */
.preview-title,
.preview-text {
    font-family: "Playpen Sans", "Segoe UI", "Arial", sans-serif;
}

/* Предзагрузка через font-display */
@font-face {
    font-family: 'Playpen Sans';
    font-display: swap;
}



































/* ========== ВЕРХНЕЕ МЕНЮ (скопировано из основного CSS) ========== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fefcfb;
    padding: 5px 50px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 99;
    flex-wrap: wrap;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 5px;
    object-fit: contain;
}



/* Оверлей для затемнения */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.active {
    display: block;
}

.nav-links {
    display: flex;
    gap: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: black;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-decoration: none;
    font-size: 20px;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 540;
}

.nav-links a:hover {
    color: #94162C;
    transform: translateY(-2px);
}

.nav-links a.active {
    color: #94162C;
}

.spacer {
    width: 150px;
}

/* АДАПТИВНОСТЬ ДЛЯ МЕНЮ (только для телефонов) */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 20px;
        width: 100%;
    }
    
    
    
    .nav-links {
        position: static;
        transform: none;
        display: flex !important;
        gap: 10px;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0px;
    }
    
    .nav-links a {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .spacer {
        display: none;
    }
        .footer-links {
   
    gap: 10px;
    
}



}




















































































