/* ============================================
   АРХИВ ИСТОРИЙ ПАЦИЕНТОВ (archive-patient_story)
   ============================================ */
/* Основные стили архива */
.site-main {
    padding: 60px 0;
    background: #f9f9f9;
}


/* Заголовок страницы */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    color: #333;
}

.archive-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

/* Поиск */
.stories-search {
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.search-wrapper {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-btn {
    padding: 12px 30px;
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    border: none;
    border-radius: 0 25px 25px 0;
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.search-btn:hover {
    opacity: 0.95;
}

/* Сетка историй */
.stories-grid {
    display: flex;
    flex-direction:column;
    /* grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); */
    gap: 30px;
    margin-bottom: 60px;
}

.story-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Изображение */
.story-image {
    position: relative;
    width: 550px;
    height: 550px;
    overflow: hidden;
    flex-shrink: 0;
}

.story-image-inner {
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

.story-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* На ПК в шапке карточки показываем только первое фото */
@media (min-width: 992px) {
    .story-image-inner img:not(:first-child) {
        display: none;
    }
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.photo-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
}

/* Контент карточки */
.story-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-header {
    margin-bottom: 20px;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #888;
}

.story-title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.story-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.story-title a:hover {
    color: #3498db;
}

.story-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    line-height: 1.4;
}

.story-quote {
    margin: 15px 0;
    padding-left: 15px;
    border-left: 3px solid #3498db;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.story-excerpt {
    flex: 1;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Два фото под excerpt */
.story-extra-photos {
    margin-bottom: 20px;
}

.story-extra-photos-link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
}

.story-extra-photo {
    flex: 1;
    display: block;
    aspect-ratio: 4/3;
    min-height: 70px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.story-extra-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* На ПК карточка не выше главного фото, компактный контент */
@media (min-width: 992px) {
    .story-card {
        max-height: 550px;
    }
    .story-content {
        min-height: 0;
        overflow: hidden;
    }
    .story-excerpt {
        margin-bottom: 12px;
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }
    .story-extra-photos {
        margin-bottom: 12px;
        flex-shrink: 0;
    }
    .story-extra-photo {
        min-height: 50px;
        max-height: 72px;
        aspect-ratio: 4/3;
    }
}

/* Футер карточки */
.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 207, 229, 0.4);
}

.read-more-btn svg {
    transition: transform 0.3s ease;
}

.read-more-btn:hover svg {
    transform: translateX(3px);
}

.story-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* Сообщение об отсутствии историй */
.no-stories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-stories-content svg {
    margin-bottom: 20px;
    color: #ccc;
}

.no-stories h3 {
    margin: 0 0 15px 0;
    color: #666;
}

.no-stories p {
    color: #888;
    margin-bottom: 25px;
}

.back-home-btn {
    display: inline-block;
    padding: 12px 30px;
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.back-home-btn:hover {
    opacity: 0.95;
}

/* Пагинация */
.stories-pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-numbers:hover {
    background: #f8f9fa;
    color: #333;
}

.page-numbers.current {
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    border-color: transparent;
    color: white;
}

.page-numbers.dots {
    background: transparent;
    border: none;
}

.prev, .next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
}

/* CTA блок */
.archive-cta {
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    border-radius: 15px;
    padding: 50px;
    color: white;
    text-align: center;
    margin-top: 60px;
}

.cta-content h2 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    color: white;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 14px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.primary-btn {
    background: white;
    color: #008BD0;
}

.primary-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.secondary-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Модальное окно для шаринга */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.share-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
}

.share-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-link.vk { background: #4a76a8; }
.share-link.telegram { background: #0088cc; }
.share-link.facebook { background: #3b5998; }
.share-link.whatsapp { background: #25d366; }
.share-link.odnoklassniki { background: #f6903b; }

.copy-link-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: -webkit-gradient(linear, left top, left bottom, from(#008BD0), to(#44C9AD));
    background: linear-gradient(90deg, #06CFE5 0%, #66C924 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
    transition: opacity 0.3s ease;
}

.copy-link-btn:hover {
    opacity: 0.9;
}

.copy-message {
    display: block;
    color: #28a745;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-message.show {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 992px) {
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .site-main {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .story-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .story-actions {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .search-wrapper {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 25px;
        margin-bottom: 10px;
    }
    
    .search-btn {
        border-radius: 25px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .archive-cta {
        padding: 30px 20px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    .story-card {
            display: flex;
    flex-direction: column;
    }
    .story-image {
        height:300px
    }
}