/* Sticky footer setup */
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glavni sadržaj */
main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 600;
}

section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.btn-primary {
  background-color: #0056b3;
  border: none;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #00408a;
}

.bg-dark {
  background-color: #111 !important;
}

i {
  transition: transform 0.3s ease;
}
i:hover {
  transform: scale(1.1);
}

form input,
form textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
}

form input:focus,
form textarea:focus {
  border-color: #0056b3;
  box-shadow: 0 0 5px rgba(0, 86, 179, 0.4);
}

footer {
  background-color: #222;
  color: #ccc;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .lead {
    font-size: 1.1rem;
  }
}

.navbar {
  transition: all 0.4s ease-in-out;
}
.navbar.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-hero {
  background-color: #667eea;
}
.flip-card {
  perspective: 1000px;
  width: 100%;
  height: 300px; /* Fiksna visina za sve kartice */
  position: relative;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  backface-visibility: hidden;
  top: 0;
  left: 0;
}

.flip-card-front {
  background-color: #fff;
}

.flip-card-front img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.overlay-title {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #1224b2;
  color: white;
  text-align: center;
  font-weight: bold;
  padding: 10px;
}

.flip-card-back {
  background-color: #1224b2;
  color: white;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* Navbar button styles */
.navbar .btn-outline-primary {
  border: 2px solid #0056b3;
  color: #0056b3;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 10px;
  width: 100px;
}

.navbar .btn-outline-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.navbar .btn-primary {
  background: linear-gradient(135deg, #0056b3, #007bff);
  border: none;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 86, 179, 0.2);
  width: 100px;
}

.navbar .btn-primary:hover {
  background: linear-gradient(135deg, #004494, #0056b3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.4);
}

.navbar .btn i {
  font-size: 0.9em;
}

/* OBAVJEŠTENJA PANEL */
.notifications-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e5e7eb;
  padding: 20px;
  margin-bottom: 20px;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.notifications-title {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notifications-count {
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background-color: #f9fafb;
  transform: translateX(2px);
}

.notification-item.urgent {
  border-left-color: #ef4444;
  background-color: #fef2f2;
}

.notification-item.warning {
  border-left-color: #f59e0b;
  background-color: #fffbeb;
}

.notification-item.info {
  border-left-color: #3b82f6;
  background-color: #eff6ff;
}

.notification-icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.notification-description {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.notifications-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.notifications-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.notifications-empty-text {
  font-size: 16px;
  margin: 0;
}

.notification-dismiss {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notification-dismiss:hover {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* Sekcija "Šta dobijate registracijom" */
.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.bg-gradient-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="60" cy="40" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.5;
  pointer-events: none;
}

.feature-card {
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  margin: 0 auto;
}

.feature-card .feature-icon i {
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon i {
  transform: scale(1.1);
}

.text-purple {
  color: #8b5cf6 !important;
}

.text-orange {
  color: #f97316 !important;
}

.text-blue {
  color: #3b82f6 !important;
}

.text-green {
  color: #10b981 !important;
}

.bg-rgba-white-10 {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-warning {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: none;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  transition: all 0.3s ease;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* Responsive dizajn */
@media (max-width: 768px) {
  .notifications-container {
    margin: 10px;
    padding: 15px;
  }

  .notification-item {
    padding: 8px;
    gap: 8px;
  }

  .notification-icon {
    font-size: 18px;
  }

  .notification-title {
    font-size: 13px;
  }

  .notification-description {
    font-size: 12px;
  }
}

/* Responsive design za feature kartice */
@media (max-width: 1199px) {
  .feature-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .bg-gradient-primary .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .feature-card {
    padding: 1.5rem !important;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
  }

  .feature-icon i {
    font-size: 1.5rem !important;
  }

  .display-6 {
    font-size: 1.8rem !important;
  }

  .btn-warning.btn-lg {
    padding: 12px 30px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 576px) {
  .bg-gradient-primary {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .feature-card h5 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }
}

/* Animacija za kartice */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card {
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.1s;
}
.feature-card:nth-child(2) {
  animation-delay: 0.2s;
}
.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}
.feature-card:nth-child(4) {
  animation-delay: 0.4s;
}
.feature-card:nth-child(5) {
  animation-delay: 0.5s;
}
.feature-card:nth-child(6) {
  animation-delay: 0.6s;
}
.feature-card:nth-child(7) {
  animation-delay: 0.7s;
}
.feature-card:nth-child(8) {
  animation-delay: 0.8s;
}
.feature-card:nth-child(9) {
  animation-delay: 0.9s;
}

/* Dodaj smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Clickable table rows for radnici table */
.radnik-row-clickable {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.radnik-row-clickable:hover {
  background-color: #f8f9fa !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radnik-row-clickable:active {
  transform: translateY(0);
  background-color: #e9ecef !important;
}

/* Osiguraj da se dugmad ne afektuju hover efektom */
.radnik-row-clickable td:last-child {
  pointer-events: none;
}

.radnik-row-clickable td:last-child button {
  pointer-events: auto;
}

/* Clickable firm cards */
.firma-row-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.firma-row-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border-color: #007bff !important;
}

.firma-row-clickable:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Osiguraj da se dugmad ne afektuju hover efektom */
.firma-row-clickable .action-buttons {
  pointer-events: none;
}

.firma-row-clickable .action-buttons button {
  pointer-events: auto;
}
