@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

@font-face {
    font-family: 'Sukari';
    src: url('fonts/SukariRegular-3lq96.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Parfumerie Script';
    src: url('fonts/parfumerie-script-regular.otf') format('opentype'); /* <-- PROVERI OVAJ DEO */
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Perandory Condensed';
    src: url('fonts/SukariRegular-3lq96.ttf') format('opentype');
    text-transform: capitalize;
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #F7F2EC;
    --text-color: #1a1a1a;
    --accent-color: #B99B6B;
    --font-serif: 'Sukari', serif;
    --font-script: 'Parfumerie Script', cursive;
    --font-sans: 'Poppins', sans-serif;
    --light-text: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.7s ease-in-out, color 0.7s ease-in-out;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-words-wrapper {
    position: relative;
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 10vw, 6rem);
    color: var(--text-color);
}

.loader-word {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.page-wrapper {
    opacity: 0;
}

body.dark-mode {
    background-color: var(--text-color);
    color: var(--bg-color);
}
body.dark-mode .btn-secondary { color: var(--bg-color); }
body.dark-mode .btn-secondary::after { background-color: var(--bg-color); }
body.dark-mode .package-card { border-top-color: var(--bg-color); }
body.dark-mode .package-btn:hover { background-color: var(--bg-color); color: var(--text-color); }
body.dark-mode .skills-ticker-section { border-color: rgba(255,255,255,0.1); }
body.dark-mode .hero-details { border-color: rgba(255,255,255,0.1); }

header {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 40px 5%; z-index: 100; mix-blend-mode: difference;
}
header .logo, header nav a { font-weight: 400; color: white; text-decoration: none; }
header .logo { font-family: var(--font-serif); font-size: 2.5rem; }
/* --- NOVI I JEDNOSTAVNIJI STILOVI ZA SVG LOGO --- */
/* --- AŽURIRANI I POUZDANIJI STILOVI ZA SVG LOGO --- */

.header-logo-svg,
.footer-logo-svg {
    display: inline-block;
    vertical-align: middle;
}

.header-logo-svg svg,
.footer-logo-svg svg {
    display: block;
    width: auto;
    height: 100%;
    transition: fill 0.7s ease-in-out;
}

/* Header Logo */
.header-logo-svg {
    height: 45px;
}
.header-logo-svg svg {
    fill: var(--bg-color); /* Uvek beo zbog mix-blend-mode */
}
header nav a { font-size: 1rem; margin-left: 40px; position: relative; padding-bottom: 5px; }
header nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 1px; background-color: white;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
header nav a:hover::after { transform: scaleX(1); }

/* --- KONAČNA I KOMPLETNA ISPRAVKA ZA LOGO U FUTERU --- */

.footer-logo-svg,
.footer-logo-svg:link,
.footer-logo-svg:visited,
.footer-logo-svg:hover,
.footer-logo-svg:active {
    display: inline-block;          /* Važno za pozicioniranje */
    height: 50px;                   /* VRAĆENA VELIČINA */
    color: var(--text-color) !important;
    text-decoration: none !important;
}

.footer-logo-svg svg {
    height: 100%;                   /* Da SVG popuni visinu linka */
    width: auto;
    display: block;
    fill: var(--text-color) !important; /* Direktno fiksiranje boje */
}

/* Ista logika za tamnu temu */
body.dark-mode .footer-logo-svg,
body.dark-mode .footer-logo-svg:link,
body.dark-mode .footer-logo-svg:visited,
body.dark-mode .footer-logo-svg:hover,
body.dark-mode .footer-logo-svg:active {
    color: var(--bg-color) !important;
}

body.dark-mode .footer-logo-svg svg {
    fill: var(--bg-color) !important;
}
/* Reset stare .logo klase ako je ostala negde */
.logo {
    font-size: 1rem;
    line-height: 1;
}



.hamburger-menu { display: none; width: 30px; height: 22px; position: relative; cursor: pointer; z-index: 1001; }
.hamburger-menu .line { position: absolute; height: 2px; width: 100%; background-color: white; transition: transform 0.3s ease, opacity 0.3s ease; }
.hamburger-menu .line-top { top: 0; }
.hamburger-menu .line-middle { top: 50%; transform: translateY(-50%); }
.hamburger-menu .line-bottom { bottom: 0; }
body.is-open .hamburger-menu .line-top { transform: translateY(10px) rotate(45deg); }
body.is-open .hamburger-menu .line-middle { opacity: 0; }
body.is-open .hamburger-menu .line-bottom { transform: translateY(-10px) rotate(-45deg); }

.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--text-color); z-index: 999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}
body.is-open .mobile-nav-overlay { transform: translateX(0); }
.mobile-nav-overlay a {
    color: var(--bg-color); text-decoration: none; font-size: 2.5rem; font-family: var(--font-serif);
    margin: 20px 0; opacity: 0; transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
body.is-open .mobile-nav-overlay a { opacity: 1; transform: translateY(0); }
body.is-open .mobile-nav-overlay a:nth-child(1) { transition-delay: 0.3s; }
body.is-open .mobile-nav-overlay a:nth-child(2) { transition-delay: 0.4s; }
body.is-open .mobile-nav-overlay a:nth-child(3) { transition-delay: 0.5s; }
.mobile-nav-close-btn { position: absolute; top: 40px; right: 5%; font-size: 8rem; color: var(--bg-color); cursor: pointer; font-family: var(--font-serif); }

.hero-reimagined {
    min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
    text-align: center; padding: 140px 0 40px 0; overflow: hidden; position: relative;
}
.hero-reimagined .hero-main-content { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-reimagined h1 { font-family: 'Perandory Condensed', serif; font-size: clamp(4rem, 16vw, 11rem); line-height: 1; font-weight: normal; text-transform: capitalize; }
.hero-reimagined h1 .line { display: block; position: relative; overflow: hidden; white-space: nowrap; }
.hero-reimagined h1 .line-1 { margin-bottom: 0.15em; }
.hero-reimagined .anim-text-main { display: inline-block; transform: translateY(110%); }
.hero-reimagined .scripted-text, .hero-reimagined .scripted-e { font-family: 'Parfumerie Script', cursive; text-transform: capitalize !important; }
.hero-reimagined .scripted-text { margin-right: 0.2em; }
.hero-reimagined .scripted-e { margin-left: -0.28em; margin-right: 0.19em; font-size: 1.15em; }
.hero-reimagined .serif-im { letter-spacing: 0.02em; }

.hero-details {
    width: 100%; border-top: 1px solid rgba(0, 0, 0, 0.1); padding-top: 30px;
    display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: center; text-align: left;
}
.hero-details .text-content .sub-headline, .hero-details .text-content .proof { opacity: 0.9; max-width: 450px; }
.hero-details .text-content .sub-headline { font-size: 1rem; line-height: 1.7; margin-bottom: 25px; }
.hero-details .text-content .proof { font-weight: 500; padding: 10px 15px; border-radius: 8px; font-size: 0.9rem; border-left: 3px solid var(--text-color); background-color: rgba(0, 0, 0, 0.02); }
.hero-details .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.hero-details .stat-item .stat-number { font-family: 'Perandory Condensed', serif; font-size: clamp(2.5rem, 6vw, 3.5rem); line-height: 1; }
.hero-details .stat-item .stat-label { font-size: 0.8rem; font-weight: 300; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.7; }

.cta-buttons { display: flex; gap: 25px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.btn { text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: all 0.3s ease; display: inline-block; }
.btn-primary { background-color: var(--text-color); color: var(--bg-color); border: 1px solid var(--text-color); padding: 12px 28px; border-radius: 50px; }
.btn-primary:hover { background-color: transparent; color: var(--text-color); transform: translateY(-3px); }
body.dark-mode .btn-primary:hover { background-color: transparent; color: var(--bg-color); border-color: var(--bg-color); }
.btn-secondary { background-color: transparent; color: var(--text-color); border: none; padding: 12px 0; position: relative; }
.btn-secondary::after { content: ''; position: absolute; bottom: 8px; left: 0; width: 100%; height: 1px; background-color: var(--text-color); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
.btn-secondary:hover::after { transform: scaleX(1); }
/* FIX: Uklanjanje plavog focus-a sa svih dugmića */

.package-btn {
    color: #000;
}

body.dark-mode .btn:focus,
body.dark-mode .package-btn:focus,
body.dark-mode .submit-btn:focus {
     box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.skills-ticker-section { padding: 2rem 0; border-top: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1); overflow: hidden; transition: border-color 0.7s ease-in-out;}
.ticker-wrap { width: 100%; display: flex; align-items: center; }
.ticker-move { display: flex; align-items: center; white-space: nowrap; animation: ticker 40s linear infinite; }
.ticker-item { font-size: 1.1rem; font-weight: 500; padding: 0 2rem; text-transform: uppercase; letter-spacing: 1px; }
.ticker-item::after { content: '•'; margin-left: 4rem; opacity: 0.5; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.section-title { font-family: var(--font-serif); font-size: clamp(3rem, 10vw, 7rem); text-align: center; font-weight: 300; white-space: nowrap; /* <-- DODAJ OVU LINIJU */}
.section-title .script-letter, .section-title .special-letter { font-family: var(--font-script); text-transform: capitalize; font-weight: normal; font-size: 1.4em; margin-right: 0.1em; display: inline-block; transform: translateY(0.06em); }

/* Title Animations */
.title-animation-wrapper { position: relative; overflow: hidden; }
.anim-title { transform: translateY(110%); transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1); }
.title-animation-wrapper.is-visible .anim-title { transform: translateY(0); }

.work-section { padding: 15vh 0; }
.project-item { display: grid; grid-template-columns: 1.2fr 1fr; gap: 5%; align-items: center; margin-bottom: 15vh; }
.project-item:nth-child(even) { grid-template-columns: 1fr 1.2fr; }
.project-item:nth-child(even) .project-image { order: 2; }
.project-image img { width: 100%; height: auto; border-radius: 15px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); transition: transform 0.4s ease; }
/* .project-image a:hover img { transform: scale(1.05); } */
.project-details { text-align: left; }
.project-title { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.5rem; }
.project-description p { margin-bottom: 1.5rem; line-height: 1.7; opacity: 0.8; }
.project-description strong { font-weight: 500; display: block; margin-bottom: 0.5rem; opacity: 1; color: inherit}
.see-all-wrapper { text-align: center; margin-top: 5vh; }
.see-all-wrapper .btn-primary { background-color: transparent; color: var(--text-color); }
.see-all-wrapper .btn-primary:hover { background-color: var(--text-color); color: var(--bg-color); }

.about-section-wrapper { padding: 15vh 0; }
.about-section-wrapper .anim-title { margin-bottom: 5vh !important; }
.about-section { height: 300vh; position: relative; }
.about-sticky-container { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.about-container { height: 100%; display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 5%; }
.about-video-wrapper { width: 100%; height: 70vh; border-radius: 20px; overflow: hidden; }
.about-video-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.about-text-wrapper { overflow: hidden; height: 70vh; }
.about-text-scroller { display: flex; width: 300%; height: 100%; }
.about-text-scroller .about-column { width: 33.333%; padding: 0 5%; display: flex; flex-direction: column; justify-content: center; }
.about-text-scroller h2 { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2rem; }
.about-text-scroller p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; }
.certification-card-scroller { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; height: 100%; }
.cert-logo-scroller { width: 120px; margin-bottom: 2rem; }
.cert-text-scroller h3 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 1rem; }
.cert-text-scroller p { font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; opacity: 0.8; }
.credential-link { font-weight: 500; text-decoration: none; position: relative; padding-bottom: 3px; color: var(--accent-color);}
.credential-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--text-color); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); }
.credential-link:hover::after { transform: scaleX(1); }
body.dark-mode .credential-link::after { background-color: var(--bg-color); }

.packages-section { padding: 10vh 0 20vh 0; position: relative; }
.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.package-card { border-top: 1px solid var(--text-color); padding-top: 30px; display: flex; flex-direction: column; transition: border-color 0.7s ease-in-out;}
.package-card h3 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 15px; }
.package-card .package-description { font-size: 1rem; margin-bottom: 30px; flex-grow: 1; }
.package-card ul { list-style: none; padding-left: 0; margin-bottom: 40px; flex-grow: 1; }
.package-card li { margin-bottom: 10px; padding-left: 1.5em; position: relative; }
.package-card li::before { content: '✓'; position: absolute; left: 0; color: var(--text-color); transition: color 0.7s ease-in-out;}
body.dark-mode .package-card li::before { color: var(--bg-color); }
.package-btn { display: inline-block; font-family: var(--font-sans); text-decoration: none; padding: 15px 30px; border: 1px solid var(--text-color); text-align: center; transition: all 0.4s ease; border-radius: 50px; margin-top: auto; }
.package-btn:hover { background-color: var(--text-color); color: var(--bg-color); }

.cta-section { padding: 20vh 0; text-align: center; background-color: rgba(0,0,0,0.02); transition: background-color 0.7s ease-in-out; }
body.dark-mode .cta-section { background-color: rgba(255,255,255,0.03); }
.cta-section .section-title { margin-bottom: 1.5rem; }
body.dark-mode .section-title { color: var(--bg-color); }
.cta-subtitle { max-width: 650px; margin: 0 auto 2.5rem auto; line-height: 1.8; opacity: 0.9; }
/* --- KONAČNA V2 ISPRAVKA ZA PARTIKLE (sa clip-path) --- */

#cta-particles-section {
    position: relative; 
    z-index: 1; /* Podižemo sekciju na viši sloj */
    
    /* Novi, moćniji način da se "zaključaju" partikli */
    /* Ovo bukvalno iseče sve što pokuša da izađe izvan okvira sekcije */
    clip-path: inset(0); 
    
    padding: 20vh 0;
    text-align: center;
    background-color: rgba(0,0,0,0.02);
    transition: background-color 0.7s ease-in-out;
}

body.dark-mode #cta-particles-section {
    background-color: transparent; /* U dark modu pozadina je providna da se vide partikli */
}


/* Platno za partikle */
#particles-js {
    /* Menjamo u fixed da stoji mirno u pozadini celog ekrana */
    position: fixed; 
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 0; /* Stavljamo ga na najniži sloj */
}

/* Sadržaj sekcije ostaje normalan */
#cta-particles-section .container {
    position: relative;
    z-index: 2; /* Osigurava da je sadržaj uvek na vrhu */
}
.contact-section { padding: 20vh 0; text-align: center; }
#contact-form { max-width: 700px; margin: 0 auto; }
.form-group { position: relative; margin-bottom: 45px; }
.form-input { width: 100%; border: 0; outline: 0; padding: 10px 0; background: transparent; border-bottom: 1px solid; font-family: var(--font-sans); font-size: 1.1rem; color: inherit; border-color: inherit; }
.form-label { position: absolute; top: 10px; left: 0; transition: all 0.3s ease; pointer-events: none; }
.form-input:focus~.form-label, .form-input:not(:placeholder-shown)~.form-label { top: -20px; font-size: 0.9rem; }
.form-input:focus { outline: none; border-bottom-width: 2px; }
body.dark-mode .form-input:focus { border-bottom-color: var(--bg-color); }
textarea.form-input { resize: vertical; min-height: 100px; }
.submit-btn { font-family: var(--font-sans); font-size: 1.1rem; padding: 15px 40px; border: 1px solid var(--text-color); background: var(--text-color); color: var(--bg-color); cursor: pointer; transition: all 0.4s ease; border-radius: 50px; }
.submit-btn:hover { background: var(--bg-color); color: var(--text-color); }
body.dark-mode .submit-btn { background: var(--bg-color); color: var(--text-color); border-color: var(--bg-color); }
body.dark-mode .submit-btn:hover { background: transparent; color: var(--bg-color); }
#form-status { margin-top: 20px; font-size: 1rem; }

.site-footer { padding: 5vh 0; border-top: 1px solid rgba(0, 0, 0, 0.1); }
body.dark-mode .site-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.social-links a { margin-left: 20px; transition: opacity 0.3s ease; }
.social-links a:hover { opacity: 0.7; }
.social-links img { width: 24px; height: 24px; vertical-align: middle; }
.copyright { font-size: 0.9rem; text-align: center; margin-top: 2vh; }

/* --- STILOVI ZA BACK TO TOP DUGME --- */
#back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 998; /* Manji od menija */
    
    /* Sakriveno po defaultu */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, background-color 0.7s ease-in-out, color 0.7s ease-in-out;
}

#back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top-btn svg {
    width: 24px;
    height: 24px;
}

/* Stil za tamnu temu */
body.dark-mode #back-to-top-btn {
    background-color: var(--bg-color);
    color: var(--text-color);
}

@media (max-width: 900px) {
    .hero-details { grid-template-columns: 1fr; text-align: center; }
    .hero-details .text-content .sub-headline, .hero-details .text-content .proof { margin-left: auto; margin-right: auto; }
    .cta-buttons { justify-content: center; }
}
@media (max-width: 768px) {
    header nav { display: none; }
    .hamburger-menu { display: block; }
    .project-item, .project-item:nth-child(even) { grid-template-columns: 1fr; }
    .project-image { margin-bottom: 2rem; }
    /* Menjamo grid na jednu kolonu */
    .project-item {
        grid-template-columns: 1fr;
    }

    /* Ključna ispravka: Vraćamo redosled elemenata u normalu */
    .project-item:nth-child(even) .project-image {
        order: 1; /* Vraćamo sliku na prvo mesto */
    }
    
    .project-item .project-image {
        order: 1; /* Osiguravamo da je slika uvek prva */
        margin-bottom: 2rem;
    }
    
    .project-item .project-details {
        order: 2; /* Osiguravamo da su detalji uvek drugi */
        /* text-align: center; Opciono: centriramo tekst na manjim ekranima */
    }
    .about-section-wrapper { padding: 10vh 0; }
    .about-section { height: auto; }
    .about-sticky-container { position: relative; height: auto; padding: 10vh 0; }
    .about-container { grid-template-columns: 1fr; }
    .about-video-wrapper { height: 50vh; margin-bottom: 5vh; }
    .about-text-wrapper { height: auto; }
    .about-text-scroller { width: 100%; flex-direction: column; gap: 8vh; }
    .about-text-scroller .about-column { width: 100%; padding: 0; }
    .footer-content { flex-direction: column; gap: 20px; }
}
@media (max-width: 480px) {
    .hero-details .stats-grid { grid-template-columns: 1fr; }
    .hero-reimagined h1 { font-size: 3rem; }
}