/* CSS Variables - Plava tema */
:root {
  --primary-blue: #0057B7;           /* Glavna jaka plava */
  --primary-blue-light: #2A74DA;     /* Svetlija plava za naglaske */
  --primary-blue-dark: #003F8A;      /* Tamnija plava za hover */
  --background-light: #E6F0FA;       /* Svetlo plava pozadina */
  --background-lighter: #F5F9FF;     /* Još svetlija za sekcije */
  --text-dark: #222E3E;              /* Taman, elegantan tekst */
  --text-light: #FFFFFF;             /* Bela za kontrast */
  --accent-blue: #007BFF;            /* Za akcente */
  --shadow-blue: rgba(0, 87, 183, 0.3); /* Senka plava */
}

/* Base reset & layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-lighter);
}

img,
svg {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.75rem;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

/* Header & navigation - više se ne koristi (skriveno) */
.site-header {
  display: none;
}

/* Mobile-first centriranje headera */
@media (max-width: 639px) {
  .header-inner {
    align-items: center;
  }

  .logo-wrap {
    justify-content: center;
  }

  .site-title span {
    text-align: center;
  }

  .main-nav {
    justify-content: center;
  }
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.traffic-light {
  width: 28px;
  height: 64px;
}

.site-title span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-top: 0.1rem;
  flex-wrap: wrap;
}

@media (max-width: 360px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.nav-link {
  text-decoration: none;
  color: #333;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #dddddd;
  background-color: #f5f5f5;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: #111;
  color: #fff;
  border-color: #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  outline: none;
}

/* Hero section – autoskola tematikom */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  color: #1f2937;
  overflow: hidden;
  isolation: isolate;
}

/* Nebo pozadina - tamnija plava tema */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 55%),
    linear-gradient(to bottom, #cfe2ff 0%, #b3d9ff 40%, #9cc5ff 75%, #cfe2ff 100%);
  z-index: -3;
}

/* Trava/zemlja na dnu - plavo */
.hero-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, #1e40af 0%, #3b82f6 45%, #93c5fd 100%);
  z-index: -2;
}

/* Put - asfalt */
.hero-road-surface {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 75%;
  max-width: 600px;
  height: 50%;
  background:
    linear-gradient(to bottom, #4b5563 0%, #1f2937 40%, #020617 100%);
  clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
  z-index: -1;
}

/* Žuta linija na putu */
.hero-road-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 8px;
  height: 50%;
  background-image: repeating-linear-gradient(
    to bottom,
    #facc15 0,
    #facc15 40px,
    transparent 40px,
    transparent 80px
  );
  z-index: 0;
  animation: road-scroll 2s linear infinite;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.9));
}

/* Saobraćajni znak – uklonjen iz prikaza (zadržan zbog strukture, ali sakriven) */
.hero-road {
  display: none;
}

.hero-inner {
  padding-top: 6.25rem;
  padding-bottom: 3.5rem;
  max-width: 720px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-kicker {
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--primary-blue);
  margin-bottom: 0.6rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 0.8s ease-out forwards 0.2s;
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  color: var(--primary-blue);
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 0.8s ease-out forwards 0.3s;
}

.hero-subtitle {
  margin: 0 0 2rem;
  color: var(--text-dark);
  max-width: 32rem;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 0.8s ease-out forwards 0.4s;
}

/* Hero CTA sekcija */
.hero-cta {
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 0.8s ease-out forwards 0.5s;
}

.hero-cta-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

.hero-nav-btn {
  background-color: var(--primary-blue);
  color: var(--text-light);
  border: none;
  border-radius: 999px;
  white-space: nowrap;
  padding: 0.7rem 0.9rem;
  flex: 1 1 100px;
  min-width: 0;
  max-width: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.hero-nav-btn:hover,
.hero-nav-btn:focus-visible {
  background-color: var(--primary-blue-light);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  outline: none;
}

/* Hero features/benefits - dodatni sadržaj - uvek vertikalno */
.hero-features {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 0.8s ease-out forwards 0.6s;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-feature-icon {
  width: 20px;
  height: 20px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: bold;
  flex-shrink: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cta-btn {
  flex: 1 1 100px;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  outline: none;
}

.cta-call {
  background-color: #2563eb;
  color: #eff6ff;
  border-color: #1d4ed8;
}

.cta-viber {
  background-color: #645495;
  color: #f5f3ff;
}

.cta-whatsapp {
  background-color: #25d366;
  color: #ffffff;
}

.cta-viber,
.cta-viber:hover,
.cta-viber:focus-visible,
.cta-viber:active {
  background-color: #645495;
  border-color: #4c3b8f;
}

.cta-whatsapp,
.cta-whatsapp:hover,
.cta-whatsapp:focus-visible,
.cta-whatsapp:active {
  background-color: #25d366;
  color: #ffffff;
}

/* Uklonjen specifičan stil - koriste se osnovni .hero-nav-btn stilovi */

.scroll-hint {
  margin-top: 1.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.scroll-icon {
  font-size: 0.8rem;
  animation: bounce-down 1.4s infinite;
}

/* Sections – plava tema sa različitim nijansama */
.section {
  padding: 3rem 0 3.5rem;
  position: relative;
}

/* Prva sekcija - tamnija plava */
#o-usluzi.section {
  background: linear-gradient(to bottom, #cfe2ff 0%, #b3d9ff 100%);
  color: var(--text-dark);
}

#o-usluzi.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 10%, rgba(0, 87, 183, 0.08), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(0, 87, 183, 0.08), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

#o-usluzi.section h2 {
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#o-usluzi.section p {
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

#o-usluzi.section p.is-visible {
  opacity: 1;
  transform: translateX(0);
}

#o-usluzi.section p:nth-child(2) {
  transition-delay: 0.1s;
}

#o-usluzi.section p:nth-child(3) {
  transition-delay: 0.2s;
}

#o-usluzi.section p:nth-child(4) {
  transition-delay: 0.3s;
}

#o-usluzi.section p:nth-child(5) {
  transition-delay: 0.4s;
}

/* Druga sekcija - tamnija plava sa patternom */
.section-muted {
  background: linear-gradient(to bottom, #b3d9ff 0%, #9cc5ff 100%);
  color: var(--text-dark);
  border-top: 3px solid rgba(0, 87, 183, 0.2);
}

.section-muted::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    rgba(0, 87, 183, 0.05) 0,
    rgba(0, 87, 183, 0.05) 18px,
    rgba(0, 87, 183, 0.03) 18px,
    rgba(0, 87, 183, 0.03) 22px
  );
  mix-blend-mode: soft-light;
  opacity: 0.7;
  pointer-events: none;
}

.section-muted h2 {
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-muted p {
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.section-muted p:last-child {
  margin-bottom: 0;
}

/* Treća sekcija - tamnija plava pozadina */
#kontakt.section {
  background: #a8d4f5;
  color: var(--text-dark);
  border-top: 3px solid rgba(0, 87, 183, 0.2);
}

#kontakt.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(0, 87, 183, 0.08), transparent 55%),
    radial-gradient(circle at 80% 50%, rgba(0, 87, 183, 0.08), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

#kontakt.section h2 {
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

#kontakt.section h2.is-visible,
#kontakt.section .section-intro.is-visible,
#kontakt.section .cta-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#kontakt.section .section-intro {
  color: var(--text-dark);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

#kontakt.section .section-intro a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--primary-blue);
  transition: color 0.2s ease;
}

#kontakt.section .section-intro a:hover {
  color: var(--primary-blue-dark);
  border-bottom-color: var(--primary-blue-dark);
}

#kontakt.section .cta-row {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.section h2 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.section p {
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--text-dark);
}

/* Scroll reveal animacije */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animacija za sekcije - samo za fade-in, ne za translate */
.section {
  transition: opacity 0.8s ease;
}

.section.is-visible {
  opacity: 1;
}

/* Packages */
.packages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.package-card {
  border-radius: 0.75rem;
  border: 2px solid rgba(0, 87, 183, 0.15);
  padding: 1.5rem 1.25rem;
  background: #ffffff;
  box-shadow: 0 8px 24px var(--shadow-blue);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
  opacity: 0;
  transform: translateY(30px);
}

.package-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.package-card:nth-child(1) {
  transition-delay: 0.1s;
}

.package-card:nth-child(2) {
  transition-delay: 0.2s;
}

.package-card:nth-child(3) {
  transition-delay: 0.3s;
}

.package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-blue);
  border-color: var(--primary-blue);
}

.package-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--primary-blue);
  font-weight: 700;
}

.package-card .package-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.package-card p {
  margin: 0;
  color: var(--text-dark);
  font-size: 0.9rem;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-field label {
  font-size: 0.85rem;
  color: #222;
}

.form-field input,
.form-field textarea {
  padding: 0.55rem 0.6rem;
  border-radius: 0.55rem;
  border: 1px solid #d0d0d0;
  font: inherit;
  resize: vertical;
  background-color: #fff;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

.primary-btn {
  align-self: flex-start;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  background-color: #111;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background-color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  outline: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(0, 63, 138, 0.3);
  background: var(--primary-blue-dark);
  padding: 1rem 0;
}

.site-footer .container {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  text-align: center;
}

.site-footer small {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Mobile optimizacije */
@media (max-width: 639px) {
  body {
    font-size: 15px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-kicker {
    font-size: 0.7rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-inner {
    padding-top: 6rem;
  }
  
  .hero .container {
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: visible;
  }
  
  .hero-cta {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 0.75rem;
    overflow-x: visible;
  }
  
  .hero-cta-row {
    padding: 0;
    gap: 0.75rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    overflow-x: visible;
  }
  
  .hero-nav-btn {
    flex: 1 1 100px;
    min-width: 0;
    max-width: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    border: none;
    border-radius: 999px;
    min-height: 44px;
  }
  
  .section {
    padding: 2rem 0 2.5rem;
  }
  
  .section h2 {
    font-size: 1.3rem;
  }
  
  #o-usluzi.section p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  .package-card {
    padding: 1.25rem 1rem;
    min-height: auto;
  }
  
  .package-card h3 {
    font-size: 1rem;
  }
  
  .package-card .package-price {
    font-size: 1.3rem;
  }
  
  .cta-btn {
    min-height: 44px; /* Optimalno za touch */
    padding: 0.75rem 1rem;
  }
  
  .hero-nav {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    width: auto;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-logo {
    margin-right: 0;
    margin-bottom: 0.3rem;
  }
  
  .hero-logo-text {
    font-size: 0.75rem;
  }
  
  .hero-nav-links {
    width: 100%;
    justify-content: center;
  }
  
  .hero-nav-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }
  
  .hero-road-surface {
    width: 85%;
  }
  
  .hero::after {
    width: 80px;
    height: 80px;
    top: 5%;
  }
  
  .hero-features {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .hero-feature {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .hero-features {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .hero-feature {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
  }
}

/* Extra small screens - vrlo uzak ekran */
@media (max-width: 360px) {
  .hero .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    overflow-x: visible;
  }
  
  .hero-cta {
    padding: 0 0.6rem;
  }
  
  .hero-cta-row {
    padding: 0;
    gap: 0.6rem;
  }
  
  .hero-nav-btn {
    padding: 0.75rem 0.8rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 999px;
    min-height: 44px;
  }
  
  .hero-feature {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .hero .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Larger screens */
@media (min-width: 640px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .cta-row {
    justify-content: flex-start;
  }

  .cta-btn {
    flex: 0 0 auto;
    min-width: 120px;
  }

  .packages {
    flex-direction: row;
  }

  .package-card {
    flex: 1 1 0;
  }
  
  .hero-road-surface {
    width: 65%;
  }
  
  .hero::after {
    width: 150px;
    height: 150px;
  }
}

/* Animacije keyframes */
@keyframes road-scroll {
  0% {
    background-position-y: 0;
  }
  100% {
    background-position-y: 80px;
  }
}

@keyframes bounce-down {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}