@media screen and (max-width: 767px) {
  .brand-history-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

 .border-text-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }

  .marquee {
    font-size: 0.65rem; /* Smaller text for mobile */
    letter-spacing: 0.1em;
    word-spacing: 0.5em;
    white-space: nowrap;
    overflow: hidden;
    color: #c9a368;
    opacity: 0.4;
  }

  .border-top,
  .border-bottom {
    width: 100%;
   
    overflow: hidden;
    border-width: 0.5px;
  }

  .border-top {
    position: absolute;
    top: 0;
    left: 0;
    border-top: 1px solid #c9a368;
  }

  .border-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    border-bottom: 1px solid #c9a368;
  }

  .border-left,
  .border-right {
    opacity: 50%; /* Hides side borders for clean mobile view */
  }

  .border-top span,
  .border-bottom span {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-horizontal 14s linear infinite;
  }

  .border-bottom span {
    animation-direction: reverse;
  }
  .brand-history-container {
    order: 1;
    width: 90%;
  transform: translateX(-20%);
    
    padding: 1rem;
    
  }

  .brand-image-center {
    order: 2;
    position: static;
    transform: none;
    margin: 1rem 0;
    width: 80%;
  }

  .brand-image-wrapper {
    width: 100%;
  }

  .vertical-catchcopy {
    order: 3;
    position: static;
    transform: none;
    margin: 1rem 0;
    text-align: center;
  }

  .vertical-text {
    writing-mode: horizontal-tb;
    font-size: 1.3rem;
  }

  .year-count {
    font-size: 2rem;
    padding-bottom: 0;
  }

  .year-count span {
    font-size: 2.5rem;
  }
 .timeline-wrapper {
    order: 4;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0.5rem;
    box-sizing: border-box;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: flex-start;
  }
/* Arrow hint (added via ::after pseudo-element) */
.timeline-wrapper::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #aaa;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

/* Show arrow when active */
.timeline-wrapper.scroll-hint-active::after {
  opacity: 1;
  animation: arrowBounce 1.5s ease-in-out 2; /* play twice then stop */
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-8px);
  }
}

/* Ensure relative positioning for wrapper */
.timeline-wrapper {
  position: relative;
}


  .timeline {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    min-width: 100%;
  }

  .timeline-event {
    flex: 0 0 48%; /* Almost half of wrapper width */
    max-width: 48%;
    scroll-snap-align: start;
    box-sizing: border-box;
  }

  .timeline-wrapper::-webkit-scrollbar {
    display: none;
  }
.timeline::before,.timeline::after,
.brand-history-fullimage,
.brand-history-centered-text,
.brand-history-overlay {
  display: none !important;
}

}

/* Default: hide everything on PC */
.mobile-only-photo {
  display: none;
}

@media screen and (max-width: 768px) {
  .mobile-only-photo {
    order: 6;
    display: block;
    position: relative;
    overflow: hidden;
    max-height: 30vh;
    transition: max-height 0.5s ease;
    cursor: pointer;
  }

  .mobile-only-photo.expanded {
    max-height: 100vh;
  }

  .mobile-only-photo img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Blurred bottom fade */
  .mobile-only-photo::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 50%;
    width: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 50%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(2px);
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .mobile-only-photo.expanded::after {
    opacity: 0;
  }

  .click-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: #1a1a1a;
  font-size: 0.95rem;
  font-weight: 500;
 
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: breathePulse 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.4s ease;
  opacity: 1;
}

/* Hide when clicked (expanded) */
.mobile-only-photo.expanded .click-hint {
  opacity: 0;
}

/* Breathing animation */
@keyframes breathePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    opacity: 0.85;
  }
}
  .timeline-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
  }

  .bubble {
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 1.1rem;
  }

  .label {
    font-size: 0.85rem;
    text-align: center;
  }
}
