@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #e11d48;
  --primary-dark: #be123c;
  --primary-light: #fff1f2;
  --secondary: #1e293b;
  --accent: #f59e0b;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-mid: #475569;
  --text-light: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #b45309; }

/* ══════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════ */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nav-logo svg { width: 24px; height: 24px; fill: currentColor; }

.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-name { font-weight: 800; font-size: 1.25rem; color: var(--text-dark); line-height: 1; }
.nav-brand-sub { font-size: 0.75rem; color: var(--text-mid); font-weight: 500; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
}

/* ══════════════════════════════════════════
   SEARCH HERO (SEARCH-FIRST UX)
   ══════════════════════════════════════════ */
.search-hero {
  padding: 60px 0 100px;
  background: radial-gradient(circle at top right, #fff1f2, #f8fafc);
  position: relative;
}

.search-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.83L42.853 13.433l-.83-.83L54.627 0zm-38.461 0l.83.83L4.392 13.433l-.83-.83L16.166 0zM0 21.193V0l21.193 21.193H0zm0 3.966V46.35l21.193-21.193H0zm0 3.966V60L21.193 38.807H0zm3.966 0l21.193 21.193H60V38.807H3.966zm3.966-3.966l21.193-21.193H60V25.159H7.932zm3.966-3.966l21.193-21.193H60V11.511H11.898z' fill='%23e11d48' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.search-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
  position: relative;
}

.search-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.search-header p {
  color: var(--text-mid);
  font-size: 1.125rem;
}

.search-card {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.input-group {
  flex: 1;
  position: relative;
}

.input-group label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: #fff;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
}

.hidden { display: none !important; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
  animation: slideUp 0.4s ease forwards;
}

.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.3s;
}

.swap-btn:hover { transform: rotate(180deg); }

.search-btn {
  padding: 0 32px;
  height: 54px;
}

/* ══════════════════════════════════════════
   LIVE STATUS SECTION
   ══════════════════════════════════════════ */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: -60px;
  position: relative;
  z-index: 20;
}

.status-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-content h4 { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 4px; }
.status-content p { font-weight: 700; font-size: 1.1rem; }

/* ══════════════════════════════════════════
   NEWS SECTION
   ══════════════════════════════════════════ */
.section { padding: 80px 0; }
.section-header { margin-bottom: 40px; }
.section-title { font-size: 2.25rem; font-weight: 800; margin-bottom: 8px; }
.section-subtitle { color: var(--text-mid); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.news-card {
  overflow: hidden;
  padding: 0;
}

.news-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-body { padding: 24px; }
.news-date { font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.news-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.news-excerpt { color: var(--text-mid); font-size: 0.95rem; margin-bottom: 20px; }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.footer {
  background: var(--secondary);
  color: #fff;
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p { color: #94a3b8; margin: 20px 0; }
.footer h4 { margin-bottom: 24px; font-weight: 700; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a { color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.footer ul li a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.875rem;
}

/* ══════════════════════════════════════════
   JOURNEY TIMELINE
   ══════════════════════════════════════════ */
.journey-container {
  margin-top: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.timeline {
  position: relative;
  padding-left: 50px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: #e2e8f0;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: -43px;
  top: 6px;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 4px solid var(--primary);
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px var(--primary-light);
}

.timeline-content {
  background: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.timeline-content:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.timeline-station-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.timeline-meta {
  text-align: right;
}

.time-diff {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.total-time-stamp {
  font-size: 0.85rem;
  color: var(--text-light);
}

.interchange-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Station Details Page */
.detail-hero {
  padding: 100px 0 60px;
  background: var(--secondary);
  color: #fff;
}

.facility-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.nearby-item {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

/* ══════════════════════════════════════════
   HOMEPAGE ENHANCEMENTS
   ══════════════════════════════════════════ */

/* Service Status Strip */
.status-strip {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
  overflow: hidden;
}

.status-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  animation: pulse 2s infinite;
}

.indicator-green { background: var(--success); }
.indicator-yellow { background: var(--warning); }
.indicator-red { background: var(--danger); }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

/* Quick Access */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.qa-card {
  background: #fff;
  padding: 32px 24px;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.qa-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
  background: linear-gradient(to bottom, #fff, #fff5f7);
}

.qa-icon {
  font-size: 2.5rem;
  background: var(--primary-light);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.qa-card:hover .qa-icon { transform: rotate(10deg); }

/* Top Stations */
.station-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #f1f5f9;
  height: 100%;
}

.station-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.station-card-img {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.station-card-img svg {
  width: 60px;
  height: 60px;
  opacity: 0.1;
  fill: var(--primary);
}

.station-card-content { padding: 20px; }

/* FAQ Accordion */
.faq-container { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
}

.faq-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-header h4 { font-weight: 700; font-size: 1rem; color: var(--text-dark); }

.faq-icon {
  transition: transform 0.3s ease;
  color: var(--primary);
}

.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-item.active { border-color: var(--primary-light); }

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #fafafa;
}

.faq-content { padding: 0 20px 20px; color: var(--text-mid); font-size: 0.95rem; }

.faq-item.active .faq-body { max-height: 200px; }

/* Filter Buttons */
.filter-btn {
  padding: 10px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}

/* ══════════════════════════════════════════
   DAILY ASSISTANT UPGRADE
   ══════════════════════════════════════════ */

/* Alert Banner */
.alert-banner {
  background: var(--danger);
  color: #fff;
  padding: 10px 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  position: relative;
  z-index: 1001;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: -40px;
  position: relative;
  z-index: 20;
}

.dashboard-card {
  background: #fff;
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.dashboard-card:hover { transform: translateY(-5px); }

.dash-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Smart Suggestions */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  padding: 8px 16px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Skeleton Loading */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.skeleton {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 104px;
  animation: shimmer 1s linear infinite forwards;
}

/* Saved Routes */
.saved-route-card {
  border-left: 4px solid var(--primary);
  background: linear-gradient(to right, #fff5f7, #fff);
}

/* ══════════════════════════════════════════
   STATION DIRECTORY & FOOTER REDESIGN
   ══════════════════════════════════════════ */

/* Directory */
.directory-section { padding-bottom: 80px; }
.line-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
}
.line-dot { width: 14px; height: 14px; border-radius: 50%; }
.dot-red { background: var(--primary); }

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.directory-link {
  display: block;
  padding: 10px 16px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.directory-link:hover {
  background: #fff;
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

.directory-search {
  max-width: 400px;
  margin-bottom: 40px;
  position: relative;
}

.directory-search input {
  width: 100%;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-weight: 500;
  transition: all 0.3s ease;
}

.directory-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* Modern Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 80px 0 40px;
}

.footer h4 {
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.footer-brand p { margin: 20px 0; line-height: 1.6; max-width: 300px; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--primary-light); }

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-social { display: flex; gap: 12px; margin-top: 30px; }
.social-icon {
  width: 40px;
  height: 40px;
  background: #1e293b;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
}
.social-icon:hover {
  background: var(--primary);
  transform: translateY(-5px);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); background: #be123c; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .search-header h1 { font-size: 2.25rem; }
  .search-form { flex-direction: column; padding: 24px; }
  .search-btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}
