/* story.php & story.view.php */

/* ==========================================================================
   §10 Story Page: Category Bar (Hashtags)
   ========================================================================== */

.story-category-bar {
  position: absolute;
  left: 0;
  width: 100%;
  top: var(--header-h-default, 94px);
  background-color: #fff;
  border-bottom: none;
  box-shadow: none;
  z-index: var(--z-header);
  transition: top 0.3s ease;
}
body.is-scrolled .story-category-bar {
  top: var(--header-h-scroll, 78px);
}
@media (max-width: 767px) {
  .story-category-bar {
    top: 78px;
  }
}
.story-tags-scroll {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
}
.story-tags-scroll::-webkit-scrollbar {
  display: none;
}
.story-tags-scroll.is-dragging {
  cursor: grabbing;
}
.story-tags-scroll.is-dragging .btn-story-tag {
  pointer-events: none;
}
.btn-story-tag {
  display: inline-flex;
  align-items: center;
  width: auto !important;
  padding: 0 16px;
  height: 30px;
  border-radius: 30px;
  background-color: #fff;
  color: #666;
  border: 1px solid #e1e1e1;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.btn-story-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
  border-color: #555;
  color: #333;
}
.btn-story-tag.active {
  border-color: #555 !important;
  color: #333 !important;
  font-weight: 700 !important;
  background-color: #fff !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   §11 Story Page: Bento Grid Layout
   ========================================================================== */

.story-list-wrap {
  padding-top: calc(var(--header-h-default) + 78px) !important;
  min-height: 100vh;
}
@media (max-width: 767px) {
  .story-list-wrap {
    padding-top: calc(132px + 12px) !important;
  }
}
.story-bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  grid-auto-rows: 320px;
  grid-auto-flow: dense;
}
@media (min-width: 768px) {
  .story-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .bento-wide {
    grid-column: span 2;
    grid-row: span 1;
  }
  .bento-tall {
    grid-column: span 1;
    grid-row: span 2;
  }
  .bento-std {
    grid-column: span 1;
    grid-row: span 1;
  }
}
@media (min-width: 1024px) {
  .story-bento-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    grid-auto-rows: 300px;
  }
}
@media (min-width: 1280px) {
  .story-bento-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    grid-auto-rows: 280px;
  }
}
.story-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff;
  border-radius: 24px;
  border: 1px solid #eaeaea;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none !important;
}
.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: #ddd;
}
.story-img-wrap {
  position: relative;
  width: 100%;
  flex-grow: 1;
  min-height: 140px;
  background-color: #f8f9fa;
  overflow: hidden;
}
.story-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.story-card:hover .story-img-wrap img {
  transform: scale(1.05);
}
.story-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2;
}
.story-badge-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 10;
  padding-right: 16px;
}
.story-badge {
  background-color: rgba(var(--primary-rgb), 0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}
.story-copy {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  margin: 0;
  word-break: keep-all;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}
@media (min-width: 768px) {
  .bento-wide .story-copy,
  .bento-tall .story-copy {
    font-size: 21px;
  }
}
.story-info {
  padding: 24px 20px 20px 20px;
  position: relative;
  flex-shrink: 0;
  background: #fff;
}
.story-spots-overlap {
  position: absolute;
  top: -18px;
  left: 20px;
  display: flex;
  align-items: center;
  z-index: 5;
}
.spot-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background-color: #eee;
}
.spot-thumb:first-child {
  margin-left: 0;
}
.spot-thumb-more {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -12px;
  background-color: #333;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.story-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-top: 4px;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ==========================================================================
   §12 Story View Page
   ========================================================================== */

.story-view-copy {
  font-size: 22px;
  font-weight: 400;
  color: #555;
  line-height: 1.5;
  word-break: keep-all;
}
@media (max-width: 767px) {
  .story-view-copy {
    font-size: 18px;
  }
}
.story-map-box {
  height: 360px;
  background-color: #eee;
}
.story-view-title {
  word-break: keep-all;
  padding-right: 10px;
  font-size: 24px !important;
}
.story-view-badge {
  font-size: 13px;
}
.btn-save-course {
  background-color: #ff4081;
  font-size: 16px;
  border: none;
  transition: all 0.2s;
}
.btn-save-course:hover {
  background-color: #e91e63;
  transform: translateY(-2px);
}
.story-editor-text {
  font-size: 15px;
  line-height: 1.6;
}
.story-card-title {
  flex: 1;
  font-size: 14px;
}
.course-timeline {
  position: relative;
  padding-left: 16px;
}
.course-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 12px;
  left: 5px;
  width: 2px;
  border-left: 2px dashed #dee2e6;
  z-index: 1;
}
.course-timeline .timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.course-timeline .timeline-item:last-child {
  padding-bottom: 0;
}
.course-timeline .timeline-item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: -16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid var(--primary-color);
  z-index: 2;
}
.course-scroll-area {
  max-height: 360px;
  overflow-y: auto;
}
.course-scroll-area::-webkit-scrollbar {
  width: 5px;
}
.course-scroll-area::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 10px;
}
.course-scroll-area::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 10px;
}
.course-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}
.badge-timeline {
  font-size: 11px;
}
.timeline-text {
  font-size: 14px;
}
.page-view .list-swiper-common .card-img-box {
  height: 180px !important;
}
.page-view .list-swiper-common .card-bg {
  height: 100% !important;
  padding-bottom: 0 !important;
}
.page-view .list-swiper-common .card-bg img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Map & Icon Colors
   ========================================================================== */

.story-view-wrap .map-control {
    top: 20px;
    right: 20px;
    pointer-events: auto;
}
.story-view-wrap .icon-trip {
    color: var(--trip-color);
}
.story-view-wrap .icon-stay {
    color: var(--stay-color);
}
.story-view-wrap .icon-dish {
    color: var(--dish-color);
}

/* ==========================================================================
   Timeline Badges
   ========================================================================== */

.story-view-wrap .badge-timeline.badge-trip {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--trip-color);
    border: 1px solid rgba(255, 152, 0, 0.25);
}
.story-view-wrap .badge-timeline.badge-stay {
    background-color: rgba(0, 166, 147, 0.1);
    color: var(--stay-color);
    border: 1px solid rgba(0, 166, 147, 0.25);
}
.story-view-wrap .badge-timeline.badge-dish {
    background-color: rgba(255, 0, 255, 0.1);
    color: var(--dish-color);
    border: 1px solid rgba(255, 0, 255, 0.25);
}
.story-view-wrap .timeline-item .bi-chevron-right {
    font-size: 10px;
}
/* ==========================================================================
   Check List Links
   ========================================================================== */

.story-view-wrap .check-list a.rounded-pill {
    font-size: 13px;
    transition: all 0.2s ease;
}
.story-view-wrap .check-list a.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Coupon Action Buttons
   ========================================================================== */

.btn-coupon-primary {
    background-color: #ff00ff;
    font-size: 16px;
    border: none;
    color: #fff;
}
.btn-coupon-primary:hover,
.btn-coupon-primary:focus,
.btn-coupon-primary:active {
    background-color: #cc00cc;
    border: none;
    color: #fff;
}


