/* ========================================
   SCHOOL STAFF - СУЧАСНИЙ ПРЕМІУМ ДИЗАЙН
   ======================================== */

.school-staff-display {
    margin: 4rem auto;
    max-width: 1400px;
    padding: 0 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   СІТКА КАРТОК
   ======================================== */

.staff-container {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.staff-container[data-columns="1"] {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

.staff-container[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.staff-container[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.staff-container[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* ========================================
   КАРТКА СПІВРОБІТНИКА - ГОРИЗОНТАЛЬНИЙ LAYOUT
   ======================================== */

.staff-member-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid #f1f3f5;
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 280px;
}

.staff-member-card:hover {
    box-shadow: 0 8px 40px rgba(37, 99, 235, 0.12);
    transform: translateY(-4px);
    border-color: #e3e8ef;
}

/* ========================================
   ФОТО СПІВРОБІТНИКА
   ======================================== */

.member-photo {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.5s ease;
}

.staff-member-card:hover .member-photo img {
    transform: scale(1.05);
}

.no-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.no-photo-placeholder::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 40%, rgba(255,255,255,0.4) 0%, transparent 60%);
}

.no-photo-placeholder .person-icon {
    font-size: 4.5rem;
    opacity: 0.25;
    position: relative;
    z-index: 1;
}

/* ========================================
   ІНФОРМАЦІЙНИЙ БЛОК
   ======================================== */

.member-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Ім'я */
.member-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Посада/Предмет */
.member-position {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.member-position .category {
    display: inline-block;
    font-size: 0.7rem;
    color: #0f766e;
    font-weight: 600;
    margin-top: 0.5rem;
    background: #ccfbf1;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ========================================
   КВАЛІФІКАЦІЯ
   ======================================== */

.member-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.member-credentials .education,
.member-credentials .experience {
    color: #475569;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.member-credentials .education::before {
    content: "🎓";
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.member-credentials .experience::before {
    content: "📅";
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.member-credentials strong {
    color: #1e293b;
    font-weight: 600;
}

/* ========================================
   КОНТАКТИ
   ======================================== */

.member-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.member-contact .phone,
.member-contact .email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.member-contact .icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.member-contact a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.member-contact a:hover {
    color: #1d4ed8;
}

.member-contact a:visited {
    color: #2563eb;
}

/* ========================================
   БІОГРАФІЯ
   ======================================== */

.member-bio {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569;
    margin-top: 1rem;
}

.member-bio p {
    margin: 0.5rem 0;
}

.member-bio p:first-child {
    margin-top: 0;
}

.member-bio p:last-child {
    margin-bottom: 0;
}

/* ========================================
   ДОСЯГНЕННЯ
   ======================================== */

.member-achievements {
    background: #fffbeb;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #92400e;
    margin-top: 1rem;
}

.member-achievements strong {
    color: #78350f;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.member-achievements p {
    margin: 0.5rem 0;
}

.member-achievements ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.member-achievements li {
    margin: 0.375rem 0;
}

/* ========================================
   ПУСТЕ ПОВІДОМЛЕННЯ
   ======================================== */

.staff-container > p {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
    font-size: 1rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

/* ========================================
   АНІМАЦІЇ
   ======================================== */

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

.staff-member-card {
    opacity: 0;
    animation: cardFadeIn 0.5s ease-out forwards;
}

.staff-member-card:nth-child(1) { animation-delay: 0.05s; }
.staff-member-card:nth-child(2) { animation-delay: 0.1s; }
.staff-member-card:nth-child(3) { animation-delay: 0.15s; }
.staff-member-card:nth-child(4) { animation-delay: 0.2s; }
.staff-member-card:nth-child(5) { animation-delay: 0.25s; }
.staff-member-card:nth-child(6) { animation-delay: 0.3s; }
.staff-member-card:nth-child(7) { animation-delay: 0.35s; }
.staff-member-card:nth-child(8) { animation-delay: 0.4s; }
.staff-member-card:nth-child(9) { animation-delay: 0.45s; }
.staff-member-card:nth-child(10) { animation-delay: 0.5s; }

/* ========================================
   АДАПТИВНИЙ ДИЗАЙН
   ======================================== */

@media (max-width: 1200px) {
    .staff-container[data-columns="4"] {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }
}

@media (max-width: 992px) {
    .school-staff-display {
        padding: 0 1.5rem;
    }

    .staff-container[data-columns="3"],
    .staff-container[data-columns="4"] {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    }
}

@media (max-width: 768px) {
    .school-staff-display {
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .staff-container {
        gap: 1.5rem;
    }

    .staff-container[data-columns="2"],
    .staff-container[data-columns="3"],
    .staff-container[data-columns="4"] {
        grid-template-columns: 1fr;
    }

    .staff-member-card {
        grid-template-columns: 160px 1fr;
        min-height: 240px;
    }

    .member-info {
        padding: 1.5rem;
        gap: 0.625rem;
    }

    .member-name {
        font-size: 1.25rem;
    }

    .member-position {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }

    .member-credentials {
        font-size: 0.8125rem;
    }

    .member-contact {
        font-size: 0.8125rem;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .school-staff-display {
        margin: 1.5rem auto;
    }

    .staff-container {
        gap: 1.25rem;
    }

    .staff-member-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .member-photo {
        height: 240px;
    }

    .member-info {
        padding: 1.25rem;
    }

    .member-name {
        font-size: 1.2rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.member-contact a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Вимкнення анімацій для користувачів з відповідними налаштуваннями */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .staff-member-card {
        opacity: 1;
    }
}

/* ========================================
   СЕЛЕКЦІЯ
   ======================================== */

::selection {
    background: #dbeafe;
    color: #1e3a8a;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .staff-member-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }

    .staff-member-card:hover {
        transform: none;
    }

    .member-contact a {
        color: #000;
        text-decoration: underline;
    }
}