/* ===== books.css - Стили для страницы продаж книг ===== */

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Типография */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.8rem;
    color: #597d89;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: #597d89;
    transition: color 0.3s ease;
}

a:hover {
    color: #4a6a75;
}

/* SEO-текстовый блок */
.seo-intro {
    padding: 30px 0;
    background: white;
    border-bottom: 1px solid #eaeaea;
}

.seo-intro h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.books-description {
    max-width: 800px;
    margin: 0 auto;
}

.books-description p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #597d89;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: #4a6a75;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #597d89;
    color: #597d89;
}

.btn-outline:hover {
    background: #597d89;
    color: white;
}

.btn-buy {
    background: #27ae60;
    width: 100%;
    margin-top: 0.8rem;
    padding: 12px;
}

.btn-buy:hover {
    background: #219653;
}

.btn-buy-now {
    background: #e74c3c;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.btn-buy-now:hover {
    background: #c0392b;
}

/* Кнопки для скачивания */
.btn-download, .btn-download-all {
    background: #27ae60;
    margin: 0.2rem;
    padding: 0.8rem;
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
}

.btn-download:hover, .btn-download-all:hover {
    background: #219653;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.btn-download-all {
    grid-column: 1 / -1;
}

.btn-send-email {
    background: #3498db;
    white-space: nowrap;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
}

.btn-send-email:hover {
    background: #2980b9;
}

.btn-retry {
    background: #e74c3c;
    width: 100%;
    margin-top: 0.8rem;
    padding: 12px;
}

.btn-retry:hover {
    background: #c0392b;
}

/* Стили для кнопки бесплатного фрагмента */
.btn-fragment {
    background: #3498db;
    color: white;
    width: 100%;
    margin-top: 0.8rem;
    padding: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.btn-fragment:hover {
    background: #2980b9;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.btn-fragment i {
    font-size: 0.9rem;
    color: white;
}

/* Шапка */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #597d89;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    font-weight: 600;
    position: relative;
    font-size: 0.95rem;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #597d89;
}

/* Хлебные крошки */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 0.8rem 0;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.breadcrumbs span {
    color: #666;
}

/* SEO-текстовый блок продаж */
.seo-sales-block {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
    padding: 50px 0;
    text-align: center;
}

.seo-sales-block h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.2rem;
}

.seo-sales-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-sales-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    opacity: 0.95;
}

.seo-highlight {
    color: #27ae60;
    font-weight: bold;
}

/* Герой-секция продаж */
.sales-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #597d89 100%);
    color: white;
    padding: 50px 0;
    text-align: center;
}

.sales-hero h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-subtitle strong {
    color: #27ae60;
}

.hero-subtitle del {
    opacity: 0.7;
}

/* Сравнение цен */
.price-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    max-width: 850px;
    margin: 2.5rem auto;
    align-items: center;
}

.price-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    color: #333;
}

.our-price {
    border: 3px solid #27ae60;
}

.their-price {
    border: 3px solid #e74c3c;
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
}

.our-price .price-badge {
    background: #27ae60;
    color: white;
}

.their-price .price-badge {
    background: #e74c3c;
    color: white;
}

.price-badge.bad {
    background: #e74c3c;
}

.price-card h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.price {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0.8rem 0;
}

.our-price .price {
    color: #27ae60;
}

.their-price .price {
    color: #e74c3c;
}

.benefits {
    list-style: none;
    text-align: left;
}

.benefits li {
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.benefits i {
    margin-right: 0.4rem;
    width: 16px;
}

.benefits .fa-check {
    color: #27ae60;
}

.benefits .fa-times {
    color: #e74c3c;
}

.vs {
    font-size: 1.3rem;
    font-weight: bold;
    background: #34495e;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Калькулятор экономии */
.savings-calc {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border: 3px solid #27ae60;
    color: #2c3e50;
}

.savings-calc h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.savings-amount {
    font-size: 2.2rem;
    font-weight: bold;
    color: #27ae60;
    margin: 0.8rem 0;
}

.savings-calc p {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0;
    font-weight: 600;
}

/* Секция "Почему выгодно" */
.why-buy-direct {
    padding: 40px 0;
    background: #f8f9fa;
}

.why-buy-direct h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.reason-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-3px);
}

.reason-icon {
    font-size: 2.5rem;
    color: #597d89;
    margin-bottom: 1.2rem;
}

.reason-card h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.reason-card p {
    font-size: 0.9rem;
}

/* Каталог книг */
.books-catalog {
    padding: 60px 0;
    background: white;
}

.books-catalog h2 {
    text-align: center;
    margin-bottom: 0.8rem;
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #666;
    font-size: 1rem;
}

/* Фильтры */
.catalog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.7rem 1.2rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.85rem;
}

.filter-btn:hover {
    border-color: #597d89;
}

.filter-btn.active {
    background: #597d89;
    color: white;
    border-color: #597d89;
}

/* Сетка книг */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 650px;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e74c3c;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.book-cover {
    height: 280px;
    overflow: hidden;
    background: #c8e4ed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    flex-shrink: 0;
}

.book-cover img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.book-card:hover .book-cover img {
    transform: scale(1.03);
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КАРТОЧКИ КНИГИ */
.book-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 320px;
}

.book-info h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
    line-height: 1.3;
    min-height: 2.8rem;
    display: flex;
    align-items: flex-start;
}

.book-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.8rem;
    gap: 0.3rem;
    flex: 1;
}

.book-meta .series {
    flex: 1;
    line-height: 1.4;
    min-height: 2.8rem;
}

.book-meta .pages {
    color: #27ae60;
    font-weight: 600;
    align-self: flex-start;
}

.price-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.our-price, .their-price {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.our-price .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
    display: block;
    line-height: 1.2;
}

.their-price .price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    display: block;
    line-height: 1.2;
}

.price-label {
    font-size: 0.75rem;
    color: #666;
    display: block;
    margin-top: 0.2rem;
}

.savings {
    text-align: center;
    color: #27ae60;
    font-weight: bold;
    margin: 0.3rem 0;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ИСПРАВЛЕННЫЙ КОНТЕЙНЕР ДЛЯ КНОПОК - ВСЕ КНОПКИ НА ОДНОМ УРОВНЕ */
.book-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    min-height: 110px;
    justify-content: flex-end;
}

/* ГАРАНТИЯ ОДИНАКОВОГО ПОЛОЖЕНИЯ КНОПОК ВО ВСЕХ КАРТОЧКАХ */
.book-buttons .btn,
.book-buttons .btn-fragment,
.book-buttons .btn-buy {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    flex-shrink: 0;
    margin-top: 0 !important;
    position: relative;
    bottom: 0;
}

/* Отзывы */
.testimonials-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-size: 3rem;
    color: #597d89;
    opacity: 0.2;
    position: absolute;
    top: 8px;
    left: 15px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

.testimonial-author {
    text-align: right;
}

.testimonial-author strong {
    color: #2c3e50;
}

.testimonial-author span {
    font-size: 0.85rem;
    color: #666;
}

/* Агрегаторы */
.aggregators-section {
    padding: 40px 0;
    background: white;
    border-top: 1px solid #eaeaea;
}

.aggregators-section h2 {
    text-align: center;
    margin-bottom: 0.8rem;
}

.aggregators-compact {
    max-width: 600px;
    margin: 1.5rem auto;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
}

.aggregator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #eaeaea;
    font-size: 0.9rem;
}

.aggregator-item:last-child {
    border-bottom: none;
}

.aggregator-name {
    font-weight: 600;
}

.aggregator-price {
    color: #e74c3c;
    font-weight: bold;
}

.aggregator-link {
    color: #597d89;
    font-size: 0.85rem;
}

.aggregators-note {
    max-width: 600px;
    margin: 1.5rem auto 0;
    padding: 0.8rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    text-align: center;
}

.aggregators-note p {
    margin-bottom: 0;
    color: #856404;
    font-size: 0.9rem;
}

/* FAQ */
.faq-section {
    padding: 40px 0 60px;
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.faq-item h3 {
    color: #597d89;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.faq-item p {
    margin-bottom: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Подвал */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: white;
}

/* КОМПАКТНОЕ МОДАЛЬНОЕ ОКНО ОПЛАТЫ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 10px 0;
}

.modal.compact-modal {
    /* Специфические стили для компактного модального окна */
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 1.2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    max-height: 85vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 0.8rem;
    top: 0.8rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
}

#modalBookInfo {
    text-align: center;
    margin-bottom: 1.2rem;
}

#modalBookInfo h3 {
    color: #2c3e50;
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.6rem;
}

#modalBookInfo p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Стили для шагов оплаты */
.payment-step {
    display: none;
}

.payment-step.active {
    display: block;
}

.qr-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.2rem 0;
}

.qr-code {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #dee2e6;
}

.qr-placeholder {
    color: #6c757d;
}

.qr-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    display: block;
}

.qr-placeholder p {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.qr-placeholder small {
    font-size: 0.75rem;
}

.payment-instructions {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.payment-instructions h3 {
    margin-bottom: 0.6rem;
    font-size: 1rem;
    color: #2c3e50;
}

.payment-instructions ol {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
}

.payment-instructions li {
    margin-bottom: 0.3rem;
}

.payment-status {
    text-align: center;
    margin: 1rem 0;
    padding: 0.8rem;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 0.9rem;
}

.status-waiting {
    color: #856404;
}

.status-success {
    color: #155724;
    background: #d4edda !important;
}

.payment-timer {
    text-align: center;
    font-weight: bold;
    color: #dc3545;
    margin: 0.8rem 0;
    font-size: 0.9rem;
}

/* Стили для шага скачивания */
.success-message {
    text-align: center;
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.success-message i {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.success-message p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.download-section h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}

.download-buttons .btn {
    padding: 0.6rem;
    font-size: 0.8rem;
}

.email-section {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #dee2e6;
}

.email-section h3 {
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.email-section p {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.email-section .form-group {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.email-section input {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.85rem;
}

.email-success {
    color: #155724;
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.85rem;
}

.email-success i {
    margin-right: 0.3rem;
}

/* Стили для шага ошибки */
.error-message {
    text-align: center;
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.error-message i {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.error-message p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Графическая заглушка для книг */
.book-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #597d89 0%, #2c3e50 100%);
    color: white;
    padding: 1rem;
}

.book-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.book-placeholder span {
    font-size: 0.8rem;
    text-align: center;
    opacity: 0.9;
    line-height: 1.3;
}

.fa-book-circle-xmark:before {
    content: "📕";
    font-style: normal;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .price-comparison {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
    }
    
    .vs {
        margin: 0.5rem auto;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.2rem;
    }
    
    /* Адаптивность для book-card на мобильных */
    .book-card {
        min-height: 620px;
    }
    
    .book-info {
        min-height: 300px;
        padding: 1rem;
    }
    
    .book-info h3 {
        font-size: 1rem;
        min-height: 2.6rem;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .seo-sales-block h1 {
        font-size: 1.6rem;
    }
    
    .seo-sales-content p {
        font-size: 1rem;
    }
    
    .download-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .email-section .form-group {
        flex-direction: column;
    }
    
    /* Модальное окно на мобильных */
    .modal-content {
        margin: 1% auto;
        padding: 1rem;
        max-height: 90vh;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    /* Адаптивность для book-card на маленьких экранах */
    .book-card {
        min-height: 600px;
    }
    
    .book-info {
        min-height: 280px;
        padding: 0.8rem;
    }
    
    .book-info h3 {
        font-size: 0.95rem;
        min-height: 2.4rem;
    }
    
    .catalog-filters {
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .testimonials-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-sales-block {
        padding: 30px 0;
    }
    
    .seo-sales-block h1 {
        font-size: 1.4rem;
    }
    
    .seo-sales-content p {
        font-size: 0.95rem;
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
    
    /* Модальное окно на маленьких экранах */
    .modal-content {
        margin: 0.5% auto;
        padding: 0.8rem;
        width: 98%;
    }
    
    .qr-container {
        gap: 0.8rem;
    }
    
    .payment-instructions {
        padding: 0.8rem;
    }
    
    /* Адаптивность для book-meta на маленьких экранах */
    .book-meta {
        font-size: 0.8rem;
    }
    
    .price-section {
        gap: 0.5rem;
    }
    
    .our-price .price {
        font-size: 1.1rem;
    }
    
    .their-price .price {
        font-size: 0.8rem;
    }
    
    .book-buttons .btn,
    .book-buttons .btn-fragment,
    .book-buttons .btn-buy {
        min-height: 40px;
        font-size: 0.85rem;
        padding: 10px;
    }
}
/* Стили для выбора формата */
.format-selection {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.format-selection h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #2c3e50;
}

.format-options {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.format-option {
    position: relative;
}

.format-option input[type="radio"] {
    display: none;
}

.format-option label {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
}

.format-option input[type="radio"]:checked + label {
    border-color: #27ae60;
    background: #f0f9f0;
}

.format-option label i {
    font-size: 1.2rem;
    color: #597d89;
    margin-bottom: 0.5rem;
}

.format-option label strong {
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.format-option label span {
    color: #666;
    font-size: 0.85rem;
}

.single-format-selection {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.single-format-selection h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: #2c3e50;
}

.format-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.format-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.format-btn:hover {
    border-color: #597d89;
}

.format-btn.selected {
    border-color: #27ae60;
    background: #f0f9f0;
}

.format-btn i {
    font-size: 1.5rem;
    color: #597d89;
    margin-bottom: 0.5rem;
}

.format-btn span {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.format-btn small {
    color: #666;
    font-size: 0.75rem;
    text-align: center;
}

.email-section-payment {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.email-section-payment h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #2c3e50;
}

.email-note {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.4rem;
}

/* Адаптивность для выбора формата */
@media (max-width: 768px) {
    .format-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .format-option label {
        min-height: 70px;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .format-buttons {
        grid-template-columns: 1fr;
    }
    
    .format-selection,
    .email-section-payment {
        padding: 1rem;
    }
}
/* ===== СТИЛИ ДЛЯ БЛОКА ГОЛОСОВАНИЯ ===== */
.books-voting-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
}

.books-voting-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}

.books-voting-section .section-intro {
    text-align: center;
    color: #c8e4ed;
    margin-bottom: 2rem;
}

.votes-counter {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin: 0 auto 2rem;
    color: white;
}

.votes-counter span {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.2rem;
}

.voting-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.voting-block {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.book-vote-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    transition: background-color 0.3s ease;
    color: white;
}

.book-vote-item:hover:not(.empty-slot) {
    background: rgba(255,255,255,0.08);
}

.empty-slot {
    opacity: 0.5;
}

.vote-btn {
    background: none;
    border: 2px solid #597d89;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #597d89;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.vote-btn:hover:not(:disabled) {
    border-color: #c8e4ed;
    color: #c8e4ed;
}

.vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.vote-btn.voted {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.vote-btn.voted i {
    color: white;
}

.book-title {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.3;
    min-width: 0;
    color: white;
}

.vote-progress {
    width: 60px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.vote-stats {
    font-size: 0.7rem;
    color: #c8e4ed;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.voting-footer {
    text-align: center;
    margin-top: 2rem;
}

.captcha-container {
    margin-bottom: 1rem;
}

.captcha-challenge {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    color: white;
}

.captcha-task {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

#captchaAnswer {
    padding: 0.5rem;
    border: 1px solid #597d89;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    width: 60px;
    text-align: center;
}

.btn-submit-votes {
    background: #27ae60;
    padding: 12px 30px;
    font-size: 1.1rem;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-votes:hover:not(:disabled) {
    background: #219653;
}

.btn-submit-votes:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.voting-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Стили для иконки сердца в кнопке отправки */
.btn-submit-votes i {
    background: #e74c3c;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-right: 0.8rem;
}

.btn-submit-votes:disabled i {
    background: #95a5a6;
    border-color: #bdc3c7;
}

/* Стили для панели администратора */
.admin-panel {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid #e74c3c;
    border-radius: 10px;
    color: white;
}

.admin-controls {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-badge {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-admin {
    background: #3498db;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-admin:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-logout {
    background: #e74c3c;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Визуальные стили для режима администратора */
.admin-mode .vote-btn {
    border-color: #e74c3c;
    animation: pulse 2s infinite;
}

.admin-mode .vote-btn:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
}

.admin-mode .book-vote-item:hover {
    background: rgba(231, 76, 60, 0.05);
    border-left: 3px solid #e74c3c;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Адаптивность для всего блока голосования */
@media (max-width: 1024px) {
    .voting-grid-three {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .voting-block {
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    .books-voting-section {
        padding: 30px 0;
        background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    }
    
    .voting-grid-three {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .voting-block {
        padding: 1rem;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    .book-vote-item {
        flex-wrap: wrap;
        padding: 0.8rem;
        gap: 0.6rem;
        background: rgba(255,255,255,0.03);
        color: white;
    }
    
    .vote-progress {
        width: 100%;
        order: 3;
        margin-top: 0.5rem;
        background: rgba(255,255,255,0.2);
    }
    
    .vote-stats {
        order: 4;
        text-align: left;
        margin-top: 0.3rem;
        min-width: 60px;
        color: #c8e4ed;
    }
    
    .captcha-task {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    #captchaAnswer {
        width: 100px;
    }
    
    .votes-counter {
        margin: 0 auto 1.5rem;
        padding: 0.4rem 0.8rem;
        background: rgba(255,255,255,0.1);
        color: white;
    }
    
    .captcha-challenge {
        background: rgba(255,255,255,0.1);
        color: white;
    }
}

@media (max-width: 480px) {
    .books-voting-section {
        padding: 20px 0;
        background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    }
    
    .books-voting-section h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
        color: white;
    }
    
    .books-voting-section .section-intro {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        color: #c8e4ed;
    }
    
    .voting-grid-three {
        gap: 0.8rem;
    }
    
    .voting-block {
        padding: 0.8rem;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    .book-vote-item {
        padding: 0.6rem;
        gap: 0.5rem;
        background: rgba(255,255,255,0.03);
        color: white;
    }
    
    .book-title {
        font-size: 0.8rem;
        line-height: 1.2;
        color: white;
    }
    
    .vote-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-color: #597d89;
        color: #597d89;
    }
    
    .vote-progress {
        height: 4px;
        background: rgba(255,255,255,0.2);
    }
    
    .vote-stats {
        font-size: 0.65rem;
        min-width: 50px;
        color: #c8e4ed;
    }
    
    .captcha-challenge {
        padding: 0.8rem;
        background: rgba(255,255,255,0.1);
        color: white;
    }
    
    .captcha-challenge p {
        font-size: 0.9rem;
        color: white;
    }
    
    #captchaAnswer {
        width: 80px;
        padding: 0.4rem;
    }
    
    .votes-counter {
        font-size: 0.9rem;
        padding: 0.3rem 0.7rem;
        background: rgba(255,255,255,0.1);
        color: white;
    }
    
    .votes-counter span {
        font-size: 1.1rem;
        color: #27ae60;
    }
    
    .btn-submit-votes {
        background: #27ae60;
        color: white;
    }
    
    .btn-submit-votes:disabled {
        background: #95a5a6;
        color: white;
    }
}

/* Адаптивность для панели администратора */
@media (max-width: 768px) {
    .admin-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-badge {
        order: -1;
    }
    
    .btn-admin {
        width: 100%;
        text-align: center;
    }
}
/* ===== КОНЕЦ СТИЛЕЙ ДЛЯ БЛОКА ГОЛОСОВАНИЯ ===== */

/* ФИКС ДЛЯ МОБИЛЬНОГО ГОЛОСОВАНИЯ */
@media (max-width: 768px) {
    .books-voting-section {
        background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%) !important;
        color: white !important;
    }
    
    .voting-block {
        background: rgba(255,255,255,0.1) !important;
    }
    
    .book-vote-item {
        background: rgba(255,255,255,0.05) !important;
        color: white !important;
    }
    
    .book-title {
        color: white !important;
    }
    
    .votes-counter {
        background: rgba(255,255,255,0.2) !important;
        color: white !important;
    }
}/* ===== КОНЕЦ ФИКС ДЛЯ МОБИЛЬНОГО ГОЛОСОВАНИЯ ===== */