/* GRID KONTEJNER */
.mc-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px;
    background: #0f0f0f; /* Tamnija, mat osnova */
    border-radius: 16px;
    border: 1px solid #222;
}

/* KARTICA (ITEM) */
.mc-file-item {
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg, #1a1a1a, #141414); /* Blagi gradijent za dubinu */
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #333;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.mc-file-item:hover {
    transform: translateY(-8px);
    border-color: #ffcc00; /* Akcenat boja na hover */
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.mc-file-item img {
    border-radius: 10px;
    max-width: 100%;
    height: 180px;
    margin-bottom: 15px;
    object-fit: cover;
    border: 1px solid #444;
    transition: transform 0.3s ease;
}

.mc-file-item:hover img {
    transform: scale(1.05);
}

.mc-file-item h4 {
    margin-bottom: 15px;
    font-size: 1.15em;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #efefef;
}

/* DUGMIĆI */
.mc-file-item a.mc-btn,
.mc-file-item a.mc-popup-btn {
    color: #111;
    text-decoration: none;
    background: #ffcc00; /* Jaka žuta za akciju */
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 80%;
}

.mc-file-item a.mc-btn:hover,
.mc-file-item a.mc-popup-btn:hover {
    background: #fff;
    transform: scale(1.05);
}

/* POPUP - GLASSMORPHISM */
#mc-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px); /* Zamućuje sajt iza popupa */
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#mc-popup-content {
    position: relative;
    width: 1100px; /* Široko za PDF i Video */
    max-width: 95%;
    height: 85vh;
    background: #111;
    border-radius: 20px;
    border: 1px solid #444;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#mc-popup-inner {
    flex: 1;
    padding: 20px;
    background: #000;
}

#mc-popup-inner iframe,
#mc-popup-inner video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

#mc-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #ffcc00;
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#mc-popup-close:hover {
    transform: rotate(90deg);
    background: #ff3333;
    color: #fff;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .mc-files-grid { padding: 15px; gap: 20px; }
    #mc-popup-content { height: 70vh; }
}
/* --- POZADINA I OSNOVNI KONTEJNER --- */
.mc-archive-container {
    background: #000;
    padding: 40px 20px;
    min-height: 100vh;
}

/* --- KONTROLE (FILTERI + SEARCH) --- */
.mc-controls-wrapper {
    max-width: 1200px;
    margin: 0 auto 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.mc-search-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
}

#mc-search-input {
    width: 100%;
    background: #111;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 12px 20px 12px 45px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#mc-search-input:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
}

.mc-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    pointer-events: none;
}

/* --- GRID ARHIVA (3 kolone) --- */
.mc-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- KARTICA (ITEM) --- */
.mc-archive-item {
    background: #111;
    border-radius: 14px;
    border: 1px solid #222;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease, opacity 0.4s ease;
    position: relative;
}

.mc-archive-item:hover {
    transform: translateY(-8px);
    border-color: #ffcc00;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.mc-archive-item.hide {
    display: none;
}

/* --- SLIKA I BADGE --- */
.mc-archive-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: top center;
    /* background-position: center; */
    transition: transform 0.3s ease;
}

.mc-archive-item:hover .mc-archive-image {
    transform: scale(1.05);
}

.mc-category-badge {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background: #ffcc00 !important;
    color: #000 !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

/* --- INFO DEO --- */
.mc-archive-info {
    padding: 20px;
    position: relative;
    z-index: 2;
    background: #111;
}

.mc-archive-info h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 500;
    color: #efefef;
    letter-spacing: 0.5px;
}

.mc-view-more {
    color: #ffcc00;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
}

/* --- POPUP (Glassmorphism) --- */
#mc-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#mc-popup-content {
    position: relative;
    width: 1100px;
    max-width: 95%;
    height: 85vh;
    background: #111;
    border-radius: 20px;
    border: 1px solid #444;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#mc-popup-inner {
    flex: 1;
    padding: 20px;
    background: #000;
}

#mc-popup-inner iframe,
#mc-popup-inner video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

#mc-popup-close {
    position: absolute;
    top: 15px; right: 15px;
    width: 40px; height: 40px;
    background: #ffcc00;
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

#mc-popup-close:hover {
    transform: rotate(90deg);
    background: #ff3333;
    color: #fff;
}
/* Single post  */
.mc-single-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: #111;
    color: #fff;
    border-radius: 12px;
}

.mc-single-title {
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.mc-single-content {
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.mc-files-section-title {
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
/* Forsiranje crne pozadine na kontejneru */
.mc-files-grid, 
.mc-archive-container {
    background-color: #000 !important;
    padding: 30px !important;
    border-radius: 12px;
}

/* Popravka za popup da uvek bude preko svega */
#mc-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    z-index: 999999 !important; /* Povećan z-index */
}

#mc-popup-content {
    position: relative;
    width: 90%;
    height: 80vh;
    background: #111;
    padding: 40px 10px 10px 10px;
    border-radius: 8px;
}

#mc-popup-inner {
    width: 100%;
    height: 100%;
}
/* Galerija Grid */
.mc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.mc-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
    cursor: pointer;
}
.mc-gallery-item img:hover { transform: scale(1.05); border: 2px solid #ffcc00; }

/* Lightbox Navigacija */
.mc-lightbox-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.mc-lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.mc-nav {
    position: absolute;
    background: rgba(255,204,0,0.8);
    border: none;
    color: #000;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}
#mc-prev { left: 10px; }
#mc-next { right: 10px; }
.mc-nav:hover { background: #fff; }
/* Admin Galerija Wrapper */
#mc-gallery-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    min-height: 100px;
    margin-bottom: 10px;
}
.mc-gallery-item img {
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease;
}

.mc-gallery-item img[src] {
    opacity: 1;
}

/* Pojedinačna slika u adminu */
.mc-gallery-item-admin {
    width: 100px;
    text-align: center;
    background: #fff;
    padding: 5px;
    border: 1px solid #ddd;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mc-gallery-item-admin:active {
    cursor: grabbing;
}

.mc-gallery-item-admin img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    margin-bottom: 5px;
}

.remove-gallery-img {
    color: #d63638;
    text-decoration: none;
    font-size: 11px;
}

.remove-gallery-img:hover {
    color: #ff0000;
}

/* Stanje dok se vuče */
.mc-gallery-item-admin[draggable="true"] {
    user-select: none;
}
/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .mc-archive-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 650px) {
    .mc-archive-grid { grid-template-columns: 1fr !important; }
    .mc-archive-container { padding: 20px 10px; }
    #mc-popup-content { height: 75vh; }
}