#vimeoCarousel .carousel-control-prev,
#vimeoCarousel .carousel-control-next {
  width: 5%;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-control-prev {
  left: clamp(-12rem, -5vw, -0.5rem);
  font-size: 3rem;
  color: white;
  top: 40%;
}

.carousel-control-next {
  right: clamp(-12rem, -5vw, -0.5rem);
  font-size: 3rem;
  color: white;
  top: 40%;
}

@media (max-width: 768px) {
  .carousel-control-prev {
    left: 0.25rem;
  }

  .carousel-control-next {
    right: 0.25rem;
  }
}

#verkefni {
  scroll-margin: 3.5rem;
}

#vimeoCarousel .carousel-control-prev-icon,
#vimeoCarousel .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.88);
  border-radius: 40%;
  background-size: 100% 80%;
}

#vimeoCarousel {
  padding-inline: 8rem;
  overflow: visible;
}

#hafaSamband .form-control {
  background-color: lightgray;
  border-radius: 0.5rem;
  border: none;
}

#hafaSamband .form-control:focus {
  background-color: white;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

#hafaSamband .btn {
  border-radius: 0.5rem;
}

.modal-header {
  border-bottom: none;
}

.btn-close.btn-close-white {
  filter: invert(1);
}

.modal-content {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  background: #f2f2f2;
  font-family: "Montserrat", sans-serif;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.logos {
  overflow: hidden;
  padding: 60px 0;
  width: 97%;
  white-space: nowrap;
  position: relative;
  margin: 0 auto;
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 5%,
    rgba(0, 0, 0, 1) 95%,
    rgba(0, 0, 0, 0) 100%
  );
}

.logos-slide {
  display: inline-block;
  animation: 30s slide infinite linear;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.logos-slide img {
  height: 60px;
  margin: 0 15px;
}

@media (min-width: 576px) {
  .logos {
    width: 70%;
  }

  .logos-slide img {
    height: 90px;
    margin: 0 45px;
  }

  .um-hero .right-col {
    margin-top: 18rem;
    width: 100%;
  }

  .um-hero-img {
    height: auto;
    width: 100%;
  }
}
.logos-slide img.pipar {
  height: 35px !important;
  width: auto !important;
}

.mt-10 {
  margin-top: 10rem;
}
.mt-20 {
  margin-top: 20rem;
}
.mb-10 {
  margin-bottom: 10rem;
}
.mb-20 {
  margin-bottom: 20rem;
}
.mb-15 {
  margin-bottom: 15rem;
}
main#app {
  opacity: 1;
  transition: opacity 0.5s ease;
}

#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: transparent !important;
  isolation: isolate;
}
#mainNav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bs-danger);
  transform: translateY(-100%);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
#mainNav:hover::before,
#mainNav.scrolled::before {
  transform: translateY(0);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
  #mainNav .navbar-collapse {
    display: none !important;
  }
  #mainNav:hover .navbar-collapse,
  #mainNav.scrolled .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    justify-content: end;
  }

  #mainNav .navbar-collapse .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    white-space: nowrap;
    transform: translateX(32px);
    opacity: 0;
    transition:
      transform 0.35s ease,
      opacity 0.3s ease;
  }
  #mainNav:hover .navbar-collapse .navbar-nav,
  #mainNav.scrolled .navbar-collapse .navbar-nav,
  #mainNav:focus-within .navbar-collapse .navbar-nav {
    transform: none;
    opacity: 1;
  }

  #mainNav .navbar-toggler {
    border-width: 50px;
    padding: 0.5rem 0.8rem;
    border: 4px solid white;
    margin-right: 1.5rem;
  }

  #mainNav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

  #mainNav:hover .navbar-toggler,
  #mainNav.scrolled .navbar-toggler {
    opacity: 0;
    pointer-events: none;
  }
}
@media (max-width: 991px) {
  #mainNav {
    background-color: rgba(220, 53, 69, 0.95) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }

  #mainNav .navbar-toggler {
    opacity: 1 !important;
  }
  #mainNav .navbar-collapse {
    transform: none;
    opacity: 1;
  }
  .gallery-3vh .img-col {
    min-height: 40vh;
  }
}

.project-panel {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: rgba(220, 53, 69, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0.9;
  padding: 3rem 0;
}

.project-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
  touch-action: manipulation;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 0.35s ease,
    transform 0.35s ease;
}
@media (hover: none) and (pointer: coarse) {
  .project-card:hover > img {
    filter: none !important;
    transform: none !important;
  }

  .project-card:hover .project-overlay {
    opacity: 0 !important;
  }
}

@media (max-width: 576px) {
  #vimeoCarousel {
    padding-inline: 4rem;
  }
  footer.footer .row > div:nth-child(1),
  footer.footer .row > div:nth-child(2) {
    display: none !important;
  }

  /* Make the remaining column span full width */
  footer.footer .row > div:nth-child(3) {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  footer.footer .row > div:nth-child(3) > div {
    justify-content: center !important;
  }
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  color: white;
  text-align: center;
  pointer-events: none;
}

.project-overlay i {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.project-card:hover > img {
  filter: blur(4px) brightness(0.75);
  transform: scale(1.05);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.hero-img-size {
  width: clamp(320px, 90vw, 1200px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.gallery-3vh {
  min-height: 100vh;
}

.gallery-3vh .img-col {
  min-height: 100vh;
}

.gallery-3vh .gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ratio.ratio-2x1 {
  --bs-aspect-ratio: 177.78%;
}

@media (max-width: 575.98px) {
  /* Hide address block and big text logo + MEDIA line */
  .footer .ps-md-5 .text-start {
    display: none;
  } /* address */
  .footer .display-3,
  .footer small {
    display: none !important;
  } /* big text */

  /* Only show social icons; hide 'Hafa samband' text & back-to-top */
  .footer .d-inline-flex > a.text-light.fw-semibold {
    display: none !important;
  }
  .footer a.position-fixed-absolute {
    display: none !important;
  }

  /* If you have an image logo in other pages, you can show it here:
     .footer .center-logo-img { display:block !important; } */

  /* Spacing + sizing that we already tuned */
  .footer {
    padding: 1.5rem 1rem;
    text-align: center;
  }
  .footer .row {
    row-gap: 1rem;
  }
  .footer .bi {
    font-size: 1.6rem;
  }
}
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

#mainNav .nav-logo {
  opacity: 0.7;
  transition: opacity 200ms ease;
}

#mainNav.scrolled .nav-logo {
  opacity: 1;
}

#mainNav:hover .nav-logo {
  opacity: 1;
}

#mainNav:has(#navMenu.show) .nav-logo {
  opacity: 1;
}

.hero-copy {
  top: 65%;
  left: 12%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .hero-copy {
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    width: min(92vw, 520px);
    text-align: center;
    padding-left: 0 !important;
  }

  .hero-copy .btn {
    width: auto;
    max-width: 92vw;
  }
}
