/* portfolio-embed.css - Premagic 3-col Categories, Category Tabs & Justified Gallery inside Evoque's portfolio.html */

.pm-portfolio-wrap {
  background-color: #ffffff;
  color: #1e293b;
  font-family: 'Source Sans Pro', 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pm-portfolio-wrap .hidden,
.pm-lightbox.hidden,
.pm-lightbox .hidden {
  display: none !important;
}

/* 1. Categories Auto-Sliding Carousel (3 cards on desktop, 2 on tablet, 1+peek on mobile) */
.pm-categories-section {
  padding: 40px 20px 36px;
  background-color: #ffffff;
}

.pm-categories-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
}

.pm-categories-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 16px;
  padding: 6px 2px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.pm-categories-grid::-webkit-scrollbar {
  display: none;
}

.pm-album-card {
  flex: 0 0 calc((100% - 32px) / 3);
  height: 230px;
  position: relative;
  border-radius: 4px;
  background-color: #ffffff;
  padding: 4px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.13);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  overflow: hidden;
  text-align: center;
  scroll-snap-align: start;
}

.pm-album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.pm-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.pm-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pm-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 40%, transparent 80%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.pm-card-title {
  color: #ffffff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* Ensure closed lead modal never intercepts clicks */
.evoque-lead-overlay:not(.is-active),
.evoque-lead-overlay:not(.is-active) * {
  pointer-events: none !important;
}

.scrolled header.header {
  z-index: 99;
}

/* 2. Category Tabs Bar (Hidden until scrolled to portfolio images, sits below site header) */
.pm-tabs-bar {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.pm-tabs-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pm-tabs-inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pm-tabs-scroll {
  display: flex;
  align-items: stretch;
  height: 56px;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.pm-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.pm-btn-slideshow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 5px;
  border: 1px solid #3a3939;
  background-color: transparent;
  color: #000000;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: color 300ms ease;
}

.pm-btn-slideshow svg,
.pm-btn-slideshow span {
  position: relative;
  z-index: 2;
}

.pm-btn-slideshow::after {
  position: absolute;
  content: "";
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: #3a3939;
  z-index: 1;
  transition: top 300ms ease;
}

.pm-btn-slideshow:hover {
  color: #ffffff;
}

.pm-btn-slideshow:hover::after {
  top: 0;
}

.pm-tab-btn {
  background: none;
  border: none;
  padding: 16px 0;
  height: 56px;
  font-family: 'Source Sans Pro', 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2px;
  line-height: 24px;
  text-transform: uppercase;
  color: rgb(64, 76, 89);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pm-tab-btn:hover {
  color: rgb(23, 35, 49);
}

.pm-tab-btn.active {
  color: rgb(23, 35, 49);
  font-weight: 600;
}

.pm-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgb(0, 110, 221);
}

/* 3. Justified Horizontal-Row Photo Gallery */
.pm-gallery-section {
  background-color: #ffffff;
  padding: 16px 0 60px;
}

.pm-gallery-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 16px;
}

.pm-photos-masonry {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pm-justified-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

/* 3b. Embedded YouTube Videos Grid */
.pm-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pm-video-card {
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pm-video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.pm-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.pm-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pm-video-frame:hover .pm-video-thumb {
  transform: scale(1.03);
}

.pm-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 40px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pm-video-frame:hover .pm-video-play {
  background: #dc2626;
  border-color: #dc2626;
  transform: translate(-50%, -50%) scale(1.08);
}

.pm-video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.pm-video-title {
  padding: 12px 14px;
  font-family: 'Open Sans', 'Source Sans Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .pm-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pm-videos-grid {
    grid-template-columns: 1fr;
  }
}

.pm-photo-item {
  position: relative;
  overflow: hidden;
  background-color: #f1f5f9;
  cursor: pointer;
  flex-shrink: 0;
}

.pm-photo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pm-photo-item:hover .pm-photo-img {
  transform: scale(1.02);
}

.pm-photo-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  transition: opacity 0.2s ease;
}

.pm-photo-item:hover .pm-photo-hover {
  opacity: 1;
}

.pm-photo-download {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.pm-photo-download:hover {
  background: #0073e6;
  transform: scale(1.1);
}

.pm-photo-download svg {
  width: 18px;
  height: 18px;
}

/* 4. Fullscreen Lightbox Modal */
.pm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.pm-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.96);
}

.pm-lightbox-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  color: #ffffff;
}

.pm-lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-lightbox-title {
  font-size: 15px;
  font-weight: 600;
}

.pm-lightbox-counter {
  font-size: 12px;
  color: #94a3b8;
}

.pm-lightbox-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-lightbox-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pm-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pm-lightbox-btn svg {
  width: 20px;
  height: 20px;
}

.pm-lightbox-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 24px;
  min-height: 0;
}

.pm-lightbox-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.pm-lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pm-lightbox-arrow svg {
  width: 24px;
  height: 24px;
}

.pm-lightbox-container {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.pm-lightbox-play-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(58, 57, 57, 0.75);
  color: #ffffff;
}

.pm-lightbox-play-btn:hover {
  background: #3a3939;
  border-color: #ffffff;
}

.pm-lightbox-play-btn.playing {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.pm-lightbox-progress {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.pm-lightbox-progress-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.1s linear;
}

.pm-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease;
}

.pm-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.pm-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease, border-radius 0.2s ease;
}

.pm-carousel-dot.active {
  width: 20px;
  border-radius: 4px;
  background-color: #1e293b;
}

@media (max-width: 1024px) {
  .pm-categories-container {
    max-width: 760px;
  }
  .pm-album-card {
    flex: 0 0 calc((100% - 16px) / 2);
  }
}

@media (max-width: 768px) {
  .pm-categories-section {
    padding: 24px 0 28px;
  }
  .pm-categories-grid {
    gap: 12px;
    padding: 4px 16px 8px;
  }
  .pm-album-card {
    flex: 0 0 82%;
    height: 210px;
    scroll-snap-align: center;
  }
  .pm-tabs-bar {
    top: 66px;
  }
  .pm-tabs-inner {
    gap: 10px;
    padding: 0 12px;
  }
  .pm-tabs-scroll {
    height: 46px;
    gap: 16px;
  }
  .pm-tab-btn {
    height: 46px;
    padding: 10px 0;
    font-size: 13px;
  }
  .pm-btn-slideshow {
    padding: 3px 8px;
    font-size: 9.5px;
    gap: 4px;
    letter-spacing: 0.2px;
    border-radius: 4px;
  }
  .pm-btn-slideshow svg {
    width: 8px;
    height: 8px;
  }
  .pm-lightbox-btn {
    width: 30px;
    height: 30px;
  }
  .pm-lightbox-btn svg {
    width: 14px;
    height: 14px;
  }
}
