/* --- 1. RESET & VARIJABLE --- */
:root {
    --primary: #c5a059;
    --primary-dark: #8a6e36;
    --secondary: #1f2833;
    --dark: #0b0c10;
    --darker: #050608;
    --text-light: #e3e3e3;
    --text-dim: #a8a8a8;
    --glass: rgba(5, 6, 8, 0.95);
    --border-light: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--dark);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 25px; }
.section-padding { padding: 100px 0; }
.bg-darker { background-color: var(--darker); }

/* --- 2. KOMPONENTE (Buttons, Cards) --- */
.btn {
    padding: 15px 40px;
    border: 1px solid var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    background: transparent;
    color: var(--text-light);
}

.btn::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0; height: 100%; background: var(--primary);
    z-index: -1; transition: var(--transition);
}

.btn:hover::before { width: 100%; }
.btn:hover { color: var(--darker); }

.btn-primary { background: var(--primary); color: var(--darker); }
.btn-primary:hover { background: transparent; color: var(--text-light); }

.placeholder-img {
    background: #1a1a1a;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* --- 3. NAVBAR & NAVIGATION --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; position: fixed; width: 100%; top: 0; z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
}

.logo { font-size: 1.5rem; font-weight: 700; color: #fff; }
.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 40px; }
.nav-links a { font-size: 0.8rem; font-weight: 600; color: #fff; opacity: 0.7; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--primary); }

.burger { display: none; cursor: pointer; z-index: 1100; }
.burger div { width: 25px; height: 2px; background: #fff; margin: 5px; transition: var(--transition); }

/* --- 4. HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(5,6,8,0.7), rgba(5,6,8,0.7)), url('assets/hero-bg.jpg') center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative;
}

.hero-content { z-index: 2; max-width: 900px; padding: 0 20px; }
.hero-subtitle { color: var(--primary); font-weight: 700; letter-spacing: 5px; text-transform: uppercase; margin-bottom: 20px; display: block; }
.hero h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; color: #fff; }
.hero p { font-size: 1.1rem; color: var(--text-dim); max-width: 650px; margin: 0 auto 40px; }

/* --- 5. GRIDS & CARDS --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.8rem; margin-bottom: 15px; color: #fff; }
.accent-line { width: 50px; height: 3px; background: var(--primary); margin: 0 auto 20px; }

.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(255,255,255,0.02);
    padding: 50px 35px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.feature-card:hover { border-color: var(--primary); transform: translateY(-10px); }
.feature-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 25px; }

/* --- 6. STATS BAR --- */
.stats-bar {
    background: var(--primary); padding: 50px 0;
    color: var(--darker); display: flex; justify-content: space-around; text-align: center;
}
.stat-item h2 { font-size: 3rem; margin-bottom: 5px; }
.stat-item p { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; }

/* --- 7. ANIMATIONS --- */
.scroll-reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.8s ease, transform 0.8s ease; 
}
.scroll-reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- 8. RESPONZIVNOST (MOBILE FIRST) --- */

@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .section-title { font-size: 2.3rem; }
}

@media (max-width: 768px) {
    .burger { display: block; }

    /* POPRAVLJEN NAVIGACIONI MENI */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 100%;
        background: var(--darker);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        z-index: 1000;
    }

    /* Klasa koju JS dodaje */
    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links li { opacity: 0; } /* Za JS animaciju */

    .nav-links a { font-size: 1.4rem; opacity: 1; }

    /* BURGER U X ANIMACIJA */
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); background: var(--primary); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); background: var(--primary); }

    /* LAYOUT POPRAVKE */
    .hero h1 { font-size: 2.4rem !important; }
    .section-padding { padding: 60px 0; }
    .stats-bar { flex-direction: column; gap: 40px; }
    
    .about-grid, .footer-grid { 
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .hero-btns .btn { width: 100%; margin: 0 !important; }
}

/* --- FOOTER --- */
footer {
    background: #020304; padding: 60px 0 20px;
    border-top: 1px solid var(--border-light);
    color: var(--text-dim);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
.footer-about h3 { color: #fff; margin-bottom: 15px; }
.footer-contact p { margin-bottom: 10px; font-size: 0.9rem; }
.copyright { text-align: center; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--border-light); font-size: 0.8rem; }

/* --- PROJECT TEASER FIX --- */
.project-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    height: 500px;
    overflow: hidden;
}

.project-teaser-item {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.project-teaser-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.7);
}

.project-teaser-item:hover .project-teaser-img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.pt-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 40px;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    width: 100%;
}

.pt-cat { color: var(--primary); font-weight: 700; font-size: 0.8rem; letter-spacing: 2px; }
.pt-title { font-size: 2rem; color: #fff; margin: 10px 0 20px; }

/* --- KAKO RADIMO (PROCESS STEPS) FIX --- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
    padding: 20px;
}

.step-num {
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary);
    border-radius: 50%; /* Ovo pravi krug */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Oswald';
    background: var(--darker);
    transition: var(--transition);
}

.step:hover .step-num {
    background: var(--primary);
    color: var(--darker);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

.step h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 15px;
}

.step p {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* --- CTA SECTION --- */
.cta-section {
    padding: 120px 0;
    background: linear-gradient(rgba(5,6,8,0.8), rgba(5,6,8,0.8)), url('assets/cta-bg.jpg') center/cover fixed;
    text-align: center;
}

.cta-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}

/* --- MOBILE FIX ZA OVE SEKCIJE --- */
@media (max-width: 768px) {
    .project-teaser-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .project-teaser-item {
        height: 350px;
    }
    .process-steps {
        grid-template-columns: 1fr;
    }
    .step {
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 40px;
    }
    .step:last-child { border-bottom: none; }
    
    .cta-box h2 { font-size: 2rem; }
}
/* --- PROJECTS PAGE SPECIFIC --- */

/* Kontejner slike u kartici projekta */
.project-card-img {
    width: calc(100% + 70px); /* Da slika ide od ivice do ivice kartice */
    margin: -50px -35px 25px -35px; /* Poništava padding kartice */
    height: 250px;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--primary);
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* KLJUČNO: Centriranje i sečenje slike bez deformacije */
    object-position: center;
    transition: transform 0.5s ease;
}

.feature-card:hover .project-card-img img {
    transform: scale(1.1); /* Blagi zoom na hover */
}

/* Kategorija iznad naslova (npr. ALGERIA ili TUNISIA) */
.project-category {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

/* Tehnički detalji (ono što izvlačimo iz PDF-a) */
.project-specs {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
/* --- PROJEKTI FINALNI FIX --- */

/* Razmak između kategorija */
.project-grid {
    margin-bottom: 80px;
}

/* Naslovi kategorija - Fix za mobilni header */
.category-title {
    margin-bottom: 40px;
    color: #fff;
}

@media (max-width: 768px) {
    /* Gura celu sekciju ispod headera na mobilnom. Potrebno je dodati klasu "projects-page" na <body> tag stranice sa projektima. */
    body.projects-page section:first-of-type {
        padding-top: 140px !important; 
    }
}

/* Kontejner slike u kartici */
.project-image-box {
    width: calc(100% + 70px); /* Širi sliku tačno do ivica paddinga kartice */
    margin: -50px -35px 25px -35px; /* Poništava padding: 50px 35px */
    height: 230px;
    overflow: hidden;
    border-bottom: 3px solid var(--primary);
}

.project-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Centriranje i punjenje prostora bez distorzije */
    object-position: center;
}

/* Stil za tag (Država) */
.project-tag {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

/* Hover efekat za sliku */
.feature-card:hover .project-image-box img {
    transform: scale(1.08);
    transition: transform 0.5s ease;
}
.about-image-container {
    width: 100%;
    height: 450px;
    overflow: hidden;
    border: 1px solid var(--primary);
    position: relative;
    background: #1a1a1a;
}

.about-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: var(--transition);
}

/* Redosled na mobilnom - da slika ne pobegne ispod teksta gde ne treba */
@media (max-width: 768px) {
    .order-mobile {
        order: -1; /* Ovo gura sliku iznad teksta na telefonu */
    }
    
    .about-image-container {
        height: 300px;
        margin-bottom: 20px;
    }

    /* Fix da About sekcija na mobilnom ne udara u header */
    body.about-page .hero, 
    body.about-page section:first-of-type {
        padding-top: 140px !important;
    }
}

/* Sinergija lista (Fortis Energy deo) */
.about-text ul {
    margin-top: 25px;
}

.about-text ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.about-text ul li i {
    color: var(--primary);
}

.features-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Ovo ih savršeno raspoređuje */
    gap: 30px;
}

/* --- FOOTER COPYRIGHT & CREDITS --- */

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.developer-credit {
    margin-top: 10px;
    font-size: 0.75rem; /* Malo sitnije od glavnog teksta, to je standard */
    opacity: 0.7;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.developer-credit a {
    color: var(--text-light);
    font-weight: 700;
    transition: var(--transition);
}

/* Na hover tvoje ime postaje zlatno */
.developer-credit a:hover {
    color: var(--primary);
    text-decoration: none; /* Bez podvlačenja, čistije je */
}