/**
 * Japan Awaits — Category Highlights Carousel & Lightbox CSS
 */

.ja-cat-highlights-section {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ja-cat-highlights-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Category Row */
.ja-cat-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/* Row Header */
.ja-cat-row-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.ja-cat-row-info {
  flex: 1;
  min-width: 0;
}

.ja-cat-row-title {
  margin: 0 0 4px 0;
  font-weight: 700;
  color: #0f2942;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ja-cat-row-subtitle {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

/* Header Carousel Arrows */
.ja-cat-row-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ja-cat-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ja-cat-nav-btn:hover {
  background-color: #f8fafc;
  color: #0f2942;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.ja-cat-nav-btn:active {
  transform: translateY(0);
}

.ja-cat-nav-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.ja-cat-nav-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Cards Carousel Track */
.ja-cat-track-container {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.ja-cat-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 4px 2px 4px 2px;
  margin: 0;
}

.ja-cat-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Individual Card */
.ja-cat-card {
  position: relative;
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 250px;
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
  scroll-snap-align: start;
  cursor: pointer;
  background-color: #1e293b;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ja-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.ja-cat-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.ja-cat-card:hover .ja-cat-card-img {
  transform: scale(1.06);
}

/* Card Gradient Overlay */
.ja-cat-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.15) 30%, rgba(15, 23, 42, 0.65) 60%, rgba(15, 23, 42, 0.95) 100%);
  pointer-events: none;
  transition: background 0.3s ease;
}

.ja-cat-card:hover .ja-cat-card-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.25) 30%, rgba(15, 23, 42, 0.75) 60%, rgba(15, 23, 42, 0.98) 100%);
}

/* Zoom hint icon in top right */
.ja-cat-card-zoom-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.ja-cat-card-zoom-icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
}

.ja-cat-card:hover .ja-cat-card-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Card Content / Text */
.ja-cat-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px 10px 14px;
  z-index: 2;
  box-sizing: border-box;
}

.ja-cat-card-title {
  margin: 0 0 3px 0 !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.32 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.75) !important;
  word-break: break-word !important;
}

.ja-cat-card-subtitle,
p.ja-cat-card-subtitle {
  margin: 0 !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  line-height: 1.38 !important;
  opacity: 0.96 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.85) !important;
  word-break: break-word !important;
  letter-spacing: 0.01em;
}

/* Responsive Grid / Cards */
@media (max-width: 1200px) {
  .ja-cat-card {
    flex: 0 0 calc((100% - 40px) / 3);
  }
}

@media (max-width: 768px) {
  .ja-cat-card {
    flex: 0 0 calc((100% - 20px) / 2);
    min-width: 220px;
  }
  .ja-cat-row-header {
    align-items: center;
  }
}

@media (max-width: 520px) {
  .ja-cat-card {
    flex: 0 0 82%;
    min-width: 240px;
  }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* LIGHTBOX MODAL POPUP                                                       */
/* ────────────────────────────────────────────────────────────────────────── */
.ja-cat-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(9, 14, 26, 0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  box-sizing: border-box;
  padding: 20px;
}

.ja-cat-lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Top bar: counter & close */
.ja-cat-lightbox-topbar {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.ja-cat-lightbox-counter {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}

.ja-cat-lightbox-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
  font-size: 20px;
  line-height: 1;
}

.ja-cat-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.85);
  transform: rotate(90deg);
}

/* Lightbox Content Container */
.ja-cat-lightbox-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
  box-sizing: border-box;
}

.ja-cat-lightbox-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(85vh - 70px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ja-cat-lightbox-img {
  max-width: 100%;
  max-height: calc(85vh - 70px);
  object-fit: contain;
  border-radius: 12px;
  display: block;
  user-select: none;
  animation: jaLightboxFadeIn 0.25s ease;
}

@keyframes jaLightboxFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Caption bar at bottom of lightbox */
.ja-cat-lightbox-caption {
  margin-top: 14px;
  text-align: center;
  max-width: 680px;
}

.ja-cat-lightbox-caption-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 2px;
}

.ja-cat-lightbox-caption-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 3px 0;
  line-height: 1.35;
}

.ja-cat-lightbox-caption-sub {
  font-size: 14px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.45;
}

/* Previous & Next Lightbox Nav Buttons */
.ja-cat-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.ja-cat-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  transform: translateY(-50%) scale(1.08);
}

.ja-cat-lightbox-nav--prev {
  left: 24px;
}

.ja-cat-lightbox-nav--next {
  right: 24px;
}

.ja-cat-lightbox-nav svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
}

@media (max-width: 768px) {
  .ja-cat-lightbox-nav {
    width: 42px;
    height: 42px;
  }
  .ja-cat-lightbox-nav--prev {
    left: 10px;
  }
  .ja-cat-lightbox-nav--next {
    right: 10px;
  }
  .ja-cat-lightbox-caption-title {
    font-size: 16px;
  }
  .ja-cat-lightbox-caption-sub {
    font-size: 13px;
  }
}
