/* Djelatnici Grid Styles */

.djelatnici-grid-wrapper {
    width: 100%;
    padding: 20px 0;
}

.djelatnici-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .djelatnici-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .djelatnici-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.djelatnik-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    /*border-radius: 8px;*/
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*.djelatnik-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}*/

.djelatnik-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.djelatnik-image {
    position: relative;
    width: 100%;
    padding-top: 150%;
    overflow: hidden;
    background: #f5f5f5;
}

.djelatnik-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.djelatnik-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    background: #fff;
}

.djelatnik-info {
    flex: 1;
    margin-bottom: 15px;
}

.djelatnik-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.djelatnik-titule {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    font-style: italic;
    line-height: 1.4;
}

.djelatnik-specijalizacije {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.djelatnik-specijalizacije p {
    margin: 0;
}

.djelatnik-button-wrapper {
    margin-top: auto;
    padding-top: 10px;
}

.djelatnik-button {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.djelatnik-button:hover {
    background: #005a87;
    transform: scale(1.02);
}

.djelatnik-button:active {
    transform: scale(0.98);
}

/* Modal Styles */
.djelatnik-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.djelatnik-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.djelatnik-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

.djelatnik-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.djelatnik-modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

.djelatnik-modal-body {
    display: flex;
    overflow-y: auto;
    max-height: 90vh;
}

.djelatnik-modal-image {
    flex: 0 0 40%;
    max-width: 400px;
    background: #f5f5f5;
}

.djelatnik-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.djelatnik-modal-info {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.djelatnik-modal-name {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.djelatnik-modal-titule {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px 0;
    font-style: italic;
    line-height: 1.4;
}

.djelatnik-modal-specijalizacije {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.7;
}

.djelatnik-modal-specijalizacije p {
    margin: 0;
    font-weight: 500;
}

.djelatnik-modal-opis {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
}

.djelatnik-modal-opis p {
    margin: 0 0 15px 0;
}

.djelatnik-modal-opis p:last-child {
    margin-bottom: 0;
}

.djelatnik-modal-taxonomies {
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-taxonomy-group {
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-taxonomy-group:last-child {
    margin-bottom: 0;
}

.modal-taxonomy-group strong {
    color: #333;
    font-weight: 600;
}

.modal-spec-list p {
    margin: 0 0 5px 0;
}

.modal-spec-list p:last-child {
    margin-bottom: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .djelatnik-modal-body {
        flex-direction: column;
    }
    
    .djelatnik-modal-image {
        flex: 0 0 auto;
        max-width: 100%;
        max-height: 300px;
    }
    
    .djelatnik-modal-info {
        padding: 30px 20px;
    }
    
    .djelatnik-modal-name {
        font-size: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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