/* ========== ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ РАЗДЕЛА ========== */

/* Базовые стили для всех документов */
.legal-document,
.consent-document,
.loyalty-document,
.offer-document,
.privacy-document {
    margin: 0 auto;
}
/* Мета-информация документа */
.legal-document .doc-meta,
.consent-document .doc-meta,
.loyalty-document .doc-meta,
.offer-document .doc-meta,
.privacy-document .doc-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 1px dashed #ddd;
}

.legal-document .doc-meta p,
.consent-document .doc-meta p,
.loyalty-document .doc-meta p,
.offer-document .doc-meta p,
.privacy-document .doc-meta p {
    margin: 5px 0;
}

/* Текст и списки */
.legal-document p,
.consent-document p,
.loyalty-document p,
.offer-document p,
.privacy-document p {
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
    text-align: justify;
}

.legal-document ul,
.consent-document ul,
.loyalty-document ul,
.offer-document ul,
.privacy-document ul,
.legal-document ol,
.consent-document ol,
.loyalty-document ol,
.offer-document ol,
.privacy-document ol {
    margin: 15px 0 15px 25px;
    line-height: 1.6;
}

.legal-document li,
.consent-document li,
.loyalty-document li,
.offer-document li,
.privacy-document li {
    margin-bottom: 8px;
    color: #444;
}

.legal-document strong,
.consent-document strong,
.loyalty-document strong,
.offer-document strong,
.privacy-document strong {
    color: #333;
    font-weight: 600;
}

/* Блоки с реквизитами и контактами */
.legal-document .company-details,
.consent-document .company-details,
.loyalty-document .contact-block,
.privacy-document .contact-block,
.legal-document .company-details-card {
    background-color: #f8f9fa;
    border-left: 4px solid #e31e24;
    padding: 20px 25px;
    margin: 20px 0 30px;
    border-radius: 0 8px 8px 0;
    line-height: 1.8;
    font-size: 15px;
}

.legal-document .company-details p,
.consent-document .company-details p,
.loyalty-document .contact-block p,
.privacy-document .contact-block p,
.legal-document .company-details-card p {
    margin-bottom: 8px;
}

.legal-document .company-details p:last-child,
.consent-document .company-details p:last-child,
.loyalty-document .contact-block p:last-child,
.privacy-document .contact-block p:last-child,
.legal-document .company-details-card p:last-child {
    margin-bottom: 0;
}

.legal-document .company-details a,
.consent-document .company-details a,
.loyalty-document .contact-block a,
.privacy-document .contact-block a {
    color: #e31e24;
    text-decoration: none;
}

.legal-document .company-details a:hover,
.consent-document .company-details a:hover,
.loyalty-document .contact-block a:hover,
.privacy-document .contact-block a:hover {
    text-decoration: underline;
}

/* Специальные ссылки */
.legal-document .email-link,
.consent-document .email-link,
.privacy-document .email-link {
    color: #e31e24;
    text-decoration: none;
    border-bottom: 1px dotted #e31e24;
}

.legal-document .email-link:hover,
.consent-document .email-link:hover,
.privacy-document .email-link:hover {
    border-bottom: 1px solid #e31e24;
}

.legal-document .offer-link,
.consent-document .offer-link {
    color: #e31e24;
    text-decoration: none;
    font-weight: 500;
}

.legal-document .offer-link:hover,
.consent-document .offer-link:hover {
    text-decoration: underline;
}

/* Выделенные блоки (note, stage) */
.legal-document .note-box,
.consent-document .note-box,
.loyalty-document .note-box,
.offer-document .note-box,
.privacy-document .note-box,
.loyalty-document .stage-box {
    background-color: #f8f9fa;
    border-left: 4px solid #e31e24;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
}

.legal-document .note-box p:last-child,
.consent-document .note-box p:last-child,
.loyalty-document .note-box p:last-child,
.offer-document .note-box p:last-child,
.privacy-document .note-box p:last-child,
.loyalty-document .stage-box p:last-child {
    margin-bottom: 0;
}

/* Основной контент (для главной страницы) */
.legal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    margin-bottom: 40px;
}

.legal-content p {
    color: #444;
    margin-bottom: 20px;
    line-height: 1.6;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

/* ========== СТИЛИ ТОЛЬКО ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ========== */
.legal-info-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e31e24;
}

/* Сетка документов */
.legal-documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.legal-document-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.legal-document-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #e31e24;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.legal-document-card:hover {
    box-shadow: 0 5px 20px rgba(227, 30, 36, 0.15);
    border-color: #e31e24;
    transform: translateY(-2px);
}

.legal-document-card:hover::before {
    transform: scaleY(1);
}

.legal-document-icon {
    width: 48px;
    height: 48px;
    background: #fff0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #e31e24;
}

.legal-document-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.legal-document-card:hover .legal-document-title {
    color: #e31e24;
}

.legal-document-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

.legal-document-arrow {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #e31e24;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.legal-document-card:hover .legal-document-arrow {
    opacity: 1;
    right: 20px;
}

/* ========== КНОПКИ ========== */
/* Кнопка скачивания */
.download-doc-wrapper {
    margin-bottom: 25px;
    text-align: right;
}

.download-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e31e24;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-doc-btn:hover {
    background-color: #c01016;
    color: #fff;
    text-decoration: none;
}

.download-icon {
    width: 18px;
    height: 18px;
}

/* Кнопка возврата */
.btn-wrapper {
    margin-top: 40px;
    text-align: center;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .legal-document h1,
    .consent-document h1,
    .loyalty-document h1,
    .offer-document h1,
    .privacy-document h1 {
        font-size: 24px;
    }
    
    .legal-document h2,
    .consent-document h2,
    .loyalty-document h2,
    .offer-document h2,
    .privacy-document h2 {
        font-size: 18px;
    }
    
    .legal-document ul,
    .consent-document ul,
    .loyalty-document ul,
    .offer-document ul,
    .privacy-document ul,
    .legal-document ol,
    .consent-document ol,
    .loyalty-document ol,
    .offer-document ol,
    .privacy-document ol {
        margin-left: 15px;
    }
    
    .legal-document .company-details,
    .consent-document .company-details,
    .loyalty-document .contact-block,
    .privacy-document .contact-block,
    .legal-document .company-details-card {
        padding: 15px;
    }
    
    .legal-info-title {
        font-size: 24px;
    }
    
    .legal-documents {
        grid-template-columns: 1fr;
    }
    
    .legal-document-arrow {
        display: none;
    }
    
    .download-doc-wrapper {
        text-align: center;
    }
    
    .download-doc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .legal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-document-card {
        padding: 20px;
    }
}