/* ============================================================
   Pro ASIC Miner Repair LLC — gallery.css
   ============================================================ */

/* ============================================================
   13. GALLERY
   ============================================================ */
.gallery {
  padding: var(--section-pad) 0;
  background: var(--white);
}

/* --- Gallery Main Carousel --- */
.gal-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy);
  margin-bottom: 1.25rem;
  box-shadow: var(--glow-blue);
}
.gal-car-track {
  display: flex;
  transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.gal-car-slide {
  flex: 0 0 100%;
  position: relative;
}
.gal-car-ph {
  aspect-ratio: 16/7;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 10px, transparent 10px, transparent 20px),
    linear-gradient(135deg, rgba(11,31,58,0.96) 0%, rgba(21,101,192,0.18) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gal-car-ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gal-car-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(11,31,58,0.88) 0%, transparent 100%);
  padding: 2.5rem 1.2rem 0.75rem;
  pointer-events: none;
}
.gal-car-caption-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
}
.gal-car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: rgba(11,31,58,0.72);
  border: 1px solid rgba(33,150,243,0.3);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
  padding: 0;
}
.gal-car-btn:hover {
  background: rgba(33,150,243,0.22);
  border-color: rgba(33,150,243,0.6);
}
.gal-car-prev { left: 0.85rem; }
.gal-car-next { right: 0.85rem; }
.gal-car-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.45rem;
  z-index: 2;
}
.gal-car-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.gal-car-dot--active {
  background: var(--blue-bright);
  transform: scale(1.4);
}

/* --- Gallery Thumbnail Grid (4 small cards) --- */
.gal-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gal-figure {
  border: 1px solid rgba(33,150,243,0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.gal-figure:hover {
  border-color: rgba(33,150,243,0.36);
  box-shadow: 0 0 18px rgba(33,150,243,0.16), 0 0 0 1px rgba(33,150,243,0.18);
}
.gal-placeholder {
  aspect-ratio: 3/2;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 10px, transparent 10px, transparent 20px),
    linear-gradient(135deg, rgba(11,31,58,0.97) 0%, rgba(21,101,192,0.14) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-replace {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  border: 1px dashed rgba(33,150,243,0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  max-width: 85%;
  line-height: 1.7;
  font-family: 'Courier New', monospace;
}
.gal-replace small { display: block; color: rgba(255,255,255,0.18); margin-top: 0.2rem; }
.gal-figure figcaption {
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(33,150,243,0.12);
  background: rgba(11,31,58,0.6);
}

@media (max-width: 768px) {
  .gal-thumb-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .gal-car-ph { aspect-ratio: 4/3; }
  .gal-car-btn { width: 2rem; height: 2rem; font-size: 1.2rem; }
}


/* ============================================================
   25. GALLERY OVERLAY + PLACEHOLDER LABEL + HOVER ZOOM
   ============================================================ */
.gal-ph-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.38);
  text-align: center;
  border: 1px dashed rgba(33,150,243,0.25);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  max-width: 80%;
  line-height: 1.7;
  font-family: monospace;
}

.gal-figure {
  position: relative;
}
.gal-placeholder {
  transition: transform 0.4s ease;
  overflow: hidden;
}
.gal-figure:hover .gal-placeholder {
  transform: scale(1.04);
}
.gal-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(11,31,58,0.88) 0%, transparent 100%);
  padding: 1.8rem 0.85rem 0.65rem;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.gal-figure:hover .gal-overlay { opacity: 1; }

/* Thumb grid: overlay always visible, caption industrial style */
.gal-thumb-grid .gal-overlay {
  opacity: 1;
  padding: 2rem 0.75rem 0.55rem;
}
.gal-thumb-grid .gal-caption {
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

.gal-caption {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.gallery-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
  font-style: italic;
}


/* ============================================================
   66. GALLERY SERVICE CARDS (.gsvc-card)
   ============================================================ */
.gsvc-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(11,31,58,0.88);
  border: 1px solid rgba(33,150,243,0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.gsvc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(33,150,243,0.36);
  box-shadow: 0 8px 28px rgba(33,150,243,0.14), 0 0 0 1px rgba(33,150,243,0.18);
}
.gsvc-img-wrap {
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}
.gsvc-img-inner {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 10px, transparent 10px, transparent 20px),
    linear-gradient(135deg, rgba(11,31,58,0.97) 0%, rgba(21,101,192,0.16) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}
.gsvc-card:hover .gsvc-img-inner {
  transform: scale(1.04);
}
.gsvc-img-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gsvc-img-inner .gal-ph-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.22);
  border-color: rgba(33,150,243,0.18);
  max-width: 88%;
}
.gsvc-body {
  padding: 0.68rem 0.9rem;
  background: rgba(7,18,38,0.75);
  border-top: 1px solid rgba(33,150,243,0.1);
}
.gsvc-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.74);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Gallery Preview Footer --- */
.gal-preview-footer {
  margin-top: 1.5rem;
  text-align: center;
}
.gal-view-all {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(21,101,192,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.gal-view-all:hover {
  color: var(--blue-bright);
  border-color: var(--blue-bright);
}


/* ============================================================
   67. PHOTO LOG CAROUSEL (.gal-log-carousel)
   ============================================================ */
.gal-log-carousel {
  position: relative;
  isolation: isolate;
  margin-top: 2rem;
  max-width: 100%;
  margin-inline: auto;
}
.gal-log-viewport {
  overflow: hidden;
  width: 100%;
}
.gal-log-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.25rem 0.25rem 0.75rem;
}
.gal-log-track::-webkit-scrollbar { display: none; }
.gal-log-card {
  flex: 0 0 calc((100% - 3rem) / 4);
  scroll-snap-align: start;
}
.gal-log-card .gsvc-title { white-space: normal; overflow: visible; text-overflow: unset; }

/* Arrows — inset inside the carousel, not outside */
.gal-log-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.5rem; height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(11,31,58,0.88);
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 24px rgba(15,23,42,0.22);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.gal-log-btn:hover {
  background: rgba(21,101,192,0.92);
  border-color: rgba(33,150,243,0.6);
  color: #ffffff;
}
.gal-log-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Inset positioning — arrows stay inside the component */
.gal-log-prev { left: 0.75rem; }
.gal-log-next { right: 0.75rem; }

/* Desktop: cap width to stay clear of right-side floating CTA buttons */
@media (min-width: 1024px) {
  .gallery .gal-log-carousel {
    max-width: min(100%, 1120px);
  }
}

@media (max-width: 1180px) {
  .gal-log-card { flex-basis: calc((100% - 2rem) / 3); }
}

@media (max-width: 768px) {
  .gal-log-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
  }
  .gal-log-viewport {
    overflow: hidden !important;
    width: 100%;
  }
  .gal-log-track {
    display: flex;
    gap: 0 !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 !important;
  }
  .gal-log-track::-webkit-scrollbar { display: none; }
  .gal-log-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start;
  }
  .gal-log-btn {
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    background: rgba(11,31,58,0.85);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  }
  .gal-log-prev { left: 0.6rem !important; }
  .gal-log-next { right: 0.6rem !important; }
}

/* --- Photo log pagination dots --- */
.gal-log-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  min-height: 1rem;
}

.gal-log-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(21,101,192,0.28);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.gal-log-dot.is-active {
  width: 18px;
  background: var(--blue);
}

.gal-log-dot:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .gal-log-dots {
    margin-top: 0.75rem;
    gap: 0.35rem;
  }

  .gal-log-dot { width: 6px; height: 6px; }
  .gal-log-dot.is-active { width: 16px; }
}
