:root {
    --matf-red: #b01212;
    --matf-dark-red: #8b0e0e;
    --matf-blue: #1a284d;
    --border-gray: #e1e1e1;
    --bg-gray: #f8f8f8;
    --text-main: #333;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Ubuntu', sans-serif;
    background-color: #fff;
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    width: 100%; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ХЕДЕР */
header { background-color: #fff; }
.header-full-width { width: 100%; box-sizing: border-box; }
.header-left-content { display: flex; align-items: center; }
.header-inner img { height: 62px; margin-right: 15px; display: block; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }

/* Изглед странице на лаптопу */
@media (min-width: 1001px) and (max-width: 1400px) {
    .header-left-content { padding-left: 70px; }
    .lang-switch { padding-right: 70px; }
}

/* Изглед странице на десктопу */
@media (min-width: 1401px) {
    .header-left-content { padding-left: 300px; }
    .lang-switch { padding-right: 250px; }
}

/* ЋИР|LAT стил */
.lang-switch { font-size: 16px; font-weight: 600; }
.lang-switch a { text-decoration: none; color: var(--matf-blue); }
.lang-switch a:hover { color: var(--matf-red); }

.logo-text a { 
    display: flex; 
    text-decoration: none; 
    color: var(--matf-red); 
    font-weight: 500; 
    line-height: 1.2; 
}

.logo-text a:hover { color: var(--matf-blue); }
.fact { font-size: 20px; }
.univ { font-size: 18px; }

/* Мени */
.main-menu { background-color: var(--matf-red); position: relative; z-index: 100; width: 100%; }
.main-menu ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-menu li { position: relative; }

.main-menu li a { 
    display: block; 
    padding: 12px 20px; 
    color: #fff; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 700; 
    text-transform: uppercase; 
    transition: background-color 0.2s ease;
}

.main-menu li a:hover { background-color: var(--matf-dark-red); }
.dropdown-content { display: none; position: absolute; background-color: #fff; min-width: 250px; box-shadow: 0px 8px 16px rgba(0,0,0,0.1); border-top: 3px solid var(--matf-dark-red); top: 100%; left: 0; }
.dropdown-content a { color: var(--text-main) !important; padding: 12px 16px !important; text-transform: none !important; font-weight: 700 !important; border-bottom: 1px solid var(--border-gray); display: block; }
.dropdown-content a:hover { background-color: var(--bg-gray); color: #f8f9fa !important; }
.dropdown:hover .dropdown-content { display: block; }

/* Распоред */
.main-wrapper { 
    margin-top: 40px; 
    margin-bottom: 0;
    padding-bottom: 50px; 
    flex: 1; 
}
.content-grid { display: flex; gap: 30px; align-items: flex-start; }
.left-sidebar { width: 300px; flex-shrink: 0; } 
.main-content { width: 540px; flex-shrink: 0; }   
.right-sidebar { width: 300px; flex-shrink: 0; }  

/* Боксеви */
.name-card-box { 
    background-color: var(--bg-gray); 
    padding: 30px; 
    border: 1px solid var(--border-gray); 
    margin-bottom: 30px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.name-card-box h1 { margin: 0; color: var(--matf-red); font-size: 32px; font-weight: 700; }
.name-card-box .subtitle { margin: 5px 0 0; font-size: 18px; color: #444; font-weight: 700; }
.name-card-box .dept { margin: 0; font-size: 16px; color: #777; font-weight: 400; }
.name-card-text { flex: 1; margin-right: 30px; }

/* Компактнији "Offset" рам у боји #444 */
.profile-photo-wrapper {
    position: relative;
    display: inline-block;
    padding: 0;
    margin: 5px 15px 15px 5px; 
    line-height: 0;
}

.profile-photo-wrapper::after {
    content: '';
    position: absolute;
    top: 6px;    
    left: 6px;   
    width: 100%;
    height: 100%;
    border: 2px solid #444; 
    z-index: 1;
    border-radius: 2px;
}

.profile-photo-frame { position: relative; z-index: 2; line-height: 0; }

.profile-photo-frame img {
    height: 130px;
    width: auto;
    object-fit: cover;
    display: block;
    border: 1px solid #222; 
    border-radius: 2px;
    /* Блага сенка је сада мало "плића" да прати рам */
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

/* Респонзивност бокса за профил за мобилни */
@media (max-width: 600px) {
    .name-card-box { 
        flex-direction: row; 
        text-align: left; 
        padding: 15px; 
        gap: 15px;
        align-items: center;
    }

    .name-card-text { margin-right: 0; margin-top: 0; flex: 1; }
    .name-card-box h1 { font-size: 20px; }
    .name-card-box .subtitle { font-size: 14px; }
    .name-card-box .dept { font-size: 13px; }
    .profile-photo-frame img { height: 85px; }
    .profile-photo-wrapper { margin: 5px 10px 10px 5px; }
}

.news-box {
    box-sizing: border-box;
    width: 100%;
    max-width: 270px;
    margin-left: 0;
    padding: 30px;
}

.sidebar-box { background: var(--bg-gray); border: 1px solid var(--border-gray); padding: 20px; margin-bottom: 25px; }
.sidebar-box h4 { color: var(--matf-red); font-weight: 700; margin-top: 0; border-bottom: 2px solid var(--matf-red); padding-bottom: 8px; text-transform: uppercase; font-size: 14px; margin-bottom: 12px; }
.welcome-box { background: #fff; padding: 30px; border: 1px solid var(--border-gray); min-height: 450px; }
.welcome-box h3 { color: var(--matf-red); margin-top: 0; font-size: 24px; border-left: 5px solid var(--matf-red); padding-left: 15px; }

.welcome-box div table {
    width: auto ;
    border-collapse: collapse;
    margin: 20px 0 ;
    border: 1px solid #666; 
    table-layout: auto ;
}

.welcome-box div table td, 
.welcome-box div table th { border: 1px solid #666 ; padding: 12px ; text-align: left; }
.welcome-box div table th { background-color: #f2f2f2 ; font-weight: bold ; color: #b01212 ; }

/* Листе */
.matf-list { list-style: none; padding: 0; margin: 0; }
.matf-list li { padding: 8px 0; border-bottom: 1px dotted var(--border-gray); }
.matf-list li a { color: var(--matf-red); text-decoration: none; font-weight: 700; font-size: 13px; }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 15px 0; border-bottom: 1px solid var(--border-gray); }
.news-list li:last-child { border-bottom: none; }
.news-date { display: inline-block; font-size: 11px; color: var(--matf-red); font-weight: 700; margin-bottom: 5px; background: #fff; padding: 1px 6px; border: 1px solid var(--border-gray); border-radius: 4px; }
.news-list a { display: block; color: var(--text-main); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.4; }
.all-news { display: block; text-align: right; color: var(--matf-red); font-size: 11px; font-weight: 700; text-decoration: none; margin-top: 15px; }

/* Футер */
.footer { background: #333; color: #fff; padding: 15px 0; text-align: center; font-size: 13px; font-weight: 700; width: 100%; }
.menu-toggle { display: none; }
.developer-credits a { color: inherit; transition: all 0.3s ease; }
.developer-credits a:hover { color: #b01212; text-decoration: underline !important; }
.footer-links a { color: inherit; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: #b01212; opacity: 1; }

/* Изглед странице на мобилном телефону или таблету */
@media (max-width: 1001px) {
    
    /* Хедер */
    .header-inner { flex-direction: column; text-align: center; gap: 15px; }
    .header-left-content { flex-direction: column; }
    .header-inner img { margin-right: 0; margin-bottom: 10px; }
    .header-full-width { padding: 15px 0; }

    /* Мени */
    .main-menu { background-color: transparent; text-align: center; width: 100%; }

    .menu-toggle {
        display: inline-block;
        background-color: var(--matf-red);
        color: #fff;
        padding: 12px 25px;
        border: none;
        border-radius: 4px;
        font-weight: 700;
        text-transform: uppercase;
        cursor: pointer;
        margin: 10px auto;
        font-family: 'Ubuntu', sans-serif;
    }

    #main-nav-ul {
        display: none;
        flex-direction: column;
        width: 100%;
        width: 90%;
        margin: 10px auto; 
        background-color: #fff;
        border: 1px solid var(--border-gray);
        padding: 0;
        list-style: none;
    }

    #main-nav-ul.show { display: flex; }
    .main-menu li { width: 100%; border-bottom: 1px solid var(--border-gray); }
    .main-menu li a {
        color: var(--text-main);
        padding: 15px;
        display: block;
        text-align: center;
    }

.dropdown { width: 100%; position: relative; }

.dropdown-content {
    display: none;
    position: static;
    width: 100%;
    background-color: #f9f9f9; 
    border: none;
    box-shadow: none;
}

.dropdown.open .dropdown-content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
    }

.dropdown-content a {
    padding: 12px 25px !important;
    text-align: left !important;
    border-bottom: 1px solid #eee;
    display: block; 
    color: #333 !important;
}

    /* Распоред */
    .content-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Редослед боксева */
    .main-content { order: 1; width: 100% !important; }
    .right-sidebar { order: 2; width: 100% !important; }
    .left-sidebar { order: 3; width: 100% !important; }

    /* Елементи садржаја */
    .main-wrapper { margin-top: 20px; padding: 0 10px; }
    .name-card-box, 
    .welcome-box{
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
    }

    .name-card-box { text-align: center; }
    .name-card-box h1 { font-size: 24px; }
    .welcome-box { min-height: auto; }
    .news-box {
        max-width: 100% !important; 
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }

    .sidebar-box { max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }

    /* Футер */
    .footer { padding: 20px 10px; width: 100%; box-sizing: border-box; }
}

/* Пагинација */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    list-style: none;
    padding: 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: 0.3s;
}
.pagination a:hover { background-color: var(--matf-red); color: #fff; border-color: var(--matf-red); }
.pagination .active { background-color: var(--matf-red); color: #fff; border-color: var(--matf-red); font-weight: bold; }