/* ===============================
   FONTS
================================*/
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100;
  src: url('/fonts/roboto-v48-latin-100.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 100;
  src: url('/fonts/roboto-v48-latin-100italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/roboto-v48-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/roboto-v48-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/roboto-v48-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/roboto-v48-latin-700italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/open-sans-v43-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300;
  src: url('/fonts/open-sans-v43-latin-300italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/open-sans-v43-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/open-sans-v43-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/open-sans-v43-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/open-sans-v43-latin-700italic.woff2') format('woff2');
}

/* ===============================
   NAVBAR
================================*/
/* Navbar styles are now handled in main.css */
/* Removed old red navbar styles to match home.html design */

/* ===============================
   SEARCH CONTAINER
================================*/
.input-container {
  display: flex;
  margin-bottom: 10px;
}
.discover-container {
  position: absolute;
  top: 50px;
  left: 0;
  bottom: 0;
  width: 25%;
  padding: 5px;
  font-family: "Open Sans";
  background-color: white;
  overflow-y: auto;
  z-index: 10;
}
.discover-input {
  flex-grow: 1;
  display: flex;
  text-align: center;
  border-radius: 10px 0 0 10px;
}
.discover-input input {
  width: 100%;
  padding: 10px 15px;
  font: inherit;
  border: none;
  background-color: #f3f3f3;
}
.search-button {
  flex-grow: 1;
  padding: 0;
  font: inherit;
  text-align: center;
  color: white;
  background-color: gray;
  border: none;
  border-radius: 0;
}

/* ===============================
   RESULTS / ROUTES
================================*/
.result-tile {
  margin: 10px;
  padding: 10px 15px;
  background-color: rgb(242,239,239);
  color: black;
  border-radius: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.result-tile h2 {
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  width: 100%;
}
.result-tile p { font-size: 14px; }
.result-tile:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.active-route {
  background-color: var(--red) !important;
  color: white !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.transport-mode-tile {
  font-size: 18px;
  padding: 8px 12px;
}

/* Map + footer */
.map { width: 100vw; height: 100vh; position: relative;}
footer { height: 0; z-index: 1; }

/* Back button */
.back-button {
  display: block;
  width: 100%;
  padding: 10px 15px;
  margin: 20px auto 10px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
}
.back-button:hover { background-color: #222; }

/* "Currently Viewing" */
#currently-viewing {
  margin: 10px 0;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  border-radius: 5px;
  background-color: #f0f0f0;
  border-left: 4px solid var(--red);
}

/* ===============================
   FLIP CARDS
================================*/
.place-card-wrapper {
  width: 100%;
  margin-bottom: 20px;
  perspective: 1000px;
}
.place-card-inner {
  position: relative;
  width: 100%;
  height: 220px;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
.place-card-inner.flipped { transform: rotateY(180deg); }
.place-card-front,
.place-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  backface-visibility: hidden;
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.place-card-front h4 {
  margin: 10px 0 0;
  font-size: 18px;
}
.place-card-back {
  padding: 20px;
  font-size: 16px;
  background-color: #f8f8f8;
  transform: rotateY(180deg);
}
.fake-image-block {
  width: 100%;
  height: 140px;
  background-color: var(--red);
  color: white;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ddd;
}

/* Go button */
.go-button {
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: var(--red);
  color: white;
  cursor: pointer;
}
.go-button:hover { background-color: #a00632; }

/* ===============================
   ROUTE CARDS / PREVIEW
================================*/
.route-card {
  max-width: 420px;
  margin: 20px auto;
  padding: 15px;
  text-align: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.route-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.route-time { font-size: 18px; font-weight: bold; margin-bottom: 6px; }
.route-duration { font-size: 15px; color: #444; margin-bottom: 12px; }
.mode-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}
.mode-chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: #f5f5f5;
  font-size: 14px;
  white-space: nowrap;
}
.route-card .go-button {
  margin: 0 auto;
  display: block;
  padding: 10px 20px;
  font-size: 16px;
}

/* Preview */
.preview-header {
  padding: 12px;
  text-align: center;
  background: var(--red);
  color: white;
  border-radius: 8px 8px 0 0;
}
.preview-header h3 { margin: 0; font-size: 18px; }
.preview-header p { margin: 0; font-size: 14px; opacity: 0.8; }
.preview-title { font-size: 20px; font-weight: bold; text-align: center; margin: 15px 0; }
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  align-items: center;
}
.timeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f5f5f5;
  font-size: 14px;
}

/* ===============================
   ACTIVITY CARDS
================================*/
.activity-card {
  max-width: 350px;
  margin: 12px auto;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.activity-card:hover { transform: translateY(-3px); }
.activity-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.activity-image .go-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background-color: #b30738;
  color: #fff;
  cursor: pointer;
}
.activity-info {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
}
.activity-info h4 { font-size: 16px; font-weight: bold; margin: 0 0 5px; color: #333; }
.activity-info p { font-size: 14px; color: #666; margin: 0; }

/* ===============================
   RESPONSIVE STYLES
================================*/

/* Tablets (≤1024px) */
@media (max-width: 1024px) {
  .discover-container { width: 35%; }
  .result-tile h2 { font-size: 22px; }
  .route-card { max-width: 90%; }
}

/* Small tablets / large phones (≤768px) */
@media (max-width: 768px) {
  .discover-container {
    position: relative;
    width: 100%;
    height: auto;
    top: auto;
    margin-bottom: 20px;
  }
  .result-tile { margin: 8px 0; }
  .route-card { width: 95%; }
  .place-card-inner { height: 200px; }
  .activity-card { max-width: 90%; }
}

/* Mobile phones (≤480px) */
@media (max-width: 480px) {
  .result-tile h2 { font-size: 18px; }
  .result-tile p,
  .activity-info p { font-size: 12px; }
  .place-card-inner { height: 180px; }
  .place-card-front h4 { font-size: 16px; }
  .route-card { padding: 10px; }
  .route-time { font-size: 16px; }
  .route-duration { font-size: 13px; }
  .timeline-step { font-size: 12px; }
  .activity-info h4 { font-size: 14px; }
}

/* Map should always be visible and behind the sidebar */
.map {
  width: 100vw;
  height: 100vh;
  position: absolute;   /* fill the screen */
  top: 0;
  left: 0;
  z-index: 0;           /* base layer */
}

/* Sidebar floats on top of map */
.discover-container {
  position: absolute;
  top: 50px;            /* leave space for header */
  left: 0;
  bottom: 0;
  width: 25%;
  padding: 5px;
  font-family: "Open Sans";
  background-color: rgba(255, 255, 255, 0.95); /* semi-transparent so map peeks through */
  overflow-y: auto;
  z-index: 10;          /* above the map */
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);   /* subtle shadow to separate */
}

/* Mobile adjustments (sidebar becomes full width) */
@media (max-width: 768px) {
  .discover-container {
    width: 100%;
    height: auto;
    position: relative;  /* stack above map */
    top: auto;
    left: auto;
    background-color: #fff; /* solid background on mobile */
    box-shadow: none;
  }
}

.discover-container {
  background-color: rgba(255, 255, 255, 0.6); /* semi-transparent */
}
