@import url("variables.css");

/* Stylizacja dla shortcode'u [pracownicy_struktura] */
.wp-block-group {
    margin-top: 0 !important;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-martel-sans), sans-serif;
}

.wp-block-post-title {
    font-size: var(--font-size-xl);
/ margin: 0 !important;
    padding: 0 var(--spacing-md);
}

.entry-content {
    padding: 0;
}

.wp-block-post-content a:where(:not(.wp-element-button)) {
    color: var(--color-black);
}

.employees-structure {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    font-family: var(--font-martel-sans), serif;
    background-color: var(--color-secondary);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

/* Sekcje */
.employees-structure section {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.employees-structure section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Nagłówki */
.employees-structure h1 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.employees-structure h1::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: var(--color-primary);
    bottom: 0;
    left: 0;
    border-radius: 2px;
}

.employees-structure h2 {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-top: var(--spacing-md);
    margin-bottom: 15px;
    position: relative;
}

.employees-structure h3 {
    font-size: var(--font-size-sm);
    color: var(--color-gray-300);
    margin-bottom: var(--spacing-sm);
    font-weight: bold;
}

/* Management Section Enhancement */
.employees-management {
    background-color: #e8f4ff;
    border-left: 5px solid var(--color-primary);
    padding-left: 15px;
}

.employees-management h1 {
    font-size: var(--font-size-xl);
    color: var(--color-primary);
}

.employees-management h2 {
    font-size: var(--font-size-lg);
}

/* Listy */
.employees-structure ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.employees-structure ul li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-2);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-base);
}

.employees-structure ul li:hover {
    background-color: var(--color-secondary);
}

.employees-structure ul li:last-child {
    border-bottom: none;
}

/* Departments Grid */
.departments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: space-between;
}

/* Każda karta katedry */
.department-card {
    flex: 1 1 calc(50% - 20px);
    box-sizing: border-box;
    background-color: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

/* Pojedynczy element na pełnej szerokości */
.department-card.full-width {
    flex: 1 1 100%;
    max-width: 100%;
}

/* Dwa elementy dzielące szerokość */
.department-card.half-width {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
}

.department-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.department-card h2 {
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    height: 48px;
    margin-bottom: 15px;
}

.department-card p {
    font-size: var(--font-size-base);
    font-weight: bold;
    color: var(--color-gray-300);
    margin-bottom: var(--spacing-sm); /* 10px → spacing-sm */
}

.department-card ul.other-employees {
    list-style-type: disc;
    margin-top: var(--spacing-sm); /* 10px → spacing-sm */
}

.department-card ul.other-employees li {
    margin-bottom: 5px;
    transition: color var(--transition-base);
}

.department-card ul.other-employees li:hover {
    color: var(--color-hover-link);
}

/* Wyróżnienie Kierownika Katedry */
.department-head-title {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.department-head {
    background-color: var(--color-secondary);
    padding: 15px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.department-head a {
    font-weight: bold;
    text-decoration: none;
}

/* Listy administracyjne */
.secretariat-list,
.technical-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.secretariat-list li,
.technical-list li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border-2);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-base);
}

.secretariat-list li:hover,
.technical-list li:hover {
    background-color: var(--color-secondary);
}

.secretariat-list li:last-child,
.technical-list li:last-child {
    border-bottom: none;
}

/* Linki */
.employees-structure a {
    text-decoration: none;
    transition: color var(--transition-base), text-decoration var(--transition-base);
}

.employees-structure a:hover {
    color: var(--color-hover-link);
    text-decoration: underline;
}

@media (max-width: 980px) {
    .department-card h2 {
        font-size: var(--font-size-sm);
        color: var(--color-primary);
        margin-bottom: 15px;
        height: 56px;
    }
}

/* Responsywność i kolumny */
@media (max-width: 768px) {
    .employees-structure {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .employees-structure section {
        padding: var(--spacing-md);
    }

    .employees-structure h1 {
        font-size: var(--font-size-xl);
    }

    .employees-structure h2 {
        font-size: var(--font-size-lg);;
    }

    .employees-structure h3 {
        font-size: var(--font-size-sm);
    }

    .department-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .department-card h2 {
        font-size: var(--font-size-sm);
        height: 48px;
    }
}
