/* Custom Styles */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

.container {
    flex: 1;
}

.content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    margin-top: auto;
}

/* Admin Styles */
.login-card {
    max-width: 400px;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    margin-left: 16.666667%; /* Offset for sidebar */
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
}
/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-blue, #0d4876);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(13, 72, 118, 0.3);
}

.back-to-top:hover {
    background-color: var(--dark-blue, #003d7a);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(13, 72, 118, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* ===== News Section - Homepage ===== */
.news-section a {
    text-decoration: none !important;
}

.news-section a:hover {
    text-decoration: none !important;
}

.news-section-title {
    font-size: calc(1.75rem * var(--font-size-multiplier, 1));
    font-weight: 700;
    color: var(--primary-blue, #0d4876);
    margin: 0;
}

.btn-news-all {
    font-weight: 500;
    white-space: nowrap;
}

/* Featured News Card */
.news-featured-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: inherit;
}

.news-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    color: inherit;
}

.news-featured-image {
    position: relative;
    min-height: 320px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-blue, #0d4876);
}

.news-featured-no-image {
    min-height: 200px;
    background: linear-gradient(135deg, var(--primary-blue, #0d4876) 0%, var(--dark-blue, #003d7a) 100%);
}

.news-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.news-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 28px;
    color: white;
}

.news-featured-meta {
    margin-bottom: 12px;
}

.news-featured-meta .date-badge {
    background-color: rgba(255,255,255,0.25);
}

.news-featured-meta .category-badge {
    background-color: var(--yellow-accent, #ffc107);
    color: #000;
}

.news-featured-title {
    font-size: calc(1.5rem * var(--font-size-multiplier, 1));
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: white;
}

.news-featured-excerpt {
    font-size: calc(0.95rem * var(--font-size-multiplier, 1));
    margin: 0 0 12px 0;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 700px;
}

.news-featured-link {
    font-weight: 600;
    font-size: calc(0.95rem * var(--font-size-multiplier, 1));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--yellow-accent, #ffc107);
    transition: gap 0.2s ease;
}

.news-featured-card:hover .news-featured-link {
    gap: 10px;
}

/* News Grid Cards */
.news-grid .news-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-grid .news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.news-card-image-link {
    display: block;
    overflow: hidden;
}

.news-card-img-wrap {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f2f5;
}

.news-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-img-wrap img {
    transform: scale(1.05);
}

.news-grid .news-card .card-body {
    padding: 20px;
}

.news-grid .news-card .news-card-meta {
    margin-bottom: 10px;
}

.news-grid .news-card .card-title {
    font-size: calc(1.05rem * var(--font-size-multiplier, 1));
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
}

.news-grid .news-card .card-title a {
    color: var(--primary-blue, #0d4876);
}

.news-grid .news-card .card-title a:hover {
    color: var(--dark-blue, #003d7a);
}

.news-grid .news-card .card-text {
    font-size: calc(0.9rem * var(--font-size-multiplier, 1));
    color: #555;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .news-featured-image {
        min-height: 260px;
    }

    .news-featured-content {
        padding: 20px 18px;
    }

    .news-featured-title {
        font-size: calc(1.25rem * var(--font-size-multiplier, 1));
    }

    .news-featured-excerpt {
        display: none;
    }
}

/* ===== Back button (vijesti, stranice) ===== */
.page-back-btn {
    position: fixed;
    top: 100px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--yellow-accent, #ffc107);
    color: #000;
    border: none;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    text-decoration: none;
}

.page-back-btn:hover {
    background-color: #ffb300;
    color: #000;
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.5);
}

@media (max-width: 768px) {
    .page-back-btn {
        top: 70px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* ===== Mobile - pregled vijesti i stranica ===== */
@media (max-width: 768px) {
    .news-section .container,
    .news-content .container,
    .page-content .container {
        padding-left: 12px;
        padding-right: 12px;
        max-width: 100%;
    }

    .news-article,
    .page-article {
        padding: 20px 16px;
    }

    .news-header .container,
    .page-header .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .news-header h1,
    .page-header h1 {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }

    .news-meta,
    .page-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .news-body img,
    .page-article img {
        max-width: 100% !important;
        height: auto !important;
    }

    .news-body table,
    .page-article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .news-section .d-flex.justify-content-between {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .news-section-title {
        font-size: 1.35rem !important;
        text-align: center;
    }

    .btn-news-all {
        width: 100%;
        text-align: center;
    }

    .news-grid .news-card .card-body {
        padding: 16px;
    }

    .news-grid .news-card .card-title {
        font-size: 1rem !important;
    }

    .sidebar-widget {
        padding: 16px;
    }
}

/* Desktop - Page Content Layout */
@media (min-width: 992px) {
    .page-header .container-fluid,
    .page-content .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .page-content .row {
        gap: 2rem;
    }
}

/* ===== LEFT MENU - LIJEVI IZBORNIK ===== */

/* Toggle Button */
.left-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1040;
    width: 48px;
    height: 48px;
    padding: 0;
    background-color: var(--primary-blue, #0d4876);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(13, 72, 118, 0.3);
}

.left-menu-toggle:hover {
    background-color: #0a3a5a;
}

.left-menu-toggle:active {
    transform: scale(0.98);
}

.left-menu-toggle.hidden {
    display: none;
}

@media (min-width: 992px) {
    .left-menu-toggle {
        display: none;
    }
}

/* Desktop Minimize Button */
.left-menu-toggle-minimize {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1040;
    width: 48px;
    height: 48px;
    padding: 0;
    background-color: #1a3a5c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
}

.left-menu-toggle-minimize:hover {
    background-color: #0f2542;
}

.left-menu-toggle-minimize.hidden {
    display: none !important;
}

@media (max-width: 991px) {
    .left-menu-toggle-minimize {
        display: none;
    }
}

/* Sidebar Container */
.left-menu-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 360px;
    background-color: #1a3a5c;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
}

/* Minimized State (Desktop only) */
.left-menu-sidebar.minimized {
    width: 80px;
}

.left-menu-sidebar.minimized .left-menu-nav {
    padding: 0;
}

.left-menu-sidebar.minimized .left-menu-link {
    justify-content: center;
    padding: 14px 10px;
    font-size: 0;
}

.left-menu-sidebar.minimized .left-menu-link > span {
    display: none;
}

.left-menu-sidebar.minimized .left-menu-link:hover,
.left-menu-sidebar.minimized .left-menu-link.active {
    background-color: rgba(255, 255, 255, 0.08);
}

.left-menu-sidebar.minimized .left-menu-toggle-icon {
    margin: 0;
    font-size: 1rem;
}

.left-menu-sidebar.minimized .left-menu-sublist {
    display: none;
}

.left-menu-sidebar.minimized .left-menu-header {
    padding: 16px 8px;
    flex-direction: column;
    gap: 8px;
}

.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-minimize-close {
    margin-left: 0;
    width: 100%;
    padding: 8px;
}

.left-menu-sidebar.minimized .left-menu-minimize-close i {
    transform: rotate(180deg);
}

@media (min-width: 992px) {
    .left-menu-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 360px;
        box-shadow: 1px 0 6px rgba(0, 0, 0, 0.1);
        transform: none !important;
    }
}

/* Mobile: Off-canvas */
@media (max-width: 991px) {
    .left-menu-sidebar {
        transform: translateX(-100%);
    }
    
    .left-menu-sidebar.open {
        transform: translateX(0);
    }
}

/* Main Layout Wrapper */
.main-layout-wrapper {
    display: flex;
    width: 100%;
}

.main-content-area {
    flex: 1;
    width: 100%;
    transition: margin-left 0.3s ease;
    margin-left: 0;
}

/* Desktop - Sidebar visible */
@media (min-width: 992px) {
    .main-layout-wrapper {
        position: relative;
    }
    
    .main-content-area {
        margin-left: 360px;
    }
}

/* Header */
.left-menu-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #0f2542;
    color: white;
}

.left-menu-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.left-menu-header strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.left-menu-header small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    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: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.left-menu-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.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: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.left-menu-minimize-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (min-width: 992px) {
    .left-menu-header {
        display: none;
    }
}

/* Navigation Container */
.left-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 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.2);
    border-radius: 3px;
}

.left-menu-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Menu List */
.left-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Menu Item */
.left-menu-item {
    position: relative;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.left-menu-item:last-child {
    border-bottom: none;
}

.left-menu-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
}

.left-menu-link > span {
    flex: 1;
}

.left-menu-toggle-icon {
    margin-left: auto;
    margin-right: -4px;
    font-size: 1rem;
    transition: transform 0.25s ease;
    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.08);
    color: white;
}

.left-menu-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
}

/* Submenu List */
.left-menu-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-left: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.left-menu-item:hover .left-menu-sublist,
.left-menu-item.open .left-menu-sublist {
    max-height: 1000px;
}

/* Submenu Link */
.left-menu-sublink {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 40px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
}

.left-menu-sublink:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    padding-left: 44px;
}

.left-menu-sublink.active {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Empty State */
.left-menu-empty {
    padding: 32px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
    margin: 20px 0 0 0;
}

.left-menu-empty strong {
    color: rgba(255, 255, 255, 0.85);
    display: block;
    margin-top: 8px;
}

/* Overlay - mobilni */
.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.5);
    pointer-events: auto;
}

@media (min-width: 992px) {
    .left-menu-overlay {
        display: none;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .left-menu-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .left-menu-sidebar {
        width: 280px;
    }
    
    .left-menu-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .left-menu-sublink {
        padding: 9px 16px 9px 36px;
        font-size: 0.85rem;
    }
    
    .left-menu-header {
        padding: 20px 16px;
        gap: 12px;
    }
    
    .left-menu-logo {
        width: 44px;
        height: 44px;
    }
}