/* ============================================================
   ADASH — Lightbox, Utilities, Download pages (dl-*), misc
   ============================================================ */

/* ---- Lightbox ---- */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 9999; align-items: center; justify-content: center;
}
/* JS toggles both 'open' and 'active' */
.lightbox-overlay.open,
.lightbox-overlay.active { display: flex; }
.lightbox-inner { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  color: var(--white); font-size: 2rem; cursor: pointer; line-height: 1;
  background: none; border: none;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--white); font-size: 2.5rem; cursor: pointer;
  background: none; border: none; padding: 0 1rem;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-caption {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 0.875rem; text-align: center;
}


/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-32 { padding-top: 8rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.hidden { display: none !important; }

/* ---- 404 / Not Found ---- */
.page-404 { text-align: center; padding: 6rem 1rem 4rem; }
.page-404 h1 { font-size: clamp(3.5rem, 14vw, 6rem); font-weight: 700; color: var(--border-200); }
.page-404 h2 { font-size: clamp(1.125rem, 4vw, 1.5rem); color: var(--text-600); margin-bottom: 1.5rem; }

.page-content { background: #fff; min-height: 100vh; padding-bottom: 4rem; }
.not-found { text-align: center; padding: 4rem 1rem; }
.not-found h1 { font-size: clamp(3.5rem, 14vw, 6rem); font-weight: 300; color: #004b87; line-height: 1; margin-bottom: 1.5rem; }
.not-found h2 { font-size: clamp(1.25rem, 4vw, 1.875rem); font-weight: 300; color: #1f2937; margin-bottom: 1rem; }
.not-found p { color: #6b7280; max-width: 28rem; margin: 0 auto 2rem; }

/* AIDY placeholder */
.aidy-page { padding: 8rem 1rem 4rem; text-align: center; }
.aidy-page h1 { font-size: 2rem; font-weight: 300; color: var(--dark-blue); margin-bottom: 1rem; }

/* Generic buttons */
.btn { display: inline-block; padding: .5rem 1.5rem; font-size: .875rem; text-decoration: none; border-radius: 2px; transition: background .2s, color .2s; }
.btn-blue { background: #004b87; color: #fff; }
.btn-blue:hover { background: #003a6b; color: #fff; text-decoration: none; }
.btn-outline { border: 1px solid #004b87; color: #004b87; background: transparent; }
.btn-outline:hover { background: #004b87; color: #fff; text-decoration: none; }
.text-muted { color: #6b7280; }

/* Product category page */
.product-page { padding-top: 2rem; padding-bottom: 4rem; }
.product-page-title {
  font-size: 2.25rem; font-weight: 300; color: var(--blue);
  margin-bottom: 3rem;
}

/* Section heading (news, exhibitions with "see all" link) */
.section-heading {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 0.5rem;
}
.section-heading h2 { font-size: 1.875rem; font-weight: 300; color: #1f2937; text-transform: uppercase; letter-spacing: -0.025em; }
.section-heading a { color: var(--green); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.section-heading a:hover { text-decoration: underline; color: var(--green); }

/* Download pages (dl-*) */
.dl-page { padding-top: 3rem; padding-bottom: 3rem; }
.dl-title {
  font-size: 1.875rem; font-weight: 300; color: #004b87;
  margin-bottom: 2rem;
}
.dl-item {
  display: flex; flex-direction: column; gap: 2rem;
  padding: 2rem 0; border-bottom: 1px solid #e5e7eb;
}
@media (min-width: 768px) { .dl-item { flex-direction: row; } }
.dl-item:last-child { border-bottom: none; }
.dl-item-img { width: 100%; }
@media (min-width: 768px) { .dl-item-img { width: 33.333%; flex-shrink: 0; } }
.dl-item-img-inner {
  display: flex; align-items: center; justify-content: center;
  min-height: 11rem; padding: 1.25rem 1rem;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem;
  box-sizing: border-box; text-decoration: none;
}
a.dl-item-img-inner { cursor: pointer; }
a.dl-item-img-inner:hover { border-color: #d1d5db; background: #f3f4f6; }
.dl-item-img-inner img {
  max-width: 100%; max-height: 13rem;
  width: auto; height: auto; object-fit: contain; object-position: center; display: block;
}
@media (min-width: 768px) {
  .dl-item-img-inner { min-height: 14rem; padding: 1.5rem 1.25rem; }
  .dl-item-img-inner img { max-height: 15rem; }
}
.dl-item-body { width: 100%; }
@media (min-width: 768px) { .dl-item-body { width: 66.667%; } }
.dl-item-title { color: #004b87; font-weight: 600; font-size: 1.125rem; margin-bottom: 1rem; }
.dl-link-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  color: #1f2937; text-decoration: none; margin-bottom: 1rem;
}
.dl-link-row:hover { text-decoration: underline; }
.dl-icon { color: #40b4a4; flex-shrink: 0; margin-top: 2px; }
.dl-icon svg { width: 1.25rem; height: 1.25rem; }
.dl-langs { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; margin-left: 2rem; }
.dl-lang-link { font-size: 0.875rem; color: #40b4a4; text-decoration: none; }
.dl-lang-link:hover { text-decoration: underline; }
.dl-note { font-size: 0.875rem; color: #4b5563; margin: 1rem 0; }
.dl-ext-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.dl-ext-link {
  display: flex; align-items: center;
  color: #40b4a4; font-size: 0.875rem; font-weight: 500;
  text-transform: uppercase; text-decoration: none;
}
.dl-ext-link:hover { color: #359d8f; text-decoration: none; }
.dl-ext-link svg { width: 1.25rem; height: 1.25rem; margin-left: 0.5rem; }

.tp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid #e5e7eb;
}
.tp-title { color: #004b87; font-weight: 500; }
.tp-link {
  display: flex; align-items: center;
  color: #40b4a4; font-size: 0.875rem; font-weight: 500;
  text-transform: uppercase; text-decoration: none; flex-shrink: 0;
}
.tp-link:hover { color: #359d8f; text-decoration: none; }
.tp-link svg { width: 1.25rem; height: 1.25rem; margin-left: 0.5rem; }

.ds-grid {
  display: grid; grid-template-columns: 1fr;
  column-gap: 3rem; row-gap: 4rem;
}
@media (min-width: 768px) { .ds-grid { grid-template-columns: repeat(3, 1fr); } }
.ds-grid-border { margin-bottom: 5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 4rem; }
.ds-card-title { color: #004b87; font-weight: 600; margin-bottom: 1rem; }
.ds-card-subtitle { font-size: 0.75rem; font-weight: 400; color: #6b7280; margin-top: 0.25rem; }
.ds-card-content { display: flex; gap: 1rem; }
.ds-card-img { width: 50%; }
.ds-card-links { width: 50%; font-size: 0.875rem; }
.ds-link-block { margin-bottom: 0.75rem; }
.ds-arrow-link { display: inline-flex; align-items: flex-start; gap: 0.5rem; text-decoration: none; }
.ds-arrow-link:hover { text-decoration: underline; }
.ds-arrow { color: #00a0b0; padding-top: 2px; flex-shrink: 0; }
.ds-link-text { color: #1f2937; }
.ds-langs-group {
  margin-top: 0.5rem; display: flex; flex-wrap: wrap;
  align-items: center; font-size: 0.75rem;
}
.ds-langs-group a { color: #00a0b0; text-decoration: none; }
.ds-langs-group a:hover { text-decoration: underline; }
.ds-langs-sep { margin: 0 0.4rem; color: #00a0b0; }
.ds-langs-list { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.75rem; }
.ds-langs-list a { color: #00a0b0; text-decoration: none; }
.ds-langs-list a:hover { text-decoration: underline; }
.ds-older-title { font-size: 1.5rem; font-weight: 300; color: #374151; margin-bottom: 2rem; }

/* Image 404 fallback */
.img-fallback-visible {
  position: relative;
}

.img-404-fallback {
  width: 100%;
  min-height: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  color: #4b5563;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
  border: 1px dashed #cbd5e1;
  box-sizing: border-box;
}

.img-404-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.img-404-code {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
