/* Объединенные стили для каталога биографий и главной страницы */

/* Основные стили контейнера */
.category-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Featured баннер */
.featured-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    min-height: 200px;
}

.featured-text {
    flex: 1;
    max-width: 60%;
}

.featured-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-title a {
    color: inherit;
    text-decoration: none;
}

.featured-image {
    flex: 0 0 300px;
    margin-left: 2rem;
}

.featured-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

/* Секция дней рождений */
.birthdays-today-section {
    margin: 3rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #007bff;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.birthdays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.birthday-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.birthday-card:hover {
    transform: translateY(-2px);
}

.birthday-photo-link {
    margin-right: 1rem;
}

.birthday-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.birthday-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.birthday-info a {
    color: #333;
    text-decoration: none;
}

.birthday-info a:hover {
    color: #007bff;
}

.birth-date {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.more-link {
    text-align: center;
    margin-top: 1.5rem;
}

.more-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.more-link a:hover {
    text-decoration: underline;
}

/* Улучшенный грид с большими отступами */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 2.5rem; /* Увеличено расстояние между карточками */
    justify-content: center;
    padding: 1rem 0; /* Добавили отступы сверху и снизу */
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 420px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 5px;
}

.card h3 a {
    text-decoration: none;
    color: #1f4b85;
    transition: color 0.2s;
}

.card h3 a:hover {
    color: #003580;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.bio-meta {
    font-size: 12px;
    color: #667688;
    margin-bottom: 4px;
}

.bio-excerpt {
    font-size: 14px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4; /* Стандартное свойство для совместимости */
    overflow: hidden;
    margin-bottom: 16px;
}

.read-more {
    text-align: right;
    margin-top: auto;
}

.card .read-more a {
    display: inline-block;
    background-color: #1b3557;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.card .read-more a:hover {
    background-color: #003580;
    transform: translateY(-2px);
}

/* Фильтр категорий */
.category-filter {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #495057;
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.filter-btn.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    transform: translateY(-1px);
}

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

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

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

/* Сообщение об отсутствии результатов */
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Стили пагинации */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-link {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.page-link.current {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    cursor: default;
}

.page-link.current:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Адаптивность */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
        gap: 1.5rem; /* Меньше отступы на планшетах */
        padding: 0.5rem;
    }
    
    .category-filter {
        padding: 1rem;
        margin: 0 -0.5rem 1.5rem -0.5rem; /* Компенсируем отступы контейнера */
    }
    
    .filter-buttons {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .category-header h1 {
        font-size: 2rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .category-filter {
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
        padding: 1rem;
    }
    
    .filter-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Два столбца на мобильном */
        gap: 0.5rem;
        justify-content: stretch;
    }
    
    .filter-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        text-align: center;
        border-radius: 15px;
        white-space: normal; /* Разрешаем перенос текста */
        line-height: 1.3;
        min-height: 44px; /* Минимальная высота для удобства нажатия */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .filter-buttons {
        grid-template-columns: 1fr; /* Один столбец на очень маленьких экранах */
    }
}
/* Шапка сайта */
.header.dark-header {
    background-color: #0d1b3d; /* тёмно-синий фон */
    color: white;
    padding: 1rem;
}

.header.dark-header a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.header.dark-header a:hover {
    color: #f1c40f; /* жёлтый при наведении */
}
