/* ==========================
   1. COMPONENT: Navigation
========================== */

nav {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
}

.hamburger {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 35px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 5000;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.35);

  transition:
    background-color 0.3s ease,
    transform 0.3s ease,
    opacity 0.3s ease;
}

.hamburger.scrolled span {
  background-color: var(--color-accent);
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 12px;
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

.hamburger.active span:nth-child(1) {
  top: 12px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 12px;
  transform: rotate(-45deg);
}

.hamburger:hover span {
  background-color: var(--color-accent);
}

.nav-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: #111;
  display: flex;
  flex-direction: column;
  padding-top: 120px;
  list-style: none;
  margin: 0;
  transition: right 0.35s ease;
  z-index: 4000;
}

.nav-panel.active {
  right: 0;
}

.nav-panel a {
  display: block;
  padding: 20px 40px;
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.nav-panel a:hover {
  color: var(--color-accent);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3000;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-submenu {
  list-style: none;
  margin: var(--space-xs) 0 0;
  padding-left: 0;
}

.nav-submenu a {
  display: grid;
  grid-template-columns: 16px auto;
  align-items: center;
  column-gap: 8px;

  padding: 10px 40px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}

.submenu-arrow {
  justify-self: start;
  font-size: 1.1rem;
  color: var(--color-accent);
}

.nav-submenu a:hover {
  color: var(--color-accent);
}

.nav-submenu a:hover .submenu-arrow {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* ==========================
   2. COMPONENT: Accent Heading
========================== */

.accent-heading {
  position: relative;
  display: inline-block;
}

.accent-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--space-xs));
  transform: translateX(-50%) scaleX(0);
  transform-origin: right;
  width: 50%;
  height: 3px;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent-dark));
  border-radius: 2px;
  transition: transform 0.8s ease 0.15s;
}

.accent-heading.animate::after {
  transform: translateX(-50%) scaleX(1);
}

/* ==========================
   3. COMPONENT: Section Cards
========================== */

.about-card,
.contact-card,
.testimonials-card {
  background: #fff;
  border-radius: 24px;
  padding: var(--space-lg);

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 18px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================
   4. COMPONENT: Slideshow
========================== */

.slideshow-shell {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: var(--space-sm);
}

.slideshow-container {
  width: 100%;
  margin: 0 auto;
  position: relative;
  text-align: center;
  min-height: 360px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  overflow: hidden;
  background-color: var(--color-accent);

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.08);
}

.slide {
  display: none;
  width: 100%;
  position: relative;
}

.slide img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.slideshow-container .slide img {
  cursor: zoom-in;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.slideshow-container .slide img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.slide::after {
  content: "⤢";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2rem;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.slide:hover::after {
  opacity: 1;
}

.graphics-slideshow {
  min-height: 380px;
  padding: var(--space-md);
}

.graphics-slideshow .slide {
  align-items: center;
  justify-content: center;
}

.graphics-slideshow .slide img {
  max-height: 340px;
  object-fit: contain;
}

.web-slideshow img {
  max-height: 520px;
  border-radius: 4px;
}

.prev,
.next {
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;

  display: grid;
  place-items: center;

  color: #111;
  background-color: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);

  font-weight: bold;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  user-select: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.prev:hover,
.next:hover {
  background-color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(116, 153, 255, 0.15);
}

/* ==========================
   5. COMPONENT: Slideshow Text + Indicators
========================== */

.text {
  color: #f2f2f2;
  font-size: 0.95rem;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

.numbertext {
  color: #f2f2f2;
  background-color: rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  padding: 8px 12px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.dots-container {
  text-align: center;
}

.dot {
  cursor: pointer;
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
  background-color: #717171;
}

/* ==========================
   6. COMPONENT: Lightbox
========================== */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  padding: 60px 16px 80px;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90%;
  max-height: calc(100vh - 140px); /* Replaces old max height */
  object-fit: contain;
  border-radius: 12px;
  transition: none;
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  will-change: transform;

  touch-action: none;
  -webkit-user-drag: none;
}

.lightbox-image.is-zoomed {
  cursor: grab;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-image.is-dragging {
  cursor: grabbing;
  transition: none;
}

.lightbox-close {
  position: absolute;
  z-index: 10000;
  top: 24px;
  right: 20px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  z-index: 100000;
  position: absolute;
  backdrop-filter: blur(6px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 2rem;
  color: white;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* ==========================
   7. COMPONENT: Animations
========================== */

.fade {
  animation: fade 0.8s ease;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

/* ==========================
   8. COMPONENT: Card
========================== */

.card {
  background-color: #fff;
  border-radius: 16px;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.audio-card {
  transform: none;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);

    box-shadow:
      0 6px 14px rgba(0, 0, 0, 0.06),
      0 14px 35px rgba(0, 0, 0, 0.1),
      0 30px 60px rgba(0, 0, 0, 0.14);
  }

  .audio-card:hover {
    transform: translateY(-4px);
  }
}

/* ==========================
   Mobile Slideshow Controls
========================== */

@media (max-width: 767px) {
  .slideshow-shell {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "slideshow slideshow"
      "prev next";
    gap: var(--space-sm);
  }

  .slideshow-container {
    grid-area: slideshow;
  }

  .prev {
    grid-area: prev;
    justify-self: end;
  }

  .next {
    grid-area: next;
    justify-self: start;
  }

  .prev,
  .next {
    margin-top: var(--space-sm);
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }

  .lightbox-close {
    top: 18px;
    right: 22px;
  }
}

/* ==========================
   9. MEDIA QUERY: Tablet
========================== */

@media (min-width: 768px) {
  .slideshow-shell {
    grid-template-columns: 46px 1fr 46px;
    gap: var(--space-md);
  }

  .slideshow-container {
    min-height: 450px;
  }

  .slide img {
    max-height: 500px;
  }

  .graphics-slideshow {
    min-height: 500px;
  }

  .graphics-slideshow .slide img {
    max-height: 460px;
  }

  .web-slideshow img {
    max-height: 600px;
  }

  .prev,
  .next {
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
  }
}

/* ==========================
   Tablet Lightbox Controls
========================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .lightbox {
    padding-left: 72px;
    padding-right: 72px;
  }

  .lightbox-image {
    max-width: calc(100vw - 180px);
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }
}

/* ==========================
   10. MEDIA QUERY: Desktop
========================== */

@media (min-width: 1024px) {
  .lightbox {
    padding-left: 80px;
    padding-right: 80px;
  }

  .lightbox-image {
    max-width: calc(100% - 120px);
  }

  .slideshow-container {
    min-height: 500px;
    background-color: transparent;
  }

  .graphics-slideshow {
    min-height: 540px;
  }

  .graphics-slideshow .slide img {
    max-height: 500px;
  }

  .web-slideshow {
    min-height: 600px;
  }
}
