/* Base & typography */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9fafb;
  color: #333;
  line-height: 1.6;
}

header {
  display: flex;
  flex-direction: column;
  gap: 4px; /* controls spacing between items */
  position: fixed;
  top: 20px;
  inset: 0 20px auto 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 1000;
}

/* Remove ALL default margins inside header */
header h2,
header h3,
header p,
header div,
header label,
header select {
  margin: 0;
  padding: 0;
}

/* Optional: fine-tune sizes */
header h2 {
  font-size: 1.3rem;
}

header h3 {
  font-size: 1rem;
}

#filter-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

header p {
  font-size: 1.05rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Listings container */
#listings-container {
  padding-top: 180px; /* adjust based on new header height */
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid layout for cards */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 0 15px;
}

/* Card */
.listing-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(50, 50, 93, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(50, 50, 93, 0.15);
}

/* Images scroll container */
.listing-images {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: #a3a3a3 transparent;
}

.listing-images::-webkit-scrollbar {
  height: 8px;
}

.listing-images::-webkit-scrollbar-thumb {
  background-color: #a3a3a3;
  border-radius: 4px;
}

.listing-images img {
  flex-shrink: 0;
  width: 190px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-images img:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* Content area */
.listing-content {
  padding: 20px 25px 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.listing-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.listing-description {
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Links */
.listing-links {
  margin-top: auto;
}

.btn-link {
  display: inline-block;
  margin-right: 12px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  user-select: none;
  transition: background 0.3s ease;
  box-shadow: 0 4px 8px rgba(59,130,246,0.4);
}

.btn-link:hover {
  background: linear-gradient(135deg, #4338ca, #2563eb);
  box-shadow: 0 6px 12px rgba(37,99,235,0.7);
}

/* Date/time styling */
.listing-datetime {
  font-style: italic;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 8px;
}

/* Disclaimer overlay styling */
#disclaimer-overlay {
  background: rgba(15, 23, 42, 0.9);
  color: #f1f5f9;
}

#disclaimer-box {
  background: #1e293b;
  padding: 28px 32px;
  border-radius: 14px;
  max-width: 520px;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

#disclaimer-button {
  margin-top: 26px;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#disclaimer-button:hover {
  background: #2563eb;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.9);
}

/* Lightbox overlay */
#lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Lightbox content */
#lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

/* Enlarged image */
#lightbox-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: none;
}

#lightbox-prev {
  left: -60px;
}

#lightbox-next {
  right: -60px;
}

/* Close button */
#lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 4px 12px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

#lightbox-close:hover {
  background: none;
}
