/* ================================================================
   1. SPREMENLJIVKE IN TEMELJI
================================================================ */
:root {
  --bg: #fefefe;
  --fg: #1e1e1e;
  --card: #f5f5f5;
  --border: #e5e5e5;
  --accent: #06a3fe;
  --muted: #9c9c9c;
  --terminal-bg: #000;
  --terminal-fg: #fff;
}

html[data-theme=dark] {
  --bg: #2b2b2b;
  --fg: #fefefe;
  --card: #262626;
  --border: #4c4c4c;
  --accent: #87d5fe;
  --muted: #b0b0b0;
  --terminal-bg: #fff;
  --terminal-fg: #000;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--fg);
  margin: 0; padding: 0;
  font-family: "Roboto", sans-serif;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  touch-action: pan-y; /* Za swipe funkcijo */
}

a { color: var(--accent); text-decoration: none; }
h2, h3, h4, h5 { margin: 0; padding: 0; }

/* ================================================================
   2. HEADER - NAVBAR
================================================================ */
.header {
  position: fixed; top: 0; left: 0; z-index: 1000;
  width: 100%; height: 60px;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 15px;
}

.logo-dark { display: none !important; }
html[data-theme='dark'] .logo-light { display: none !important; }
html[data-theme='dark'] .logo-dark { display: block !important; }

.header .logo-link img { width: 120px; height: auto; cursor: pointer; }

.header h1 {
  font-size: 1.1rem; margin: 0 auto; text-align: center;
  max-width: 45%; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.header .icons-wrapper { display: flex; gap: 10px; }

.header .icons-wrapper .services,
.header .icons-wrapper .project {
  color: var(--fg); font-size: 14px; padding: 5px 12px;
  border-radius: 20px; border: 1px solid var(--border);
}

.header .icons-wrapper .inputField,
.header .icons-wrapper .textLink {
  width: 35px; height: 35px; display: flex;
  align-items: center; justify-content: center;
  background-color: var(--card); border-radius: 50%;
  border: 1px solid var(--border); color: var(--fg); cursor: pointer;
}

/* ================================================================
   3. BLOG - MREŽA IN PAGINACIJA
================================================================ */
.container80 {
  width: 85%; max-width: 1400px;
  margin: 100px auto 40px auto;
  min-height: calc(100vh - 300px);
}

.posts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px; padding: 20px 0;
}

.post-card {
  background: var(--card); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); display: flex; flex-direction: column;
  transition: transform 0.3s ease;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.post-card-img { width: 100%; height: 180px; background-size: cover; background-position: center; }
.post-card-body { padding: 20px; flex-grow: 1; }
.post-card-body h3 { color: var(--accent); margin-bottom: 10px; }

.pagination { display: flex; justify-content: center; gap: 15px; margin: 40px 0; }
.btn-paginacija {
  padding: 10px 20px; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; font-weight: bold;
}
.btn-paginacija:hover { background: var(--accent); color: #000; }

/* Lightbox & Slike */
.lightbox {
  display: none; position: fixed; z-index: 9999;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9); cursor: zoom-out;
  align-items: center; justify-content: center;
}
.lightbox img { max-width: 90%; max-height: 90%; border: 2px solid #fff; }
.povecaj-ob-kliku { cursor: zoom-in; }

/* ================================================================
   4. POSAMEZEN ČLANEK (Single Post)
================================================================ */
.single-post { max-width: 850px; margin: 0 auto; padding: 0 15px 60px 15px; }
.article-title { font-size: 2.2rem; margin-bottom: 15px; line-height: 1.2; }
.main-article-img img { width: 100%; border-radius: 12px; }
.article-content { font-size: 1.1rem; line-height: 1.7; }

.clanek-vsebina pre {
  display: block; width: 100%; overflow-x: auto; padding: 15px;
  background: var(--card); border-radius: 8px; border: 1px solid var(--border);
}

/* ================================================================
   5. NOGA (FOOTER) IN DONACIJE
================================================================ */
.noga {
  width: 100%; padding: 40px 15px; text-align: center;
  background-color: var(--card); border-top: 1px solid var(--border);
}

.donacija-sekcija {
  max-width: 700px; margin: 25px auto; padding: 20px;
  background-color: var(--bg); border: 1px solid var(--border); border-radius: 12px;
}

.donacija-tekst { font-size: 0.95rem; margin-bottom: 15px; font-style: italic; }
.donacija-kontejner { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn-donacija {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-radius: 6px; font-weight: 600; color: #fff !important;
}
.btn-paypal { background: #003087; }
.btn-stripe { background: #635bff; }

/* ================================================================
   6. PIŠKOTKI - Cookies
================================================================ */
.cookie-notice {
  position: fixed; bottom: 0; left: 0; width: 100%;
  padding: 15px; background-color: #1e1e1e; color: #fefefe;
  z-index: 9999; text-align: center; border-top: 2px solid var(--accent);
}
.cookie-btn {
  cursor: pointer; padding: 8px 20px; background-color: var(--accent);
  color: #000; border-radius: 6px; border: none; font-weight: bold; margin-top: 10px;
}

/* ================================================================
   7. OSTALI KONTEJNERJI (Original Vadnica)
================================================================ */
.container {
  max-width: 95%; width: 2000px; margin: 100px auto 40px auto;
  background: rgba(245, 245, 245, 0.7); backdrop-filter: blur(12px);
  border-radius: 30px; padding: 60px 50px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
html[data-theme=dark] .container { background: rgba(43, 43, 43, 0.8); }
.container90 { width: 90%; margin: 0 auto; padding: 60px 0; }

/* ================================================================
   8. ODZIVNOST (Media Queries)
================================================================ */
@media screen and (max-width: 1520px) {
  .container80 h1, .container h1, .container90 h1 {
    display: block; font-size: 1.8rem !important; text-align: left; margin-bottom: 20px;
  }
  .container80, .container { margin-top: 90px !important; }
}

@media screen and (max-width: 1100px) {
  .container { padding: 30px 20px; border-radius: 15px; }
  .noga, .donacija-sekcija { width: 100% !important; padding: 20px 10px !important; }
  .donacija-kontejner { flex-direction: column; align-items: center; }
  .btn-donacija { width: 100%; max-width: 280px; justify-content: center; }
}

@media screen and (max-width: 768px) {
  .container80, .container90 { width: 95%; }
  .article-title, h1 { font-size: 1.6rem !important; }
  .container80 { margin-top: 100px !important; }
}

@media screen and (max-width: 680px) {
  .header { flex-direction: column; height: auto; padding: 10px; }
  .header h1 { display: none; }
  .header .icons-wrapper { margin-top: 10px; }
  .container80, .container { margin-top: 140px !important; }
}

/* ================================================================
   9. SEZNAMI
================================================================ */
.list_standard { width: 100%; padding-left: 20px; margin-bottom: 1.5rem; }
.list_standard li { list-style: circle; padding: 8px; color: var(--fg); }
.list_standard li::marker { color: var(--accent); }

/* ================================================================
   10. TABELE
================================================================ */
.table_newest {
  width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; background: var(--card);
}
.table_newest th { background: var(--accent); color: #000; padding: 12px; text-align: left; }
.table_newest td { padding: 12px; border: 1px solid var(--border); }

@media screen and (max-width: 600px) {
  .table_newest thead { display: none; }
  .table_newest tr { display: block; margin-bottom: 10px; border: 1px solid var(--accent); }
  .table_newest td {
    display: block; text-align: right; padding-left: 50%; position: relative;
  }
  .table_newest td::before {
    content: attr(data-label); position: absolute; left: 10px;
    font-weight: bold; text-align: left;
  }
}