/* Styles for index.html */

/* Анимации fade-in */
.fade-in {
    animation: fadeIn 0.6s ease-in;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.welcome-section {
    text-align: center;
    padding: 1.1rem 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0.7rem 0;
    min-height: unset;
    max-height: 120px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-section h1 {
    color: #2c3e50;
    font-size: 1.45rem;
    margin-bottom: 0.7rem;
}

.welcome-section .lead {
    color: #6c757d;
    font-size: 1.02rem;
    line-height: 1.5;
}

.document-workflow-card {
    position: relative;
    background: linear-gradient(135deg, #1f2a44 0%, #223552 55%, #2c3e50 100%);
    border-radius: 20px; /* Уменьшили с 24px */
    padding: 1.5rem; /* Уменьшили с 2.25rem */
    color: #f8f9fa;
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.35);
    overflow: hidden;
    margin-bottom: 2rem; /* Уменьшили с 2.5rem */
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.document-workflow-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(111, 207, 255, 0.22), transparent 55%);
    opacity: 0.75;
    pointer-events: none;
}

.document-workflow-card__top,
.document-workflow-card__stats,
.document-workflow-card__actions {
    position: relative;
    z-index: 1;
}

.document-workflow-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem; /* Уменьшили с 2.5rem */
    margin-bottom: 1.25rem; /* Уменьшили с 2rem */
}

.document-workflow-card__intro {
    flex: 1 1 320px;
}

.document-workflow-card__eyebrow {
    display: none; /* Скрываем, так как элемент удален */
}

.document-workflow-card__title {
    font-size: 1.4rem; /* Уменьшили с 1.95rem */
    font-weight: 700;
    margin: 0 0 0.5rem 0; /* Уменьшили отступ */
    color: #ffffff;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.document-workflow-card__description {
    margin: 0;
    max-width: 520px;
    font-size: 0.85rem; /* Уменьшили с 1rem */
    line-height: 1.5; /* Уменьшили с 1.6 */
    color: rgba(232, 239, 255, 0.9);
}

.document-workflow-card__visual {
    flex: 0 0 90px; /* Уменьшили с 168px */
    display: flex;
    justify-content: center;
}

.document-workflow-card__visual-icon {
    width: 80px; /* Уменьшили с 148px */
    height: 80px; /* Уменьшили с 148px */
    border-radius: 18px; /* Уменьшили с 28px */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; /* Уменьшили с 3rem */
    color: #f6d365;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.document-workflow-card__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Уменьшили minmax с 240px */
    gap: 1rem; /* Уменьшили с 1.25rem */
    margin-bottom: 1.5rem; /* Уменьшили с 2.15rem */
}

.document-stat {
    display: flex;
    align-items: center;
    gap: 0.9rem; /* Уменьшили с 1.1rem */
    padding: 0.9rem 1rem; /* Уменьшили с 1.25rem 1.35rem */
    border-radius: 14px; /* Уменьшили с 18px */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.document-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    background: rgba(255, 255, 255, 0.14);
}

.document-stat__icon {
    width: 42px; /* Уменьшили с 52px */
    height: 42px; /* Уменьшили с 52px */
    border-radius: 12px; /* Уменьшили с 16px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem; /* Уменьшили с 1.6rem */
    color: #1f2a44;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.document-stat__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.document-stat__label {
    font-size: 0.75rem; /* Уменьшили с 0.85rem */
    letter-spacing: 0.02em;
    color: rgba(232, 239, 255, 0.85);
}

.document-stat__value {
    font-size: 1.8rem; /* Уменьшили с 2.4rem */
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
}

.document-stat__caption {
    font-size: 0.7rem; /* Уменьшили с 0.8rem */
    color: rgba(232, 239, 255, 0.7);
}

.document-stat--pending .document-stat__icon {
    color: #1f2a44;
    background: linear-gradient(135deg, #ffd166 0%, #f6ad55 100%);
}

.document-stat--in-progress .document-stat__icon {
    color: #0f172a;
    background: linear-gradient(135deg, #6ed0ff 0%, #4ca1ff 100%);
}

.document-workflow-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.document-action {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.35rem;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.document-action i {
    font-size: 1.1rem;
}

.document-action:hover,
.document-action:focus {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
    text-decoration: none;
}

.document-action--primary {
    background: rgba(255, 255, 255, 0.92);
}

.document-action--primary:hover,
.document-action--primary:focus {
    background: white;
}

.document-action--create {
    background: linear-gradient(135deg, #59e391 0%, #2ecc71 100%);
    color: #083b2e;
    box-shadow: 0 10px 28px rgba(46, 204, 113, 0.35);
}

.document-action--create:hover,
.document-action--create:focus {
    background: linear-gradient(135deg, #7ff3b3 0%, #4ade80 100%);
}

.document-action--workflow {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    color: #0f172a;
    box-shadow: 0 10px 28px rgba(96, 165, 250, 0.35);
}

.document-action--workflow:hover,
.document-action--workflow:focus {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.document-workflow-card__actions a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

.document-workflow-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -60px;
    right: -40px;
}

.document-workflow-card__visual-icon {
    position: relative;
}

.document-workflow-card__visual-icon i {
    position: relative;
    z-index: 1;
}

.document-workflow-card__visual-icon::before {
    content: "";
    position: absolute;
    inset: -8px; /* Уменьшили с -14px */
    border-radius: 20px; /* Уменьшили с 32px */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0.65;
}

.document-workflow-card__visual-icon::after {
    content: "";
    position: absolute;
    inset: 10px; /* Уменьшили с 18px */
    border-radius: 14px; /* Уменьшили с 20px */
    background: rgba(15, 23, 42, 0.25);
    z-index: 0;
    box-shadow: inset 0 8px 18px rgba(8, 13, 23, 0.4);
}

.document-workflow-card__visual-icon i {
    z-index: 2;
}

@media (max-width: 992px) {
    .document-workflow-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .document-workflow-card {
        padding: 1.75rem;
    }

    .document-workflow-card__top {
        gap: 1.5rem;
    }

    .document-workflow-card__title {
        font-size: 1.25rem; /* Уменьшили пропорционально */
    }

    .document-workflow-card__description {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .document-workflow-card__visual {
        flex-basis: 70px; /* Уменьшили с 120px */
    }

    .document-workflow-card__visual-icon {
        width: 70px; /* Уменьшили с 120px */
        height: 70px; /* Уменьшили с 120px */
        font-size: 1.5rem; /* Уменьшили с 2.4rem */
    }

    .document-workflow-card__stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.75rem;
    }

    .document-workflow-card__actions {
        flex-direction: column;
    }

    .document-action {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .document-workflow-card {
        padding: 1.35rem;
        border-radius: 20px;
    }

    .document-workflow-card__title {
        font-size: 1.15rem; /* Уменьшили пропорционально */
    }

    .document-workflow-card__visual {
        display: none;
    }

    .document-stat {
        padding: 1.1rem;
    }

    .document-stat__icon {
        width: 48px;
        height: 48px;
    }

    .document-stat__value {
        font-size: 2.1rem;
    }
}

.section-title {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 3px 6px rgba(0,0,0,0.5);
    margin-bottom: 1.1rem;
    text-align: center;
    background-color: #000000;
    padding: 10px 16px;
    border-radius: 15px;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* Карточки тестов */
.test-card-wrapper {
    transition: transform 0.3s ease;
}

.test-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
    height: 100%;
    min-height: 336px;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Активные тесты */
.test-card.active-test {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.test-card.active-test .test-title {
    color: #2c3e50;
}

.test-card.active-test .test-meta {
    color: #6c757d;
}

.test-card.active-test .brand-info i,
.test-card.active-test .category-info i,
.test-card.active-test .deadline-info i,
.test-card.active-test .attempts-info i,
.test-card.active-test .test-period i {
    color: #6c757d;
}

/* Переопределяем цвета для срочных дедлайнов в активных тестах */
.test-card.active-test .deadline-info.warning {
    color: #f39c12;
}

.test-card.active-test .deadline-info.warning i {
    color: #f39c12;
}

.test-card.active-test .deadline-info.urgent {
    color: #e74c3c;
}

.test-card.active-test .deadline-info.urgent i {
    color: #e74c3c;
}

.test-card.active-test .attempts-info {
    color: #3498db;
}

.test-card.active-test .attempts-info i {
    color: #3498db;
}

.test-card.active-test {
    cursor: pointer;
}

/* Неактивные тесты */
.test-card.inactive-test {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.test-card.inactive-test .test-title {
    color: #2c3e50;
}

.test-card.inactive-test .test-meta {
    color: #6c757d;
}

.test-card.inactive-test .brand-info i,
.test-card.inactive-test .category-info i,
.test-card.inactive-test .deadline-info i,
.test-card.inactive-test .attempts-info i,
.test-card.inactive-test .test-period i {
    color: #6c757d;
}

.test-card-image {
    position: relative;
    height: 224px;
    overflow: hidden;
    background: #ffffff;
    padding: 0;
    margin: 0;
    line-height: 0;
}

.test-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease, opacity 0.3s ease;
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0;
}

.test-card-image img.loaded {
    opacity: 1;
}

.test-card:hover .test-card-image img {
    transform: scale(1.1);
}

.test-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.test-card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
    color: #2c3e50;
}

.test-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    color: #2c3e50;
}

.test-meta {
    margin-bottom: 0.6rem;
    flex-grow: 1;
    color: #6c757d;
}

.brand-info,
.category-info,
.deadline-info,
.attempts-info,
.test-period,
.upcoming-info,
.extra-test-info,
.completed-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    font-size: 0.7rem;
    color: #6c757d;
}

.brand-info i,
.category-info i,
.deadline-info i,
.attempts-info i,
.test-period i,
.upcoming-info i,
.extra-test-info i,
.completed-info i {
    width: 16px;
    text-align: center;
    color: #6c757d;
}

.deadline-info.warning {
    color: #f39c12;
    font-weight: 600;
}

.deadline-info.warning i {
    color: #f39c12;
}

.deadline-info.urgent {
    color: #e74c3c;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.deadline-info.urgent i {
    color: #e74c3c;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.attempts-info {
    color: #3498db;
}

.attempts-info i {
    color: #3498db;
}

.attempts-info .text-danger {
    font-size: 0.6rem;
    margin-left: 4px;
}

/* Предстоящий тест */
.test-card.upcoming-test {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.test-card.upcoming-test .test-title {
    color: #2c3e50;
}

.test-card.upcoming-test .test-meta {
    color: #6c757d;
}

.test-card.upcoming-test .brand-info i,
.test-card.upcoming-test .category-info i,
.test-card.upcoming-test .test-period i,
.test-card.upcoming-test .completed-info i {
    color: #6c757d;
}

.test-card.upcoming-test .upcoming-info {
    color: #3498db;
}

.test-card.upcoming-test .upcoming-info i {
    color: #3498db;
}

.test-card.upcoming-test .extra-test-info {
    color: #27ae60;
}

.test-card.upcoming-test .extra-test-info i {
    color: #27ae60;
}

.upcoming-info {
    color: #3498db;
    font-weight: 600;
}

.upcoming-info i {
    color: #3498db;
}

.extra-test-info {
    color: #27ae60;
    font-style: italic;
}

.extra-test-info i {
    color: #27ae60;
}

.action-text.upcoming {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.action-text.overdue {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    animation: pulse 2s infinite;
}

/* Стили для просроченных карточек тестов - ИДЕНТИЧНЫ ОБЫЧНЫМ */
.test-card.overdue-test {
    cursor: pointer;
    /* Фон и цвета ИДЕНТИЧНЫ обычным карточкам */
}

/* Просроченные карточки имеют красный статус с анимацией */
.test-card.overdue-test .deadline-info.urgent {
    color: #e74c3c;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.test-card.overdue-test .deadline-info.urgent i {
    color: #e74c3c;
}

.test-card.overdue-test .attempts-info {
    color: #3498db;
}

.test-card.overdue-test .attempts-info i {
    color: #3498db;
}

.test-action {
    margin-top: auto;
}

.action-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 600;
    padding: 8px;
    border-radius: 6px;
    background: #2c3e50;
    color: white;
    text-align: center;
    font-size: 0.75rem;
    transition: background 0.3s ease;
}

.action-text:hover {
    background: #34495e;
}

.action-text.completed {
    background: rgba(255, 255, 255, 0.15);
}

/* Модальное окно выбора действия для теста */
/* Стили для внешнего вида, не влияющие на позиционирование */
.test-action-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.test-action-modal .modal-header {
    background: #000000;
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.test-action-modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-action-modal .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    opacity: 1;
    transition: background 0.3s ease;
}

.test-action-modal .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.test-action-modal .btn-close::before {
    content: '×';
    font-size: 24px;
    line-height: 1;
}

.test-action-modal .modal-body {
    padding: 1.5rem;
    background: white;
}

.modal-material-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #2c3e50;
}

.action-buttons {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.action-buttons .btn {
    position: relative;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    border-width: 2px;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
}

.action-buttons .btn-outline-primary {
    border-color: #6c757d;
    color: #6c757d;
    background: white;
}

.action-buttons .btn-outline-primary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.action-buttons .btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.action-buttons .btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.action-buttons .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.action-buttons .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .test-card {
        margin-bottom: 1rem;
        min-height: 304px;
    }
    
    .test-card-image {
        height: 192px;
    }
    
    .test-card-content {
        padding: 0.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        padding: 16px 20px;
        text-align: center;
        border-radius: 12px;
    }
    
    .test-action-modal .modal-dialog {
        width: 95%;
    }
    
    .test-action-modal .modal-body {
        padding: 1.2rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .action-buttons .btn {
        padding: 0.65rem 0.8rem;
        font-size: 0.85rem;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
        padding: 15px 20px;
        text-align: center;
        border-radius: 12px;
    }
    
    .test-card {
        min-height: 272px;
        margin-bottom: 0.8rem;
    }
    
    .test-card-image {
        height: 128px;
    }
    
    .test-card-content {
        height: calc(100% - 128px);
        padding: 0.8rem;
        gap: 0.6rem;
    }
    
    .test-title {
        font-size: 0.88rem;
    }
    
    .brand-info, 
    .category-info,
    .deadline-info,
    .attempts-info,
    .test-period,
    .upcoming-info,
    .extra-test-info,
    .completed-info {
        font-size: 0.68rem;
    }
    
    .deadline-info.urgent,
    .deadline-info.warning {
        font-size: 0.7rem;
        font-weight: 700;
    }
    
    .action-text {
        font-size: 0.72rem;
        padding: 8px;
    }
    
    .test-status-badge {
        font-size: 0.6rem;
        padding: 5px 8px;
        top: 8px;
        right: 8px;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.4rem;
        padding: 14px 18px;
        text-align: center;
        border-radius: 10px;
    }
    
    .test-card {
        min-height: 256px;
    }
    
    .test-card-image {
        height: 112px;
    }
    
    .test-card-content {
        height: calc(100% - 112px);
        padding: 0.64rem;
    }
    
    .test-title {
        font-size: 0.8rem;
    }
    
    .brand-info, 
    .category-info,
    .deadline-info,
    .attempts-info,
    .test-period,
    .upcoming-info,
    .extra-test-info,
    .completed-info {
        font-size: 0.64rem;
    }
    
    .deadline-info.urgent,
    .deadline-info.warning {
        font-size: 0.66rem;
        font-weight: 700;
    }
    
    .action-text {
        font-size: 0.68rem;
        padding: 6px;
    }
    
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .btn-primary {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }
}

.info-header {
    background-color: #ccc;
    padding: 15px;
    margin: -1.5rem -1.5rem 20px -1.5rem;
    border-radius: 10px 10px 0 0;
}

.info-nav {
    background-color: #eee;
    padding: 8px 15px;
    margin: -1.5rem -1.5rem 20px -1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.tabs {
    background-color: #ddd;
    display: flex;
    padding: 5px;
    margin: 0 -1.5rem 20px -1.5rem;
    overflow-x: auto;
    gap: 5px;
}

.tab {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #bbb;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.tab:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.tab.active {
    background: #007bff;
    color: white;
    font-weight: bold;
    border-color: #007bff;
}

.info-content {
    text-align: center;
}

.info-content h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
}

.image-block {
    text-align: center;
    margin: 20px 0;
}

.image-block img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.business-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.business-info h3 {
    color: #495057;
    margin-bottom: 15px;
}

.business-info p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .info-content h2 {
        font-size: 1.5rem;
    }
}

/* Стили для дайджеста */
.digest-card-wrapper {
    transition: transform 0.3s ease;
}

.digest-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
    height: 100%;
    min-height: 500px; /* было 380px */
    display: flex;
    flex-direction: column;
}

.digest-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.digest-card-image {
    position: relative;
    height: 400px; /* было 280px */
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digest-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* показывать всю картинку без обрезки */
    background: #fff;
    border-radius: 0;
    transition: transform 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.digest-card-image img.loaded {
    opacity: 1;
}

.digest-card:hover .digest-card-image img {
    transform: scale(1.1);
}

.digest-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 3rem;
}

.digest-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.digest-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 0.75;
    max-height: 180px;
}

.digest-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(44,62,80,0.07);
    transition: color 0.3s;
    min-height: unset;
}
.digest-title:hover {
    color: #2980b9;
}

.digest-author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #3498db;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.digest-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 0.92rem;
    margin-bottom: 0;
}

.digest-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.digest-action {
    margin-top: auto;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.digest-action .action-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.digest-action .action-text.no-link {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    cursor: default;
}

.digest-action .action-text:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
}

.digest-action .action-text.no-link:hover {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    transform: none;
}

/* Адаптивные стили для дайджеста */
@media (max-width: 768px) {
    .digest-card {
        min-height: 350px;
    }
    .digest-card-image {
        height: 300px;
    }
}
@media (max-width: 576px) {
    .digest-card {
        min-height: 260px;
    }
    .digest-card-image {
        height: 220px;
    }
}

/* Горизонтальный layout для карточек дайджестов */
.digest-card-horizontal {
    flex-direction: row !important;
    min-height: 200px !important;
    max-height: 220px !important;
}

.digest-card-horizontal .digest-card-image {
    width: 200px !important;
    min-width: 200px !important;
    height: 100% !important;
    flex-shrink: 0 !important;
}

.digest-card-horizontal .digest-card-content {
    padding: 20px !important;
    flex: 1 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.digest-card-horizontal .digest-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
}

.digest-card-horizontal .digest-author {
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.digest-card-horizontal .digest-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.digest-card-horizontal .digest-meta {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.digest-card-horizontal .digest-action {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.digest-card-horizontal .digest-action .action-text {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Адаптивные стили для горизонтальных карточек */
@media (max-width: 1200px) {
    .digest-card-horizontal .digest-card-image {
        width: 180px;
        min-width: 180px;
    }
    
    .digest-card-horizontal .digest-card-content {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .digest-card-horizontal {
        flex-direction: column !important;
        min-height: 320px !important;
        max-height: none !important;
    }
    
    .digest-card-horizontal .digest-card-image {
        width: 100% !important;
        height: 180px !important;
        min-width: auto !important;
        flex-shrink: 1 !important;
    }
    
    .digest-card-horizontal .digest-card-content {
        padding: 15px !important;
        flex: none !important;
    }
    
    .digest-card-horizontal .digest-description {
        -webkit-line-clamp: 2 !important;
    }
}

@media (max-width: 576px) {
    .digest-card-horizontal {
        min-height: 280px !important;
    }
    
    .digest-card-horizontal .digest-card-image {
        height: 160px;
    }
    
    .digest-card-horizontal .digest-card-content {
        padding: 12px;
    }
    
    .digest-card-horizontal .digest-title {
        font-size: 1rem;
    }
    
    .digest-card-horizontal .digest-description {
        font-size: 0.85rem;
    }
}

.main-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.main-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 18px;
    text-align: center;
}

.no-active-digests {
    font-size: 1.05rem;
    color: #888;
    text-align: center;
    margin-top: 18px;
}

@media (max-width: 600px) {
    .main-title {
        font-size: 1.3rem;
    }
    .main-subtitle {
        font-size: 0.95rem;
    }
    .no-active-digests {
        font-size: 0.92rem;
    }
}

@media (max-width: 600px) {
    .welcome-section {
        padding: 0.5rem 0.2rem;
        margin: 0.3rem 0;
        max-height: 70px;
    }
    .welcome-section h1 {
        font-size: 1.08rem;
    }
    .welcome-section .lead {
        font-size: 0.93rem;
    }
    .section-title {
        font-size: 1.05rem;
        padding: 7px 8px;
    }
}

