html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f6fa;
  color: #333;
}

header {
  background-color: #1e90ff;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}

header h1 {
  display: flex;
  align-items: center;
  font-size: 2em;
  margin: 0;
  color: white;
}

#logo {
  height: 3em;
  width: auto;
  margin-right: 0;
  vertical-align: middle;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-link img {
  cursor: pointer;
}

.brand-link h1 {
  margin-left: 10px;
  cursor: pointer;
}

.menu-toggle {
  display: block;
  cursor: pointer;
  font-size: 2em;
  font-weight: bold;
  margin-right: 10px;
  user-select: none;
}

nav {
  max-height: 0;
  overflow: hidden;
  background-color: #1e90ff;
  position: absolute;
  top: 80px;
  right: 0;
  width: 100%;
  text-align: center;
  transition: max-height 0.8s ease;
  z-index: 9999;
  border-radius: 0 0 0 20px;
}

nav.show {
  max-height: 400px;
}

nav a {
  display: block;
  padding: 15px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

nav a:first-child {
  border-top: none;
}

nav a:hover {
  transform: scale(1.1);
  opacity: 0.8;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#hero {
  position: relative;
  text-align: center;
  color: white;
  background: url('/static/img/herobg.png') no-repeat;
  background-size: cover;
  background-position: center;
  padding: 10%;
  margin: 0;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4);;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  z-index: 1;
}

#hero #logohero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  width: 80%;
  max-width: 600px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

#hero h2,
#hero p {
  position: relative;
  z-index: 2;
}

#hero h2 {
  font-size: 3em;
  margin-bottom: 10px;
}

#hero p {
  font-size: 2em;
  margin-bottom: 20px;
}

.btn {
  display: inline-block; 
  background-color: white;
  color: #007bff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.4s ease;
}

.btn:hover {
  background-color: #e6e6e6;
  transform: scale(1.1);
}

section {
  padding: 40px 20px;
  text-align: center;
}

#about, #services{
  position: relative;           
  overflow: hidden;            
  background-image: url('../img/bravarija/bravarija3.webp'); 
  background-size: cover;       
  background-position: center;  
  background-repeat: no-repeat;
  background-attachment: fixed; 
  background-blend-mode: lighten;
  color: #333;
}

#about, #services{
  background-color: rgba(225, 225, 225, 0.8); 
  padding: 60px 20px;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  background-color: rgba(235, 235, 235, 0.85);
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 5px 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}

.about-content h2 {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #222;
}

.about-content p {
  font-size: 1.4em;
  line-height: 1.8;
  margin-bottom: 25px;
  color: #333;
}

.about-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.about-features li {
  background-color: rgba(220, 220, 220, 0.2);
  padding: 15px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2em;
  color: #1e90ff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  cursor: default;
}

.about-features li:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  background-color: rgba(200, 200, 200, 0.4);
}

.services-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

#services h2{
  font-size: 3em;
}

.services-list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.services-list li {
  flex: 1 1 300px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

#services ul {
  list-style: none; 
  padding: 0;     
  margin: 0;      
}

.services-list li:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
}

.services-list h3 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #1e90ff;
}

.services-list p {
  font-size: 2em;
  line-height: 1.6;
  color: #444;
}

.services-content p {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 20px;
}

.services-list li {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Dugme za uslugu */
.service-btn {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.service-btn:hover {
  background-color: rgba(70, 70, 70, 0.8);
  transform: scale(1.05);
}


/* za sliku */
.services-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.6);
  z-index: 0;
  transition: transform 0.8s ease;
}

.services-list li:hover::before {
  transform: scale(1.2);
}

/* tekst iznad slike */
.services-list li h3,
.services-list li p {
  position: relative;
  z-index: 1;
  color: #fff;
}

.services-list li:nth-child(1)::before { /* bravarija */
  background-image: url('../img/bravarija/bravarija25.jpg');
}

.services-list li:nth-child(2)::before { /* kapije i ograde */
  background-image: url('../img/kio/kio1.png');
}

.services-list li:nth-child(3)::before { /* hale */ 
  background-image: url('../img/hala/hala5.jpg');
}

.services-list li:nth-child(4)::before { /* resetke */
  background-image: url('../img/resetka/resetka1.jpg');
}

.bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;  
  z-index: -1;
}

#footer {
  position: relative;
  background-color: #333;
  color: white;
  padding: 60px 20px;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);
}

#footer #logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform: scale(14);
  width: auto;             
  max-width: auto;       
  opacity: 0.04;          
  z-index: 0;            
  pointer-events: none;   
}

.footer-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.footer-left {
  flex: 1;
  min-width: 320px;
}

.footer-left h2 {
  margin-bottom: 20px;
  color: #c5c5c5;
  font-size: 2.5em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  background-color: rgb(34, 34, 34, 0.9);
  color: #c5c5c5;
  resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #c5c5c5;
}

.contact-form button {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.2);
  color: #c5c5c5;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.contact-form button:hover {
  background-color: rgba(70, 70, 70, 0.8);
  transform: scale(1.05);
}

.footer-right {
  flex: 1;
  min-width: 280px;
}

.footer-right h2 {
  color: #c5c5c5;
  margin-bottom: 20px;
  font-size: 2.5em;
}

.footer-right p {
  margin: 8px 0;
  font-size: 1.4em;
  color: #ccc;
  font-weight: bold;
}

.footer-right a {
  color: #c5c5c5;
  text-decoration: none;
  font-weight: bold;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* poruka */
.form-message {
  margin-top: 10px;
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.form-message.success {
  color: #00c851; /* uspesno */
}

.form-message.error {
  color: #ff4444; /* neuspesno */
}


/* Lightbox overlay */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);;
}

.lightbox button { /* strelice */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 2.5em;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.lightbox button:hover {
  background: rgba(255,255,255,0.4);
}

.lightbox .prev { left: 40px; }
.lightbox .next { right: 40px; }

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  z-index: 1002;
  backdrop-filter: blur(3px);
}

#lightbox-prev {
  left: 30px;
  color: white;
  font-weight: bold;
}

#lightbox-next {
  right: 30px;
  color: white;
  font-weight: bold;
}

/* SVG ikone */
#lightbox-prev svg,
#lightbox-next svg {
  width: 42px;
  height: 42px;
  fill: white;
  pointer-events: none;
  transition: transform 0.2s ease;
}

#lightbox-prev:hover svg,
#lightbox-next:hover svg {
  transform: scale(1.15);
}

/* Hover efekat na pozadinu */
#lightbox-prev:hover,
#lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) scale(1.3);
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
  z-index: 10000;
}



/* Stranice usluga */

.service-hero {
  position: relative;
  height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 1;
}

.service-hero-content {
  position: relative;
  z-index: 2;
  color: rgb(255, 255, 255, 0.7);
}

.service-hero h2 {
  font-size: 4em;
  margin-bottom: 10px;
}

.service-hero p {
  font-size: 2em;
  opacity: 0.9;
}

/* glavni sadrzaj */
.service-detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 200px);
  gap: 20px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  align-items: stretch;
}

/* Galerija */
.service-gallery {
  display: contents; /* omogućava raspored svake slike direktno u grid */
}

.service-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.service-gallery img:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.55);
}

/* Pozicije slika u obliku obrnute L forme */
.service-gallery img:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.service-gallery img:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.service-gallery img:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}
.service-gallery img:nth-child(4) {
  grid-column: 1;
  grid-row: 4;
}
.service-gallery img:nth-child(5) {
  grid-column: 2;
  grid-row: 4;
}
.service-gallery img:nth-child(6) {
  grid-column: 3;
  grid-row: 4;
}
.service-gallery img:nth-child(7) {
  grid-column: 1;
  grid-row: 4;
}

/* Tekst popunjava prazan prostor */
.service-text {
  grid-column: 2 / 4;
  grid-row: 1 / 4;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.service-text h3 {
  font-size: 2.2em;
  color: #222;
  margin-bottom: 15px;
  font-weight: bold;
}

.service-text p {
  font-size: 1.4em;
  color: #333;
  line-height: 1.8;
  margin-bottom: 15px;
}

.service-points {
  list-style: none;
  padding: 0;
}

.service-points li {
  font-size: 1.2em;
  color: #383838;
  margin-bottom: 8px;
}

.back-btn {
  display: inline-block;
  margin-top: 15px;
  color: #1e90ff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.3em;
}

.back-btn:hover {
  text-decoration: underline;
}

/* Dugme nazad */
.back-btn {
  display: inline-block;
  margin-top: 25px;
  background-color: #1e90ff;
  color: white;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: bold;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.back-btn:hover {
  background-color: #0077e6;
  transform: scale(1.05);
}

@media (max-width: 768px) {

  #hero {
    padding: 20% 5%;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);;
    background-size: 120%;
  }

  #hero h2 {
    font-size: 1.6em;
  }

  #hero p {
    font-size: 1em;
  }

  #hero #logohero {
    width: 90%;
    opacity: 0.25;
  }

  #hero:before {
    backdrop-filter: blur(2px);
  }

  .footer-container {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-left, .footer-right {
    width: 100%;
  }

  .contact-form button {
    width: 100%;
  }

  .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.8em;
    user-select: none;
  }

  nav {
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    background-color: #1e90ff;
    position: absolute;
    top: 80px; 
    left: 0;
    width: 100%;
    text-align: center;
    transition: max-height 0.8s ease;
    z-index: 9999;
    border-radius: 0 0 20px 20px;
  }

  nav.show {
    max-height: 400px;
  }

  nav a {
    display: block;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  nav a:first-child {
    border-top: none;
  }

  .about-features li.active {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    background-color: rgba(200, 200, 200, 0.4);
  }

  .service-hero {
    height: 50vh;
  }

  .service-detail {
    display: flex;
    flex-direction: column;
  }

  .service-gallery {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: none;
  }

  .service-gallery::-webkit-scrollbar {
    display: none;
  }

  .service-gallery img {
    flex: 0 0 auto;
    width: 85%;
    height: 220px;
    border-radius: 10px;
    object-fit: cover;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.5);
  }

  .service-text {
    order: -1;
    margin-bottom: 20px;
  }

  .services-list li.active {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
  }
  .services-list li.active::before {
    transform: scale(1.2)
  }

  #lightbox-prev, #lightbox-next {
    display: none;
  }

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