/* ── OneDrive Gallery ─────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

.odg-gallery-wrap {
  --odg-gap:      12px;
  --odg-radius:   6px;
  --odg-accent:   #1a1a2e;
  --odg-caption:  #555;
  --odg-overlay:  rgba(0,0,0,.45);
  --odg-duration: .3s;
  margin: 2rem 0;
  font-family: 'DM Sans', sans-serif;
}

.odg-gallery-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--odg-accent);
  margin: 0 0 1.25rem;
  letter-spacing: -.02em;
}

/* ── Grid ───────────────────────────────────────────────────────────── */

.odg-grid {
  display: grid;
  gap: var(--odg-gap);
}

.odg-cols-1 { grid-template-columns: 1fr; }
.odg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.odg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.odg-cols-4 { grid-template-columns: repeat(4, 1fr); }
.odg-cols-5 { grid-template-columns: repeat(5, 1fr); }
.odg-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
  .odg-cols-4,
  .odg-cols-5,
  .odg-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .odg-grid   { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 400px) {
  .odg-grid   { grid-template-columns: 1fr !important; }
}

/* ── Items ──────────────────────────────────────────────────────────── */

.odg-item {
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--odg-radius);
  cursor: pointer;
  background: #e8e8e8;
  aspect-ratio: 1 / 1;
}

.odg-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--odg-duration) ease, filter var(--odg-duration) ease;
}

.odg-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--odg-duration) ease, transform var(--odg-duration) ease;
}

.odg-item:hover img        { transform: scale(1.05); filter: brightness(.9); }
.odg-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* ── Notices ────────────────────────────────────────────────────────── */

.odg-notice {
  padding: 12px 16px;
  border-left: 4px solid #0073aa;
  background: #f0f6fc;
  border-radius: 0 4px 4px 0;
  font-size: .9rem;
}
.odg-notice.odg-error { border-color: #d63638; background: #fcf0f1; }

/* ── Lightbox ───────────────────────────────────────────────────────── */

.odg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 10, 18, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}

.odg-lightbox:not([hidden]) { display: flex; }
.odg-lightbox[hidden]        { display: none; }
.odg-lightbox.odg-lb-visible { opacity: 1; }

.odg-lb-inner {
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.odg-lb-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 60px rgba(0,0,0,.6);
  transition: opacity .2s ease;
}

.odg-lb-caption {
  color: rgba(255,255,255,.65);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  margin: 12px 0 0;
  text-align: center;
  letter-spacing: .04em;
}

.odg-lb-close,
.odg-lb-prev,
.odg-lb-next {
  position: fixed;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s;
  line-height: 1;
}

.odg-lb-close {
  top: 18px; right: 18px;
  width: 42px; height: 42px;
  font-size: 1.5rem;
}

.odg-lb-prev,
.odg-lb-next {
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
}

.odg-lb-prev { left: 18px; }
.odg-lb-next { right: 18px; }

.odg-lb-close:hover,
.odg-lb-prev:hover,
.odg-lb-next:hover { background: rgba(255,255,255,.2); }
