/* =========================================
   myJourni Global Styles
   ========================================= */

/* Brand palette */
:root {
  --color-primary: #0f9fb7;        /* teal */
  --color-primary-soft: #e3f7fb;   /* very light teal */
  --color-secondary: #ff9b4a;      /* warm accent */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5fb;
  --color-text: #111827;
  --color-muted: #6b7280;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 18px;
  --radius-xl: 26px;
  --max-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================
   Header & Navigation
   ========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

/* Logo */
.logo-wrap {
  display: block;
}

.logo-image {
  height: 90px;
  width: auto;
  display: block;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-muted);
  padding: 6px 4px;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* =========================================
   Hero Section
   ========================================= */

.hero {
  padding: 42px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  margin-bottom: 10px;
  color: var(--color-primary);
  font-weight: 700;
}

.hero-bullets {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.hero-actions {
  margin-top: 20px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-block;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #0596a5);
  color: white;
  box-shadow: 0 10px 25px rgba(8, 145, 178, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(8, 145, 178, 0.5);
}

.btn-block {
  display: block;
  width: 100%;
}

/* =========================================
   Steps / How It Works
   ========================================= */

.step-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-number {
  position: absolute;
  top: -12px;
  left: 14px;
  height: 28px;
  width: 28px;
  border-radius: 999px;
  background: var(--color-secondary);
  color: #1f2933;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   Features Section
   ========================================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* =========================================
   Itinerary Block
   ========================================= */

.itinerary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 18px;
}

.itinerary-item {
  display: grid;
  grid-template-columns: 0.3fr 1fr;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
}

.itinerary-time {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.itinerary-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.itinerary-activity {
  font-weight: 600;
}

.itinerary-operator {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* =========================================
   Chat Button & Window
   ========================================= */

/* Floating chat bubble */
#chat-button {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--color-primary);
  color: white;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  font-weight: 600;
  z-index: 9999;
}

/* Chat window */
#chat-window {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 350px;
  height: 480px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

#chat-header {
  background: var(--color-primary);
  color: white;
  padding: 12px;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
}

#chat-close {
  cursor: pointer;
  font-size: 1.3rem;
}

#chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

/* Chat messages */
.chat-message-user {
  background: var(--color-primary-soft);
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  align-self: flex-end;
}

.chat-message-bot {
  background: #f0f4ff;
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  align-self: flex-start;
}

/* Input area */
#chat-input-wrapper {
  display: flex;
  border-top: 1px solid #ddd;
  align-items: center;
}

/* 🎤 Microphone button */
#chat-mic {
  background: #eee;
  border: none;
  padding: 10px 12px;
  font-size: 1.3rem;
  cursor: pointer;
  border-right: 1px solid #ddd;
}

#chat-mic.listening {
  background: var(--color-primary);
  color: white;
}

/* Input box */
#chat-input {
  flex: 1;
  padding: 10px;
  border: none;
}

/* Send button */
#chat-send {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================
   Footer
   ========================================= */

.site-footer {
  padding: 18px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: #020617;
  color: rgba(226, 232, 240, 0.85);
}

.footer-content {
  text-align: center;
  font-size: 0.85rem;
}

/* =========================================
   RESPONSIVE DESIGN FIXES
   ========================================= */

/* MOBILE FIXES */
@media (max-width: 768px) {

  /* HERO: force single column */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }

  /* STEPS: stack vertically */
  .steps-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .step-card {
    padding: 20px;
  }

  /* Prevent hero/steps overlapping */
  .hero-card,
  #how-it-works,
  .section,
  .section-alt {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  /* Features grid → 1 column */
  .feature-grid {
    grid-template-columns: 1fr !important;
  }

  /* Itinerary spacing */
  .itinerary-item {
    grid-template-columns: 0.4fr 1fr;
  }

  /* Chat bubble no longer covers CTA */
  #chat-button {
    bottom: 110px !important;
  }

  /* Chat window full-width on mobile */
  #chat-window {
    right: 10px;
    left: 10px;
    width: auto;
    height: 70vh;
  }

  /* Reduce header logo size */
  .logo-image {
    height: 70px;
  }

  /* Navigation spacing */
  .main-nav {
    gap: 12px;
    font-size: 0.9rem;
  }
}
