/* === Глобальные переменные и стили AiFranch === */
:root {
    --aifranch-primary: #6A11CB; /* Глубокий фиолетовый */
    --aifranch-secondary: #2575FC; /* Яркий синий */
    --aifranch-accent: #00F2FE; /* Электрик циан */
    --aifranch-dark: #1A1A2E; /* Очень темный сине-фиолетовый */
    --aifranch-light: #FFFFFF;
    --aifranch-grey-light: #F4F7FC;
    --aifranch-grey-medium: #E9EEF7;
    --aifranch-grey-dark: #A9B4C8;
    --aifranch-text: #4B4F5F;
    --aifranch-success: #34D399; /* Зеленый для успеха/уникальности */
    --aifranch-warning: #FBBF24; /* Желтый для предупреждений */
    --aifranch-font: 'Poppins', sans-serif; /* Современный шрифт */
    --aifranch-radius: 12px;
    --aifranch-shadow: 0 6px 20px rgba(40, 50, 70, 0.1);
    --aifranch-transition: all 0.3s ease-in-out;
}

/* Подключение шрифта Poppins (пример) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Базовый размер */
}

body {
    font-family: var(--aifranch-font);
    line-height: 1.7;
    color: var(--aifranch-text);
    background-color: var(--aifranch-light);
}

.container {
    width: 90%;
    max-width: 1200px; /* Немного шире */
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--aifranch-dark);
    line-height: 1.3;
    margin-bottom: 0.75em;
    font-weight: 600;
}

h1 { font-size: 3em; font-weight: 700; letter-spacing: -1px;}
h2 { font-size: 2.4em; text-align: center; margin-bottom: 1.5em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }

p { margin-bottom: 1em; }
a { color: var(--aifranch-secondary); text-decoration: none; transition: var(--aifranch-transition); }
a:hover { color: var(--aifranch-primary); text-decoration: underline; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }

/* Иконки */
.aifranch-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5em;
}
.aifranch-icon.large-icon { font-size: 2.8em; color: var(--aifranch-secondary); }
.aifranch-icon.feature-icon { font-size: 2.2em; color: var(--aifranch-primary); display: block; margin-bottom: 15px; }
.aifranch-icon.huge-icon { font-size: 6em; color: var(--aifranch-success); }
.input-field-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--aifranch-grey-dark); font-size: 1.3em; pointer-events: none;}
.aifranch-icon.btn-icon { margin-left: 0.5em; margin-right: 0; }

/* === Кнопки AiFranch === */
.aifranch-btn {
    display: inline-block;
    padding: 14px 32px;
    border: 2px solid transparent;
    border-radius: var(--aifranch-radius);
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    transition: var(--aifranch-transition);
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.aifranch-btn-primary {
    background: linear-gradient(90deg, var(--aifranch-secondary) 0%, var(--aifranch-primary) 100%);
    color: var(--aifranch-light);
    border: none;
    box-shadow: 0 5px 15px rgba(60, 80, 250, 0.3);
}
.aifranch-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(60, 80, 250, 0.4);
}
.aifranch-btn-outline {
    background-color: var(--aifranch-light);
    color: var(--aifranch-primary);
    border: 2px solid var(--aifranch-primary);
}
.aifranch-btn-outline:hover {
    background-color: var(--aifranch-primary);
    color: var(--aifranch-light);
}
.aifranch-btn-icon-right {
    display: inline-flex;
    align-items: center;
}
.aifranch-btn:disabled {
    background: var(--aifranch-grey-medium);
    color: var(--aifranch-grey-dark);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    border-color: transparent;
}
.full-width { width: 100%; }

/* === Header AiFranch === */
.aifranch-header {
    background-color: var(--aifranch-light);
    padding: 15px 0;
    border-bottom: 1px solid var(--aifranch-grey-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.aifranch-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.aifranch-logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--aifranch-dark);
    display: inline-flex;
    align-items: center;
}
.aifranch-logo .aifranch-icon { color: var(--aifranch-primary); }
.aifranch-logo:hover { text-decoration: none; }

.aifranch-nav ul { display: flex; gap: 30px; }
.aifranch-nav a {
    color: var(--aifranch-text);
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
}
.aifranch-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--aifranch-primary);
    transition: width 0.3s ease;
}
.aifranch-nav a:hover { color: var(--aifranch-primary); text-decoration: none; }
.aifranch-nav a:hover::after { width: 100%; }

/* === Hero Section AiFranch === */
.aifranch-hero {
    padding: 80px 0 60px;
    background: linear-gradient(120deg, var(--aifranch-grey-light) 0%, var(--aifranch-light) 100%);
    overflow: hidden; /* Для анимаций */
}
.aifranch-hero-container {
    display: flex;
    align-items: center;
    gap: 50px;
}
.aifranch-hero-content {
    flex: 1 1 50%;
}
.aifranch-hero-image {
    flex: 1 1 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.aifranch-hero-subtitle {
    font-size: 1.2em;
    color: var(--aifranch-text);
    margin-bottom: 35px;
    max-width: 600px;
}
.aifranch-generator-form {
    margin-top: 20px;
}
.aifranch-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--aifranch-dark);
    font-size: 0.95em;
}
.aifranch-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}
.aifranch-input-wrapper input[type="text"],
.aifranch-requirements input {
    width: 100%;
    padding: 16px 18px 16px 55px; /* Увеличим padding */
    font-size: 1.05em;
    border: 1px solid var(--aifranch-grey-medium);
    border-radius: var(--aifranch-radius);
    transition: var(--aifranch-transition);
    background-color: var(--aifranch-light);
}
.aifranch-requirements input {
    padding: 12px 18px; /* Поля требований чуть меньше */
    font-size: 0.95em;
}

.aifranch-input-wrapper input[type="text"]:focus,
.aifranch-requirements input:focus {
    outline: none;
    border-color: var(--aifranch-primary);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.15);
}

/* Требования */
.aifranch-requirements {
    margin-top: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: var(--aifranch-grey-light);
    border-radius: var(--aifranch-radius);
    border: 1px solid var(--aifranch-grey-medium);
}
.aifranch-req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}
.aifranch-req-grid input { padding-left: 18px; /* Убираем место для иконки */}

.aifranch-generator-form .aifranch-btn {
    width: 100%;
    margin-top: 10px;
}

/* Область вывода */
.aifranch-output-section {
    padding: 60px 0;
    background-color: var(--aifranch-grey-light);
    border-top: 1px solid var(--aifranch-grey-medium);
}
.aifranch-output-section h2 { text-align: left; margin-bottom: 1em; }
.aifranch-generated-paper {
    background-color: var(--aifranch-light);
    padding: 30px 35px;
    border-radius: var(--aifranch-radius);
    box-shadow: var(--aifranch-shadow);
    border: 1px solid var(--aifranch-grey-medium);
    min-height: 200px;
    margin-bottom: 30px;
}
.aifranch-generated-paper h3 { color: var(--aifranch-primary); }
.aifranch-generated-paper ul { list-style: disc; padding-left: 25px; }
.aifranch-generated-paper li { margin-bottom: 8px; }
.aifranch-generated-paper p { margin-bottom: 0.8em; }

.aifranch-important-note {
    padding: 15px 20px;
    background-color: rgba(251, 191, 36, 0.1); /* Светло-желтый фон */
    border: 1px solid var(--aifranch-warning);
    border-radius: var(--aifranch-radius);
    color: #92400E; /* Темно-желтый текст */
    font-size: 0.95em;
}
.aifranch-important-note .aifranch-icon { color: var(--aifranch-warning); font-size: 1.2em;}
.aifranch-important-note strong { color: #78350F; }


/* === How it Works Section === */
.aifranch-how-it-works {
    padding: 80px 0;
    background-color: var(--aifranch-light);
}
.aifranch-steps-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start; /* Выравниваем по верху */
    gap: 30px;
    flex-wrap: wrap;
}
.aifranch-step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    padding: 20px;
}
.aifranch-step-icon-wrapper {
    margin-bottom: 20px;
    display: inline-block;
    padding: 15px;
    background: linear-gradient(135deg, var(--aifranch-secondary) 0%, var(--aifranch-primary) 100%);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(60, 80, 250, 0.2);
}
.aifranch-step-icon-wrapper .aifranch-icon {
    color: var(--aifranch-light);
    display: block; /* Чтобы не было лишних отступов */
    margin: 0;
}
.aifranch-step h3 { margin-bottom: 10px; font-size: 1.3em; }
.aifranch-step p { font-size: 0.95em; }
.aifranch-step-arrow {
    font-size: 2.5em;
    color: var(--aifranch-grey-medium);
    align-self: center; /* Стрелка по центру */
    margin: 0 20px;
}

/* === Features Section === */
.aifranch-features {
    padding: 80px 0;
    background-color: var(--aifranch-grey-light);
}
.aifranch-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.aifranch-feature-item {
    background-color: var(--aifranch-light);
    padding: 35px;
    border-radius: var(--aifranch-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--aifranch-grey-medium);
    transition: var(--aifranch-transition);
    text-align: center;
}
.aifranch-feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--aifranch-shadow);
    border-color: var(--aifranch-secondary);
}

/* === Uniqueness Section === */
.aifranch-uniqueness {
    padding: 80px 0;
    background: linear-gradient(45deg, var(--aifranch-success) 0%, #6EE7B7 100%); /* Зеленый градиент */
    color: var(--aifranch-dark);
}
.aifranch-uniqueness-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background-color: rgba(255, 255, 255, 0.85); /* Полупрозрачный белый фон */
    padding: 40px;
    border-radius: var(--aifranch-radius);
    box-shadow: var(--aifranch-shadow);
}
.aifranch-uniqueness-icon {
    flex-shrink: 0;
    text-align: center;
}
.aifranch-uniqueness-icon .aifranch-icon { color: var(--aifranch-success); }
.aifranch-uniqueness-content h2 { color: #065F46; } /* Темно-зеленый заголовок */
.aifranch-uniqueness-content ul { margin-top: 20px; padding-left: 5px; }
.aifranch-uniqueness-content li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}
.aifranch-uniqueness-content li .aifranch-icon {
    color: var(--aifranch-success);
    font-size: 1.3em;
    margin-right: 10px;
    margin-top: 2px;
}
.aifranch-uniqueness-content p:last-of-type { margin-top: 20px; font-style: italic; color: #047857; }

/* === Pricing Section === */
.aifranch-pricing {
    padding: 80px 0;
    background-color: var(--aifranch-light);
}
.aifranch-pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    align-items: stretch;
}
.aifranch-price-card {
    border: 1px solid var(--aifranch-grey-medium);
    border-radius: var(--aifranch-radius);
    padding: 35px;
    display: flex;
    flex-direction: column;
    background-color: var(--aifranch-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: var(--aifranch-transition);
    position: relative;
    overflow: hidden;
}
.aifranch-price-card:hover {
    box-shadow: var(--aifranch-shadow);
    transform: translateY(-5px);
}
.aifranch-popular-card {
    border-color: var(--aifranch-primary);
    border-width: 2px;
    box-shadow: 0 10px 30px rgba(106, 17, 203, 0.15);
}
.aifranch-popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, var(--aifranch-secondary), var(--aifranch-primary));
    color: var(--aifranch-light);
    padding: 8px 30px 8px 20px;
    font-size: 0.85em;
    font-weight: 600;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); /* Скошенная форма */
}
.aifranch-card-header {
    text-align: center;
    margin-bottom: 25px;
}
.aifranch-card-header h3 { color: var(--aifranch-primary); margin-bottom: 5px; }
.aifranch-card-header p { font-size: 0.9em; color: var(--aifranch-text); margin-bottom: 0; }
.aifranch-card-price {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--aifranch-dark);
    text-align: center;
    margin-bottom: 30px;
}
.aifranch-card-features {
    margin-bottom: 30px;
    flex-grow: 1;
    padding-left: 10px;
}
.aifranch-card-features li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    font-size: 0.95em;
}
.aifranch-card-features .aifranch-icon {
    color: var(--aifranch-secondary);
    margin-right: 10px;
    margin-top: 3px;
}
.aifranch-price-card .aifranch-btn { margin-top: auto; }

/* === Reviews Section === */
.aifranch-reviews {
    padding: 80px 0;
    background-color: var(--aifranch-grey-light);
}
.aifranch-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.aifranch-review-card {
    background-color: var(--aifranch-light);
    padding: 25px;
    border-radius: var(--aifranch-radius);
    box-shadow: var(--aifranch-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px; /* Примерная высота */
}
.aifranch-review-card p { font-style: italic; margin-bottom: 20px; flex-grow: 1; }
.aifranch-review-card footer {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--aifranch-grey-medium);
    padding-top: 15px;
    gap: 15px;
}
.aifranch-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.aifranch-review-card footer div:nth-of-type(1) { flex-grow: 1; } /* Имя и статус */
.aifranch-review-card footer strong { display: block; color: var(--aifranch-dark); }
.aifranch-review-card footer small { color: var(--aifranch-grey-dark); font-size: 0.85em; }
.aifranch-stars { color: var(--aifranch-warning); font-size: 1.1em; white-space: nowrap; }

/* === FAQ Section === */
.aifranch-faq {
    padding: 80px 0;
    background-color: var(--aifranch-light);
}
.aifranch-faq-list {
    max-width: 850px;
    margin: 0 auto;
}
.aifranch-faq-item {
    border-bottom: 1px solid var(--aifranch-grey-medium);
    margin-bottom: 10px;
}
.aifranch-faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--aifranch-dark);
    cursor: pointer;
    padding: 18px 0;
    list-style: none; /* Убрать стандартный маркер */
    transition: color 0.3s ease;
}
.aifranch-faq-item summary::-webkit-details-marker { display: none; } /* Убрать стандартный маркер в Chrome/Safari */
.aifranch-faq-item summary:hover { color: var(--aifranch-primary); }

.aifranch-faq-icon {
    font-size: 1.3em;
    font-weight: 500;
    color: var(--aifranch-secondary);
    transition: transform 0.3s ease;
}
.aifranch-faq-item[open] summary .aifranch-faq-icon {
    transform: rotate(45deg);
}
.aifranch-faq-item p {
    padding: 0 5px 20px 5px; /* Отступы для ответа */
    font-size: 0.95em;
    line-height: 1.8;
}
.aifranch-faq-item[open] summary { color: var(--aifranch-primary); }

/* === Footer AiFranch === */
.aifranch-footer {
    background-color: var(--aifranch-dark);
    color: var(--aifranch-grey-dark);
    padding: 60px 0 30px 0;
    font-size: 0.9em;
}
.aifranch-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.aifranch-footer-col .footer-logo { color: var(--aifranch-light); margin-bottom: 15px; font-size: 1.6em;}
.aifranch-footer-col p { line-height: 1.6; }
.aifranch-footer-col h4 {
    color: var(--aifranch-light);
    margin-bottom: 18px;
    font-size: 1.05em;
    font-weight: 600;
}
.aifranch-footer-col ul li { margin-bottom: 12px; }
.aifranch-footer-col a { color: var(--aifranch-grey-dark); }
.aifranch-footer-col a:hover { color: var(--aifranch-light); text-decoration: none; }
.aifranch-footer-col address span.aifranch-icon { color: var(--aifranch-secondary); margin-right: 8px; }
.aifranch-footer-col address a { color: var(--aifranch-grey-dark); }
.aifranch-footer-col address a:hover { color: var(--aifranch-light); }

.aifranch-footer-bottom {
    border-top: 1px solid #33334E; /* Темный разделитель */
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.aifranch-social-links a {
    color: var(--aifranch-grey-dark);
    margin-left: 15px;
    font-size: 1.4em; /* Крупнее иконки соцсетей */
    transition: var(--aifranch-transition);
}
.aifranch-social-links a:hover { color: var(--aifranch-secondary); }

/* === Адаптивность === */
@media (max-width: 1024px) {
    h1 { font-size: 2.6em; }
    h2 { font-size: 2.1em; }
    .aifranch-nav { margin-top: 10px; width: 100%; justify-content: center;} /* Навигация под кнопкой и лого */
    .aifranch-header-container { justify-content: space-between;} /* Возвращаем лого слева, кнопку справа */
    .aifranch-header-container .aifranch-btn { margin-left: auto;} /* Кнопка справа */
    .aifranch-hero-container { flex-direction: column; text-align: center; gap: 30px; }
    .aifranch-hero-content { order: 2; }
    .aifranch-hero-image { order: 1; max-width: 500px; }
    .aifranch-hero-subtitle { margin-left: auto; margin-right: auto; }
    .aifranch-generator-form .aifranch-btn { max-width: 400px; margin: 10px auto 0 auto; }
    .aifranch-steps-container { flex-direction: column; align-items: center; }
    .aifranch-step-arrow { transform: rotate(90deg); margin: 10px 0; }
    .aifranch-uniqueness-container { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.9em; }
    .aifranch-header-container { flex-direction: column; gap: 15px; }
    .aifranch-header-container .aifranch-btn { margin: 10px 0 0 0;} /* Кнопка по центру */
    .aifranch-nav ul { gap: 20px; flex-wrap: wrap; justify-content: center; }
    .aifranch-pricing-cards { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto; }
    .aifranch-reviews-grid { grid-template-columns: 1fr; }
    .aifranch-footer-grid { grid-template-columns: 1fr; text-align: center; }
    .aifranch-footer-col address { text-align: center;}
    .aifranch-footer-bottom { flex-direction: column; text-align: center; gap: 10px;}
}

@media (max-width: 480px) {
    h1 { font-size: 1.9em; }
    h2 { font-size: 1.7em; }
    .container { width: 95%; }
    .aifranch-hero { padding: 50px 0 30px; }
    .aifranch-btn { padding: 12px 25px; font-size: 0.95em; }
    .aifranch-input-wrapper input[type="text"], .aifranch-requirements input { font-size: 1em; padding-top: 14px; padding-bottom: 14px; padding-left: 48px; }
    .aifranch-requirements input { padding-left: 15px; }
    .aifranch-req-grid { grid-template-columns: 1fr; } /* Поля требований друг под другом */
    .aifranch-generated-paper { padding: 20px 25px; }
    .aifranch-faq-item summary { font-size: 1.1em; }
}