/* ============================================================
   CANON — Cinematic Mixed-Ratio Gallery System
   Video = 16:9, Music = Square
   Frosted title bar + raised progress bar
============================================================ */

/* Section wrapper */
.gallery-block {
  margin: 3rem 0;
  width: 100%;
}

.gallery-block h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.45rem;
  font-weight: 600;
}

/* Row container with arrows */
.gallery-wrapper {
  position: relative;
  width: 92%;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

/* Horizontal scroll region */
.gallery-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0 1rem;
  width: 100%;
  scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   CARD BASE
============================================================ */

.gallery-card {
  flex: 0 0 auto;
  border-radius: 22px;
  overflow: hidden;

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.16);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.32);
}

/* Video & Audio sizes */
.card-video {
  width: 440px;
  height: 248px;
}

.card-audio {
  width: 248px;
  height: 248px;
}

@media (max-width: 1200px) {
  .card-video {
    width: 380px;
    height: 214px;
  }

  .card-audio {
    width: 230px;
    height: 230px;
  }
}

/* ============================================================
   THUMBNAIL LAYER
============================================================ */

.thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   TITLE BAR (Frosted) — NO FLUTTER
============================================================ */

.title-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 40px;
  padding: 0 14px;

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

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);

  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;

  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);

  overflow: hidden;
  z-index: 2;
}

.title-bar .title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

/* ============================================================
   PROGRESS BAR (Raised)
============================================================ */

.progress-bar {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  width: 88%;
  height: 7px;

  background: rgba(255,255,255,0.22);
  border-radius: 7px;
  overflow: hidden;

  box-shadow:
    0 1px 3px rgba(0,0,0,0.25),
    inset 0 0 3px rgba(255,255,255,0.25);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.9),
    rgba(255,255,255,1)
  );
  border-radius: 7px;
  box-shadow:
    0 0 4px rgba(255,255,255,0.8),
    0 0 6px rgba(255,255,255,0.6);
  transition: width 0.35s ease;
}

/* ============================================================
   ARROWS
============================================================ */

.gallery-arrow {
  position: absolute;
  z-index: 100;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;

  border-radius: 50%;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;

  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(255,255,255,0.20);
  color: var(--text-color);

  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.30);

  transition: transform 0.25s ease;
}

.gallery-arrow.left  { left: -28px; }
.gallery-arrow.right { right: -28px; }

.gallery-arrow:hover {
  transform: translateY(-50%) scale(1.12);
}

@media (max-width: 600px) {
  .gallery-arrow { display: none; }
}

/* ============================================================
   THEME OVERRIDES
============================================================ */

body.night .title-bar {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  color: rgba(255,255,255,0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

body.day .title-bar {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  color: rgba(0,0,0,0.90);
  box-shadow: none;
}

body.night .progress-bar {
  background: rgba(255,255,255,0.24);
}

body.day .progress-bar {
  background: rgba(255,255,255,0.18);
}