/* Custom Cinema Gallery for Elementor */

.ccge-cinema-gallery,
.ccge-cinema-gallery * {
  box-sizing: border-box;
}

.ccge-cinema-gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: #fff;

  border-radius: 10px;
}

.ccge-cinema-grid {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  grid-auto-rows: 220px;
  gap: 22px;
}

.ccge-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #151515;
  animation: ccge-breathe 8s ease-in-out infinite alternate;
  transition: transform 0.6s ease, filter 0.6s ease;
  isolation: isolate;
}

.ccge-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.22), transparent 40%);
  pointer-events: none;
}

.ccge-frame img,
.ccge-frame video,
.ccge-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 1.2s ease, filter 1.2s ease;
  filter: brightness(0.95) saturate(0.96);
}

.ccge-frame:hover img,
.ccge-frame:hover video {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.02);
}

.ccge-hero {
  grid-column: span 2;
  grid-row: span 2;
  animation-delay: 0s;
}

.ccge-vertical {
  grid-row: span 2;
  animation-delay: 2s;
}

.ccge-square {
  animation-delay: 4s;
}

.ccge-wide {
  grid-column: span 2;
  animation-delay: 1s;
}

.ccge-meta {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ccge-meta span {
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
}

@keyframes ccge-breathe {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-6px);
  }
}

.ccge-ambient-line {
  position: absolute;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.04), transparent);
  z-index: 0;
  pointer-events: none;
}

.ccge-line-1 {
  width: 1px;
  height: 100%;
  left: 38%;
  top: 0;
}

.ccge-line-2 {
  width: 1px;
  height: 100%;
  right: 28%;
  top: 0;
}

.ccge-no-motion .ccge-frame {
  animation: none;
}

.ccge-no-hover-zoom .ccge-frame:hover img,
.ccge-no-hover-zoom .ccge-frame:hover video {
  transform: none;
  filter: brightness(0.95) saturate(0.96);
}

.ccge-placeholder,
.ccge-editor-empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.55);
  background: #151515;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .ccge-cinema-gallery {
    overflow: visible;
  }

  .ccge-cinema-grid {
    min-height: auto;
    padding: 18px;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .ccge-hero,
  .ccge-vertical,
  .ccge-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .ccge-frame {
    min-height: 260px;
  }

  .ccge-frame img,
  .ccge-frame video,
  .ccge-media {
    height: 100%;
    min-height: 260px;
  }
}

@media (max-width: 600px) {
  .ccge-cinema-grid {
    padding: 14px;
    gap: 14px;
  }

  .ccge-frame {
    min-height: 220px;
    border-radius: 18px;
  }

  .ccge-frame img,
  .ccge-frame video,
  .ccge-media {
    min-height: 220px;
  }

  .ccge-meta {
    left: 14px;
    bottom: 14px;
  }

  .ccge-meta span {
    font-size: 0.62rem;
    letter-spacing: 1.5px;
  }
}
