/* ===================================================================
   MOJMAJSTOR.NET — GLOBALNI DIZAJN SISTEM + KOMPONENTE
   Verzija 2.2 (ispravljen scroll)
   =================================================================== */

/* ===================================================================
   1. CSS VARIJABLE
   =================================================================== */
:root {
    --color-primary: #0056a0;
    --color-primary-dark: #004080;
    --color-primary-light: #e8f4f8;

    --color-accent: #f39c12;
    --color-accent-dark: #d68910;
    --color-accent-hover: #e67e22;

    --color-dark: #2c3e50;
    --color-dark-light: #34495e;
    --color-text: #333333;
    --color-text-muted: #777777;
    --color-text-light: #999999;
    --color-bg: #f5f7fa;
    --color-bg-white: #ffffff;
    --color-border: #ddd;
    --color-border-light: #eee;

    --color-success: #27ae60;
    --color-success-bg: #d4edda;
    --color-success-border: #c3e6cb;
    --color-success-text: #155724;

    --color-danger: #e74c3c;
    --color-danger-bg: #f8d7da;
    --color-danger-border: #f5c6cb;
    --color-danger-text: #721c24;

    --color-warning: #f39c12;
    --color-info: #3498db;

    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 15px;
    --font-size-sm: 13px;
    --font-size-xs: 12px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.3;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 50%;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 30px rgba(0, 0, 0, 0.12);

    --transition-fast: 0.15s ease;
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;

    --container-max: 1200px;
}

/* ===================================================================
   2. RESET I OSNOVE
   =================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: var(--color-accent-hover);
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

/* Sprečava da duge reči/URL-ovi razvlače layout */
p, h1, h2, h3, h4, h5, h6,
a, li, td, th, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-dark);
    margin-bottom: var(--space-5);
    line-height: var(--line-height-tight);
}
h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-dark-light);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-tight);
}
h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin: var(--space-5) 0 var(--space-3);
}
h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin: var(--space-4) 0 var(--space-2);
}

p {
    margin-bottom: var(--space-3);
}

/* ===================================================================
   3. GLOBALNA ZAŠTITA OD HORIZONTALNOG OVERFLOW-A
   =================================================================== */
.mobile-nav-item,
.footer-col,
.footer-newsletter,
.content-column,
.sidebar,
.featured-info,
.featured-card,
.article-card-portal,
.classified-card,
.tradesman-card,
.hero-search,
.hero-search-group,
.nav-header,
.nav-right,
.nav-links,
.user-menu,
.post-body,
.forum-post,
.comment,
.text-list-column,
.widget,
.portal-widget {
    min-width: 0;
}

/* ===================================================================
   4. ALERT PORUKE
   =================================================================== */
.alert {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    border: 1px solid transparent;
    font-size: var(--font-size-base);
}

.alert-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success-text);
}

.alert-error {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: var(--color-danger-text);
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* ===================================================================
   5. HEADER I NAVIGACIJA
   =================================================================== */
header {
    background-color: var(--color-dark);
    color: #fff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    gap: var(--space-4);
}

.nav-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-header .logo .logo-icon {
    font-size: 22px;
    line-height: 1;
}

.nav-header .logo .logo-text {
    font-weight: var(--font-weight-extrabold);
    color: #fff;
    font-size: var(--font-size-xl);
    letter-spacing: -0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) 0 var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-links a {
    color: #ecf0f1;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
    padding: var(--space-1) 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-links a.active {
    color: var(--color-accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

.nav-links .search-form {
    margin-left: auto;
}

/* Search forma — NAMENSKI, ne nasleđuje generički form stil */
.search-form {
    display: flex;
    gap: var(--space-1);
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
    box-shadow: none;
    border-radius: 0;
}

.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: var(--radius-sm);
    width: 200px;
    max-width: 100%;
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: all var(--transition-fast);
    min-width: 0;
}

.search-form input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-form input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--color-accent);
}

.search-form button {
    padding: 8px 12px;
    background-color: var(--color-accent-hover);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    min-width: 44px;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.search-form button:hover {
    background-color: var(--color-accent-dark);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), transform var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
}

.nav-toggle:active {
    transform: scale(0.92);
}

/* User area */
.user-area {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Zvonce */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: #ecf0f1;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--color-accent);
}

.bell-icon {
    font-size: 18px;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-dark);
    line-height: 1;
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 25px;
    padding: 4px 12px 4px 4px;
    color: #ecf0f1;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-placeholder {
    background: var(--color-accent);
    color: #fff;
    font-weight: var(--font-weight-bold);
    font-size: 14px;
}

.user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1100;
}

.user-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 16px;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: background var(--transition-fast);
    position: relative;
}

.user-menu a:hover {
    background: #f5f7fa;
    color: var(--color-primary);
}

.menu-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: var(--space-1) 0;
}

.menu-badge {
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
}

.user-menu a.menu-logout {
    color: var(--color-danger);
}

.user-menu a.menu-logout:hover {
    background: #fef5f4;
    color: var(--color-danger);
}

/* Auth dugmad */
.auth-buttons {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.btn-login {
    padding: 8px 16px;
    color: #ecf0f1;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.btn-login:hover {
    color: var(--color-accent);
}

.btn-register {
    padding: 8px 16px;
    background: var(--color-accent-hover);
    color: #fff;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.btn-register:hover {
    background: var(--color-accent-dark);
    color: #fff;
}

/* ===================================================================
   6. GLAVNI SADRŽAJ
   =================================================================== */
main {
    max-width: var(--container-max);
    margin: var(--space-8) auto;
    padding: 0 var(--space-5);
    flex: 1;
    width: 100%;
}

/* ===================================================================
   7. DUGMAD
   =================================================================== */
.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    font-family: inherit;
    font-size: var(--font-size-base);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--color-accent-hover);
    color: #fff;
    border-color: var(--color-accent-dark);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary-dark);
}

.btn-secondary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: #c0392b;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #e67e22;
    color: #fff;
    transition: background 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}

.btn-sm:hover {
    background: #d35400;
    color: #fff;
}

.btn-outline-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.btn-outline-sm:hover {
    background: #e0e0e0;
}

/* ===================================================================
   8. FORME — samo prave forme (auth, admin), NE search/newsletter
   =================================================================== */
.auth-form,
main > form,
main > section > form,
main > article > form {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 600px;
    margin: 0 auto var(--space-5);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

form label {
    display: block;
    margin: var(--space-3) 0 var(--space-2);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    font-size: var(--font-size-sm);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="url"],
form input[type="date"],
form input[type="file"],
form select,
form textarea {
    width: 100%;
    max-width: 100%;
    padding: var(--space-3);
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 160, 0.1);
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

.auth-form button[type="submit"],
main > form button[type="submit"],
main > section > form button[type="submit"],
main > article > form button[type="submit"] {
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-5);
    background-color: var(--color-accent-hover);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-family: inherit;
    font-weight: var(--font-weight-semibold);
    transition: background var(--transition-fast);
}

.auth-form button[type="submit"]:hover,
main > form button[type="submit"]:hover,
main > section > form button[type="submit"]:hover,
main > article > form button[type="submit"]:hover {
    background-color: var(--color-accent-dark);
}

/* ===================================================================
   9. TABELE
   =================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
}

table th,
table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

table th {
    background-color: var(--color-dark-light);
    color: #fff;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* ===================================================================
   10. PORUKE (MESSAGES)
   =================================================================== */
.messages .message {
    background: #f8f9fa;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.messages .message.mine {
    background: #e8f4f8;
    text-align: right;
}

/* ===================================================================
   11. PORTAL HEADER
   =================================================================== */
.portal-header {
    background: #0056a0;
    color: #fff;
    padding: var(--space-3) 0;
    margin-bottom: var(--space-5);
}

.portal-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.date {
    font-weight: var(--font-weight-bold);
    color: #fff;
}

.portal-nav {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.portal-nav a {
    color: #fff;
    font-weight: var(--font-weight-medium);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.portal-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ===================================================================
   12. GLAVNI LAYOUT SA TRI KOLONE
   =================================================================== */
.main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-top: var(--space-2);
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
}

.content-column {
    flex: 1;
    min-width: 0;
}

.widget {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.widget h3 {
    margin-top: 0;
    margin-bottom: var(--space-3);
    font-size: 1.1em;
    color: #0056a0;
    border-bottom: 2px solid #f39c12;
    padding-bottom: var(--space-1);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: var(--space-2);
}

.widget ul li a {
    color: var(--color-text);
    text-decoration: none;
}

.widget ul li a:hover {
    color: #0056a0;
}

.section-title {
    font-size: 1.5em;
    margin-bottom: var(--space-5);
    color: #0056a0;
    border-bottom: 2px solid #f39c12;
    display: inline-block;
    padding-bottom: var(--space-1);
}

/* ===================================================================
   13. SEKCIJA "NAJNOVIJI SAVETI I ČLANCI"
   =================================================================== */
.articles-featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-5);
    margin-top: var(--space-2);
    align-items: start;
}

.featured-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.featured-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.featured-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform var(--transition-slow);
}

.featured-card:hover .featured-image {
    transform: scale(1.05);
}

.featured-info {
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
}

.featured-info h3 {
    margin: 0 0 6px;
    font-size: 1em;
    color: #0056a0;
    line-height: 1.3;
}

.featured-info h3 a {
    color: inherit;
    text-decoration: none;
}

.featured-info h3 a:hover {
    color: #e67e22;
}

.featured-info .meta {
    display: flex;
    gap: var(--space-3);
    color: #777;
    font-size: 0.8em;
    flex-wrap: wrap;
}

.text-list-column {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    min-width: 0;
}

.text-list-column h4 {
    margin: 0 0 var(--space-3);
    color: #0056a0;
    border-bottom: 2px solid #f39c12;
    padding-bottom: var(--space-1);
    font-size: 1.05em;
}

.text-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: var(--space-2);
}

.text-list-item:last-child {
    border-bottom: none;
}

.text-list-item .latest-title {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9em;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.text-list-item .latest-title:hover {
    color: #0056a0;
}

.text-list-item .read-more {
    background: #e67e22;
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8em;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.text-list-item .read-more:hover {
    background: #d35400;
    color: #fff;
}

/* ===================================================================
   14. POSLEDNJI OGLASI NA POČETNOJ
   =================================================================== */
.latest-classifieds {
    margin-top: var(--space-8);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.latest-classifieds h3 {
    margin: 0 0 var(--space-4);
    color: #0056a0;
    border-bottom: 2px solid #f39c12;
    padding-bottom: var(--space-2);
}

.classified-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.classified-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: var(--radius-lg);
    padding: 12px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--color-text);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp 0.4s ease forwards;
    min-width: 0;
    overflow: hidden;
}

.classified-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}

.classified-category {
    font-size: 0.8em;
    color: #777;
    margin-bottom: var(--space-1);
}

.classified-title {
    font-weight: bold;
    font-size: 0.9em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.classified-price {
    color: #e67e22;
    font-weight: bold;
    font-size: 0.95em;
    margin: var(--space-1) 0;
}

.classified-location {
    font-size: 0.8em;
    color: #555;
}

.classified-more {
    text-align: right;
    margin-top: var(--space-4);
}

.classified-more a {
    color: #0056a0;
    text-decoration: none;
    font-weight: bold;
}

.classified-more a:hover {
    color: #e67e22;
}

/* ===================================================================
   15. FORUM SPECIFIČNI STILOVI
   =================================================================== */
.forum-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
}

.forum-table th {
    background: #0056a0;
    color: #fff;
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.forum-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.forum-table tr:hover {
    background: #f5f9ff;
}

.forum-title {
    font-weight: bold;
    color: #0056a0;
    font-size: 16px;
}

.forum-desc {
    color: #777;
    font-size: 13px;
    margin-top: 4px;
}

.forum-stats {
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.forum-last {
    font-size: 13px;
    color: #777;
}

.forum-last a {
    color: #0056a0;
}

.topic-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-5);
}

.topic-table th {
    background: #0056a0;
    color: #fff;
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.topic-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.topic-table tr:hover {
    background: #f5f9ff;
}

.topic-title {
    font-weight: bold;
    color: #0056a0;
    font-size: 15px;
}

.topic-author {
    font-size: 13px;
    color: #777;
}

.topic-stats {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.badge-pinned {
    background: #f39c12;
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-right: 5px;
}

.badge-locked {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-left: 5px;
}

.forum-breadcrumb {
    background: #f5f7fa;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-sm);
}

.forum-breadcrumb a {
    color: #0056a0;
    margin-right: 5px;
}

.forum-breadcrumb span {
    color: #777;
}

.forum-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-5);
}

.forum-actions .btn {
    background: #e67e22;
    color: #fff;
    padding: 12px 25px;
    border-radius: var(--radius-md);
    font-weight: bold;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: background var(--transition), box-shadow var(--transition);
    display: inline-block;
    border: 1px solid #d35400;
}

.forum-actions .btn:hover {
    background: #d35400;
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.forum-post {
    display: flex;
    gap: var(--space-4);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.forum-post .poster {
    width: 160px;
    flex-shrink: 0;
    text-align: center;
    border-right: 1px solid var(--color-border-light);
    padding-right: var(--space-4);
}

.forum-post .poster .avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: #0056a0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto var(--space-2);
    overflow: hidden;
}

.forum-post .poster .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-post .poster .username {
    font-weight: bold;
    color: #0056a0;
    margin-bottom: 5px;
}

.forum-post .poster .post-count {
    color: #777;
    font-size: 0.85em;
}

.forum-post .post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.forum-post .post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: var(--space-2);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.forum-post .post-date {
    color: #777;
    font-size: 0.9em;
}

.forum-post .post-content {
    line-height: 1.7;
    color: var(--color-text);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.post-actions .left-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.post-actions .right-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.report-form {
    display: none;
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: #f9f9f9;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.report-form input[type="text"] {
    width: 100%;
    padding: var(--space-2);
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 5px;
}

.report-form button {
    margin-left: auto;
    display: block;
}

/* ===================================================================
   16. ADMIN DODATNO
   =================================================================== */
.admin-table th {
    background-color: #0056a0;
    color: #fff;
}

.admin-table tr:hover {
    background-color: #f0f8ff;
}

.admin-form {
    max-width: 800px;
    margin: 0 auto var(--space-5);
    background: #fff;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.admin-form label {
    font-weight: bold;
    color: #0056a0;
    display: block;
    margin-bottom: 5px;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
}

.admin-form button[type="submit"] {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
}

.admin-form button[type="submit"]:hover {
    background: #d35400;
}

/* ===================================================================
   17. PROFIL KORISNIKA
   =================================================================== */
.profile-header {
    display: flex;
    gap: var(--space-5);
    background: #fff;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    align-items: center;
    flex-wrap: wrap;
}

.avatar img {
    border-radius: var(--radius-full);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.reputation {
    text-align: center;
    font-size: 1.5em;
    color: #0056a0;
}

.profile-stats {
    display: flex;
    gap: var(--space-8);
    background: #fff;
    padding: var(--space-4) var(--space-5);
    margin: var(--space-5) 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.profile-stats div {
    text-align: center;
}

.profile-stats span {
    display: block;
    color: #777;
}

.badges-section,
.topics-section {
    background: #fff;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-5);
}

.badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.badge-item {
    background: #f0f0f0;
    padding: var(--space-2) var(--space-4);
    border-radius: 20px;
}

.roles .badge {
    background: #0056a0;
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8em;
    margin-right: 5px;
}

/* ===================================================================
   18. KOMENTARI SA AVATAROM
   =================================================================== */
.comment {
    display: flex;
    gap: var(--space-4);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.comment .comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: #0056a0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.comment .comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment .comment-body {
    flex: 1;
    min-width: 0;
}

.comment .comment-author {
    font-weight: bold;
    color: #0056a0;
    margin-bottom: 5px;
}

.comment .comment-content {
    color: var(--color-text);
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ===================================================================
   19. PORTAL GRID SA SLIKAMA
   =================================================================== */
.portal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    min-width: 0;
}

.portal-widget {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.portal-widget h3 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: #0056a0;
    border-bottom: 2px solid #f39c12;
    padding-bottom: var(--space-2);
    font-size: 1.1em;
}

.portal-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-widget ul li {
    margin-bottom: var(--space-2);
}

.portal-widget ul li a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.portal-widget ul li a:hover {
    color: #0056a0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.article-card-portal {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease forwards;
    min-width: 0;
}

.article-card-portal:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.article-card-portal .article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f0f0f0;
    transition: transform var(--transition-slow);
}

.article-card-portal:hover .article-image {
    transform: scale(1.05);
}

.article-card-portal .article-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #0056a0, #004080);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
}

.article-card-portal .article-body {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.article-card-portal .article-body h2 {
    margin: 0 0 var(--space-2);
    font-size: 1.2em;
    line-height: 1.3;
}

.article-card-portal .article-body h2 a {
    color: #0056a0;
    text-decoration: none;
}

.article-card-portal .article-body h2 a:hover {
    color: #e67e22;
}

.article-card-portal .article-body p {
    color: #555;
    font-size: 0.95em;
    margin: 0 0 var(--space-3);
    flex: 1;
}

.article-card-portal .article-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.85em;
    border-top: 1px solid var(--color-border-light);
    padding-top: var(--space-2);
    margin-top: auto;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.no-results {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    color: #777;
}

/* ===================================================================
   20. LAZY LOADING
   =================================================================== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.featured-image,
.article-image {
    object-fit: cover;
    background: #f0f0f0;
}

/* ===================================================================
   21. PAGINACIJA
   =================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: var(--space-8) 0 var(--space-5);
    flex-wrap: wrap;
}

.pagination .page-link {
    display: inline-block;
    padding: var(--space-2) 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: #0056a0;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: #0056a0;
    color: #fff;
    border-color: #0056a0;
}

.pagination .page-current {
    display: inline-block;
    padding: var(--space-2) 14px;
    background: #0056a0;
    color: #fff;
    border: 1px solid #0056a0;
    border-radius: var(--radius-sm);
    font-weight: bold;
}

.pagination .page-dots {
    padding: var(--space-2) 6px;
    color: #999;
}

/* ===================================================================
   22. COOKIE BANNER
   =================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-dark);
    color: #fff;
    padding: var(--space-4) var(--space-5);
    z-index: 9999;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.cookie-banner a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.cookie-btn-accept,
.cookie-btn-decline {
    padding: var(--space-2) var(--space-5);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.cookie-btn-accept {
    background: var(--color-success);
    color: #fff;
}

.cookie-btn-accept:hover {
    background: #219150;
}

.cookie-btn-decline {
    background: #95a5a6;
    color: #fff;
}

.cookie-btn-decline:hover {
    background: #7f8c8d;
}

/* ===================================================================
   23. HERO SEKCIJA
   =================================================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: var(--space-12) var(--space-5);
    text-align: center;
    margin: 0 0 var(--space-8);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    min-width: 0;
}

.hero h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-3);
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

.hero-search {
    display: flex;
    gap: var(--space-2);
    background: #fff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    width: 100%;
    margin: 0 auto var(--space-6);
    flex-wrap: wrap;
    align-items: stretch;
}

.hero-search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    flex: 1;
    min-width: 200px;
    border-right: 1px solid #eee;
}

.hero-search-group:last-of-type {
    border-right: none;
}

.hero-search-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.hero-search-group input {
    width: 100%;
    border: none;
    padding: 8px 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    background: transparent;
    min-width: 0;
}

.hero-search-group input:focus {
    outline: none;
}

.hero-search button {
    padding: 12px 32px;
    background: var(--color-accent-hover);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.hero-search button:hover {
    background: var(--color-accent-dark);
}

.hero-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 12px 28px;
    background: var(--color-accent-hover);
    color: #fff;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-accent-hover);
}

.hero-btn:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.hero-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* ===================================================================
   24. STATISTIKA
   =================================================================== */
.stats-section {
    max-width: var(--container-max);
    margin: 0 auto var(--space-8);
    padding: 0 var(--space-5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.stat-box {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    text-align: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: var(--space-2);
    line-height: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--space-1);
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================================================
   25. POPULARNE KATEGORIJE
   =================================================================== */
.categories-section {
    max-width: var(--container-max);
    margin: 0 auto var(--space-8);
    padding: 0 var(--space-5);
}

.section-heading {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: var(--space-5);
    text-align: center;
    font-weight: var(--font-weight-bold);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-4);
}

.category-tile {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-3);
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.category-tile-icon {
    font-size: 32px;
    margin-bottom: var(--space-2);
    line-height: 1;
}

.category-tile-name {
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    color: var(--color-dark);
}

.category-tile:hover .category-tile-name {
    color: var(--color-primary);
}

/* ===================================================================
   26. KARTICE — ANIMACIJE I BEDŽEVI
   =================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.classifieds-grid .classified-card:nth-child(1) { animation-delay: 0.05s; }
.classifieds-grid .classified-card:nth-child(2) { animation-delay: 0.1s; }
.classifieds-grid .classified-card:nth-child(3) { animation-delay: 0.15s; }
.classifieds-grid .classified-card:nth-child(4) { animation-delay: 0.2s; }

.tradesmen-grid .tradesman-card:nth-child(1) { animation-delay: 0.05s; }
.tradesmen-grid .tradesman-card:nth-child(2) { animation-delay: 0.1s; }
.tradesmen-grid .tradesman-card:nth-child(3) { animation-delay: 0.15s; }
.tradesmen-grid .tradesman-card:nth-child(4) { animation-delay: 0.2s; }
.tradesmen-grid .tradesman-card:nth-child(5) { animation-delay: 0.25s; }
.tradesmen-grid .tradesman-card:nth-child(6) { animation-delay: 0.3s; }

.category-tag,
.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ===================================================================
   27. FOOTER — NOVI DIZAJN
   =================================================================== */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #b8c1c9;
    padding: var(--space-10) 0 0;
    margin-top: var(--space-10);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col {
    min-width: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-4);
}

.footer-logo-icon {
    font-size: 24px;
    line-height: 1;
}

.footer-logo-text {
    font-size: 1.4rem;
    font-weight: var(--font-weight-extrabold);
    color: #fff;
    letter-spacing: -0.5px;
}

.footer-about {
    color: #95a5a6;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: var(--space-5);
}

.footer-social {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: #ecf0f1;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-3px);
}

.footer-heading {
    color: #fff;
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-2);
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: var(--space-2);
}

.footer-list a {
    color: #95a5a6;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-list a:hover {
    color: var(--color-accent);
    padding-left: 6px;
}

.footer-newsletter-text {
    color: #95a5a6;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.footer-newsletter {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.footer-newsletter:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
}

.footer-newsletter input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    min-width: 0;
    width: 100%;
}

.footer-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer-newsletter button {
    padding: 0 20px;
    background: var(--color-accent-hover);
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: inherit;
    flex-shrink: 0;
}

.footer-newsletter button:hover {
    background: var(--color-accent-dark);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    color: #95a5a6;
    font-size: 14px;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-contact a {
    color: #95a5a6;
    text-decoration: none;
    transition: color var(--transition-fast);
    overflow-wrap: break-word;
    word-break: break-all;
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) 0;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.footer-copyright p {
    margin: 0;
    color: #7f8c8d;
    font-size: 13px;
}

.footer-legal {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.footer-legal a {
    color: #7f8c8d;
    font-size: 13px;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-accent);
}

/* ===================================================================
   28. MOBILNA BOTTOM NAVIGACIJA
   =================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    padding: 6px 4px 4px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.mobile-nav-item:active {
    background: #f0f4f8;
}

.mobile-nav-item.active {
    color: var(--color-primary);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 3px 3px;
}

.mobile-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.mobile-nav-label {
    font-size: 10px;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    background: var(--color-danger);
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}

/* ===================================================================
   29. HAMBURGER ANIMACIJA
   =================================================================== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-links.active {
    animation: slideDown 0.25s ease;
}

/* ===================================================================
   30. IOS SAFE AREA
   =================================================================== */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    header nav {
        padding-left: max(var(--space-4), env(safe-area-inset-left));
        padding-right: max(var(--space-4), env(safe-area-inset-right));
    }
}

/* ===================================================================
   31. RESPONSIVNOST
   =================================================================== */

/* --- Tablet: 992px --- */
@media (max-width: 992px) {
    .user-name { display: none; }
    .dropdown-arrow { display: none; }
    .user-toggle { padding: 4px; }
    .search-form input[type="text"] { width: 140px; }

    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .content-column { order: 1; }
    .left-sidebar { order: 2; }
    .right-sidebar { order: 3; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
}

/* --- Mobilni: 768px --- */
@media (max-width: 768px) {
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }

    nav { padding: 0 var(--space-4); }

    .nav-header { padding: var(--space-2) 0; }
    .nav-header .logo .logo-icon { font-size: 20px; }
    .nav-header .logo .logo-text { font-size: 18px; }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-3) 0;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        padding: var(--space-3) var(--space-2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        font-size: var(--font-size-base);
    }

    .nav-links a.active::after { display: none; }

    .nav-links .search-form {
        margin-left: 0;
        margin-top: var(--space-3);
        width: 100%;
        padding-top: var(--space-2);
    }

    .search-form input[type="text"] {
        flex: 1;
        width: auto;
    }

    .auth-buttons { gap: 4px; }
    .btn-login { padding: 6px 10px; font-size: 12px; }
    .btn-register { padding: 6px 12px; font-size: 12px; }

    .notification-bell { width: 36px; height: 36px; }
    .user-avatar { width: 30px; height: 30px; }

    main { padding: 0 var(--space-4); }

    .auth-form,
    main > form,
    main > section > form,
    main > article > form {
        padding: var(--space-4);
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    table th, table td {
        padding: var(--space-3) var(--space-3);
        font-size: 13px;
    }

    .articles-featured-grid { grid-template-columns: 1fr; }
    .featured-image { width: 100px; height: 70px; }
    .classified-grid { grid-template-columns: 1fr; }

    .forum-post {
        flex-direction: column;
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .forum-post .poster {
        width: 100%;
        flex-direction: row;
        display: flex;
        align-items: center;
        gap: var(--space-3);
        text-align: left;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--color-border-light);
        padding-bottom: var(--space-2);
        margin-bottom: var(--space-3);
    }

    .forum-post .poster .avatar {
        margin: 0;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .forum-post .poster .username {
        font-size: 14px;
        margin-bottom: 2px;
        display: block;
    }

    .forum-post .poster .post-count {
        font-size: 12px;
        display: block;
    }

    .portal-layout { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .mobile-bottom-nav { display: flex; }

    body {
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0));
    }

    .btn,
    .btn-sm,
    .btn-outline-sm,
    .hero-btn,
    .forum-actions .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="url"],
    input[type="date"],
    input[type="search"],
    input[type="file"],
    select,
    textarea {
        min-height: 44px;
        font-size: 16px !important;
    }

    .widget ul li a,
    .footer-list a,
    .tab-list a {
        padding: 8px 0;
        display: inline-block;
    }

    .article-card-portal .article-body,
    .classified-card-body,
    .tradesman-card-body {
        padding: var(--space-3);
    }

    .hero {
        padding: var(--space-8) var(--space-4) var(--space-6);
    }

    .hero h1 { font-size: 1.5rem; }

    .hero p {
        font-size: 1rem;
        margin-bottom: var(--space-6);
    }

    .hero-search {
        border-radius: var(--radius-lg);
        padding: 12px;
        gap: 8px;
        flex-direction: column;
    }

    .hero-search-group {
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid #eee;
        width: 100%;
        min-width: 0;
    }

    .hero-search-group:last-of-type {
        border-bottom: none;
    }

    .hero-search button {
        width: 100%;
        border-radius: var(--radius-md);
    }

    .hero-buttons { flex-direction: column; }
    .hero-btn { width: 100%; text-align: center; }

    .stat-box { padding: var(--space-4) var(--space-3); }
    .stat-icon { font-size: 26px; }
    .stat-number { font-size: 1.4rem; }
    .stat-label { font-size: 11px; }

    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .section-heading { font-size: 1.2rem; }

    .forum-breadcrumb {
        font-size: 12px;
        padding: var(--space-2) var(--space-3);
        margin-bottom: var(--space-4);
        overflow-x: auto;
        white-space: nowrap;
    }

    .alert {
        padding: var(--space-3) var(--space-4);
        font-size: 14px;
    }

    header { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

    .profile-cover {
        height: 140px;
        margin-bottom: 55px;
        border-radius: var(--radius-md);
    }

    .profile-avatar-large {
        width: 90px;
        height: 90px;
        font-size: 34px;
        border-width: 4px;
    }

    .profile-avatar-wrapper {
        left: 16px;
        bottom: -45px;
    }

    .reputation-box {
        width: 100%;
        min-width: 100%;
    }

    .footer-bottom { padding-bottom: var(--space-6); }

    .cookie-banner {
        bottom: calc(52px + env(safe-area-inset-bottom, 0));
    }

    .question-item {
        padding: var(--space-3);
        flex-direction: column;
    }

    .question-stats {
        align-self: flex-end;
        padding: var(--space-2) var(--space-3);
        min-width: auto;
    }

    .question-stats .count { font-size: 1.2em; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        padding-bottom: var(--space-6);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
        gap: var(--space-3);
    }

    .classifieds-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-3);
    }

    .classified-card-image { height: 130px; }
    .classified-card-body h2 { font-size: 0.95em; }
    .classified-card-body .description { display: none; }

    .tradesmen-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-3);
    }

    .tradesman-card-image { height: 140px; }

    .tradesman-card-image .avatar-big {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .tradesman-card-body h2 { font-size: 1rem; }
}

/* --- Mali telefoni: 480px --- */
@media (max-width: 480px) {
    .nav-header .logo .logo-text { font-size: var(--font-size-lg); }

    .btn-login { padding: 6px 8px; font-size: 11px; }
    .btn-register { padding: 6px 10px; font-size: 11px; }

    .hero h1 { font-size: 1.3rem; }
    .hero p { font-size: 0.9rem; }

    .stat-number { font-size: 1.2rem; }
    .stat-icon { font-size: 22px; }
    .stat-label { font-size: 10px; }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .category-tile { padding: var(--space-4) var(--space-2); }
    .category-tile-icon { font-size: 26px; }
    .category-tile-name { font-size: 12px; }

    .mobile-nav-label { font-size: 9px; }
    .mobile-nav-icon { font-size: 18px; }

    .classifieds-grid,
    .tradesmen-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
}
/* ===================================================================
   33. 404 STRANICA
   =================================================================== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.error-page-content {
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.error-code {
    font-size: 6rem;
    font-weight: var(--font-weight-extrabold);
    line-height: 1;
    color: var(--color-primary);
    letter-spacing: -4px;
    margin-bottom: var(--space-3);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title {
    font-size: var(--font-size-2xl);
    color: var(--color-dark);
    margin-bottom: var(--space-3);
}

.error-message {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.error-search {
    display: flex;
    gap: var(--space-2);
    background: #fff;
    padding: 6px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    margin: 0 auto var(--space-8);
    max-width: 500px;
    width: 100%;
    border: none;
}

.error-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    outline: none;
    min-width: 0;
}

.error-search button {
    padding: 12px 24px;
    background: var(--color-accent-hover);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.error-search button:hover {
    background: var(--color-accent-dark);
}

.error-links {
    margin-bottom: var(--space-6);
}

.error-links h3 {
    color: var(--color-dark);
    font-size: var(--font-size-base);
    margin: 0 0 var(--space-4);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    opacity: 0.7;
}

.error-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.error-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--space-4) var(--space-3);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: all var(--transition-fast);
    min-width: 0;
}

.error-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.error-link-icon {
    font-size: 24px;
    line-height: 1;
}

.error-link-text {
    font-weight: var(--font-weight-semibold);
    font-size: 13px;
}

.error-home-btn {
    display: inline-block;
    padding: 12px 28px;
}

@media (max-width: 600px) {
    .error-code { font-size: 4.5rem; }
    .error-title { font-size: var(--font-size-xl); }
    .error-search {
        border-radius: var(--radius-lg);
        flex-direction: column;
        padding: 12px;
    }
    .error-search input {
        padding: 10px 12px;
        text-align: center;
    }
    .error-search button {
        width: 100%;
        border-radius: var(--radius-md);
    }
    .error-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .error-home-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===================================================================
   34. EMPTY STATE (prazna stanja)
   =================================================================== */
.empty-state {
    background: #fff;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    color: var(--color-text-muted);
    margin: var(--space-5) 0;
}

.empty-state-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: var(--space-4);
    opacity: 0.85;
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin: 0 0 var(--space-2);
}

.empty-state-message {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    max-width: 420px;
    margin: 0 auto var(--space-5);
    line-height: 1.6;
}

.empty-state-cta {
    display: inline-block;
    padding: 10px 24px;
}

@media (max-width: 600px) {
    .empty-state {
        padding: var(--space-8) var(--space-4);
    }
    .empty-state-icon {
        font-size: 44px;
    }
    .empty-state-cta {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   MAPA MAJSTORA (Leaflet)
   ============================================================ */

.map-popup {
    font-family: inherit;
    min-width: 180px;
    line-height: 1.4;
}
.map-popup strong {
    display: block;
    font-size: 14px;
    color: #0056a0;
    margin-bottom: 4px;
}
.map-popup-cat {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}
.map-popup-rating {
    font-size: 12px;
    color: #e67e22;
    font-weight: 700;
    margin-bottom: 4px;
}
.map-popup-city {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}
.map-popup-verified {
    display: inline-block;
    padding: 2px 8px;
    background: #27ae60;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}
.map-popup-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #e67e22;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s ease;
}
.map-popup-btn:hover {
    background: #d35400;
    color: #fff;
}

/* Leaflet popup override — da bude u skladu sa ostatkom sajta */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.leaflet-popup-content {
    margin: 12px 14px;
    font-family: inherit;
}

/* Leaflet kontrole — malo lepše */
.leaflet-control-zoom a {
    color: #0056a0;
}
.leaflet-control-zoom a:hover {
    background: #f5f9ff;
    color: #0056a0;
}

/* ===================================================================
   KRAJ
   =================================================================== */