:root {
    /* ===== THEME COLOR SOURCE VARIABLES ===== */
    /* Light Theme (Source Values) */
    --bg-color-light: #f0f0f0;          /* Light gray page background */
    --text-color-light: #222222;        /* Dark text for readability */
    --secondary-text-color-light: #555555; /* For less prominent text */
    --card-bg-color-light: #ffffff;     /* Background for cards, header, forms */
    --border-color-light: #dddddd;      /* Borders */
    --shadow-color-light: rgba(0,0,0,0.1); /* Shadows */
    --logo-text-color-light: var(--deep-red); /* Original logo color */
    --hamburger-color-light: #555555;
    --link-color-light: #555555; /* For nav links (not buttons) */
    --link-hover-color-light: var(--deep-red);

    /* Dark Theme (Source Values) */
    --bg-color-dark: #2c2c2c;            /* Dark gray page background */
    --text-color-dark: #e0e0e0;          /* Light text for readability */
    --secondary-text-color-dark: #aaaaaa;
    --card-bg-color-dark: #383838;
    --border-color-dark: #505050;
    --shadow-color-dark: rgba(255,255,255,0.08);
    --logo-text-color-dark: #ff6b6b; /* Brighter red for dark mode */
    --hamburger-color-dark: #aaaaaa;
    --link-color-dark: #bbbbbb;
    --link-hover-color-dark: #ff6b6b;

    /* ===== APPLIED THEME VARIABLES (Defaults to Light Theme) ===== */
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --text-color-secondary: var(--secondary-text-color-light);
    --card-bg-color: var(--card-bg-color-light);
    --border-color: var(--border-color-light);
    --shadow-color: var(--shadow-color-light);
    --logo-text-color: var(--logo-text-color-light);
    --hamburger-color: var(--hamburger-color-light);
    --link-color: var(--link-color-light);
    --link-hover-color: var(--link-hover-color-light);
    --footer-bg-color: #333;
    --footer-text-color: #e0e0e0;

    /* --- Existing Functional Colors --- */
    --deep-red: #8b0000;
    --white: #ffffff;
    --black: #000000;
    --font-family: 'Poppins', sans-serif;

    /* --- DEPRECATE/REPLACE old general grays if they conflict --- */
    /* --gray: #6e6e6e; */ /* Replaced by theme-specific secondary text */
    /* --light-gray: #f5f5f5; */ /* Replaced by --bg-color-light or --card-bg-color-light */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    background: var(--card-bg-color);
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

nav.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    color: var(--logo-text-color);
    font-weight: 600;
    text-decoration: none;
}
.logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 40px;
    margin-right: 0.8rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Adjusted gap for closer icons */
}

.flag {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    vertical-align: middle;
    line-height: 1;
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px; /* Fine-tuned padding */
}

#lang-en {
    font-size: 1.0rem;
    position: relative;
    top: -10px;
}

#lang-bs {
   font-size: 1.0rem;
   position: relative;
   top: -10px;
}

.flag:hover, .flag.active {
    opacity: 1;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 0.5rem; /* Space between ENG and hamburger */
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--hamburger-color);
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem; /* Slightly reduced gap */
    align-items: center;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}
.nav-menu li a:hover {
    color: var(--link-hover-color);
}

/* Task 1: Make "Pristup asistentu" button in top sidebar a little tighter */
.nav-menu li a.access-link { /* More specific selector for the top menu button */
    color: var(--white) !important; /* Changed to white for better contrast */
    background: var(--deep-red);
    padding: 0.4rem 0.8rem; /* Reduced padding for a tighter button */
    border-radius: 5px;
    font-weight: 600; /* Consider reducing if it still feels too big */
    font-size: 0.9rem; /* Slightly reduced font size */
    transition: background 0.3s ease, color 0.3s ease;
}
.nav-menu li a.access-link:hover {
    background: #a50000;
    color: var(--white) !important;
}

/* Task 2: Add red lines with very narrow margins */
.red-separator {
    border: none;
    border-top: 2px solid var(--deep-red); /* Using the deep red color */
    margin: 10px 0; /* Very narrow margins (e.g., 10px top/bottom, 0 left/right) */
    width: 100%; /* Ensure it spans the container width */
}


.footer-logo { /* Used in the footer */
    height: 60px; /* Increased logo size */
    margin-bottom: 0.5rem;
    filter: grayscale(1) brightness(2);
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    padding: 3rem 0; /* Reduced padding */
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-content h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    text-align: center;
    min-width: 300px;
}

.hero-image img {
    max-width: 80%; /* Task 1: Make hero image smaller */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Bullet Section ("Zašto JusticeFusion?") */
#bullet {
    padding: 2rem 0; /* Adjust padding */
    margin-top: -2rem; /* Task 2: Move "Zašto JusticeFusion?" block up */
    text-align: left; /* Align text to the left if desired */
}

#bullet .hero-content { /* Re-using hero-content for structure */
    flex: none; /* Override flex behavior from hero */
    width: 100%;
}

#bullet h1 { /* Assuming h1 for "Zašto JusticeFusion", was h2 in prompt */
    font-size: 2.5rem; /* Adjust size as needed */
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}
#bullet p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem; /* Space between bullet points */
    line-height: 1.8;
}


/* Buttons */
.btn {
    display: inline-block;
    background: var(--deep-red);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

.btn:hover {
    background: #a50000;
    transform: translateY(-2px);
}

/* General Sections */
section {
    padding: 3rem 0;
}
section:last-of-type {
    border-bottom: none;
}

section h2, .section-title-linkable a { /* For clickable section titles */
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: color 0.3s ease;
}
.section-title-linkable a:hover {
    color: var(--link-hover-color);
}


/* Task 3: Two-column layout for Contact and Architecture start */
.contact-architecture-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 2rem;       /* Space between columns */
    padding: 2rem 0; /* Add some padding to this wrapper */
    border-bottom: 1px solid var(--border-color); /* Separator */

}

.contact-column {
    flex: 1; /* Takes up 1 part of the space */
    min-width: 300px; /* Minimum width before wrapping */
}

.architecture-column-start{
    flex: 1 1 100%;
    padding: 2rem 0;
}
.architecture-column-start h2 {
    text-align: left;
    margin-top: 0;
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Full width architecture continuation */
.architecture-full-width {
    padding-top: 2rem;
    border-bottom: 1px solid var(--border-color);
}
.architecture-full-width h2 {
    display: none;
}


/* Contact Form (can be reused) */
.contact-form-section {
      border-bottom: 1px solid var(--border-color);
}
#contact-form {
    max-width: 100%;
    margin: 0 auto;
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
}
.form-group {
    margin-bottom: 1rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: var(--bg-color); /* Themed background */
    color: var(--text-color); /* Themed text color */
}
.form-group textarea {
    resize: vertical;
}
#contact-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
}

/* Responsive video wrapper for embedded videos */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-top: 1rem;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* About Section / Advantages Section */
#about-assistant, #prednosti-chatgpt-section {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* Style the LINK within the H2 in the "Prednosti..." section to look like a button */
section#prednosti-chatgpt-section h2 a.section-title-button {
    display: inline-block;
    background-color: var(--deep-red);
    color: var(--white) !important;      /* White text for contrast */
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none !important;
    line-height: normal;
    transition: background-color 0.3s ease, color 0.3s ease;
}

section#prednosti-chatgpt-section h2 a.section-title-button:hover {
    background-color: #a50000;
    color: var(--white) !important;
}

section#prednosti-chatgpt-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background-color: transparent;
    padding: 0;
    display: block;
}




/* For the new Prednosti page content */
#prednosti-content {
    text-align: left;
    padding: 2rem 0;
}
#prednosti-content h3 {
    font-size: 1.8rem;
    color: var(--deep-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
}
#prednosti-content h4 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
#prednosti-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 1rem;
}
#prednosti-content li {
    margin-bottom: 0.5rem;
}
#prednosti-content p {
    margin-bottom: 1rem;
}
#prednosti-content strong {
    font-weight: 600;
}


/* Footer */
footer {
    background: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 1.5rem 0;
    margin-top: 2rem;
}
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.footer-logo {
    height: 40px;
    margin-bottom: 0.5rem;
    filter: grayscale(1) brightness(2);
}
footer p {
    font-size: 0.9rem;
}

/* =================================================================== */
/* SYSTEM THEME PREFERENCE                        */
/* =================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        /* ===== RE-ASSIGN APPLIED VARIABLES FOR DARK THEME ===== */
        --bg-color: var(--bg-color-dark);
        --text-color: var(--text-color-dark);
        --text-color-secondary: var(--secondary-text-color-dark);
        --card-bg-color: var(--card-bg-color-dark);
        --border-color: var(--border-color-dark);
        --shadow-color: var(--shadow-color-dark);
        --logo-text-color: var(--logo-text-color-dark);
        --hamburger-color: var(--hamburger-color-dark);
        --link-color: var(--link-color-dark);
        --link-hover-color: var(--link-hover-color-dark);
        --footer-bg-color: #222222;
        --footer-text-color: var(--secondary-text-color-dark);
    }
}


/* Responsive for mobile */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--card-bg-color);
        flex-direction: column;
        width: 250px;
        box-shadow: -2px 2px 5px var(--shadow-color);
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    .nav-menu li a {
        display: block;
        padding: 0.5rem;
    }
    .access-link {
        display: block;
        text-align: center;
    }
    .hamburger {
        display: flex;
    }

    #hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }
    .hero-image img {
        max-width: 100%; /* Full width on mobile */
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    section h2, .section-title-linkable a {
        font-size: 1.8rem;
    }

    .contact-architecture-wrapper {
        flex-direction: column;
    }

    #bullet {
        margin-top: 0; /* Reset negative margin for mobile */
    }
    #bullet h1 {
        font-size: 2rem;
    }
}

/* ===== GraphLab logo unutar sekcije Prednosti ===== */
#prednosti-chatgpt-section .small-logo{
    height: 120px;        /* ⇽ promijeni po želji */
    width: auto;
    display: block;
    margin: 2rem auto 1rem;
    opacity: 0.9;         /* malo jača vidljivost */
}

/* ================================================================== */
/*  Puna (90 %) širina sekcije “Arhitektura JusticeFusion”            */
/* ================================================================== */
#architecture-start.architecture-column-start{
    /* Izlazi iz “dva-stupca”: */
    flex: 0 0 100%;          /* uzmi cijeli red unutar flex-wrappera   */
    width: 100%;             /* 100 % unutar .container = 90 % body-a */
    
    /* Poravnanje teksta i padding */
    padding: 2rem 0;         /* samo vertikalni razmak, bez left/right */
}

/* Ako koristiš .architecture-full-width dalje u nastavku, neka isto bude 100 % */
.architecture-full-width{
    width: 100%;
    padding: 2rem 0;         /* jednako kao gore radi konzistentnosti */
}
