/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --color-text-main: #2d3748;
  --color-text-muted: #718096;
  --color-bg-light: #f7fafc;
  --color-white: #ffffff;
  
  --color-accent-blue: #4299e1;
  --color-accent-purple: #9f7aea;
  --color-accent-pink: #ed64a6;
  --color-accent-orange: #ed8936;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(159, 122, 234, 0.3);
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-pill: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --day1-grad: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  --day2-grad: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  --day3-grad: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow: hidden; /* Prevent scrolling on body, manage in slide container */
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
}

.header-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-main);
}

.header-nav {
  display: flex;
  gap: 16px;
}

.nav-dot {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--border-radius-pill);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.nav-dot:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-dot.active {
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Slides Container
   ========================================================================== */
.slides-container {
  display: flex;
  width: 300vw; /* 3 slides */
  height: 100vh;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.slide {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 60px; /* Header space */
  padding-bottom: 80px; /* Controls space */
}

/* Scrollbar styling */
.slide::-webkit-scrollbar {
  width: 6px;
}
.slide::-webkit-scrollbar-track {
  background: transparent;
}
.slide::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 20px;
}

.slide-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* Slide Specific Backgrounds */
.slide--day1 .slide-bg-gradient { background: var(--day1-grad); }
.slide--day2 .slide-bg-gradient { background: var(--day2-grad); }
.slide--day3 .slide-bg-gradient { background: var(--day3-grad); }

.slide-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ==========================================================================
   Typography & Cards
   ========================================================================== */
.day-title-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.day-number {
  font-family: 'Outfit', sans-serif;
  color: var(--color-accent-purple);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.day-num-big {
  font-size: 2.5rem;
  line-height: 1;
}

.day-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--color-text-main);
}

.day-subtitle {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 0;
}

/* Main timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 79px; /* Center for icon alignment */
  width: 2px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  position: relative;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.timeline-time {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-main);
  width: 65px;
  text-align: right;
  flex-shrink: 0;
  padding-top: 18px;
}

.timeline-icon {
  width: 32px;
  height: 32px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  position: absolute;
  left: 64px; /* Centers exactly over the line (79px) */
  top: 14px;
  z-index: 2;
  border: 2px solid #fff;
}

.timeline-card {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  margin-left: 45px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.timeline-item:hover .timeline-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timeline-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Highlighted Timeline Item (Fes, Meals, etc.) */
.timeline-item--highlight .timeline-card {
  background: var(--color-white);
  border: 2px solid rgba(159, 122, 234, 0.3); /* Purple tint border */
  box-shadow: var(--shadow-glow);
}

.timeline-item--highlight .timeline-icon {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: var(--shadow-md);
}

/* Card Actions (Maps/Calendar buttons) */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--border-radius-pill);
  text-decoration: none;
  background: var(--color-bg-light);
  color: var(--color-text-main);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.map-btn:hover {
  background: var(--color-accent-blue);
  color: var(--color-white);
  border-color: var(--color-accent-blue);
}

/* ==========================================================================
   Illustrations
   ========================================================================== */
.day-illustration {
  margin-top: 20px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  padding: 10px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.day-illustration.aos-animate {
  opacity: 1;
  transform: scale(1);
}

.day-illustration img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  display: block;
}

.illustration-caption {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-main);
  padding: 12px 10px 4px;
}

/* ==========================================================================
   Navigation Controls (Bottom)
   ========================================================================== */
.slide-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 10px 20px;
  border-radius: var(--border-radius-pill);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.slide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text-main);
  background: transparent;
  transition: all var(--transition-fast);
}

.slide-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-accent-purple);
}

.slide-btn:active {
  transform: scale(0.95);
}

.slide-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.slide-counter {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 60px;
  text-align: center;
}

.current-slide {
  color: var(--color-accent-purple);
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */
.progress-bar {
  position: fixed;
  top: 60px; /* Below header */
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 99;
}

.progress-fill {
  height: 100%;
  background: var(--color-accent-purple);
  width: 33.333%; /* Default to first slide */
  transition: width 0.3s ease;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .slide-content {
    padding: 20px 16px;
    gap: 24px;
  }
  
  .day-title-card {
    padding: 24px 20px;
  }
  
  .timeline {
    padding-left: 0;
  }
  
  .timeline::before {
    left: 19px;
  }
  
  .timeline-item {
    flex-direction: column;
  }
  
  .timeline-time {
    width: auto;
    text-align: left;
    font-size: 0.9rem;
    padding-top: 2px;
    margin-left: 45px;
    color: var(--color-accent-purple);
  }
  
  .timeline-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    left: 6px;
    top: 0px;
  }
  
  .timeline-card {
    margin-left: 45px;
    margin-top: 8px;
    padding: 14px 16px;
    width: calc(100% - 45px);
  }
}
