.generic-card {
    display: flex;
    background-color: #ffffff !important;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
    flex-grow: 1;
}

.generic-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
    
.employee-photo {
    width: 250px;
    height: 313px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
    
.employee-info {
    flex: 1;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
}
    
.employee-name {
    font-size: 24px;
    font-weight: bold;
    color: #004899;
    margin-bottom: 10px;
}

.employee-card.rector .employee-name {
    font-size: 28px;
}
    
.employee-position {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

.employee-regales {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.employee-contacts {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.employee-contacts p {
    margin-bottom: 8px;
}
    
.employee-contacts strong, .department-info strong {
    color: #333;
    margin-right: 5px;
}
    
.employee-contacts a, .department-info a {
    color: #0066cc;
    text-decoration: none;
}

.employee-contacts a:hover, .department-info a:hover {
    text-decoration: underline;
}

.email-link {
    text-decoration: none !important;
    color: #004899 !important;
}

.employee-buttons {
    margin-top: 1rem;
    flex-grow: 1;
    align-content: end;
    padding-bottom: 3px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.employee-button-wrapper {
    text-decoration: none !important;
    flex-grow: 1;
}

.employee-button {
    padding: 1rem;
    border-radius: 0.25rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 72, 153, 0.5);
    color: #004899;
    text-decoration: none !important;
    font-weight: bold;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.employee-button:hover {
    box-shadow: 0 4px 12px rgba(0, 72, 153, 0.6);
}

.max-button {
    background: linear-gradient(45deg, #050515, #420cae, #480988, #67007f);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
}

.max-logo {
    max-width: 30px;
}

.department-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 колонки одинаковой ширины */
    gap: 1rem;
}

.department-wrapper .generic-card, .generic-card.department {
    flex-direction: column;
}

.department-name {
    font-size: 18px;
    font-weight: bold;
    color: #004899;
    margin-bottom: 10px;
}

.department-info {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.department-info p {
    margin-bottom: 8px;
}

/* Адаптивность */

/* Планшеты в альбомной ориентации */
@media only screen and (max-width: 1200px) {
    .employee-photo {
        width: 200px;
        height: 250px;
    }
    
    .employee-info {
        padding-left: 20px;
    }
    
    .employee-name {
        font-size: 22px;
    }
    
    .employee-card.rector .employee-name {
        font-size: 24px;
    }
    
    .employee-position {
        font-size: 17px;
    }
    
    .employee-regales {
        font-size: 15px;
    }
}

/* Планшеты */
@media only screen and (max-width: 992px) {
    .department-wrapper {
        grid-template-columns: 1fr; /* 1 колонка */
    }
    
    .employee-photo {
        width: 180px;
        height: 225px;
    }
    
    .employee-info {
        padding-left: 15px;
    }
    
    .employee-name {
        font-size: 20px;
    }
    
    .employee-card.rector .employee-name {
        font-size: 22px;
    }
    
    .employee-position {
        font-size: 16px;
    }
    
    .department-name {
        font-size: 17px;
    }
}

/* Планшеты в портретной ориентации */
@media only screen and (max-width: 768px) {
    .generic-card {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    
    .employee-photo {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 4/5;
        margin-bottom: 20px;
    }
    
    .employee-info {
        padding-left: 0;
        width: 100%;
    }
    
    .employee-name {
        font-size: 20px;
        text-align: center;
    }
    
    .employee-card.rector .employee-name {
        font-size: 22px;
    }
    
    .employee-position {
        font-size: 16px;
        text-align: center;
    }
    
    .employee-regales {
        font-size: 14px;
        text-align: center;
    }
    
    .employee-contacts {
        text-align: center;
    }
    
    .department-name {
        font-size: 16px;
        text-align: center;
    }
    
    .department-info {
        font-size: 13px;
    }
}

/* Мобильные устройства */
@media only screen and (max-width: 576px) {
    .generic-card {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .employee-photo {
        max-width: 250px;
    }
    
    .employee-name {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .employee-card.rector .employee-name {
        font-size: 20px;
    }
    
    .employee-position {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .employee-regales {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .employee-contacts,
    .department-info {
        font-size: 13px;
    }
    
    .employee-contacts p,
    .department-info p {
        margin-bottom: 6px;
    }
    
    .employee-button {
        padding: 0.75rem;
        font-size: 14px;
    }
    
    .department-wrapper {
        gap: 0.75rem;
    }
    
    .department-name {
        font-size: 15px;
        margin-bottom: 8px;
    }
}

/* Малые мобильные устройства */
@media only screen and (max-width: 480px) {
    .generic-card {
        padding: 10px;
    }
    
    .employee-photo {
        max-width: 200px;
    }
    
    .employee-name {
        font-size: 16px;
    }
    
    .employee-card.rector .employee-name {
        font-size: 18px;
    }
    
    .employee-position {
        font-size: 14px;
    }
    
    .employee-regales {
        font-size: 12px;
    }
    
    .employee-contacts,
    .department-info {
        font-size: 12px;
        line-height: 1.6;
    }
    
    .employee-buttons {
        margin-top: 0.75rem;
        gap: 0.4rem;
    }
    
    .employee-button {
        padding: 0.6rem;
        font-size: 13px;
    }
    
    .max-logo {
        max-width: 20px;
    }
    
    .department-wrapper {
        gap: 0.5rem;
    }
    
    .department-name {
        font-size: 14px;
    }
    
    .department-info {
        font-size: 11px;
    }
}

/* Очень малые устройства */
@media only screen and (max-width: 360px) {
    .generic-card {
        padding: 8px;
    }
    
    .employee-photo {
        max-width: 180px;
    }
    
    .employee-name {
        font-size: 15px;
    }
    
    .employee-position {
        font-size: 13px;
    }
    
    .employee-button {
        padding: 0.5rem;
        font-size: 12px;
    }
    
    .department-name {
        font-size: 13px;
    }
}
