:root {
  --bg-primary: #ebe7dd;
  --bg-secondary: hsl(38, 40%, 96%);
  --accent-color: #e9c46a;
  --cards-bg: #a3b18a;
  --footer-bg: #2d463e;
  --text-primary: #3e2723;
  --font-heading: "Montserrat", sans-serif;
  --font-text: "Open Sans", sans-serif;
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--text-primary);
  font-weight: 700;
}
h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 4vw, 2rem);
  color: var(--text-primary);
}
h3 {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-primary);
  font-weight: 600;
}
p {
  font-family: var(--font-text);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  color: var(--text-primary);
  line-height: 1.6;
}
a {
  cursor: pointer;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
nav {
  background-color: var(--bg-primary);
}

.animirani-link {
  text-decoration: none;
  color: #333;
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.animirani-link::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #3e2723;
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.3s ease-out;
}

.animirani-link:hover::after {
  transform: scaleX(1);
}
.hero {
  background:
    linear-gradient(rgba(136, 136, 136, 0.333), rgba(136, 136, 136, 0.333)),
    url(../fotke/cover-dron.webp);
  background-size: cover;
  background-position: center;
}
button {
  background-color: var(--accent-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-family: var(--font-text);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #d4a75a;
}
#about,
#contact {
  padding: clamp(1rem, 5vw, 2rem) clamp(1rem, 8vw, 4rem);
}
.mobileMenu-links a {
  font-weight: 400;
}
.about-img-container {
  height: 17rem;
  width: 100%;
  max-width: 30rem;
  overflow: hidden;
}

.about-img-container img {
  border-radius: 0.5rem;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.services {
  background-color: var(--bg-primary);
}
.services-card {
  /* background-color: var(--cards-bg); */
  width: 100%;
  max-width: 25rem;
  height: auto;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: left;
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.contact li,
.contact a {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 2vw, 0.5rem);
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  width: 100%;
  padding: clamp(0.25rem, 1vw, 0.5rem);
  border-radius: 15px;
  font-weight: 500;
}
.contact li:hover {
  background-color: var(--bg-primary);
  cursor: pointer;
}
footer {
  background-color: var(--footer-bg);
  color: #ffffff;
  padding: 1rem 0;
  font-size: 1rem;
  text-align: center;
}
footer p {
  color: #fff8e1;
}
footer hr {
  width: 60%;
  margin: 0 auto;
  border: none;
  background-color: rgba(255, 255, 255, 0.425);
  height: 1px;
}

/* MODAL STYLES */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
  opacity: 0;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  /* background-color: var(--bg-primary); */
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: clamp(300px, 90vw, 600px);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2rem);
  z-index: 1001;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Scroll animations */
@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInLeft {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
}

.scroll-animate.visible {
  animation: fadeInUp 0.8s ease-out forwards;
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-40px);
}

.scroll-animate-left.visible {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(40px);
}

.scroll-animate-right.visible {
  animation: fadeInRight 0.8s ease-out forwards;
}

.stagger-child {
  opacity: 0;
  transform: translateY(40px);
}

.stagger-child.visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-child:nth-child(1).visible {
  animation-delay: 0s;
}

.stagger-child:nth-child(2).visible {
  animation-delay: 0.1s;
}

.stagger-child:nth-child(3).visible {
  animation-delay: 0.2s;
}

.stagger-child:nth-child(4).visible {
  animation-delay: 0.3s;
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2);
}

.modal-body {
  margin-bottom: 2rem;
  text-align: center;
}

.modal-body h2 {
  margin-bottom: 1rem;
}

.modal-body p {
  text-align: left;
  line-height: 1.8;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.nav-btn {
  flex: 1;
  background-color: var(--cards-bg);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-family: var(--font-text);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.nav-btn:hover {
  background-color: #8a9c72;
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #ccc;
}

.modal-images {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-images img {
  width: 50%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
@media (max-width: 600px) {
  .modal-images {
    flex-direction: column;
  }

  .modal-images img {
    width: 100%;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: var(--text-primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    background-color 0.3s ease;
  z-index: 998;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #d4a75a;
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}
