/* ============================================================
   VTA DJELATNICI — Frontend Styles
   ============================================================ */

.vta-djelatnici-container {
    --vta-djel-accent: #f5c518;
    --vta-djel-text: #fff;
    --vta-djel-text-muted: rgba(255, 255, 255, 0.55);
    --vta-djel-card-bg: rgba(255, 255, 255, 0.03);
    --vta-djel-card-bg-hover: rgba(255, 255, 255, 0.06);
    --vta-djel-border: rgba(255, 255, 255, 0.15);
    --vta-djel-border-hover: rgba(245, 197, 24, 0.55);
    --vta-djel-easing: cubic-bezier(0.23, 0.46, 0.4, 1);

    font-family: inherit;
    color: var(--vta-djel-text);
}

.vta-djelatnici-container *,
.vta-djelatnici-container *::before,
.vta-djelatnici-container *::after {
    box-sizing: border-box;
}

/* ============================================================
   FILTER TABS (desktop)
   ============================================================ */

.vta-djel-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 0 0 50px;
    padding: 0;
}

.vta-djel-filter {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 11px 22px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--vta-djel-text);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}

.vta-djel-filter::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1.25px rgba(255, 255, 255, 0.35);
    transition: box-shadow 0.25s ease;
}

.vta-djel-filter:hover {
    background: rgba(255, 255, 255, 0.08);
}

.vta-djel-filter:hover::before {
    box-shadow: inset 0 0 0 1.25px rgba(255, 255, 255, 0.55);
}

.vta-djel-filter.active {
    background: var(--vta-djel-accent);
    color: #000;
}

.vta-djel-filter.active::before {
    box-shadow: inset 0 0 0 1.25px var(--vta-djel-accent);
}

/* ============================================================
   MOBILE DROPDOWN
   ============================================================ */

.vta-djel-mobile-toggle {
    display: none;
    margin: 0 0 25px;
}

.vta-djel-mobile-btn {
    position: relative;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--vta-djel-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.25s ease, color 0.25s ease;
}

.vta-djel-mobile-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1.25px rgba(255, 255, 255, 0.35);
    transition: box-shadow 0.25s ease;
}

.vta-djel-mobile-btn .mobile-btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s var(--vta-djel-easing);
}

.vta-djel-mobile-toggle.open .vta-djel-mobile-btn {
    background: var(--vta-djel-accent);
    color: #000;
}

.vta-djel-mobile-toggle.open .vta-djel-mobile-btn::before {
    box-shadow: inset 0 0 0 1.25px var(--vta-djel-accent);
}

.vta-djel-mobile-toggle.open .mobile-btn-icon {
    transform: rotate(180deg);
}

/* ============================================================
   SECTIONS (po odjelu)
   ============================================================ */

.vta-djel-sections {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.vta-djel-section {
    transition: opacity 0.3s ease;
}

.vta-djel-section.is-hidden {
    display: none;
}

.vta-djel-section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 0 36px;
    flex-wrap: wrap;
}

.vta-djelatnici-container .vta-djel-section-title {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--vta-djel-text);
    line-height: 1.25;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    /* Nikad ne lomi riječ s crticom - cijela riječ pada u novi red */
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

.vta-djel-section-line {
    flex: 1 1 0%;
    min-width: 60px;
    height: 1px;
    background: linear-gradient(
        90deg,
        var(--vta-djel-accent) 0%,
        rgba(245, 197, 24, 0.3) 30%,
        rgba(255, 255, 255, 0.05) 100%
    );
}

/* ============================================================
   GRID
   ============================================================ */

.vta-djel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Hero layout (sekcija s 1 djelatnikom) - cijela sekcija ograničena na 760px
   da header + linija + kartica budu poravnani na istu širinu */
.vta-djel-section.is-hero {
    max-width: 760px;
}

.vta-djel-section.is-hero .vta-djel-grid {
    grid-template-columns: 1fr;
}

.vta-djel-section.is-hero .vta-djel-card {
    padding: 38px 40px;
}

.vta-djel-section.is-hero .vta-djel-card-top {
    align-items: center;
}

.vta-djel-section.is-hero .vta-djel-avatar {
    width: 88px;
    height: 88px;
    font-size: 30px;
}

.vta-djel-section.is-hero .vta-djel-name {
    font-size: 26px;
}

/* ============================================================
   KARTICA
   ============================================================ */

.vta-djel-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--vta-djel-card-bg);
    border-radius: 12px;

    /* initial state for stagger animation */
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.55s var(--vta-djel-easing),
        transform 0.55s var(--vta-djel-easing),
        background 0.3s ease,
        box-shadow 0.4s ease;
    transition-delay: calc(var(--i, 0) * 60ms);
    will-change: transform, opacity;
}

.vta-djel-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1.25px var(--vta-djel-border);
    transition: box-shadow 0.4s ease;
}

.vta-djel-section.is-visible .vta-djel-card {
    opacity: 1;
    transform: translateY(0);
}

.vta-djel-card:hover {
    background: var(--vta-djel-card-bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(245, 197, 24, 0.12);
    /* override stagger delay on hover for instant feedback */
    transition-delay: 0s;
}

.vta-djel-card:hover::before {
    box-shadow: inset 0 0 0 1.25px var(--vta-djel-border-hover);
}

/* ===== CARD TOP (avatar + identity) ===== */
.vta-djel-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.vta-djel-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vta-djel-accent) 0%, #d8a812 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(245, 197, 24, 0.25);
    transition: transform 0.4s var(--vta-djel-easing), box-shadow 0.4s ease;
}

.vta-djel-card:hover .vta-djel-avatar {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 8px 24px rgba(245, 197, 24, 0.4);
}

.vta-djel-initials {
    line-height: 1;
}

.vta-djel-identity {
    min-width: 0;
    flex: 1;
}

.vta-djel-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--vta-djel-text);
    line-height: 1.3;
    word-wrap: break-word;
}

.vta-djel-titula {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: var(--vta-djel-text-muted);
    line-height: 1.4;
    letter-spacing: 0.2px;
}

/* ===== POZICIJA ===== */
.vta-djel-pozicija {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
    color: var(--vta-djel-accent);
    line-height: 1.45;
}

/* ===== DIVIDER ===== */
.vta-djel-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 18px 0;
}

/* ===== KONTAKT LIST ===== */
.vta-djel-kontakt {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vta-djel-kontakt li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.vta-djel-kontakt li::before,
.vta-djel-kontakt li::marker {
    display: none !important;
    content: none !important;
}

.vta-djel-kontakt-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88) !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease, transform 0.3s var(--vta-djel-easing);
    word-break: break-word;
    max-width: 100%;
}

.vta-djel-kontakt-link:hover {
    color: var(--vta-djel-accent) !important;
    transform: translateX(3px);
}

.vta-djel-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(245, 197, 24, 0.12);
    color: var(--vta-djel-accent);
    transition: background 0.25s ease, color 0.25s ease;
}

.vta-djel-kontakt-link:hover .vta-djel-icon {
    background: var(--vta-djel-accent);
    color: #000;
}

.vta-djel-kontakt-text {
    flex: 1;
    min-width: 0;
}

/* Email - animated underline u Salient stilu */
.vta-djel-email .vta-djel-kontakt-text {
    position: relative;
    display: inline-block;
}

.vta-djel-email .vta-djel-kontakt-text::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    border-bottom: 1px solid currentColor;
    background-color: transparent !important;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition:
        transform 0.4s var(--vta-djel-easing),
        opacity 0.2s ease;
    pointer-events: none;
}

.vta-djel-email:hover .vta-djel-kontakt-text::after {
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.vta-djelatnici-empty {
    padding: 40px !important;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1200px) {
    .vta-djel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .vta-djel-mobile-toggle {
        display: block;
    }

    .vta-djel-filters {
        display: none;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 30px;
    }

    .vta-djel-filters.mobile-open {
        display: flex;
    }

    .vta-djel-filter {
        text-align: center;
    }

    .vta-djel-sections {
        gap: 50px;
    }

    .vta-djel-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 28px;
    }

    .vta-djelatnici-container .vta-djel-section-title {
        font-size: 18px;
        line-height: 1.35;
        letter-spacing: 0.3px;
        width: 100%;
        flex: 0 0 auto;
    }

    .vta-djel-section-line {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .vta-djel-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vta-djel-section.is-hero .vta-djel-card,
    .vta-djel-card {
        padding: 22px;
    }

    .vta-djel-section.is-hero .vta-djel-avatar {
        width: 64px;
        height: 64px;
        font-size: 22px;
    }

    .vta-djel-section.is-hero .vta-djel-name {
        font-size: 20px;
    }

    .vta-djel-name {
        font-size: 17px;
    }

    .vta-djel-kontakt-link {
        font-size: 13px;
    }

    /* na mobitelu - bez hover liftaja (touch) */
    .vta-djel-card:hover {
        transform: none;
    }
}

/* Vrlo uski mobile */
@media (max-width: 380px) {
    .vta-djelatnici-container .vta-djel-section-title {
        font-size: 13px;
        letter-spacing: 0.2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .vta-djel-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .vta-djel-card:hover {
        transform: none;
    }
    .vta-djel-avatar,
    .vta-djel-kontakt-link {
        transition: none !important;
    }
}
