/* ==========================================================================
   1. ROOT & GENERAL STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-color: #1a1b26; --surface-color: #282a36; --primary-color: #ff79c6;
  --secondary-color: #f8f8f2; --text-color: #bd93f9; --border-color: #44475a;
  --success-color: #50fa7b; --warning-color: #f1fa8c; --busy-color: #ffb86c;
  --danger-color: #ff5555; --font-family: 'Poppins', sans-serif;
  --border-radius: 12px; --header-height: 70px; --shadow-glow: 0 0 25px rgba(255, 121, 198, 0.2);
  --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.15); } }
body { font-family: var(--font-family); margin: 0; padding-top: var(--header-height); background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body.nav-open { overflow: hidden; }
h1, h2, h3 { color: var(--secondary-color); font-weight: 600; letter-spacing: -0.5px; }
h2 { border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; margin-bottom: 1.5rem; }
a { color: var(--primary-color); text-decoration: none; transition: filter var(--transition-speed); }
a:hover { filter: brightness(1.2); }
main { max-width: 1280px; margin: 3rem auto; padding: 0 1.5rem; }

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.site-header { background-color: rgba(26, 27, 38, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); padding: 0 1.5rem; height: var(--header-height); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.header-container { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--secondary-color); }
.nav-links { list-style: none; display: flex; gap: 2.5rem; margin: 0; padding: 0; }
.nav-links a { color: var(--secondary-color); font-size: 1rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary-color); }
.burger { display: none; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.burger-line { display: block; width: 25px; height: 2px; background-color: var(--secondary-color); margin: 6px 0; transition: all 0.4s var(--transition-speed); }
.burger.active .burger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active .burger-line:nth-child(2) { opacity: 0; }
.burger.active .burger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero { position: relative; color: white; padding: 9rem 1rem; text-align: center; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/assets/images/logo-placeholder.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1; /* Image is at the bottom layer */
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(26, 27, 38, 0.8), var(--bg-color));
  z-index: 2; /* Sits on top of the image */
}
.hero.short-hero { padding: 6rem 1rem; }
.hero-content { position: relative; z-index: 3; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 4rem; font-weight: 700; color: white; margin-bottom: 1rem; letter-spacing: -2px; text-shadow: 0 0 40px rgba(0,0,0,0.6); }
.hero p { font-size: 1.25rem; opacity: 0.9; font-weight: 300; max-width: 600px; margin: 0 auto; }

/* ==========================================================================
   4. FILTERS & CARDS
   ========================================================================== */
.filters-container { background-color: rgba(40, 42, 54, 0.5); backdrop-filter: blur(5px); padding: 1.5rem; margin-bottom: 3rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.filters { display: flex; gap: 1rem; flex-wrap: wrap; }
.filters input, .filters select { padding: 0.8rem 1.2rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; flex-grow: 1; background-color: var(--bg-color); color: var(--secondary-color); transition: all var(--transition-speed); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(255, 121, 198, 0.2); }
.filters input::placeholder { color: var(--text-color); }
.filter-button { padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 600; color: var(--secondary-color); background-color: var(--primary-color); border: none; border-radius: 8px; cursor: pointer; transition: all var(--transition-speed); }
.filter-button:hover { filter: brightness(1.1); box-shadow: 0 0 20px rgba(255, 121, 198, 0.3); transform: translateY(-2px); }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-link { display: block; text-decoration: none; color: inherit; border-radius: var(--border-radius); transition: transform var(--transition-speed); animation: fadeInUp 0.6s ease-out forwards; opacity: 0; }
.grid > .card-link:nth-child(1) { animation-delay: 0.05s; } .grid > .card-link:nth-child(2) { animation-delay: 0.1s; } .grid > .card-link:nth-child(3) { animation-delay: 0.15s; } .grid > .card-link:nth-child(4) { animation-delay: 0.2s; } .grid > .card-link:nth-child(5) { animation-delay: 0.25s; } .grid > .card-link:nth-child(6) { animation-delay: 0.3s; } .grid > .card-link:nth-child(7) { animation-delay: 0.35s; } .grid > .card-link:nth-child(8) { animation-delay: 0.4s; } .grid > .card-link:nth-child(9) { animation-delay: 0.45s; } .grid > .card-link:nth-child(10) { animation-delay: 0.5s; } .grid > .card-link:nth-child(11) { animation-delay: 0.55s; } .grid > .card-link:nth-child(12) { animation-delay: 0.6s; }
.card-link:hover { transform: translateY(-8px); }
.card { background: var(--surface-color); border-radius: var(--border-radius); overflow: hidden; border: 1px solid var(--border-color); height: 100%; position: relative; transition: all var(--transition-speed); }
.card-link:hover .card { border-color: var(--primary-color); box-shadow: var(--shadow-glow); }
.card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image.has-fallback-bg {
  background: linear-gradient(45deg, var(--bg-color) 0%, var(--surface-color) 100%);
}
.card-image.has-fallback-bg::after {
  content: '';
  display: block;
  width: 64px;
  height: 64px;
  background-image: url('/assets/images/logo-placeholder.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.2;
}
.card-content { padding: 1.5rem; }
.card-content .address { font-size: 0.9rem; color: var(--text-color); margin-bottom: 1rem; }
.rating { font-weight: 600; font-size: 1rem; color: var(--secondary-color); }
.rating .star { color: var(--primary-color); }
.listing-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background-color: var(--bg-color); border: 2px solid var(--border-color); flex-shrink: 0; }
.listing-logo.is-placeholder { padding: 4px; }
.card-content h2, .listing-main h2 { display: flex; align-items: center; gap: 0.75rem; }

/* ==========================================================================
   5. POPULAR TIMES & OTHER ELEMENTS
   ========================================================================== */
.popularity-indicator { background: rgba(26, 27, 38, 0.8); backdrop-filter: blur(4px); color: var(--secondary-color); padding: 0.3rem 0.8rem; position: absolute; top: 12px; left: 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 0.5rem; }
.popularity-indicator::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.popularity-indicator.level-1::before { background-color: var(--success-color); } .popularity-indicator.level-2::before { background-color: var(--warning-color); } .popularity-indicator.level-3::before { background-color: var(--busy-color); } .popularity-indicator.level-4::before { background-color: var(--danger-color); }
.popular-times-chart { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.day-row { display: flex; align-items: center; gap: 0.5rem; }
.day-name { font-size: 0.75rem; color: var(--text-color); width: 30px; flex-shrink: 0; }
.bar-container { display: flex; align-items: flex-end; flex-grow: 1; height: 30px; gap: 2px; background-color: var(--bg-color); border-radius: 4px; padding: 3px; border: 1px solid var(--border-color); }
.bar { flex: 1; background-color: var(--primary-color); opacity: 0.5; border-radius: 2px; transition: all var(--transition-speed); }
.bar:hover { opacity: 1; filter: brightness(1.2); }
.breadcrumb { max-width: 1280px; margin: 2rem auto; padding: 0 1.5rem; font-size: 0.9rem; }
.breadcrumb a { color: var(--text-color); }
.listing-container { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.listing-main { flex: 2.5; min-width: 300px; background-color: var(--surface-color); padding: 2rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.listing-sidebar { flex: 1; min-width: 280px; position: sticky; top: calc(var(--header-height) + 2rem); }
.sidebar-widget { background: var(--surface-color); padding: 1.5rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); margin-bottom: 1.5rem; }
.sidebar-widget h3 { margin-top: 0; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; font-size: 1.1rem; }
.listing-image { width: 100%; height: 400px; background-size: cover; background-position: center; border-radius: var(--border-radius); margin-bottom: 2rem; }
.details-list, .attributes-list, .work-schedule { list-style: none; padding: 0; }
.details-list li, .work-schedule li { padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.details-list li span, .details-list li a { text-align: right; min-width: 0; overflow-wrap: break-word; word-wrap: break-word; word-break: break-all; }
.details-list li:first-child, .work-schedule li:first-child { padding-top: 0; }
.details-list li:last-child, .work-schedule li:last-child { border-bottom: none; padding-bottom: 0; }
.details-list li strong, .work-schedule .day { color: var(--secondary-color); }
.attributes-list { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.attributes-list li { padding: 0.5rem 1rem; border-radius: 20px; background-color: var(--bg-color); border: 1px solid var(--border-color); font-size: 0.85rem; font-weight: 500; color: var(--secondary-color); }
.work-schedule .time.closed { color: var(--text-color); opacity: 0.7; }
.map-container iframe { width: 100%; height: 350px; border: 1px solid var(--border-color); border-radius: var(--border-radius); filter: grayscale(1) invert(0.9) hue-rotate(240deg); }

/* ==========================================================================
   6. PAGINATION & STATIC CONTENT
   ========================================================================== */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 2rem 0; margin-top: 2rem; list-style: none; }
.pagination a, .pagination span { display: inline-block; padding: 0.5rem 1rem; text-decoration: none; color: var(--secondary-color); background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; transition: all var(--transition-speed); font-weight: 500; }
.pagination a:hover { background-color: var(--primary-color); color: var(--bg-color); border-color: var(--primary-color); }
.pagination .current { background-color: var(--primary-color); color: var(--bg-color); border-color: var(--primary-color); font-weight: 700; box-shadow: var(--shadow-glow); }
.pagination .disabled { color: var(--text-color); pointer-events: none; opacity: 0.5; }
.homepage-content-wrapper { margin-top: 5rem; display: flex; flex-direction: column; gap: 4rem; border-top: 1px solid var(--border-color); padding-top: 5rem; }
.homepage-content-section h2 { text-align: center; margin-top: 0; margin-bottom: 2rem; font-size: 2.25rem; }
.homepage-content-section p { max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; color: var(--text-color); }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.featured-item { position: relative; display: flex; justify-content: center; align-items: center; height: 150px; border-radius: var(--border-radius); text-decoration: none; overflow: hidden; border: 1px solid var(--border-color); }
.featured-item::before { content: ''; position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.4s var(--transition-speed), filter 0.4s; }
.featured-item:hover::before { transform: scale(1.1); filter: brightness(0.8); }
.featured-item span { position: relative; z-index: 2; color: #fff; font-size: 1.8rem; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,0.7); transition: transform var(--transition-speed); }
.featured-item:hover span { transform: scale(1.05); }
.static-page { background-color: var(--surface-color); padding: 2.5rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); max-width: 800px; margin: 3rem auto; }
.static-page h1 { margin-top: 0; }
.site-footer-main { text-align: center; padding: 4rem 1rem; margin-top: 5rem; color: var(--text-color); border-top: 1px solid var(--border-color); }
.footer-links { margin-top: 1rem; }
.footer-links a { color: var(--text-color); margin: 0 0.5rem; }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 2rem; }
.browse-item { display: block; padding: 1rem; background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--border-radius); color: var(--secondary-color); text-align: center; font-weight: 500; transition: all var(--transition-speed); }
.browse-item:hover { background-color: var(--primary-color); color: var(--bg-color); border-color: var(--primary-color); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.location-page main { padding: 0; max-width: none; }
.location-page .hero { border-radius: 0; }
.location-grid-container { max-width: 1280px; margin: 3rem auto; padding: 0 1.5rem; }

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) { .listing-sidebar { position: static; width: 100%; } }
@media (max-width: 768px) {
  :root { --header-height: 60px; }
  main { padding: 0 1rem; margin: 2rem auto; }
  .site-header { padding: 0 1rem; }
  .main-nav { position: fixed; top: 0; right: 0; width: 80%; max-width: 320px; height: 100vh; background-color: var(--bg-color); flex-direction: column; justify-content: center; align-items: center; transform: translateX(100%); transition: transform 0.4s var(--transition-speed); border-left: 1px solid var(--border-color); }
  .main-nav.active { transform: translateX(0); }
  .nav-links { flex-direction: column; text-align: center; gap: 2rem; }
  .nav-links a { font-size: 1.25rem; }
  .burger { display: block; }
  .hero h1 { font-size: 2.8rem; }
  .hero p { font-size: 1.1rem; }
  .filters { flex-direction: column; }
  .filters input, .filters select, .filter-button { flex-grow: 0; width: 100%; }
  .listing-container, .location-grid-container { padding: 0 1rem; }
  .listing-image { height: 300px; }
  .listing-main, .static-page { padding: 1.5rem; }
  .listing-logo { width: 28px; height: 28px; }
  .card-content h2, .listing-main h2 { font-size: 1.1rem; }
}