/* =========================================
   1. OSNOVNE POSTAVKE I VARIJABLE
   ========================================= */
:root {
    --crna: #050505;
    --tamno-plava: #010a14;
    --dinamo-plava: #005bac; 
    --dinamo-plava-hover: #001835; 
    --tekst: #ffffff; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--tamno-plava);
    color: var(--tekst);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* =========================================
   2. NAVIGACIJA I LOGO
   ========================================= */
header {
    background-color: rgba(5, 5, 5, 0.95);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--dinamo-plava);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

nav a {
    display: inline-block; 
    color: var(--tekst);
    text-decoration: none;
    margin-left: 15px;
    padding: 8px 16px; 
    font-weight: 500;
    border: 1px solid transparent; 
    border-radius: 6px; 
    transition: all 0.3s; 
}

nav a:hover {
    color: var(--dinamo-plava);
    border-color: var(--dinamo-plava); 
    background-color: rgba(0, 91, 172, 0.05); 
}

/* =========================================
   3. GUMB (Bubble efekt)
   ========================================= */
.btn {
    background-color: var(--dinamo-plava); 
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 91, 172, 0.3); 
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: box-shadow 0.3s, transform 0.3s;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 91, 172, 0.5);
}

.btn span {
    position: absolute;
    width: 25%; 
    height: 100%;
    background-color: var(--dinamo-plava-hover);
    transform: translateY(150%); 
    border-radius: 50%;
    left: calc((var(--n) - 1) * 25%);
    transition: 0.5s;
    transition-delay: calc((var(--n) - 1) * 0.1s);
    z-index: -1; 
}

.btn:hover span {
    transform: translateY(0) scale(2);
}

.btn span:nth-of-type(1) { --n: 1; }
.btn span:nth-of-type(2) { --n: 2; }
.btn span:nth-of-type(3) { --n: 3; }
.btn span:nth-of-type(4) { --n: 4; }

/* =========================================
   4. HERO SEKCIJA
   ========================================= */
.hero {
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background-image: linear-gradient(rgba(1, 10, 20, 0.8), rgba(1, 10, 20, 1)), 
                      url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2070');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #ffffff; 
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #e0e0e0; 
}

.gradient-text {
    background: linear-gradient(90deg, #ffffff, #26acd9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    text-shadow: none !important; 
}

/* =========================================
   5. ZAJEDNIČKI ELEMENTI (Grid i naslovi)
   ========================================= */
.grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.sekcija-opis {
    font-size: 1.2rem;
    margin-bottom: 60px;
    color: var(--tekst);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   6. SEKCIJA: USLUGE I RAZLOZI KARTICE
   ========================================= */
.usluge {
    padding: 100px 50px;
    background-color: transparent; 
    text-align: center;
}

.usluge h2 {
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: #fff;
}

.kartica {
    background-color: var(--crna); 
    padding: 50px;
    border-radius: 12px;
    width: 350px;
    border: 1px solid rgba(0, 91, 172, 0.15);
    border-top: 4px solid var(--dinamo-plava); 
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.kartica:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 91, 172, 0.5);
    box-shadow: 0 15px 30px rgba(0, 91, 172, 0.15); 
}

.kartica h3 {
    color: var(--dinamo-plava); 
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* =========================================
   7. SEKCIJA: NAŠI RADOVI (Portfolio)
   ========================================= */
.radovi {
    padding: 100px 50px;
    text-align: center;
    background-color: transparent; 
}

.radovi h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #fff;
}

a {
    text-decoration: none;
}

.radovi-kartica {
    background-color: var(--crna); 
    border-radius: 12px;
    width: 350px;
    border: 1px solid rgba(0, 91, 172, 0.15);
    border-top: 4px solid var(--dinamo-plava); 
    overflow: hidden; 
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    text-align: left; 
    display: flex;
    flex-direction: column;
}

.radovi-kartica:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 91, 172, 0.5);
    box-shadow: 0 15px 30px rgba(0, 91, 172, 0.15); 
}

.radovi-slika img {
    width: 100%;
    height: 220px; 
    object-fit: cover; 
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}

.radovi-info {
    padding: 30px;
    flex-grow: 1; 
}

.radovi-info h3 {
    color: var(--dinamo-plava); 
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.radovi-info p {
    font-size: 1rem;
    color: var(--tekst);
    margin-bottom: 0;
}

/* =========================================
   8. SEKCIJA: ZAŠTO WEB BANNERR
   ========================================= */
.zasto-web {
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    text-align: center;
}

.zasto-sadrzaj {
    background-color: var(--crna);
    padding: 60px 40px;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    border: 1px solid rgba(0, 91, 172, 0.15);
    border-top: 4px solid var(--dinamo-plava); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.zasto-sadrzaj:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 91, 172, 0.2);
}

.zasto-sadrzaj h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.zasto-sadrzaj p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--tekst);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   9. SEKCIJA: KONTAKT
   ========================================= */
.kontakt {
    padding: 100px 50px;
    text-align: center;
    background-color: transparent; 
}

.kontakt h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #fff;
}

.kontakt p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   10. FOOTER
   ========================================= */
footer {
    background-color: var(--crna);
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   11. MEDIA QUERIES (Prilagodba za mobitele)
   ========================================= */
@media (max-width: 768px) {
    /* Manji razmak između redova za bolju čitljivost */
    body {
        line-height: 1.4;
    }

    header {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo img {
        width: 140px; 
    }
    
    nav {
        margin-top: 15px;
    }
    
    nav a {
        margin: 5px; 
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    /* Vraćen blagi overlay, mrvicu svjetliji od desktopa */
    .hero {
        height: auto; 
        padding: 100px 20px 60px 20px;
        background-attachment: scroll;
        background-image: linear-gradient(rgba(1, 10, 20, 0.75), rgba(1, 10, 20, 0.95)), 
                          url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2070');
    }
    
    /* Prvo smanjivanje slova (zlatna sredina) */
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 30px;
    }
    
    .usluge, .radovi, .kontakt, .zasto-web {
        padding: 60px 20px;
    }

    .usluge h2, .radovi h2, .kontakt h2, .zasto-sadrzaj h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .kartica p, .radovi-info p, .sekcija-opis, .kontakt p, .zasto-sadrzaj p {
        font-size: 0.95rem;
    }

    .grid {
        flex-direction: column;
        align-items: center;
        gap: 25px; 
    }
    
    /* Urednije kartice */
    .kartica, .radovi-kartica {
        width: 100%;
        max-width: 350px;
        padding: 30px 25px; 
    }

    .radovi-kartica {
        padding: 0; 
    }

    .radovi-info {
        padding: 20px;
    }

    .kartica h3, .radovi-info h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .zasto-sadrzaj {
        padding: 40px 20px;
    }
}