.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.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: 300px; /* Максимальная ширина */
    overflow: hidden;
}

.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,
.card h3 a:focus {
    color: #003580; /* цвет при наведении */
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.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;
    display: -moz-box;
    display: -ms-flexbox;
    display: 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;
    cursor: pointer;
}

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

.read-more a,
.featured-banner .btn {
    padding: 6px 12px;
    background-color: 
#587ca1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 15px;
    display: inline-block;
}

.featured-banner .btn:hover {
    background-color: 
#003580;
    color: 
#ffffff;
}

.birthdays-today-section {
    margin: 40px 0;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 1.8rem;
    line-height: 1.3;
    border-bottom: 2px solid #333;
    padding-bottom: 0.3rem;
    margin-bottom: 24px;
    text-align: left;
    max-width: none;
}

.birthdays-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.birthday-card {
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.07);
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

.birthday-card:hover {
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.birthday-photo-link {
    flex-shrink: 0;
    margin-right: 14px;
}

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

.birthday-info {
    flex: 1;
    min-width: 0;
}

.birthday-name {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
}

.birthday-name a {
    color: #222;
    text-decoration: none;
}

.birthday-name a:hover {
    text-decoration: underline;
}

.birth-date {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.more-link {
    text-align: left;
    margin-top: 24px;
    font-weight: 600;
}

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

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