/* category.css */
/* ---------------------------------------------------------------------------
   Shared styling for category pages (Entertainment, Dining, etc.)
--------------------------------------------------------------------------- */

body {
  font-family: "Open Sans", sans-serif;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
}

.category-header {
  text-align: center;
  margin-top: 80px;
}

.category-header h2 {
  color: var(--red);
  font-size: 36px;
  font-weight: 700;
  margin-top: 10px;
}

.category-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.category-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--light-gray);
  background-color: white;
  padding: 10px;
}

.back-button {
  background-color: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  margin: 10px;
  cursor: pointer;
}

.back-button:hover {
  background-color: var(--light-gray);
  color: var(--gray);
}

/* Category Grid */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin: 40px auto;
  max-width: 1000px;
  padding-bottom: 50px;
}

.category-card {
  width: 200px;
  height: 220px;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.25);
}

.category-card img {
  width: 100%;
  height: 75%;
  object-fit: cover;
}

.category-card p {
  margin: 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
  .category-card {
    width: 160px;
    height: 180px;
  }
}

/* Flippable Cards */
.flip-card {
  width: 150px;
  height: 180px;
  perspective: 1000px;
  margin: 15px;
  display: inline-block;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-inner.flipped {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.flip-front img {
  width: 100%;
  height: 75%;
  object-fit: cover;
}

.flip-front p {
  text-align: center;
  font-weight: bold;
  color: var(--gray);
  margin-top: 8px;
}

.flip-back {
  background-color: var(--red);
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flip-back button {
  margin-top: 10px;
  background-color: white;
  color: var(--red);
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

#nearby-results {
  margin-top: 20px;
  padding: 10px;
  background: white;
  border-radius: 10px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.place-item {
  background-color: var(--red);
  color: white;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.place-item:hover {
  background-color: white;
  color: var(--red);
  border: 1px solid var(--red);
}
/* Entertainment Page Styles */
#category-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-header {
  text-align: center;
  margin-bottom: 30px;
}

.category-icon-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.category-icon {
  width: 80px;
  height: 80px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Scrollable Nearby Results */
#nearby-results {
  margin-top: 40px;
  width: 90%;
  max-width: 700px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
}

#nearby-results h3 {
  text-align: center;
  color: var(--red);
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.place-item {
  background-color: var(--red);
  color: white;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.place-item:hover {
  background-color: white;
  color: var(--red);
  border: 1px solid var(--red);
}

.place-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.place-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.place-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- SLIDER STRUCTURE --- */
#slider-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  overflow: hidden;
  margin: 0 auto;
}

#category-panel,
#places-panel {
  position: absolute;
  top: 0;
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
  background-color: var(--red);
  color: white;
  border-radius: 25px;
  padding: 25px;
  box-sizing: border-box;
}

#category-panel {
  transform: translateX(0%);
}

#places-panel {
  transform: translateX(100%);
  background-color: white;
  color: var(--gray);
}

/* --- HEADER INSIDE CATEGORY PANEL --- */
#category-panel h3 {
  text-align: center;
  color: white;
  font-size: 22px;
  margin-bottom: 20px;
}

/* --- PLACES PANEL CONTENT --- */
#nearby-results h3 {
  text-align: center;
  color: var(--red);
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.place-item {
  background-color: var(--red);
  color: white;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.place-item:hover {
  background-color: white;
  color: var(--red);
  border: 1px solid var(--red);
  transform: translateY(-2px);
}

.place-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

/* --- SLIDE STATE CHANGES --- */
.slide-left {
  transform: translateX(-100%);
}

.slide-in {
  transform: translateX(0%);
}

/* --- Back button inside places panel --- */
#back-to-categories {
  background-color: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 15px;
  margin-bottom: 15px;
  cursor: pointer;
}

/* === SLIDER CONTAINER FIX === */
#slider-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  min-height: 500px; /* ✅ ensure space is reserved */
}

/* Category panel */
#category-panel {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--red);
  color: white;
  padding: 30px 20px;
  border-radius: 20px;
  box-sizing: border-box;
  transition: transform 0.6s ease;
  transform: translateX(0);
  min-height: 500px;
}

/* Places panel (starts off-screen) */
#places-panel {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  background-color: #fff;
  color: var(--gray);
  padding: 30px 20px;
  border-radius: 20px;
  box-sizing: border-box;
  transition: transform 0.6s ease;
  transform: translateX(100%);
  min-height: 500px;
}

/* When sliding between panels */
.slide-left {
  transform: translateX(-100%);
}

.slide-in {
  transform: translateX(0);
}

/* Category grid styling fix */
#category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.category-card {
  width: 160px;
  height: 180px;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.category-card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
}

.category-card p {
  color: var(--gray);
  font-weight: 600;
  margin-top: 8px;
}

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

/* Fix nearby results inside places panel */
#nearby-results {
  margin-top: 15px;
  overflow-y: auto;
  max-height: 420px;
}

/* ============================================================
   SLIDE PANEL ANIMATIONS for Entertainment Page
   ============================================================ */
#slider-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  min-height: 600px;
}

/* Category Panel (the red side) */
#category-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--red);
  color: white;
  padding: 30px 20px;
  border-radius: 25px;
  transition: transform 0.6s ease;
  transform: translateX(0);
  z-index: 2;
  min-height: 600px;
}

/* Places Panel (white background) */
#places-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  color: var(--gray);
  padding: 30px 20px;
  border-radius: 25px;
  transition: transform 0.6s ease;
  transform: translateX(100%);
  z-index: 1;
  min-height: 600px;
}

/* When JS triggers the slide */
#category-panel.slide-left {
  transform: translateX(-100%);
}

#places-panel.slide-in {
  transform: translateX(0);
  z-index: 3;
}

/* Fade effect (optional but nice) */
#places-panel.slide-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ============================================================
   NEARBY RESULTS STYLING (Entertainment Page)
   ============================================================ */

#nearby-results {
  margin-top: 20px;
  background-color: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 550px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

#nearby-results h3 {
  color: var(--red);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Each place card */
.place-item {
  display: flex;
  align-items: center;
  background-color: var(--red);
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.place-item:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Bigger photo on the left */
.place-img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
}

/* Text content beside the image */
.place-info {
  padding: 12px 15px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.place-info strong {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.place-info p {
  font-size: 14px;
  color: #f7f7f7;
  line-height: 1.4;
  margin: 0;
}

/* Mobile responsive tweaks */
@media (max-width: 768px) {
  .place-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .place-img {
    width: 100%;
    height: 180px;
    border-radius: 10px 10px 0 0;
  }

  .place-info {
    padding: 10px;
  }
}
/* ============================================================
   MODERN STACKED CARD STYLE — for Nearby Results
   ============================================================ */

#nearby-results {
  margin-top: 25px;
  background-color: transparent;
  border-radius: 20px;
  padding: 10px;
  max-height: 550px;
  overflow-y: auto;
}

#nearby-results h3 {
  color: var(--red);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.scroll-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Each place as a big image card */
.place-item {
  background-color: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.place-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(179, 7, 56, 0.25);
}

/* Big top image */
.place-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid var(--red);
}

/* Text below the image */
.place-info {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-info strong {
  color: var(--red);
  font-size: 17px;
  font-weight: 700;
  text-transform: none;
}

.place-info p {
  color: #555;
  font-size: 15px;
  line-height: 1.4;
}

/* Responsive tweaks for mobile */
@media (max-width: 768px) {
  #nearby-results {
    padding: 10px;
    max-height: unset;
  }

  .place-img {
    height: 180px;
  }

  .place-info {
    padding: 12px;
  }

  .place-info strong {
    font-size: 16px;
  }
}

.place-info .meta-row {
  font-size: 14px;
  color: #555;
  margin-top: 4px;
}

.rating-row {
  margin-top: 6px;
  color: #f1c40f;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.yelp-tag {
  background-color: #d32323;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}
