/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1c3d7a;
  --primary-dark: #14305f;
  --primary-light: #2a55a8;
  --accent: #c0922a;
  --dark: #0d1a2a;
  --gray-900: #1f2937;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --transition: 0.25s ease;
  --max-w: 1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28,61,122,0.4);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn--outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn--full { width: 100%; text-align: center; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26,26,26,0.96);
  backdrop-filter: blur(10px);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
}

.logo__img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ===== NAV ===== */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all var(--transition);
}

.nav__link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav__link--cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 8px 18px;
}

.nav__link--cta:hover {
  background: var(--primary-dark);
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(160deg, #0d1a2a 0%, #0f2340 50%, #0d1a2a 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(28,61,122,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(28,61,122,0.15) 0%, transparent 50%);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.hero__video--fade {
  opacity: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 30, 0.58);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 100px 0 60px;
}

.hero__label {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero__title span {
  color: #7aaae8;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__scroll span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
}

.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%   { top: 6px; opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* ===== SECTIONS ===== */
.section {
  padding: 96px 0;
}

.section--gray {
  background: var(--gray-100);
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__label {
  display: inline-block;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section__sub {
  color: var(--gray-500);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section__cta {
  text-align: center;
  margin-top: 48px;
}

/* ===== ABOUT ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__text p {
  color: var(--gray-700);
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat__num {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===== SERVICES ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-card__icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== CATEGORIES ===== */
.categories__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  display: block;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card__img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.category-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card__img img {
  transform: scale(1.06);
}

.category-card__body {
  padding: 20px 20px 22px;
}

.category-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.category-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ===== LOCATION ===== */
.location__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
}

.location__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.location__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.location__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.location__item strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark);
}

.location__item p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.location__item a {
  color: var(--primary);
  font-weight: 500;
}

.location__item a:hover { text-decoration: underline; }

.location__map {
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.location__map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map__placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  gap: 8px;
}

.map__placeholder span { font-size: 3rem; }
.map__placeholder p { font-weight: 600; }
.map__placeholder small { font-size: 0.8rem; opacity: 0.7; }


/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding: 64px 24px 48px;
}

.footer__brand .logo {
  margin-bottom: 14px;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer__links h4,
.footer__contact h4 {
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer__links a:hover { color: var(--primary); }

.footer__contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer__contact a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer__contact a:hover { color: var(--primary); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 24px;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(26,26,26,0.98);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .nav.open { display: flex; }

  .nav__link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hamburger { display: flex; }

  .section { padding: 72px 0; }
  .section__header { margin-bottom: 40px; }

  .hero__content { padding: 88px 0 52px; }

  .about__grid { gap: 28px; }

  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .location__grid { grid-template-columns: 1fr; }
  .location__map { height: 260px; }

  .footer__inner { grid-template-columns: 1fr; gap: 28px; padding: 48px 24px 36px; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .section__header { margin-bottom: 28px; }
  .section__cta { margin-top: 32px; }

  .hero__content { padding: 80px 8px 44px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; max-width: 280px; text-align: center; }

  .categories__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }

  .stat { padding: 20px 14px; }
  .stat__num { font-size: 1.9rem; }

  .location__map { height: 220px; }
  .location__info { gap: 14px; }

  .footer__inner { padding: 36px 24px 28px; gap: 24px; }
  .footer__bottom { padding: 16px 24px; }
}

/* ===== PARTNERI TRAKA ===== */
.partners-strip {
  background: var(--white);
  border-top: 1px solid var(--gray-300);
  border-bottom: 1px solid var(--gray-300);
  padding: 28px 0;
  overflow: hidden;
}

.partners-strip__label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.partners-strip__viewport {
  overflow: hidden;
  position: relative;
  /* fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.partners-strip__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: scroll-logos 36s linear infinite;
}

.partners-strip__track:hover {
  animation-play-state: paused;
}

.partners-strip__track img {
  height: 48px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

@keyframes scroll-logos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== SECTION MODERNIZATION ===== */

/* --- O NAMA --- */
#o-nama {
  background: linear-gradient(140deg, #edf2ff 0%, #f5f8ff 50%, #ffffff 100%);
  position: relative;
}

#o-nama::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

#o-nama .about__text {
  border-left: 4px solid var(--primary-light);
  padding-left: 24px;
}

#o-nama .stat {
  background: var(--white);
  border: none;
  border-top: 4px solid var(--primary);
  box-shadow: 0 6px 28px rgba(28,61,122,0.1);
}

#o-nama .stat:nth-child(2) { border-top-color: var(--primary-light); }
#o-nama .stat:nth-child(3) { border-top-color: var(--accent); }
#o-nama .stat:nth-child(4) { border-top-color: #5ea8e8; }

/* --- KATEGORIJE – tamna pozadina --- */
#proizvodi-preview {
  background: linear-gradient(140deg, #0d1a2a 0%, #0f2340 100%);
}

#proizvodi-preview .section__label { color: #7aaae8; }
#proizvodi-preview .section__title { color: var(--white); }
#proizvodi-preview .section__sub   { color: rgba(255,255,255,0.55); }

/* --- LOKACIJA & KONTAKT (merged) --- */
#kontakt {
  background: linear-gradient(160deg, #e4ecf8 0%, #eef3fb 100%);
  position: relative;
}

#kontakt::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light) 0%, #5ea8e8 100%);
}

#kontakt .location__item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 14px rgba(28,61,122,0.07);
}


/* ===== LOADING SCREEN ===== */
#loader {
  position: fixed;
  inset: 0;
  background: #0d1a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.loader__logo {
  width: 260px;
  animation: loaderPulse 1.4s ease-in-out infinite;
}

.loader__bar-track {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}

.loader__bar-fill {
  height: 100%;
  width: 0%;
  background: #5ea8e8;
  border-radius: 99px;
  transition: width 0.1s linear;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.93); }
}
