/* Frontend Styles for Predavači Widget */

.predavaci-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.predavaci-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.predavaci-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.predavaci-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Style 1 - Pravougaoni stil (default) */
.predavac-card:not(.team-card) {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.predavac-card-clickable:not(.team-card) {
    cursor: pointer;
}

.predavac-card:not(.team-card):hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: var(--theme-color, #4CAF50);
}

.predavac-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.predavac-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.predavac-card:hover .predavac-img {
    transform: scale(1.05);
}

.predavac-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
    font-size: 14px;
    text-align: center;
}

.predavac-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.predavac-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #333333;
}

.predavac-name a {
    color: #333333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.predavac-name a:hover {
    color: #4CAF50;
}

.predavac-role {
    font-size: 13px;
    color: #999999;
    margin: 0 0 10px 0;
    font-style: italic;
    font-weight: 500;
}

.predavac-excerpt {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.predavac-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.predavac-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0077B5;
    color: #ffffff;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 16px;
}

.predavac-linkedin:hover {
    background: #005885;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 119, 181, 0.3);
}

/* Kurs page - Predavači section */
.kurs-predavaci-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.kurs-predavaci-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333333;
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .predavaci-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .predavaci-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .predavac-card:not(.team-card) {
        border-radius: 6px;
    }

    .predavac-card:not(.team-card) .predavac-image {
        height: 200px;
    }

    .predavac-card:not(.team-card) .predavac-content {
        padding: 16px;
    }

    .predavac-card:not(.team-card) .predavac-name {
        font-size: 16px;
    }

    .kurs-predavaci-section {
        margin: 30px 0;
        padding: 20px 0;
    }

    .kurs-predavaci-title {
        font-size: 20px;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .predavaci-grid,
    .predavaci-grid-2,
    .predavaci-grid-3,
    .predavaci-grid-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .predavac-card:not(.team-card) {
        border-radius: 6px;
    }

    .predavac-card:not(.team-card) .predavac-image {
        height: 220px;
    }

    .predavac-card:not(.team-card) .predavac-content {
        padding: 15px;
    }

    .predavac-card:not(.team-card) .predavac-name {
        font-size: 15px;
    }

    .predavac-card:not(.team-card) .predavac-role {
        font-size: 12px;
    }

    .predavac-card:not(.team-card) .predavac-excerpt {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .kurs-predavaci-section {
        margin: 20px 0;
        padding: 15px 0;
    }

    .kurs-predavaci-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Single predavac page */
.single-predavac .predavac-hero {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.single-predavac .predavac-hero h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #ffffff;
}

.single-predavac .predavac-hero .predavac-role {
    color: #f0f0f0;
    font-size: 16px;
}

/* ===================================
   MODAL SA GLASSMORPHISM EFEKTOM
   =================================== */

.predavac-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.predavac-modal.active {
    opacity: 1;
    visibility: visible;
}

.predavac-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.predavac-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 92%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    
    /* Glassmorphism efekt */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.predavac-modal.active .predavac-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.predavac-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.predavac-modal-close:hover,
.predavac-modal-close:active {
    background: rgba(244, 67, 54, 0.9);
    color: #fff;
    transform: rotate(90deg);
}

.predavac-modal-body {
    padding: 40px 30px 30px;
    text-align: center;
}

.predavac-modal-image-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, var(--theme-color, #4CAF50) 0%, var(--theme-color2, #45a049) 100%);
    position: relative;
}

.predavac-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.predavac-modal-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.3;
}

.predavac-modal-funkcija {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-color, #4CAF50);
    margin: 0 0 25px;
    padding: 8px 20px;
    display: inline-block;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.predavac-modal-biografija {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin: 0 0 30px;
    text-align: left;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.predavac-modal-footer {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.predavac-modal-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--theme-color, #0077B5) 0%, var(--theme-color2, #005582) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.predavac-modal-linkedin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 119, 181, 0.4);
    color: #fff;
}

.predavac-modal-linkedin i {
    font-size: 18px;
}

/* Responsive */

/* Tablet landscape i manji desktop */
@media (max-width: 1024px) {
    .predavac-modal-content {
        max-width: 750px;
        width: 90%;
    }
    
    .predavac-modal-body {
        padding: 35px 25px 25px;
    }
}

/* Tablet portret */
@media (max-width: 768px) {
    .predavac-modal-content {
        width: 96%;
        max-width: none;
        max-height: 92vh;
        border-radius: 18px;
    }
    
    .predavac-modal-body {
        padding: 30px 20px 20px;
    }
    
    .predavac-modal-image-wrapper {
        width: 160px;
        height: 160px;
        margin-bottom: 20px;
        border-width: 4px;
    }
    
    .predavac-modal-name {
        font-size: 26px;
    }
    
    .predavac-modal-funkcija {
        font-size: 15px;
        padding: 7px 18px;
    }
    
    .predavac-modal-biografija {
        font-size: 14px;
        line-height: 1.7;
        padding: 16px;
    }
    
    .predavac-modal-linkedin {
        padding: 11px 26px;
        font-size: 14px;
    }
}

/* Mobilni telefoni */
@media (max-width: 480px) {
    .predavac-modal-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .predavac-modal-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
    
    .predavac-modal-body {
        padding: 25px 16px 16px;
    }
    
    .predavac-modal-image-wrapper {
        width: 130px;
        height: 130px;
        margin-bottom: 16px;
        border-width: 3px;
    }
    
    .predavac-modal-name {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .predavac-modal-funkcija {
        font-size: 13px;
        padding: 6px 14px;
        margin-bottom: 20px;
    }
    
    .predavac-modal-biografija {
        font-size: 13px;
        line-height: 1.6;
        padding: 14px;
        margin-bottom: 20px;
    }
    
    .predavac-modal-footer {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .predavac-modal-linkedin {
        padding: 10px 22px;
        font-size: 13px;
        gap: 6px;
    }
    
    .predavac-modal-linkedin i {
        font-size: 16px;
    }
}

/* Ekstra mali telefoni */
@media (max-width: 360px) {
    .predavac-modal-content {
        border-radius: 12px;
    }
    
    .predavac-modal-body {
        padding: 20px 12px 12px;
    }
    
    .predavac-modal-image-wrapper {
        width: 110px;
        height: 110px;
        margin-bottom: 14px;
    }
    
    .predavac-modal-name {
        font-size: 20px;
    }
    
    .predavac-modal-funkcija {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .predavac-modal-biografija {
        font-size: 12px;
        padding: 12px;
    }
    
    .predavac-modal-linkedin {
        padding: 9px 18px;
        font-size: 12px;
    }
}

/* Scrollbar styling za modal */
.predavac-modal-content::-webkit-scrollbar {
    width: 8px;
}

.predavac-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.predavac-modal-content::-webkit-scrollbar-thumb {
    background: var(--theme-color, #4CAF50);
    border-radius: 10px;
}

.predavac-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color2, #45a049);
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .predavac-modal-content {
        max-height: 96vh;
        width: 85%;
    }
    
    .predavac-modal-body {
        padding: 25px 20px 20px;
    }
    
    .predavac-modal-image-wrapper {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
    
    .predavac-modal-name {
        font-size: 22px;
    }
    
    .predavac-modal-biografija {
        font-size: 13px;
        padding: 14px;
        margin-bottom: 18px;
    }
}

/* Hide scrollbar on mobile but keep functionality */
@media (max-width: 768px) {
    .predavac-modal-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .predavac-modal-content::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Safe area for notched phones (iPhone X+) */
@supports (padding: max(0px)) {
    .predavac-modal-content {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    @media (max-width: 768px) {
        .predavac-modal-body {
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
        }
    }
}
/* ============================= */
/* Grid Layout for Style 2 (Team Card) */
/* ============================= */

.predavaci-grid-style2 .team-card.style2 {
    width: 100%;
    margin-bottom: 0;
    max-width: 380px;
    justify-self: center;
}

.predavaci-grid-style2 .team-card.style2 .team-img-wrap {
    max-width: 327px;
    margin: 0 auto;
}

/* Grid responsive adjustments for Style 2 */
@media (max-width: 1399px) {
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 315px;
    }
}

@media (max-width: 1299px) {
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 261px;
    }
}

@media (max-width: 1199px) {
    .predavaci-grid-style2.predavaci-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 296px;
    }
}

@media (max-width: 991px) {
    .predavaci-grid-style2.predavaci-grid-4,
    .predavaci-grid-style2.predavaci-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 336px;
    }
}

@media (max-width: 767px) {
    .predavaci-grid-style2.predavaci-grid-4,
    .predavaci-grid-style2.predavaci-grid-3,
    .predavaci-grid-style2.predavaci-grid-2 {
        grid-template-columns: 1fr;
    }
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 246px;
    }
}

@media (max-width: 575px) {
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 401px;
    }
}

@media (max-width: 375px) {
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 351px;
    }
}

@media (max-width: 320px) {
    .predavaci-grid-style2 .team-card.style2 .team-img-wrap {
        max-width: 296px;
    }
}