/* ==========================================================================
   gradjevina.rs - Design System Stylesheet
   Theme: Light, Premium Reading-Focused Magazine
   Color Palette: White, Technical Blues, Eco Greens, Light Grays
   Typography: Monolithic Sans-Serif (Outfit & System Fonts)
   ========================================================================== */

:root {
    /* Color Tokens */
    --primary-blue: #1e3a8a;
    --primary-blue-light: #3b82f6;
    --primary-blue-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Category Colors */
    --color-unutrasnji: #8b5cf6;
    --color-grubi: #f59e0b;
    --color-instalacije: #06b6d4;
    --color-projektovanje: #3b82f6;
    --color-stolarija: #ec4899;
    --color-masine: #10b981;
    --color-industrija: #64748b;
    
    /* Layout Tokens */
    --container-width: 1200px;
    --font-stack: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: var(--font-stack);
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    width: 100%;
}

.header-bottom-row {
    border-top: 1px solid var(--border-color);
    width: 100%;
    background-color: var(--bg-light);
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo span {
    color: var(--accent-green);
}

.logo-text {
    display: inline-block;
    white-space: nowrap;
}

.logo-text span {
    color: var(--accent-green);
}

.logo-icon {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-slogan {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 1px solid var(--border-color);
    padding-left: 12px;
    margin-right: auto;
    margin-left: 12px;
    white-space: nowrap;
}

/* Header Search */
.header-search-wrapper {
    max-width: 280px;
    width: 100%;
    margin-left: 20px;
}

.header-search {
    position: relative;
    width: 100%;
}

.header-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    font-family: var(--font-stack);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
    outline: none;
}

.header-search input:focus {
    border-color: var(--primary-blue-light);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 14px 16px;
    transition: var(--transition-smooth);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-blue);
    background-color: transparent;
    border-bottom-color: var(--primary-blue-light);
}

/* Hamburger menu toggle button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    border-bottom: 1px solid var(--border-color);
    padding: 100px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0px;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    border-radius: 99px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.search-box:focus-within {
    border-color: var(--primary-blue-light);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 18px 24px 18px 60px;
    border: none;
    outline: none;
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--text-main);
}

/* ==========================================================================
   Filters
   ========================================================================== */
.filter-section {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue-light);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: var(--bg-white);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   Articles Grid & Cards
   ========================================================================== */
.articles-grid-section {
    padding: 60px 0 100px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    position: relative;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: var(--bg-light);
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.article-card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.badge-unutrasnji { background-color: #f3e8ff; color: var(--color-unutrasnji); }
.badge-grubi { background-color: #fef3c7; color: var(--color-grubi); }
.badge-instalacije { background-color: #ecfeff; color: var(--color-instalacije); }
.badge-projektovanje { background-color: #dbeafe; color: var(--color-projektovanje); }
.badge-stolarija { background-color: #fce7f3; color: var(--color-stolarija); }
.badge-masine { background-color: #d1fae5; color: var(--color-masine); }
.badge-industrija { background-color: #f1f5f9; color: var(--color-industrija); }

.card-date-time {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-date-time span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-title:hover {
    color: var(--primary-blue-light);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue-light);
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.no-results {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Article Detail Page
   ========================================================================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--primary-blue-light);
}

.breadcrumbs .separator {
    font-size: 0.65rem;
}

.article-header {
    margin-bottom: 30px;
}

.article-header .category-badge {
    margin-bottom: 16px;
    font-size: 0.85rem;
    padding: 6px 12px;
}

.article-header .article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-cover-wrapper {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    aspect-ratio: 16/9;
}

.article-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar with Table of Contents */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sticky-sidebar {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toc-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
    padding-left: 12px;
    border-left: 2px solid transparent;
}

.toc-link:hover, .toc-link.active {
    color: var(--primary-blue-light);
    border-left-color: var(--primary-blue-light);
}

/* Article Content Wrapper */
.article-content-wrapper {
    min-width: 0;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 1.75rem;
    color: var(--primary-blue);
    margin: 40px 0 20px;
    font-weight: 700;
    letter-spacing: -0.015em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    scroll-margin-top: 120px;
}

.article-content h3 {
    font-size: 1.35rem;
    color: var(--text-main);
    margin: 30px 0 16px;
    font-weight: 700;
    scroll-margin-top: 120px;
}

.article-content ul, .article-content ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Content blockquotes & alert notifications */
.article-content blockquote {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-blue-light);
    padding: 16px 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Premium Styled Alert Boxes */
.alert-box {
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue-light);
    background-color: var(--bg-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    font-size: 0.98rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alert-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.alert-box.alert-note {
    border-left-color: #3b82f6;
    background-color: #f0f7ff;
}

.alert-box.alert-tip {
    border-left-color: #10b981;
    background-color: #ecfdf5;
}

.alert-box.alert-important {
    border-left-color: #8b5cf6;
    background-color: #f5f3ff;
}

.alert-box.alert-warning {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.alert-box.alert-caution {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alert-title i {
    font-size: 1.15rem;
}

.alert-box.alert-note .alert-title {
    color: #1d4ed8;
}

.alert-box.alert-tip .alert-title {
    color: #047857;
}

.alert-box.alert-important .alert-title {
    color: #6d28d9;
}

.alert-box.alert-warning .alert-title {
    color: #b45309;
}

.alert-box.alert-caution .alert-title {
    color: #b91c1c;
}

.alert-content {
    color: #334155;
    line-height: 1.7;
}

.alert-content p {
    margin-bottom: 12px;
}

.alert-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Table Wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 35px 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
}

.table-wrapper table {
    margin: 0;
    width: 100%;
    min-width: 650px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* CAD Blueprint styles for general ASCII diagrams */
.terminal-blueprint {
    background-color: #0b0f19;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 24px;
    margin: 35px 0;
    overflow-x: auto;
    color: #38bdf8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.terminal-blueprint::before {
    content: "Tehnički nacrt / Blok šema";
    position: absolute;
    top: 8px;
    right: 16px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    font-family: var(--font-stack);
    font-weight: 700;
}

/* SVG Diagrams style */
.svg-diagram-container {
    width: 100%;
    margin: 35px 0;
    background-color: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.svg-diagram {
    display: block;
    width: 100%;
    height: auto;
    min-width: 600px;
    max-width: 100%;
}

/* Premium Visual Diagrams (Light themed, non-ASCII) */
.visual-diagram-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.diagram-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
    text-align: center;
}

.diagram-grid {
    display: grid;
    gap: 20px;
    margin-top: 15px;
}

.diagram-grid.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.diagram-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.diagram-grid.five-cols {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 768px) {
    .diagram-grid.two-cols,
    .diagram-grid.three-cols,
    .diagram-grid.five-cols {
        grid-template-columns: 1fr;
    }
}

.diagram-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diagram-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.diagram-card.active {
    border-color: var(--primary-blue-light);
    background-color: #eff6ff;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -6px;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.card-list li {
    margin-bottom: 6px;
}

.card-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-badge.cool {
    background-color: #dbeafe;
    color: #1e40af;
}

.card-badge.heat {
    background-color: #fee2e2;
    color: #991b1b;
}

.card-solution {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}

/* VRF Lines representation */
.vrf-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto 15px;
}

.vrf-line {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
}

.vrf-line.red {
    background-color: #ef4444;
}

.vrf-line.blue {
    background-color: #3b82f6;
}

.vrf-line.green {
    background-color: #10b981;
}

.diagram-node.main-node {
    background-color: var(--primary-blue);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 8px;
    max-width: 250px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.flowchart-arrow {
    text-align: center;
    color: #94a3b8;
    font-size: 1.25rem;
    margin: 10px 0;
}

/* Visual Horizontal Bar Charts */
.visual-chart-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.chart-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 6px;
}

.chart-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 15px;
}

.bar-label {
    width: 150px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    text-align: right;
}

.bar-container {
    flex-grow: 1;
    background-color: #f1f5f9;
    border-radius: 99px;
    height: 28px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background-color: var(--primary-blue-light);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-radius: 99px;
}

@media (max-width: 576px) {
    .chart-bar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .bar-label {
        width: 100%;
        text-align: left;
    }
}

/* Stacked Layer Diagrams (Kos krov, demit fasada, podzemni slojevi) */
.layer-diagram-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.layers-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-item {
    padding: 14px 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--primary-blue-light);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    transition: transform 0.2s ease;
}

.layer-item:hover {
    transform: translateX(4px);
    background-color: #f1f5f9;
    border-left-color: var(--primary-blue);
}

/* Flowcharts (Logistika, Koraci) */
.visual-flowchart {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 650px;
    margin: 30px auto;
}

.flowchart-step {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.flowchart-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-badge {
    background-color: var(--primary-blue-light);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.step-text {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.flowchart-connector {
    width: 2px;
    height: 20px;
    background-color: #cbd5e1;
    margin-left: 38px;
}

.article-content th {
    background-color: var(--primary-blue);
    color: var(--bg-white);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
}

.article-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

.article-content tr:nth-child(even) td {
    background-color: var(--bg-light);
}

.article-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 40px 0;
    height: 0;
}

/* Call To Action Box (CTA) */
.cta-box {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 30px;
    margin: 50px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: var(--shadow-md);
}

.cta-content {
    flex: 1;
}

.cta-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.cta-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0 !important;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-hover));
    color: var(--bg-white);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* FAQ Accordion */
.faq-section {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    margin-top: 50px;
}

.faq-section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-white);
    transition: var(--transition-smooth);
}

.faq-item.active {
    border-color: var(--primary-blue-light);
    box-shadow: var(--shadow-sm);
}

.faq-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-light);
    cursor: pointer;
    user-select: none;
}

.faq-item.active .faq-header {
    background-color: var(--bg-white);
}

.faq-question {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    padding-right: 20px;
}

.faq-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-answer {
    padding: 0 24px 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-body {
    /* Set via JS or fallback */
}

/* Related articles */
.related-section {
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    margin-top: 60px;
    margin-bottom: 40px;
}

.related-section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 24px;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.site-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-brand h2 span {
    color: var(--accent-green);
}

.footer-about {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-links-list a:hover {
    color: var(--primary-blue-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 20px;
}

.footer-partners-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-partner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 24px;
}

.footer-partner-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px dotted var(--text-muted);
}

.footer-partner-links a:hover {
    color: var(--primary-blue-light);
    border-bottom-style: solid;
    border-bottom-color: var(--primary-blue-light);
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
    .site-slogan {
        display: none;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .article-body-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header-search-wrapper {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .header-bottom-row {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    
    .header-bottom-row.active {
        display: block;
    }
    
    .site-nav {
        flex-direction: column;
        padding: 15px 20px;
        gap: 5px;
    }
    
    .nav-link {
        padding: 12px 10px;
        border-bottom: 1px solid var(--bg-light);
        width: 100%;
        text-align: left;
    }
    
    .nav-link:hover, .nav-link.active {
        border-bottom-color: var(--primary-blue-light);
    }
    
    /* Hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .cta-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Light fallback diagram style */
.clean-diagram-pre {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.clean-diagram-pre pre {
    margin: 0;
    font-family: 'Outfit', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}
