﻿/* WORKERS */
.workers {
    padding: 60px 0;
    background: #f4f4f4;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #0b3c6d;
}

.workers-grid {
    justify-content: flex-start; /* все зліва */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.worker-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;

    max-width: 100%;
     position: relative;
}

/* ===== ADMIN BUTTONS ALWAYS VISIBLE ===== */

.admin-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;

    /* ГОЛОВНЕ — завжди видимі */
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.icon-btn {
    background: #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    font-size: 16px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.icon-btn.edit {
    background: #f9b233;
    color: #000;
}

.icon-btn.delete {
    background: #e74c3c;
    color: #fff;
}

.worker-card:hover {
    transform: translateY(-20px);
}

.worker-photo {
    display: block;
    max-width: 100%;
    height: auto;          /* ❗ зберігає пропорції */
    object-fit: contain;  /* без обрізки */
    background: #eee;
}

.worker-info {
    padding: 20px;
    padding-top: 60px;
}

.worker-info h3 {
    font-size: 22px;
    margin-bottom: 5px;
    color: #222;
}

.worker-position {
    display: inline-block;
    font-size: 18px;
    color: #f9b233;
    font-weight: bold;
    margin-bottom: 10px;
}

.worker-describe {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}
.no-workers {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #555;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    max-width: 600px;
    margin: 0 auto;
}
.workers-actions {
    display: flex;
    justify-content: flex-start; /* кнопка зліва */
    margin-bottom: 30px;
    padding-left: 30px;
}

.btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: unset;
    padding: 10px 18px;
    white-space: nowrap;
}

.worker-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.workers-subtitle {
    font-size: 24px;
    margin: 40px 0 25px;
    color: #0b3c6d;
    border-left: 5px solid #f9b233;
    padding-left: 15px;
}



.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.form-message {
    background: #e7f7e7;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.worker-page {
    padding: 60px 0;
}

/* ОСНОВНИЙ БЛОК */
.worker-profile {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* вирівнюємо по верхньому краю */
    margin-bottom: 30px;
}

/* ФОТО ЗЛІВА */
.worker-photo-block {
    width: 320px;
    flex-shrink: 0;
}

.worker-photo-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #eee;
}

/* ІНФО СПРАВА */
.worker-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.worker-name {
    margin-bottom: 10px;
    font-size: 24px;
    color: #222;
}

.worker-position {
    color: #f39c12;
    font-weight: 600;
    font-size: 18px;
}

/* ОПИС ПІД ФОТО ТА ІНФО */
.worker-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 16px;
}


@media (max-width: 1200px) {
    .workers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .workers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .workers-actions {
        justify-content: center;
    }
    .worker-profile {
        flex-direction: column; /* фото зверху, інфа під ним */
        align-items: center;
        text-align: center; /* центр для тексту */
    }

    .worker-photo-block {
        width: 100%;
        max-height: 350px;
        margin-bottom: 200px; /* відступ між фото і текстом */
    }

    .worker-main-info {
        width: 100%;
        margin-top: 0; /* текст йде після фото */
    }

    .worker-name {
    margin-bottom: 10px;
    font-size: 24px;
    color: #222;
}
    .worker-position {
        color: #f39c12; /* або зберегти фірмовий колір для посади */
    }

    .worker-description {
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
    }
}

@media (max-width: 600px) {
    .workers-grid {
        grid-template-columns: 1fr;
    }
}
