/**
 * Moderni CSS za Ei Pionir UKT website
 * HTML5 layout sa responzivnim dizajnom
 */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, sans-serif;
    background-color: #FFFFFF;
    color: #000000;
}

/* Layout Container */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-image: url('../img/top03_salogo.jpg'), url('../img/top03_ponavljanje.gif');
    background-repeat: no-repeat, repeat-x;
    background-position: left top, right bottom;
    background-size: auto, auto;
    background-color: #f5f5f5;
    padding: 0;
    height: 68px;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    /* Tuning variables */
    --logo-width: 520px;
    --bar-top: 54px;
    --bar-height: 14px;
    --hamburger-reserve: 72px;
    --hamburger-right: 6px;
    --hamburger-width: 35px;
    --hamburger-gap: 8px;
}

header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: var(--hamburger-reserve);
    height: 100%;
    background-image: url('../img/top03_ponavljanje.gif');
    background-repeat: repeat-x;
    background-position: right bottom;
    background-color: #f5f5f5;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

/* Language Selector */
.lang-selector {
    position: absolute;
    top: var(--bar-top);
    right: var(--hamburger-right);
    z-index: 10;
    padding: 0;
    line-height: var(--bar-height);
    text-align: right;
}

.lang-selector a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    display: block;
}

.lang-selector a:hover {
    color: #ADB5CC;
    text-decoration: underline;
}

body.lang-srb .lang-selector {
    top: calc(var(--bar-top) - 4px);
}

body.lang-eng .lang-selector {
    top: calc(var(--bar-top) - 5px);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex: 1;
}

/* Navigation */
nav {
    width: 140px;
    background-color: #ADB5CC;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid #999;
}

nav a {
    display: block;
    text-align: right;
    padding: 5px;
}

nav img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

nav a:hover img {
    filter: brightness(1.15);
}

body.no-nav nav {
    display: none;
}

body.no-nav .hamburger {
    display: none;
}

body.no-nav header {
    display: none;
}

body.in-frame header,
body.in-frame nav,
body.in-frame .hamburger {
    display: none;
}

/* Main Content */
main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Wrapper for breadcrumbs + main content */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #ccc;
}

.footer-credits {
    margin-top: 6px;
    font-size: 11px;
    color: #444;
}

/* Centered link block before footer */
.centered-footer-link {
    text-align: center;
    margin-bottom: 0.5cm;
}

/* Kontakt page media block */
.contact-media {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.contact-image {
    flex: 0 0 300px;
}

.contact-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #000066;
}

.contact-map {
    flex: 1 1 300px;
    min-width: 280px;
}

.contact-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

.contact-block {
    margin: 12px 0 16px;
}

.contact-block strong {
    display: block;
    margin-bottom: 4px;
}

.contact-sub {
    padding-left: 14px;
    line-height: 1.4;
}

.contact-docs {
    margin-top: 18px;
}

.contact-docs a {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #000066;
    background-color: #f0f4ff;
    text-decoration: none;
    margin: 4px 8px 0 0;
}

.contact-docs a:hover {
    background-color: #e0e8ff;
}

/* Home page feature box + video */
.home-feature {
    width: min(100%, 400px);
    border: 1px solid #000066;
    background-color: #f0f0ff;
    padding: 10px;
    margin: 20px 0;
}

.home-feature-title {
    font-size: 14px;
    font-weight: bold;
    color: #000066;
    margin-bottom: 6px;
}

.home-video {
    margin: 30px 0;
}

.home-video video {
    width: min(100%, 400px);
    height: auto;
    border: 1px solid #000066;
}

/* Hamburger menu - desktop placement inside header */
.hamburger {
    display: none;
    position: absolute;
    right: 60px;
    top: 17px;
    z-index: 12;
    width: 35px;
    height: var(--bar-height);
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* ============================================
   RESPONSIVE / MOBILE STYLES
   ============================================ */

@media (max-width: 768px) {
    header {
        --hamburger-reserve: calc(var(--hamburger-width) + var(--hamburger-right) + var(--hamburger-gap));
        padding-right: var(--hamburger-reserve);
        background-image: url('../img/top03_ponavljanje.gif');
        background-repeat: repeat-x;
        background-position: right bottom;
        background-size: auto;
    }

    header::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: calc(100% - var(--hamburger-reserve) + 200px);
        height: 68px;
        background-image: url('../img/top03_salogo.jpg');
        background-repeat: no-repeat;
        background-position: left top;
        background-size: calc(100% - var(--hamburger-reserve)) 68px;
        z-index: 0;
        pointer-events: none;
    }

    .lang-selector {
        right: var(--hamburger-right);
    }

    header::after {
        opacity: 1;
    }

    .content-wrapper {
        flex-direction: column;
        position: relative;
    }
    
    /* Hamburger Button */
    .hamburger {
        display: block;
        width: var(--hamburger-width);
        height: 25px;
        cursor: pointer;
        position: absolute;
        right: var(--hamburger-right);
        top: 10px;
        z-index: 20;
        background-color: transparent;
        border: none;
        padding: 0;
    }
    
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #FFFFFF;
        margin: 5px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Mobile Navigation - Dropdown */
    nav {
        width: 100%;
        background-color: #ADB5CC;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex-direction: column;
        gap: 0;
        padding: 0;
        order: -1;
    }
    
    nav.active {
        max-height: 400px;
        padding: 10px 5px;
    }
    
    nav a {
        display: block;
        padding: 12px 15px 12px 40px;
        border-bottom: 1px solid #9DA7C0;
        font-size: 13px;
        font-weight: bold;
        color: #333;
        text-decoration: none;
        text-align: left;
        transition: background-color 0.2s;
    }
    
    nav a::before {
        content: attr(title);
    }
    
    nav a:hover {
        background-color: #98a4b8;
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    nav img {
        display: none;
    }
}

/* ============================================
   TABLET ADJUSTMENTS (768px - 1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    nav {
        width: 120px;
    }
    
    main {
        padding: 15px;
    }
}

