* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

[data-route][hidden] {
  display: none !important;
}

:root {
  --gap: 10px;
  --nav-max-width: 1200px;
  --nav-padding-y: 18px;
  --nav-padding-x: 28px;
  --nav-min-height: 64px;
}

@font-face {
  font-family: "font";
  src: url("/fonts/RELIGATH-Demo.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  padding: var(--nav-padding-y) var(--nav-padding-x);
  min-height: var(--nav-min-height);

  max-width: var(--nav-max-width);
  margin: 0 auto;
  font-family: "font", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 18px 20px;
  gap: 6px;
}

header nav,
.nav {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px) saturate(1.05);
  padding: var(--nav-padding-y) var(--nav-padding-x);
  border-radius: 14px;
  align-items: center;
  justify-content: space-evenly;
  gap: calc(var(--gap) / 5);
  width: 100%;
  max-width: var(--nav-max-width);
  margin: 0 auto;

  z-index: 99;
  font-family: "font", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

header nav a,
.nav-link {
  position: relative;
  text-decoration: none;
  background-color: transparent;
  margin-left: 15%;
}

@media (max-width: 770px) {
  header nav a,
  .nav-link {
    margin-left: 0%;
  }
}
header nav a:hover,
.nav-link:hover {
  transform: translateY(-1px);
  background: rgba(28, 28, 34, 0.726);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 20px;
  z-index: 100;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  align-items: flex-end;
  margin-left: 10%;
}

.lang-switch button {
  background-color: transparent;
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);

  color: #ffffff;
  font-weight: 600;
  cursor: context-menu;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lang-switch button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.06);
}

.lang-switch button.active {
  background: linear-gradient(180deg, #252a35, #13171f);
  color: white;
  border-color: transparent;
}

.nav-center {
  font-size: 1.65rem;
  font-weight: 600;
  font-family: "font";
  color: #dcdee4;
  text-decoration: none;
  text-align: center;
}

.brand-float {
  position: relative;
  display: inline-block;
  z-index: 10;
  font-family: "font";
  font-weight: 700;
  font-size: clamp(1.2rem, 4vw, 2rem);
  padding: 6px 14px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  color: #111827;
  box-shadow: 0 10px 30px rgba(3, 10, 18, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brand-float:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 50px rgba(3, 10, 18, 0.18);
}

/* Mobile Menu - Animacija izlaska iz navbara */
.mobile-menu {
  position: relative;
  top: 100%;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  gap: 5px;
  padding: 20px;
  margin-top: -5px;
  box-shadow: 0 2px 8px rgba(20, 20, 24, 0.726);
  border-radius: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  z-index: 31;
  width: 90%;
  text-decoration: none;

  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease,
    max-height 0.3s ease;
}

.mobile-menu:not([hidden]) {
  transform: scaleY(1);
  opacity: 10;
  max-height: 500px;
  position: relative;
  align-items: center;
  justify-content: space-evenly;
  width: 80%;
  margin-top: -6px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  z-index: 10;
}

.mobile-menu[hidden] {
  display: flex !important;
  transform: scaleY(0);
  opacity: 0;
  max-height: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }

  .nav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav > a:not(.nav-center) {
    display: none;
  }

  .nav-center {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-padding-y: 8px;
    --nav-padding-x: 12px;
    --nav-min-height: 44px;
  }

  .nav {
    justify-content: center;
    gap: 8px;
  }

  .brand-float {
    font-size: clamp(1rem, 6vw, 1.4rem);
    top: 8px;
    padding: 4px 8px;
  }
}

@media (max-width: 430px) {
  :root {
    --nav-padding-y: 8px;
    --nav-padding-x: 12px;
    --nav-min-height: 70px;
  }

  .nav {
    padding: 6px 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(var(--nav-max-width) - 30px);
  }

  .nav-center {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: "font";
  }
}

@media (max-width: 350px) {
  :root {
    --nav-padding-y: 8px;
    --nav-padding-x: 12px;
    --nav-min-height: 50px;
  }

  .nav {
    padding: 4px 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-center {
    font-size: 1rem;
    font-weight: 600;
    font-family: "font";
  }

  .brand-float {
    font-size: 1.09rem;
  }
}

/* Preloader styles */
#preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  transition: opacity 0.32s ease;
}

#preloader .preloader-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0 8px 30px rgba(3, 10, 18, 0.06);
}

#preloader .spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #ffffff;
  animation: pre-spin 1s linear infinite;
}

#preloader .preloader-text {
  font-weight: 700;
  color: #ffffff;
  font-family: "font", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@keyframes pre-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Sekcija centrirana */
.section-hero {
  /* širina cijelog bloka ispod nav-a */
  margin: 0px auto 0;
  height: 100%;
}

.carousel {
  width: 100%;
  overflow: hidden;
  --slide-w: clamp(240px, 60vw, 520px);
  --slide-h: clamp(160px, 40vw, 400px);
  --gap: 16px;
  --scale-active: 1.05;
  /* istakni centralnu */
  --blur-side: 5px;
}

/* Decorative controls under the carousel */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  color: #111827;
  font-family: "font", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

.carousel-controls .arrow {
  background: rgba(0, 0, 0, 0.03);
  color: #111827;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  /* purely decorative: prevent clicks */
  pointer-events: none;
}

.carousel-controls .slide-counter {
  font-weight: 700;
  min-width: 56px;
  text-align: center;
  font-size: 0.95rem;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 480px) {
  .carousel-controls .arrow {
    font-size: 1rem;
    padding: 5px 6px;
  }

  .carousel-controls .slide-counter {
    min-width: 44px;
    font-size: 0.86rem;
  }
}

.track {
  display: flex;
  width: 100%;
  gap: var(--gap);
  padding: 20px var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - var(--slide-w) / 2);
  /* centriranje aktivne */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.track::-webkit-scrollbar {
  display: none;
}

/* WebKit */

.slide {
  flex: 0 0 var(--slide-w);
  height: var(--slide-h);
  object-fit: cover;
  border-radius: 25px;
  scroll-snap-align: center;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  transform: scale(0.98);
  filter: blur(var(--blur-side)) saturate(0.9);
  /* default: zamućeno */
  opacity: 0.8;
}

/* aktivna (centrirana) slika dobija klasu .is-active iz JS-a */
.slide.is-active {
  transform: scale(var(--scale-active));
  filter: none;
  /* bez blura na aktivnoj */
  opacity: 1;
  z-index: 1;
  height: 650px;
}

@media (max-width: 768px) {
  .slide.is-active {
    height: 450px;
    width: 300px;
  }
}

@media (max-width: 480px) {
  .carousel {
    width: 100%;
    overflow: hidden;
    --slide-w: clamp(240px, 60vw, 520px);
    --slide-h: clamp(360px, 60vw, 600px);
    --gap: 16px;
    --scale-active: 1.05;
    /* istakni centralnu */
    --blur-side: 5px;
  }

  .slide.is-active {
    height: 450px;
    width: 300px;
  }
}

/* About Me Section */

.about_me h1 {
  font-family: "font", system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #596372 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.about_me h1::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #d1daee, transparent);
  border-radius: 2px;
}

/* Alternativno: Moderna kartica sa pozadinom */
.about_me.card-style {
  background: linear-gradient(#080808e3);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  max-width: 100%;
  padding: 40px 30px;
  align-items: center;
  margin-top: 20px;
  border: 1px solid rgba(26, 19, 19, 0.4);
}

.about_me.card-style p {
  border-left: none;
  padding-left: 0;
}

/* Highlight key phrases */
.about_me p strong,
.about_me p .highlight {
  color: #ffffff;
  font-weight: 600;
  position: relative;
  padding: 0 4px;
}

.about_me p .highlight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: rgba(17, 24, 39, 0.08);
  z-index: -1;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 640px) {
  .about_me {
    padding: 24px 20px;
  }

  .about_me p {
    font-size: 0.95rem;
    line-height: 1.7;
    padding-left: 16px;
  }
}

/* Jača crna pozadina za navigaciju */
.nav {
  background-color: transparent;
  color: #fff !important;
  align-items: center;
  box-shadow: 0 6px 16px rgba(28, 28, 34, 0.726) !important;
}

/* Strelice (carousel-controls, arrows) u bijelo */
.carousel-controls .arrow,
.carousel-controls .arrow svg,
.carousel-controls .arrow path {
  background: ffffff;
  color: #ffffff !important;
}
.carousel-controls .slide-counter {
  background: #111111 !important;
  color: #ffffff !important;
}

/* About Me naslov u bijelo */
.about_me h1,
.about_me.card-style h1,
.brand-float,
.category-tag {
  background-color: #000000 !important;
  color: #000000 !important;
}
.about_me.about_me.card-style {
  background-color: #0e0d0d !important;
  color: #fff !important;
}

/* Ostali tekstovi u bijelo, pozadine u tamnoj nijansi */
body,
.category-content,
.work-filters,
.filter-btn,
.filter-btn.active,
.item-overlay,
#preloader .preloader-inner {
  background-color: #000000 !important;

  color: #fff !important;
}

/* Linkovi i hover efekti */
a,
.nav-link,
header nav a,
.lang-switch button,
.filter-btn {
  color: #fff !important;
  background-color: transparent !important;
}

a:hover,
.nav-link:hover,
.lang-switch button:hover,
.filter-btn:hover {
  color: #c9d1d9 !important;
  background: #23272f !important;
}

/* Overlay i scroll bar */
.item-overlay {
  background: linear-gradient(to top, #23272f 85%, transparent) !important;
}

::-webkit-scrollbar {
  background: #23272f !important;
}

::-webkit-scrollbar-thumb {
  background: #373c43 !important;
}
#preloader {
  background: #0a0a0a !important;
  color: #fff;
}
.hamburger {
  color: #fff !important;
}
