:root {
  /* Core Brand Palette */
  --nyc-orange: #E38509;
  --burnt-orange: #CA5400;
  --deep-red: #700000;
  
  /* Dark UI */
  --charcoal: #3B4149;
  --near-black: #111111;
  
  /* Light UI */
  --white: #F9F9F9;
  --soft-gray: #F4F4F4;
  --border-gray: #D8D8D8;
  
  /* Text */
  --primary-text: #222222;
  --secondary-text: #666666;

  --font-family: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--white);
  color: var(--primary-text);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Top Banner */
.top-banner {
  background-color: #E38509;
  width: 100%;
  text-align: center;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001; /* Above the header */
}

.top-banner-logo {
  max-height: 80px; 
  max-width: 100%;
  display: block;
}

/* Loader */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--soft-gray);
  border-top-color: var(--nyc-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Header & Navigation */
.site-header {
  background-color: var(--charcoal);
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.site-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.site-logo span {
  color: var(--nyc-orange);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--nyc-orange);
}

.nav-link.active {
  color: var(--burnt-orange);
}

/* Map Controls (Filters) */
.map-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff !important;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--nyc-orange);
  cursor: pointer;
}

.control-group select,
.search-input {
  background: #fff;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.control-group select:focus,
.search-input:focus {
  border-color: var(--nyc-orange);
  box-shadow: 0 0 0 2px rgba(227, 133, 9, 0.2);
}

.search-input {
  min-width: 220px;
  cursor: text;
}

.control-group select.active-filter {
  background: var(--burnt-orange);
  color: #fff;
  border-color: var(--burnt-orange);
}

/* Map Container */
.map-container {
  position: relative;
  flex: 1;
  width: 100vw;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Leaflet Overrides for NYCThirst Cards */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #fff;
  color: var(--primary-text);
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.leaflet-popup-content-wrapper {
  border-top: 4px solid var(--nyc-orange);
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--secondary-text);
  padding: 4px;
}

.leaflet-popup-content {
  font-family: var(--font-family);
  margin: 15px 18px;
}

.leaflet-popup-content b {
  font-size: 1.2em;
  color: var(--charcoal);
  display: block;
  margin-bottom: 4px;
}

/* Marker Cluster Custom Colors */
.marker-cluster-small { background-color: rgba(227, 133, 9, 0.6); }
.marker-cluster-small div { background-color: rgba(227, 133, 9, 0.9); color: white; }
.marker-cluster-medium { background-color: rgba(202, 84, 0, 0.6); }
.marker-cluster-medium div { background-color: rgba(202, 84, 0, 0.9); color: white; }
.marker-cluster-large { background-color: rgba(112, 0, 0, 0.6); }
.marker-cluster-large div { background-color: rgba(112, 0, 0, 0.9); color: white; }

/* Sidebar */
.sidebar {
  position: absolute;
  top: 0;
  right: -450px;
  width: 420px;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--border-gray);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.sidebar.open {
  right: 0;
}

.sidebar-inner {
  padding: 40px 30px;
  border-top: 5px solid transparent;
  transition: border-color 0.3s;
}

.sidebar:hover .sidebar-inner {
  border-top-color: var(--nyc-orange);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--secondary-text);
  font-size: 36px;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.close-btn:hover {
  color: var(--charcoal);
}

#bar-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  padding-right: 30px;
  letter-spacing: -0.5px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-general {
  background: var(--nyc-orange);
  color: #fff;
}

.badge-featured {
  background: var(--deep-red);
  color: #fff;
}

.badge-events {
  background: var(--burnt-orange);
  color: #fff;
}

.badge-nightlife {
  background: var(--charcoal);
  color: #fff;
}

.detail-section {
  margin-bottom: 1.8rem;
}

.detail-section h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--charcoal);
  border-bottom: 3px solid var(--nyc-orange);
  display: inline-block;
  margin-bottom: 0.8rem;
  padding-bottom: 2px;
  font-weight: 800;
}

.detail-section p {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--secondary-text);
}

.current-day-highlight {
  color: var(--burnt-orange);
  font-weight: 700;
  display: inline-block;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2.5rem;
  margin-top: 2rem;
}

.tag {
  background: var(--soft-gray);
  color: var(--charcoal);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-gray);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}

.social-links a {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

.social-links a:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.social-links img {
  width: 48px;
  height: 48px;
  display: block;
}

/* Buttons */
.primary-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--nyc-orange);
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.primary-btn:hover {
  background: var(--burnt-orange);
  transform: translateY(-2px);
}

.secondary-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--deep-red);
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.secondary-btn:hover {
  background: #5a0000;
  transform: translateY(-2px);
}

.ghost-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--nyc-orange);
  border: 2px solid var(--nyc-orange);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ghost-btn:hover {
  background: var(--nyc-orange);
  color: white;
}

/* Footer */
.site-footer {
  background-color: var(--near-black);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-top: 2px solid var(--nyc-orange);
}

.site-footer h3 {
  color: var(--nyc-orange);
  font-size: 1.1rem;
  margin-bottom: 0;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--burnt-orange);
}

/* Typography tweaks */
a {
  color: var(--burnt-orange);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--nyc-orange);
}

/* Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    right: -100%;
  }
  .site-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  .map-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .site-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
