/* ============================================
   LEFT MENU - Moderna stilizacija kao zagreb.hr
   ============================================ */

/* Mobilni hamburger gumb */
.left-menu-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1040;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #1a4e7a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(26, 78, 122, 0.25);
}

.left-menu-toggle:hover {
    background-color: #153d5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 78, 122, 0.35);
}

.left-menu-toggle:active {
    transform: translateY(0);
}

.left-menu-toggle.hidden {
    display: none;
}

@media (min-width: 992px) {
    .left-menu-toggle {
        display: none;
    }
}

/* Desktop Minimize gumb */
.left-menu-toggle-minimize {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1040;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #1a4e7a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(26, 78, 122, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.left-menu-toggle-minimize:hover {
    background-color: #153d5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 78, 122, 0.35);
}

.left-menu-toggle-minimize.hidden {
    display: none !important;
}

@media (max-width: 991px) {
    .left-menu-toggle-minimize {
        display: none;
    }
}

/* Sidebar kontejner */
.left-menu-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 320px;
    background: linear-gradient(135deg, #1a4e7a 0%, #1f5a89 100%);
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
}

/* Minimizirana verzija (Desktop) */
.left-menu-sidebar.minimized {
    width: 80px;
}

.left-menu-sidebar.minimized .left-menu-header {
    padding: 16px 8px;
}

.left-menu-sidebar.minimized .left-menu-nav {
    padding: 0;
}

.left-menu-sidebar.minimized .left-menu-link {
    justify-content: center;
    padding: 14px 10px;
}

.left-menu-sidebar.minimized .left-menu-link > span {
    display: none;
}

.left-menu-sidebar.minimized .left-menu-toggle-icon {
    margin: 0;
}

.left-menu-sidebar.minimized .left-menu-sublist {
    display: none;
}

.left-menu-sidebar.minimized .left-menu-logo {
    width: 44px;
    height: 44px;
    margin: 0 auto;
}

.left-menu-sidebar.minimized .left-menu-header strong,
.left-menu-sidebar.minimized .left-menu-header small {
    display: none;
}

.left-menu-sidebar.minimized .left-menu-close,
.left-menu-sidebar.minimized .left-menu-minimize-close {
    display: none;
}

@media (min-width: 992px) {
    .left-menu-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 320px;
        box-shadow: 1px 0 10px rgba(0, 0, 0, 0.08);
        transform: none !important;
    }
}

/* Mobilna off-canvas verzija */
@media (max-width: 991px) {
    .left-menu-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .left-menu-sidebar.open {
        transform: translateX(0);
    }
}

/* Header */
.left-menu-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.1);
    color: white;
    flex-shrink: 0;
    transition: padding 0.3s ease;
}

.left-menu-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(1.1);
}

.left-menu-header strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
    color: white;
}

.left-menu-header small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 400;
}

.left-menu-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.left-menu-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.left-menu-minimize-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.left-menu-minimize-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(-90deg);
}

@media (min-width: 992px) {
    .left-menu-header {
        display: none;
    }
}

/* Navigation */
.left-menu-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.left-menu-nav::-webkit-scrollbar {
    width: 6px;
}

.left-menu-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.left-menu-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

.left-menu-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Lista stavki */
.left-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Stavka */
.left-menu-item {
    position: relative;
    margin: 0;
    border: none;
}

.left-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    position: relative;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.left-menu-link > span {
    flex: 1;
    transition: all 0.25s ease;
}

.left-menu-toggle-icon {
    margin-left: auto;
    font-size: 0.9rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
}

.left-menu-item.open .left-menu-toggle-icon {
    transform: rotate(90deg);
}

.left-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: white;
    padding-left: 18px;
}

.left-menu-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #4da6d6;
    font-weight: 600;
}

/* Podizbornik */
.left-menu-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
}

.left-menu-item.open .left-menu-sublist {
    max-height: 1500px;
    opacity: 1;
}

/* Podizbornik link */
.left-menu-sublink {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 44px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.25s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.left-menu-sublink::before {
    content: '•';
    position: absolute;
    left: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}

.left-menu-sublink:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    padding-left: 46px;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.left-menu-sublink.active {
    color: white;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #4da6d6;
}

/* Prazna stanja */
.left-menu-empty {
    padding: 32px 20px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.6;
    margin: 20px 0 0 0;
}

.left-menu-empty strong {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-top: 10px;
}

/* Overlay */
.left-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1020;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.left-menu-overlay.show {
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

@media (min-width: 992px) {
    .left-menu-overlay {
        display: none;
    }
}

/* Main layout */
.main-layout-wrapper {
    display: flex;
    width: 100%;
}

.main-content-area {
    flex: 1;
    width: 100%;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0;
}

@media (min-width: 992px) {
    .main-layout-wrapper {
        position: relative;
    }
    
    .main-content-area {
        margin-left: 320px;
    }
    
    .main-layout-wrapper.sidebar-minimized .main-content-area {
        margin-left: 80px;
    }
}

/* Mobilne prilagodbe */
@media (max-width: 576px) {
    .left-menu-link {
        padding: 11px 14px;
        font-size: 0.9rem;
    }
    
    .left-menu-sublink {
        padding: 9px 14px 9px 40px;
        font-size: 0.85rem;
    }
}
