/* Osnovni stilovi */
:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #fca311;
  --light: #e6e6e6;
  --dark: #0f0f1a;
  --text: #333333;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #f9f9f9;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title span {
  color: var(--accent);
  position: relative;
}

.section-title span::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s ease;
}

.section-title:hover span::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 3D Navigacija */
.navbar-3d {
  background-color: var(--primary);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transform-style: preserve-3d;
  transition: all 0.5s ease;
}

.navbar-3d:hover {
  transform: translateY(-5px) rotateX(10deg);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-3d {
  display: flex;
  perspective: 1000px;
}

.logo-part {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light);
  margin-right: 5px;
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  display: inline-block;
}

.logo-part:nth-child(1) { color: var(--accent); }
.logo-part:nth-child(2) { transform: translateZ(10px); }
.logo-part:nth-child(3) { transform: translateZ(20px); }
.logo-part:nth-child(4) { transform: translateZ(30px); }

.logo-part:hover {
  transform: translateZ(50px) rotateY(360deg);
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

.booking-btn-3d {
  background-color: var(--accent);
  color: var(--dark);
  border: none;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(252, 163, 17, 0.4);
}

.booking-btn-3d:hover {
  transform: translateY(-3px) translateZ(10px);
  box-shadow: 0 8px 20px rgba(252, 163, 17, 0.6);
}

.booking-btn-3d:active {
  transform: translateY(1px) translateZ(5px);
}

/* Hero sekcija */
.hero {
  height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  color: var(--light);
  max-width: 600px;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.roko-text {
  color: var(--accent);
  display: inline-block;
  position: relative;
}

.roko-text::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-btn {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-btn:hover {
  background: var(--accent);
  color: var(--dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(252, 163, 17, 0.3);
}

.hero-scissors {
  perspective: 1000px;
}

.scissors-3d {
  width: 200px;
  height: 200px;
  background-image: url('scissors-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform-style: preserve-3d;
  animation: floatScissors 6s ease-in-out infinite, rotateScissors 8s linear infinite;
}

@keyframes floatScissors {
  0%, 100% {
      transform: translateY(0) rotateY(0);
  }
  50% {
      transform: translateY(-20px) rotateY(180deg);
  }
}

@keyframes rotateScissors {
  0% {
      transform: rotateZ(0deg);
  }
  100% {
      transform: rotateZ(360deg);
  }
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  animation: movePattern 100s linear infinite;
}

@keyframes movePattern {
  0% {
      background-position: 0 0;
  }
  100% {
      background-position: 1000px 1000px;
  }
}

/* Usluge sekcija */
.services {
  padding: 5rem 2rem;
  background-color: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.5s ease;
}

.haircut-3d {
  background-image: url('haircut-icon.png');
  transform-style: preserve-3d;
  animation: rotateIcon 10s infinite linear;
}

.beard-3d {
  background-image: url('beard-icon.png');
  transform-style: preserve-3d;
  animation: rotateIcon 8s infinite linear reverse;
}

.royal-3d {
  background-image: url('crown-icon.png');
  transform-style: preserve-3d;
  animation: bounceIcon 3s infinite ease-in-out;
}

@keyframes rotateIcon {
  0% {
      transform: rotateY(0deg);
  }
  100% {
      transform: rotateY(360deg);
  }
}

@keyframes bounceIcon {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-15px);
  }
}

.price-bubble {
  background-color: var(--accent);
  color: var(--dark);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 0;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.5s ease;
  transform: scale(1);
}

.service-card:hover .price-bubble {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 5px 15px rgba(252, 163, 17, 0.4);
}

/* Galerija sekcija */
.gallery {
  padding: 5rem 2rem;
  background-color: var(--light);
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.5s ease;
}

.gallery-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: all 0.5s ease;
}

.img1 { background-image: url('gallery1.jpg'); }
.img2 { background-image: url('gallery2.jpg'); }
.img3 { background-image: url('gallery3.jpg'); }
.img4 { background-image: url('gallery4.jpg'); }

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 33, 62, 0.7);
  opacity: 0;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-overlay::before {
  content: '+';
  color: white;
  font-size: 3rem;
  font-weight: 300;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Brijači sekcija */
.barbers {
  padding: 5rem 2rem;
  background-color: white;
}

.barbers-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.barber-card {
  height: 400px;
  perspective: 1000px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.barber-front, .barber-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.8s ease;
}

.barber-front {
  background-color: white;
  transform: rotateY(0deg);
}

.barber-back {
  background-color: var(--primary);
  color: white;
  transform: rotateY(180deg);
}

.barber-card:hover .barber-front {
  transform: rotateY(180deg);
}

.barber-card:hover .barber-back {
  transform: rotateY(360deg);
}

.barber-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin-bottom: 1.5rem;
  border: 5px solid var(--accent);
  transition: all 0.5s ease;
}

.barber1 { background-image: url('barber1.jpg'); }
.barber2 { background-image: url('barber2.jpg'); }
.barber3 { background-image: url('barber3.jpg'); }

.barber-card:hover .barber-img {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-barber {
  background-color: var(--accent);
  color: var(--dark);
  border: none;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.book-barber:hover {
  background-color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* Kontakt sekcija */
.contact {
  padding: 5rem 2rem;
  background-color: var(--light);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.info-icon {
  width: 50px;
  height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.5s ease;
}

.location-3d {
  background-image: url('location-icon.png');
  animation: pulse 3s infinite ease-in-out;
}

.phone-3d {
  background-image: url('phone-icon.png');
  animation: shake 3s infinite ease-in-out;
}

.clock-3d {
  background-image: url('clock-icon.png');
  animation: rotateClock 6s infinite linear;
}

@keyframes pulse {
  0%, 100% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.1);
  }
}

@keyframes shake {
  0%, 100% {
      transform: rotate(0deg);
  }
  25% {
      transform: rotate(-5deg);
  }
  75% {
      transform: rotate(5deg);
  }
}

@keyframes rotateClock {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.2);
}

.form-submit-btn {
  background-color: var(--accent);
  color: var(--dark);
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.form-submit-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Footer */
.footer-3d {
  background-color: var(--primary);
  color: white;
  padding: 3rem 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: all 0.5s ease;
  transform-style: preserve-3d;
}

.fb-3d {
  background-image: url('facebook-icon.png');
  animation: floatSocial 4s infinite ease-in-out;
}

.ig-3d {
  background-image: url('instagram-icon.png');
  animation: floatSocial 4s infinite ease-in-out 0.5s;
}

.twitter-3d {
  background-image: url('twitter-icon.png');
  animation: floatSocial 4s infinite ease-in-out 1s;
}

@keyframes floatSocial {
  0%, 100% {
      transform: translateY(0) rotateY(0);
  }
  50% {
      transform: translateY(-10px) rotateY(180deg);
  }
}

.footer-copyright {
  text-align: center;
  padding-top: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* Responsivnost */
@media (max-width: 768px) {
  .hero-container {
      flex-direction: column;
      text-align: center;
  }
  
  .hero-text {
      margin-bottom: 3rem;
  }
  
  .nav-links {
      display: none;
  }
  
  .section-title {
      font-size: 2rem;
  }
  
  .hero-title {
      font-size: 3rem;
  }
}