@import url("https://fonts.googleapis.com/css2?family=Albert+Sans:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Sans+3:wght@300;400;600&display=swap");

:root {
  --bg-primary: #faf8f5;
  --bg-secondary: #ffffff;
  --text-primary: #272727;
  --text-secondary: #666666;
  --text-secondary: #a0a0a0;
  --title-color: black;
  --accent: #dac15f;
  --border: #e0ddd8;
  --shadow: rgba(0, 0, 0, 0.05);
  --overlay: rgba(0, 0, 0, 0.7);
  --text-link-primary: #1d4ed4;
  --odvojak-color: #999;
  --cookieLink-color: #dac15f;
  --bg-button-primary: #dac15f;
}

[data-theme="dark"] {
  --bg-primary: #0c0e07;
  --bg-secondary: #1a1a1a;
  --text-primary: #d2d2d2;
  --text-secondary: #a0a0a0;
  --title-color: #dac15f;
  --accent: #dac15f;
  --border: #2a2a2a;
  --shadow: rgba(255, 255, 255, 0.05);
  --overlay: rgba(0, 0, 0, 0.85);
  --text-link-primary: #dac15f;
  --odvojak-color: #dac15f;
  --cookieLink-color: #dac15f;
  --bg-button-primary: #dac15f;
}

.btn-secondary {
  background-color: var(--bg-button-primary) !important;
  border: none !important;
}

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

body {
  font-family: "Albert Sans", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.2rem;
}

/* Header & Navigation */
header {
  background: var(--bg-secondary);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

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

.header-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-container {
  position: relative;
}

.search-input {
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: "Source Sans 3", sans-serif;
  border-radius: 0;
  width: 300px;
  /* transition: all 0.3s ease;*/
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 1.25rem;
  cursor: pointer;
  font-size: 1.1rem;
  /* transition: opacity 0.3s ease;*/
}

.search-btn:hover {
  opacity: 0.9;
}

.theme-toggle {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  color: var(--text-primary);
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  cursor: pointer;
  /* transition: all 0.3s ease;*/
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(180deg);
}

nav {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.nav-link {
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  /*transition: all 0.3s ease;*/
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Main Content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 300px);
}

.page-title {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
h3.news-title,
h2.news-title {
  color: var(--title-color);
}
.news-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
  /* transition: all 0.3s ease;*/
  cursor: pointer;
  animation: slideUp 0.6s ease backwards;
}

.news-card:nth-child(1) {
  animation-delay: 0.1s;
}
.news-card:nth-child(2) {
  animation-delay: 0.2s;
}
.news-card:nth-child(3) {
  animation-delay: 0.3s;
}
.news-card:nth-child(4) {
  animation-delay: 0.4s;
}
.news-card:nth-child(5) {
  animation-delay: 0.5s;
}
.news-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card:hover {
  box-shadow: 0 10px 30px var(--shadow);
  transform: translateY(-5px);
}

.news-image {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, var(--border) 0%, var(--bg-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.news-content {
  padding: 1.5rem;
}

.news-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.news-category {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.news-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* transition: gap 0.3s ease;*/
}

.read-more:hover {
  gap: 1rem;
}

/* Featured Article */
.featured-article {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  overflow: hidden;
}

.featured-image {
  height: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, var(--border) 0%, var(--bg-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--text-secondary);
}

.featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 4rem 0;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.loading::after {
  content: "...";
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}

.no-results h2 {
  font-family: "Playfair Display", serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-secondary);
}

.footer-content p {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 1rem;
  }

  .search-input {
    width: 100%;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 300px;
  }

  .featured-content {
    padding: 2rem;
  }

  .featured-title {
    font-size: 2rem;
  }

  .page-title {
    font-size: 2.5rem;
  }
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  cursor: pointer;
  color: var(--text-primary);
}
/* Mobile / collapsed nav */
header.collapsed nav {
  display: none;
}

header.collapsed nav.open {
  display: block;
}

header.collapsed .nav-container {
  flex-direction: column;
}

header.collapsed .nav-link {
  border-bottom: 1px solid var(--border);
}
.pagination {
  display: flex;
  justify-content: center; /* center horizontally */
  gap: 1rem; /* spacing between buttons */
  margin: 2rem 0; /* vertical spacing from content */
  flex-wrap: wrap; /* optional: wrap on small screens */
}

/* Default (light theme) */
.pagination a {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff; /* text color for light theme */
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 85%;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.pagination a:hover {
  background: #a00d24;
}

/* Dark theme overrides */
[data-theme="dark"] .pagination a {
  background: var(--accent); /* can keep same or change */
  color: #000; /* new text color for dark theme */
}

[data-theme="dark"] .pagination a:hover {
  background: #ff9900; /* optional hover color for dark mode */
  color: #111; /* optional hover text color */
}

.news-image,
.featured-image {
  width: 100%;
  height: 240px; /* adjust height as needed */
  background-size: cover; /* scale image to cover div */
  background-position: center; /* center the image */
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem; /* optional fallback emoji */
  color: var(--text-secondary);
}

.linkBojaNaslova,
.linkBojaNaslova:visited {
  color: var(--accent) !important;
  text-decoration: none;
}
.linkBojaNaslova:hover {
  color: var(--accent) !important;
  text-decoration: none;
}

.novost-slika {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: 10px;
  object-fit: cover;
}

a:link {
  color: var(--text-link-primary);
}

.odvojak {
  border-bottom: 1px solid;
  border-bottom-color: var(--odvojak-color);
  display: block;
  height: 15px;
  margin-bottom: 16px;
}
/* Invisible click blocker */
#cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2); /* slight dark tint (optional) */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(4px); /* Safari support */
  z-index: 9998;
}

/* Footer bar */
#cookie-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: white;
  padding: 20px;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.cookie-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-buttons button {
  margin-left: 10px;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
}

.accept {
  background: #28a745;
  color: white;
}

.reject {
  background: #dc3545;
  color: white;
}
.cookieLink {
  color: var(--cookieLink-color) !important;
}
