/* ============================================
   TRAVELOGUE SINGLE PAGE CSS
   Dispatch Studio / R. Scott Davis
   v3.1 - Pixel-perfect Figma match
============================================ */

:root {
  --color-header-bg: #121212;
  --color-body-bg: #323232;
  --color-brand-yellow: #ebe545;
  --color-yellow-muted: #cbc300;
  --color-text-primary: #ffffff;
  --color-text-secondary: #8e8e8e;
  --font-heading: 'NB Architekt Std', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-label: 'NB Typewriter Pro', monospace;
  --spacing-horizontal: 80px;
  --spacing-section-gap: 120px;
  --max-width: 1440px;
}

/* ============================================
   WRAPPER & GENERAL
============================================ */

.travelogue-single-wrapper {
  background-color: var(--color-body-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-section-gap);
}

/* ============================================
   HEADER SECTION
============================================ */

.travelogue-single-header {
  background-color: var(--color-header-bg);
  padding: 116px var(--spacing-horizontal) 48px var(--spacing-horizontal);
}

.travelogue-single-header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Breadcrumb */
.travelogue-single-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-family: var(--font-label);
  color: var(--color-text-secondary);
}

.travelogue-single-breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-family: var(--font-heading);
  font-weight: 300;
}

.travelogue-single-breadcrumb a:hover {
  color: var(--color-brand-yellow);
}

.breadcrumb-separator {
  color: var(--color-text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}

.breadcrumb-current {
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-weight: 300;
}

/* Title */
.travelogue-single-title {
  font-size: 56px;
  font-weight: 400;
  font-family: var(--font-heading);
  color: var(--color-brand-yellow);
  margin: 0;
  line-height: 68px;
}

/* Subtitle: Location and Date */
.travelogue-single-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 845px;
  font-size: 16px;
  font-family: var(--font-label);
  color: var(--color-text-primary);
  letter-spacing: -0.48px;
  line-height: 20px;
}

.travelogue-single-location {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 628px;
}

.travelogue-single-location svg {
  color: var(--color-text-primary);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0;
}

.travelogue-single-date {
  display: flex;
  align-items: flex-start;
  white-space: nowrap;
}

/* Share Icons in Header */
.travelogue-single-share-header {
  display: flex;
  gap: 18px;
  align-items: center;
}

.travelogue-single-share-header .social-icon-wrapper{
  width: 24px;
  height: 24px;
}

.travelogue-single-share-header .hover-frame {
  width: 40px;
  height: 40px;
}

.share-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 14px;
  white-space: nowrap;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  font-size: 0;
  font-family: inherit;
}

.share-icon:hover {
  color: var(--color-brand-yellow);
}

.share-icon svg {
  width: 24px;
  height: 24px;
}

.share-icon.copy-link {
  color: var(--color-text-primary);
}

.share-icon.copy-link:hover {
  color: var(--color-brand-yellow);
}

.share-icon.copied {
  color: var(--color-brand-yellow);
}

/* ============================================
   HERO IMAGE
============================================ */

.travelogue-single-hero {
  width: 100%;
  height: 763px;
  overflow: hidden;
  background: var(--color-header-bg);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   MAIN CONTENT WRAPPER
============================================ */

.travelogue-single-content-wrapper {
  padding: 0 var(--spacing-horizontal);
}

.travelogue-single-content-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 96px;
  align-items: flex-start;
}

/* ============================================
   SIDEBAR
============================================ */

.travelogue-single-sidebar {
  width: 339px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  gap: 60px;
}

/* Intro Quote at TOP */
.sidebar-intro-quote {
  display: flex;
  flex-direction: column;
}

.intro-quote-text {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 400;
  color: var(--color-yellow-muted);
  line-height: 30px;
  margin: 0;
}

/* Share Section at BOTTOM */
.sidebar-share-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 71px;
  position: sticky;
  top: 0;
}

.sidebar-share-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 14px;
  margin: 0;
  white-space: nowrap;
}

.sidebar-share-icons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.sidebar-share-icons .social-icon-wrapper {
  width: 48px;
  height: 48px;
}

/* ============================================
   MAIN CONTENT
============================================ */

.travelogue-single-main {
  flex: 1;
  max-width: 844px;
  min-width: 0;
}

.travelogue-single-body-content {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 24px;
  color: var(--color-text-primary);
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.travelogue-single-body-content h2,
.travelogue-single-body-content h3,
.travelogue-single-body-content h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin: 0;
  color: var(--color-text-primary);
}

.travelogue-single-body-content h2 {
  font-size: 32px;
  line-height: 40px;
}

.travelogue-single-body-content h3 {
  font-size: 24px;
  line-height: 30px;
}

.travelogue-single-body-content p {
  margin: 0;
}

.travelogue-single-body-content ul,
.travelogue-single-body-content ol {
  margin: 0;
  padding-left: 24px;
}

.travelogue-single-body-content li {
  margin-bottom: 8px;
}

.travelogue-single-body-content a {
  color: var(--color-brand-yellow);
  text-decoration: none;
  transition: color 0.3s ease;
}

.travelogue-single-body-content a:hover {
  text-decoration: underline;
}

/* ============================================
   GALLERY SECTION
============================================ */

.travelogue-gallery-section {
  padding: 0 var(--spacing-horizontal);
}

.travelogue-gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-image {
  width: 100%;
  height: 275px;
  object-fit: contain;
  display: block;
}

.gallery-caption {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: normal;
}

/* ============================================
   MAP SECTION
============================================ */

.travelogue-single-map-section {
  padding: 0 var(--spacing-horizontal);
}

.travelogue-single-map-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 456px;
  border-radius: 0;
  overflow: hidden;
  background: var(--color-header-bg);
}

.travelogue-single-map-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.travelogue-single-map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   VIDEO SECTION
============================================ */

.content-block-video {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  height: 556px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.content-block-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Dark overlay shown before playback. `pointer-events: none` lets clicks fall through to the play button. */
.content-block-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
  pointer-events: none;
}

/* Full-area invisible button so clicking anywhere on the video starts playback. */
.content-block-video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.content-block-video-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' fill='none'%3E%3Crect width='48' height='48' fill='%23EBE545'/%3E%3Cpath d='M16 10.2812V38.2812L38 24.2813L16 10.2812Z' fill='black'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
}

.content-block-video-play:hover::after {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Once playback starts, hide the overlay and the custom button so native controls take over. */
.content-block-video.is-playing::before,
.content-block-video.is-playing .content-block-video-play {
  display: none;
}

/* ============================================
   MAP SECTION (Google Maps)
============================================ */

.content-block-map {
  width: 100%;
  padding: 0 var(--spacing-horizontal);
}

.content-block-map.is-grayscale iframe {
    filter: grayscale(100%) invert(5%) contrast(90%);
    transition: filter 0.3s ease;
}

.content-block-map iframe {
  width: 100%;
  height: 357px;
  border: none;
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
}

.content-block-map img {
  width: 100%;
  height: 357px;
  object-fit: cover;
  display: block;
}

/* ============================================
   MORE TRAVELOGUES SECTION
============================================ */

.travelogue-more-section {
  padding: 0 var(--spacing-horizontal) 120px var(--spacing-horizontal);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.travelogue-more-header {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.travelogue-more-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  color: var(--color-brand-yellow);
  margin: 0;
  line-height: 58px;
}

/* Carousel Controls - BELOW carousel, right-aligned */
.travelogue-carousel-controls {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-brand-yellow);
  color: var(--color-header-bg);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
  padding: 0;
}

.carousel-btn:hover {
  background: var(--color-brand-yellow);
  opacity: 0.9;
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
}

/* .carousel-btn.carousel-prev svg {
  transform: rotate(180deg);
} */

/* ============================================
   CAROUSEL
============================================ */

.travelogue-carousel-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.travelogue-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: clip;
  scroll-behavior: smooth;
  padding: 0;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.travelogue-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  flex: 0 0 628px;
  display: flex;
  gap: 24px;
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.carousel-card:hover {
  opacity: 0.9;
}

.carousel-card-image {
  width: 302px;
  height: 230px;
  overflow: hidden;
  background: #d9d9d9;
  flex-shrink: 0;
}

.carousel-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-card:hover .carousel-card-image img {
  transform: scale(1.05);
}

.carousel-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  height: 230px;
}

.carousel-card-content > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carousel-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 25px;
}

.carousel-card-description {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 25px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.carousel-card-location {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 15px;
}

/* ============================================
   RESPONSIVE: 1024px
============================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-horizontal: 60px;
  }

  .travelogue-single-title {
    font-size: 48px;
    line-height: 58px;
  }

  .travelogue-single-meta {
    width: 100%;
  }

  .travelogue-single-hero {
    height: 600px;
  }

  .travelogue-single-content-inner {
    gap: 48px;
  }

  .travelogue-single-sidebar {
    width: 280px;
  }

  .travelogue-single-main {
    max-width: none;
  }

  .travelogue-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .gallery-image {
    height: 220px;
  }

  .carousel-card {
    flex: 0 0 520px;
  }

  .carousel-card-image {
    width: 240px;
    height: 200px;
  }

  .carousel-card-content {
    height: 200px;
  }
}

/* ============================================
   RESPONSIVE: 768px
============================================ */

@media (max-width: 768px) {
  :root {
    --spacing-horizontal: 40px;
    --spacing-section-gap: 80px;
  }

  .travelogue-single-header {
    padding: 80px var(--spacing-horizontal) 40px var(--spacing-horizontal);
  }

  .travelogue-single-breadcrumb {
    gap: 8px;
    font-size: 14px;
  }

  .travelogue-single-title {
    font-size: 36px;
    line-height: 44px;
  }

  .travelogue-single-meta {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .travelogue-single-location {
    width: 100%;
  }

  .travelogue-single-hero {
    height: 400px;
  }

  .travelogue-single-content-inner {
    flex-direction: column;
    gap: 40px;
  }

  .travelogue-single-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .sidebar-intro-quote {
    flex: 1;
  }

  .sidebar-share-section {
    position: static;
    flex-direction: row;
    width: auto;
    gap: 12px;
    align-items: center;
  }

  .sidebar-share-icons {
    flex-direction: row;
    gap: 12px;
  }

  .travelogue-single-main {
    width: 100%;
    max-width: none;
  }

  .travelogue-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .gallery-image {
    height: 200px;
  }

  .gallery-caption {
    font-size: 16px;
  }

  .travelogue-single-map-container {
    height: 350px;
  }

  .travelogue-more-section {
    gap: 32px;
  }

  .travelogue-more-title {
    font-size: 36px;
    line-height: 44px;
  }

  .carousel-card {
    flex: 0 0 100%;
  }

  .carousel-card-image {
    width: 200px;
    height: 180px;
  }

  .carousel-card-content {
    height: 180px;
  }
}

/* ============================================
   RESPONSIVE: 480px
============================================ */

@media (max-width: 480px) {
  :root {
    --spacing-horizontal: 20px;
    --spacing-section-gap: 60px;
  }

  .travelogue-single-header {
    padding: 60px var(--spacing-horizontal) 30px var(--spacing-horizontal);
  }

  .travelogue-single-breadcrumb {
    gap: 6px;
    font-size: 12px;
  }

  .travelogue-single-title {
    font-size: 28px;
    line-height: 36px;
  }

  .travelogue-single-meta {
    gap: 8px;
    font-size: 12px;
  }

  .travelogue-single-hero {
    height: 280px;
  }

  .travelogue-single-sidebar {
    flex-direction: column;
    gap: 24px;
  }

  .intro-quote-text {
    font-size: 18px;
    line-height: 24px;
  }

  .sidebar-share-section {
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
  }

  .sidebar-share-icons {
    flex-direction: row;
    gap: 8px;
  }

  .sidebar-share-icon {
    width: 40px;
    height: 40px;
  }

  .travelogue-single-body-content {
    font-size: 16px;
    line-height: 22px;
    gap: 16px;
  }

  .travelogue-single-body-content h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .travelogue-single-body-content h3 {
    font-size: 18px;
    line-height: 24px;
  }

  .travelogue-gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-image {
    height: auto;
    max-height: 250px;
  }

  .gallery-caption {
    font-size: 14px;
  }

  .travelogue-single-map-container {
    height: 250px;
  }

  .travelogue-more-section {
    gap: 24px;
    padding-bottom: 60px;
  }

  .travelogue-more-title {
    font-size: 24px;
    line-height: 32px;
  }

  .carousel-card {
    flex: 0 0 100%;
    flex-direction: column;
  }

  .carousel-card-image {
    width: 100%;
    height: 180px;
  }

  .carousel-card-content {
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }

  .carousel-card-title {
    font-size: 16px;
    line-height: 20px;
  }

  .carousel-card-description {
    font-size: 14px;
    line-height: 20px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
============================================ */

@media (prefers-reduced-motion: reduce) {
  .travelogue-single-body-content a,
  .share-icon,
  .sidebar-share-icon,
  .carousel-btn,
  .carousel-card,
  .carousel-card-image img,
  .travelogue-carousel,
  .travelogue-single-breadcrumb a {
    transition: none;
    transform: none;
  }
}

/* ============================================
   PRINT STYLES
============================================ */

@media print {
  .travelogue-single-share-header,
  .sidebar-share-section,
  .travelogue-carousel-controls,
  .travelogue-more-section {
    display: none;
  }

  .travelogue-single-header {
    page-break-after: avoid;
  }

  .travelogue-single-hero {
    page-break-inside: avoid;
  }
}

/* ---- Video Player ---- */
.content-block-video {
    width: 100%;
    margin: 40px auto;
}

.travelogue-video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 4px;
    outline: none;
}

.content-block-video video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.7);
}


/* ---- Responsive Video Iframe Wrapper (YouTube / Vimeo) ---- */
.video-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    background: #000;
    border-radius: 4px;
}

.video-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
