/* Section Base */
.section {
  padding: var(--section-padding, 6rem) 0;
}
.section__title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

/* Hero Variants */
/* NOTE: .section--hero layout (height/min-height/position/flex/overflow) ir pārvietots uz inline critical CSS head.hbs */

/* NOTE: .hero__bg layout (position/inset/size/object-fit) ir pārvietots uz inline critical CSS head.hbs */
/* Šeit atstājam tikai dekoratīvos/teksta stilus */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero__title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero__subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Hero Variant: overlay-dark */
/* NOTE: min-height/height ir inline critical, te tikai vizuālie */
.section--hero--overlay-dark {
  position: relative;
  color: white;
}

.section--hero--overlay-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Šis ir OK (nedod layout shift) */
.section--hero--overlay-dark .hero__bg {
  z-index: 0;
}

/* Services Grid */
.grid--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 768px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
  /* NOTE: .section--hero augstuma maiņa izņemta (lai nerada CLS) */
}

/* Final CTA */
.section--final-cta {
  background: var(--color-primary);
  color: white;
  text-align: center;
}
.final-cta__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.final-cta__text {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Contact */
.section--contact {
  background: var(--color-bg-alt);
}

/* Stats Section */
.section--stats {
  min-height: 180px;
  background: var(--color-bg-alt);
  padding: 4rem 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat__number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.stat__label {
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}
@media (max-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ==========================================================================
   PROJECT SHOWCASE - Before/After Premium Display
   ========================================================================== */

.project-showcase {
  padding: 5rem 0;
  background: var(--color-bg-alt, #f8f9fa);
}

.project-showcase__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text);
  line-height: 1.2;
}

.project-showcase__meta {
  text-align: center;
  color: var(--color-muted);
  font-size: 1.125rem;
  margin-top: 2rem;
  font-weight: 500;
}

/* Before/After Grid */
.before-after {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.before-after.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for items */
.before-after.is-visible .before-after__item:nth-child(1) {
  transition-delay: 0.1s;
}

.before-after.is-visible .before-after__item:nth-child(2) {
  transition-delay: 0.3s;
}

.before-after__item {
  position: relative;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition:
    transform 0.6s ease,
    opacity 0.6s ease;
}

.before-after.is-visible .before-after__item {
  transform: translateY(0);
  opacity: 1;
}

.before-after__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.before-after__item:hover .before-after__img {
  transform: scale(1.03);
}

/* Gradient Overlay */
.before-after__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Watermark Text - PA LABI STŪRĪ ar pulsāciju */
.before-after__watermark {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem; /* PA LABI instead of center */
  left: auto; /* Atceļ centering */
  transform: none; /* Atceļ translateX */
  font-size: 1.5rem; /* Lielāks */
  font-weight: 800; /* Biezāks */
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.95; /* Spilgtāks (nevis 0.85) */
  z-index: 2;
  white-space: nowrap;
  animation: pulse-glow 3s ease-in-out infinite; /* Lēna pulsācija */
}

/* Spilgtāki BEFORE/AFTER */
.before-after__watermark--before {
  color: #ff1a1a; /* Spilgtāks sarkans (nevis tumšs #8B0000) */
  text-shadow:
    0 0 10px rgba(255, 26, 26, 0.8),
    0 0 20px rgba(255, 26, 26, 0.6),
    0 0 30px rgba(255, 26, 26, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.8);
}

.before-after__watermark--after {
  color: #2ecc71; /* Spilgtāks zaļš (nevis tumšs #1F8A50) */
  text-shadow:
    0 0 10px rgba(46, 204, 113, 0.8),
    0 0 20px rgba(46, 204, 113, 0.6),
    0 0 30px rgba(46, 204, 113, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Pulsējošā animācija */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.95;
    transform: scale(1);
    /* text-shadow noņemts no animācijas - tikai static */
    text-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor;
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
    text-shadow:
      0 0 10px currentColor,
      0 0 20px currentColor; /* Static shadow */
  }
}

/* Mobile pielāgojums */
@media (max-width: 768px) {
  .before-after__watermark {
    font-size: 1.1rem;
    bottom: 1rem;
    right: 1rem;
    letter-spacing: 0.1em;
  }
}
/* ==========================================================================
   LIGHTBOX - Full Screen Image Viewer
   ========================================================================== */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: none; /* Prevent scroll while zoomed */
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox__caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 3rem;
  width: 60px;
  height: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 0;
  border-radius: 0 8px 8px 0;
}
.lightbox__nav--next {
  right: 0;
  border-radius: 8px 0 0 8px;
}

.lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Clickable cursor on gallery items */
.before-after__item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .lightbox__nav {
    width: 50px;
    height: 80px;
    font-size: 2rem;
  }

  .lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }

  .lightbox__caption {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
}
