/* Header Styles */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(16, 42, 82, 0.8);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 20px 20px;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo Section */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.logo-link:focus {
  outline: none;
}

.logo-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text-link {
  text-decoration: none;
  color: white;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.logo-text-link:focus {
  outline: none;
}

.logo-text {
  font-weight: 600;
  font-size: 1.2rem;
}

.logo-text-link:hover {
  text-decoration: none;
  color: #ffffff;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 71, 161, 0.3);
}

.contact-btn {
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.8), rgba(25, 118, 210, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.contact-btn:hover {
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.9), rgba(25, 118, 210, 0.9));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 71, 161, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:focus {
  outline: none;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation - Transform to X */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(13, 71, 161, 0.75);
  backdrop-filter: blur(120px) saturate(150%) brightness(1.05);
  -webkit-backdrop-filter: blur(120px) saturate(150%) brightness(1.05);
  -moz-backdrop-filter: blur(120px) saturate(150%) brightness(1.05);
  filter: blur(0); /* Mobilni fallback */
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: all 0.3s ease-out;
}

/* Fallback for mobile devices that don't support backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .mobile-menu-overlay {
    background: rgba(13, 71, 161, 0.85);
    background: linear-gradient(135deg, 
      rgba(13, 71, 161, 0.82) 0%, 
      rgba(25, 118, 210, 0.78) 50%, 
      rgba(13, 71, 161, 0.82) 100%);
  }
}

.mobile-menu-overlay.active {
  display: flex;
  opacity: 1;
}

.mobile-menu-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(25px) saturate(120%);
  -webkit-backdrop-filter: blur(25px) saturate(120%);
  -moz-backdrop-filter: blur(25px) saturate(120%);
}

.mobile-menu-close {
  margin-top: 50px;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  font-size: 2.2rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
  backdrop-filter: blur(15px) saturate(120%);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  animation: fadeIn 0.4s ease-out 0.2s both;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05) rotate(90deg);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.mobile-nav-menu li {
  margin: 20px 0;
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 0.4s ease-out forwards;
}

.mobile-nav-menu li:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-menu li:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav-menu li:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav-menu li:nth-child(4) { animation-delay: 0.2s; }
.mobile-nav-menu li:nth-child(5) { animation-delay: 0.25s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes staggerFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-15px);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.mobile-nav-link {
  display: block;
  padding: 22px 45px;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 25px;
  margin: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(15px) saturate(120%);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-nav-link::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;
}

.mobile-nav-link:hover::before {
  left: 100%;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.mobile-nav-link:active {
  transform: translateY(-2px) scale(0.98);
}

.mobile-contact-btn {
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.6), rgba(13, 71, 161, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  font-size: 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(25, 118, 210, 0.2);
}

.mobile-contact-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.mobile-contact-btn:hover::after {
  width: 300px;
  height: 300px;
}

.mobile-contact-btn:hover {
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.75), rgba(13, 71, 161, 0.8));
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(25, 118, 210, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-container {
    padding: 0 15px;
  }
  
  .logo-text {
    font-size: 1.3rem;
  }
  
  .logo-image {
    width: 35px;
    height: 35px;
  }
  
  .mobile-nav-link {
    padding: 18px 35px;
    font-size: 1.4rem;
    margin: 0 10px;
  }
  
  .mobile-nav-menu li {
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
  
  .logo-image {
    width: 30px;
    height: 30px;
  }
  
  .mobile-nav-link {
    font-size: 1.3rem;
    padding: 16px 30px;
    margin: 0 5px;
  }
  
  .mobile-contact-btn {
    font-size: 1.4rem;
  }
  
  .mobile-menu-close {
    width: 50px;
    height: 50px;
    font-size: 2rem;
    margin-top: 35px;
  }
  
  .mobile-nav-menu li {
    margin: 12px 0;
  }
  
  .mobile-menu-content {
    padding: 40px 15px;
  }
}

/* Hamburger Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Body padding for fixed header */
body {
  padding-top: 50px; /* Prilagođeno na stvarnu visinu header-a */
}

@media (max-width: 768px) {
  body {
    padding-top: 60px; /* Prilagođeno na stvarnu visinu header-a */
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 60px; /* Prilagođeno na stvarnu visinu header-a */
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 75px; /* Prilagođeno na stvarnu visinu header-a */
  }
}

/* ==============================================
   MANAGEMENT PANEL BUTTON STYLES
   ============================================== */

/* Desktop Management Panel Button */
.management-panel-btn-desktop {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.management-panel-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #4a148c, #6a1b9a);
  border: 1px solid rgba(186, 104, 200, 0.3);
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(74, 20, 140, 0.3);
}

.management-panel-link:hover {
  background: linear-gradient(135deg, #6a1b9a, #8e24aa);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 20, 140, 0.4);
  color: white;
  text-decoration: none;
}

.management-panel-link:active {
  transform: translateY(-1px);
}

.management-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.management-text {
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Mobile Management Panel Button */
.mobile-management-btn {
  background: linear-gradient(135deg, #4a148c, #6a1b9a) !important;
  border: 1px solid rgba(186, 104, 200, 0.3) !important;
  color: white !important;
  font-weight: 600 !important;
}

.mobile-management-btn:hover {
  background: linear-gradient(135deg, #6a1b9a, #8e24aa) !important;
  color: white !important;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .management-panel-btn-desktop {
    left: 15px;
  }
  
  .management-panel-link {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  .management-text {
    font-size: 0.75rem;
  }
  
  .management-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 768px) {
  /* Hide desktop button on mobile */
  .management-panel-btn-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  .mobile-management-btn {
    font-size: 0.9rem !important;
  }
}
