/* ============================================
   MARITIME MODERNISM - Hero Section Redesign
   BHMenus - Bar Harbor Restaurant Guide
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Core Ocean Palette */
  --harbor-deep: #0a1628;
  --atlantic-blue: #1e3a5f;
  --atlantic-mid: #2d4a6f;
  --sea-foam: #4a9eb8;
  --spray-white: #e8f4f8;

  /* Maine Coastal Accents */
  --lobster-red: #c84b31;
  --buoy-orange: #e76f51;
  --sunset-coral: #f4a261;
  --driftwood: #a68a64;
  --sandy-shore: #f4f1de;

  /* Acadia Nature */
  --pine-green: #2d6a4f;
  --morning-fog: rgba(232, 232, 232, 0.4);

  /* Typography */
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Hero Section Redesign ---------- */
.hero-maritime {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  contain: layout style paint;
  background: linear-gradient(
    180deg,
    #0b1a2e 0%,
    #122744 30%,
    #1a3558 60%,
    #1e3d5f 100%
  );
  padding: 120px 0 100px;
}

/* Animated wave layers */
.hero-maritime::before,
.hero-maritime::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 200px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23f8fafc' fill-opacity='.15'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: wave 25s linear infinite;
  opacity: 0.3;
}

.hero-maritime::after {
  height: 150px;
  animation: wave 18s linear infinite reverse;
  opacity: 0.2;
  bottom: -20px;
}

@keyframes wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Grain texture for warmth */
.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Split layout container */
.hero-split {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 2rem 3rem;
  }
}

/* Left content */
.hero-left {
  text-align: left;
}

/* Right image mosaic */
.hero-right {
  display: none;
}

@media (min-width: 1024px) {
  .hero-right {
    display: block;
  }
}

/* Main headline */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1.25rem;
  animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-headline-accent {
  color: var(--sea-foam);
  font-style: italic;
  font-weight: 300;
}

/* Subheadline */
.hero-subheadline {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

/* Search container */
.hero-search-container {
  animation: fadeSlideUp 0.8s ease-out 0.6s both;
  max-width: 100%;
}

.hero-search-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1.25rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-search-box:focus-within {
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(74, 158, 184, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .hero-search-box {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem;
    border-radius: 100px;
  }
}

.hero-search-input-wrapper {
  position: relative;
  flex: 1;
}

.hero-search-input-wrapper svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--atlantic-blue);
  opacity: 0.5;
}

.hero-search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--harbor-deep);
  outline: none;
}

.hero-search-input:focus-visible,
.hero-region-select:focus-visible,
.hero-search-btn:focus-visible {
  outline: 3px solid rgba(30, 58, 95, 0.7);
  outline-offset: 3px;
}

.hero-search-input::placeholder {
  color: #64748b;
}

.hero-search-divider {
  display: none;
  width: 1px;
  height: 2rem;
  background: #e2e8f0;
}

@media (min-width: 640px) {
  .hero-search-divider {
    display: block;
  }
}

.hero-region-select {
  padding: 1rem 2.5rem 1rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--harbor-deep);
  cursor: pointer;
  appearance: none;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e3a5f'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.hero-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--lobster-red) 0%, var(--buoy-orange) 100%);
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(200, 75, 49, 0.4);
}

.hero-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 75, 49, 0.5);
}

.hero-search-btn:active {
  transform: translateY(0);
}

/* ---------- Image Mosaic ---------- */
.hero-mosaic {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1.2fr 1fr;
  gap: 0.75rem;
  height: 420px;
  animation: fadeSlideUp 0.8s ease-out 0.5s both;
}

.hero-mosaic picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-mosaic picture img {
  display: block;
}

.hero-mosaic > div {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
}

.hero-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-mosaic > div:hover img {
  transform: scale(1.05);
}

.mosaic-large {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}

.mosaic-top-right {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
}

.mosaic-bottom-left {
  grid-row: 2 / 3;
  grid-column: 1 / 2;
}

.mosaic-bottom-right {
  grid-row: 2 / 3;
  grid-column: 2 / 3;
}

.mosaic-label {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

.mosaic-large::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, transparent 70%);
  pointer-events: none;
}

.mosaic-small::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.25) 50%, transparent 70%);
  pointer-events: none;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeIn 1s ease-out 1.2s both;
  cursor: pointer;
  transition: color 0.3s ease;
}

.hero-scroll-indicator:hover {
  color: rgba(255, 255, 255, 0.9);
}

.hero-scroll-indicator svg {
  width: 24px;
  height: 24px;
  animation: bounce-gentle 2s ease-in-out infinite;
}

@keyframes bounce-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Animations */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Wave divider at bottom */
.hero-wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 20;
}

.hero-wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.hero-wave-divider .shape-fill {
  fill: #f8fafc; /* matches bg-slate-50 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-maritime {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 80px;
  }

  .hero-scroll-indicator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-maritime::before,
  .hero-maritime::after {
    animation: none;
  }

  .hero-scroll-indicator svg {
    animation: none;
  }

  .hero-headline,
  .hero-subheadline,
  .hero-search-container,
  .hero-scroll-indicator,
  .hero-mosaic {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .region-card-maritime:hover {
    transform: none;
  }

  .restaurant-card-maritime:hover {
    transform: none;
  }

  .restaurant-card-maritime:hover .restaurant-card-image img {
    transform: none;
  }

  .hero-mosaic > div:hover img {
    transform: none;
  }
}

/* ---------- Navigation Enhancement ---------- */
.nav-maritime {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-maritime a {
  color: rgba(255, 255, 255, 0.85);
}

.nav-maritime a:hover {
  color: #ffffff;
}

/* Logo glow effect */
.nav-logo-glow {
  filter: drop-shadow(0 0 8px rgba(231, 111, 81, 0.4));
  transition: filter 0.3s ease;
}

.nav-logo-glow:hover {
  filter: drop-shadow(0 0 12px rgba(231, 111, 81, 0.6));
}

/* ============================================
   REGION CARDS - Redesign
   ============================================ */

.region-cards-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.region-cards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.1), transparent);
}

.region-section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--harbor-deep);
  text-align: center;
  margin-bottom: 0.5rem;
}

.region-section-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
}

.region-card-maritime {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  height: 180px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.region-card-maritime:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.region-card-maritime::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform 0.4s ease;
}

.region-card-maritime:hover::before {
  transform: scale(1.1);
}

/* Bar Harbor - Deep Ocean */
.region-card-maritime.bar-harbor {
  background: linear-gradient(135deg, var(--atlantic-blue) 0%, #1a365d 100%);
}

/* Southwest Harbor - Teal Waters */
.region-card-maritime.southwest {
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}

/* Mount Desert - Pine Forest */
.region-card-maritime.mount-desert {
  background: linear-gradient(135deg, var(--pine-green) 0%, #1e4d3d 100%);
}

/* Town Hill - Sunset Amber */
.region-card-maritime.town-hill {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}

.region-card-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.region-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.region-card-maritime:hover .region-card-icon {
  transform: scale(1.2);
}

.region-card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.region-card-count {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Decorative wave on cards */
.region-card-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  opacity: 0.15;
}

/* ---------- Nav Logo ---------- */
.nav-logo {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
}

/* ---------- Nav Scroll State ---------- */
.nav-scrolled .nav-logo {
  color: var(--harbor-deep);
}
.nav-scrolled a.text-white\/80 {
  color: #475569 !important;
}

.nav-scrolled a.text-white\/80:hover {
  color: var(--atlantic-blue) !important;
}

.nav-scrolled #mobile-menu-btn {
  color: #475569;
}

/* ============================================
   FILTER BAR - Maritime Style
   ============================================ */

.filters-maritime {
  background: #ffffff;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.filter-section-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--atlantic-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Cuisine pill buttons */
.cuisine-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.cuisine-pill:hover {
  background: #e2e8f0;
  color: var(--harbor-deep);
}

.filters-maritime .cuisine-pill.active,
.filters-maritime .filter-btn.cuisine-pill.active {
  background: var(--harbor-deep);
  color: white;
  border-color: var(--harbor-deep);
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.3);
}

/* Filter dropdowns */
.filter-dropdown-maritime {
  position: relative;
}

.filter-dropdown-maritime label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--atlantic-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
  display: block;
}

.filter-dropdown-maritime select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--harbor-deep);
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e3a5f'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.filter-dropdown-maritime select:hover {
  border-color: var(--sea-foam);
  background-color: #ffffff;
}

.filter-dropdown-maritime select:focus {
  outline: none;
  border-color: var(--sea-foam);
  box-shadow: 0 0 0 3px rgba(74, 158, 184, 0.2);
}

/* Favorites button */
.favorites-btn-maritime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--harbor-deep);
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.favorites-btn-maritime:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.favorites-btn-maritime.active {
  background: var(--lobster-red);
  color: white;
  border-color: var(--lobster-red);
  box-shadow: 0 4px 12px rgba(200, 75, 49, 0.3);
}

/* Open Now button */
.opennow-btn-maritime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--harbor-deep);
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.opennow-btn-maritime:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.opennow-btn-maritime.active {
  background: var(--pine-green);
  color: white;
  border-color: var(--pine-green);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

/* Reset button */
.reset-btn-maritime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-btn-maritime:hover {
  background: #e2e8f0;
  color: var(--harbor-deep);
}

/* ============================================
   RESTAURANT CARDS - Maritime Style
   ============================================ */

.restaurant-grid-section {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.restaurant-grid-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--harbor-deep);
}

.restaurant-card-maritime {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.restaurant-card-maritime:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(74, 158, 184, 0.2);
}

.restaurant-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.restaurant-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.restaurant-card-maritime:hover .restaurant-card-image img {
  transform: scale(1.08);
}

/* Card badges */
.card-badge-maritime {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-badge-maritime.year-round {
  background: linear-gradient(135deg, var(--pine-green), #059669);
  color: white;
}

.card-badge-maritime.summer-only {
  background: linear-gradient(135deg, var(--buoy-orange), var(--sunset-coral));
  color: white;
}

.card-badge-maritime.happy-hour {
  background: linear-gradient(135deg, #9333ea, #db2777);
  color: white;
}

/* Card content */
.restaurant-card-content {
  padding: 1.25rem;
}

.restaurant-card-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--harbor-deep);
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.restaurant-card-maritime:hover .restaurant-card-name {
  color: var(--sea-foam);
}

/* Rating display */
.restaurant-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
}

.restaurant-rating .star {
  color: #fbbf24;
}

.restaurant-rating .score {
  font-weight: 600;
  color: var(--harbor-deep);
}

.restaurant-rating .count {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Region badge on cards */
.region-badge-maritime {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
}

.region-badge-maritime.bar-harbor {
  background: rgba(30, 58, 95, 0.1);
  color: var(--atlantic-blue);
}

.region-badge-maritime.southwest {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}

.region-badge-maritime.mount-desert {
  background: rgba(45, 106, 79, 0.1);
  color: var(--pine-green);
}

.region-badge-maritime.town-hill {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

/* Cuisine tags */
.cuisine-tag-maritime {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  background: #fdf2f8;
  color: #9d174d;
}

/* Service tags */
.service-tag-maritime {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  background: #f5f3ff;
  color: #6b21a8;
}

/* Quick action buttons on card hover */
.card-quick-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  padding-top: 3rem;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.9), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.restaurant-card-maritime:hover .card-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.quick-action-btn-maritime {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--harbor-deep);
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-action-btn-maritime:hover {
  background: #ffffff;
  transform: scale(1.05);
}

/* ============================================
   MAP/GRID VIEW TOGGLE
   ============================================ */

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #64748b;
  background: #f1f5f9;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:hover {
  color: var(--harbor-deep);
  background: #e2e8f0;
}

.view-toggle-btn.active {
  color: var(--harbor-deep);
  background: white;
  border-color: var(--sea-foam);
  box-shadow: 0 2px 8px rgba(74, 158, 184, 0.2);
}

/* ============================================
   FOOTER - Maritime Depths
   The footer mirrors the hero: if the hero is
   the sky above the harbor, the footer is the
   ocean floor beneath it.
   ============================================ */

.footer-maritime {
  position: relative;
  margin-top: 0;
  background: linear-gradient(
    180deg,
    #0b1a2e 0%,
    #091422 40%,
    #060e18 100%
  );
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  border-top: 3px solid var(--atlantic-blue);
}

/* Subtle animated wave layers in footer background */
.footer-maritime::before,
.footer-maritime::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%234a9eb8' fill-opacity='.03'/%3E%3C/svg%3E");
  background-size: 50% 80px;
  background-repeat: repeat-x;
  background-position: top;
  animation: wave 30s linear infinite;
  pointer-events: none;
}

.footer-maritime::after {
  animation: wave 22s linear infinite reverse;
  opacity: 0.5;
  top: 30px;
}

/* Grain texture for depth */
.footer-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ---------- Footer Content Area ---------- */
.footer-content {
  position: relative;
  z-index: 10;
  padding-top: 3rem;
}

/* ---------- Brand Column ---------- */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand svg {
  width: 28px;
  height: 28px;
  color: var(--sea-foam);
  filter: drop-shadow(0 0 6px rgba(74, 158, 184, 0.3));
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  max-width: 320px;
}

/* ---------- Column Headings ---------- */
.footer-heading {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sea-foam);
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--sea-foam), transparent);
  border-radius: 1px;
}

/* ---------- Footer Links ---------- */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: all 0.25s ease;
  padding: 0.125rem 0;
  background: none;
  border: none;
  cursor: pointer;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.footer-link:hover::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sea-foam);
  margin-right: -0.125rem;
  animation: footerDotPulse 1s ease-in-out infinite;
}

@keyframes footerDotPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---------- Bottom Bar ---------- */
.footer-bottom {
  position: relative;
  z-index: 10;
  padding: 1.5rem 0;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

.footer-copyright svg {
  color: var(--lobster-red);
  vertical-align: -0.125em;
  filter: drop-shadow(0 0 4px rgba(200, 75, 49, 0.4));
}

/* ---------- Footer Responsive ---------- */
@media (max-width: 768px) {
  .footer-content {
    padding-top: 2rem;
  }

  .footer-brand-name {
    font-size: 1.25rem;
  }

  .footer-tagline {
    font-size: 0.875rem;
  }

  .footer-bottom .flex {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-maritime::before,
  .footer-maritime::after {
    animation: none;
  }

  .footer-link:hover {
    transform: none;
  }
}

/* ============================================
   DARK MODE OVERRIDES
   Activated by .dark class on <html> element.
   ============================================ */

/* Smooth theme transition */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ---------- Page Background ---------- */
html.dark body {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* ---------- Wave Divider (hero bottom) ---------- */
html.dark .hero-wave-divider .shape-fill {
  fill: #0f172a;
}

/* ---------- Region Cards Section ---------- */
html.dark .region-cards-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

html.dark .region-cards-section::before {
  background: linear-gradient(90deg, transparent, rgba(74, 158, 184, 0.15), transparent);
}

html.dark .region-section-title {
  color: #e2e8f0;
}

html.dark .region-section-subtitle {
  color: #94a3b8;
}

/* ---------- Nav Scrolled State ---------- */
html.dark .nav-scrolled {
  background: rgba(15, 23, 42, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html.dark .nav-scrolled .nav-logo {
  color: #e2e8f0;
}

html.dark .nav-scrolled a.text-white\/80 {
  color: #94a3b8 !important;
}

html.dark .nav-scrolled a.text-white\/80:hover {
  color: #e2e8f0 !important;
}

html.dark .nav-scrolled #mobile-menu-btn {
  color: #94a3b8;
}

/* ---------- Mobile Menu ---------- */
html.dark #mobile-menu > div {
  background: #1e293b;
  border-color: #334155;
}

html.dark #mobile-menu a.text-slate-700,
html.dark #mobile-menu a[class*="text-slate-700"] {
  color: #cbd5e1;
}

html.dark #mobile-menu a:hover {
  background: #334155;
}

/* ---------- Filter Bar ---------- */
html.dark .filters-maritime {
  background: #1e293b;
  border-bottom-color: rgba(74, 158, 184, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Cuisine pills */
html.dark .cuisine-pill {
  background: #334155;
  color: #cbd5e1;
  border-color: transparent;
}

html.dark .cuisine-pill:hover {
  background: #475569;
  color: #e2e8f0;
}

html.dark .filters-maritime .cuisine-pill.active,
html.dark .filters-maritime .filter-btn.cuisine-pill.active {
  background: var(--sea-foam);
  color: #0f172a;
  border-color: var(--sea-foam);
}

/* Filter dropdowns */
html.dark .filter-dropdown-maritime label {
  color: var(--sea-foam);
}

html.dark .filter-dropdown-maritime select {
  color: #e2e8f0;
  background-color: #334155;
  border-color: #475569;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

html.dark .filter-dropdown-maritime select:hover {
  border-color: var(--sea-foam);
  background-color: #475569;
}

html.dark .filter-dropdown-maritime select:focus {
  border-color: var(--sea-foam);
  box-shadow: 0 0 0 3px rgba(74, 158, 184, 0.25);
}

html.dark .filter-dropdown-maritime select option {
  background: #1e293b;
  color: #e2e8f0;
}

/* Favorites button (dark) */
html.dark .favorites-btn-maritime {
  color: #e2e8f0;
  background: rgba(200, 75, 49, 0.15);
  border-color: rgba(200, 75, 49, 0.3);
}

html.dark .favorites-btn-maritime:hover {
  background: rgba(200, 75, 49, 0.25);
  border-color: rgba(200, 75, 49, 0.5);
}

/* Open Now button (dark) */
html.dark .opennow-btn-maritime {
  color: #e2e8f0;
  background: rgba(45, 106, 79, 0.15);
  border-color: rgba(45, 106, 79, 0.3);
}

html.dark .opennow-btn-maritime:hover {
  background: rgba(45, 106, 79, 0.25);
  border-color: rgba(45, 106, 79, 0.5);
}

/* Reset button (dark) */
html.dark .reset-btn-maritime {
  color: #94a3b8;
  background: #334155;
}

html.dark .reset-btn-maritime:hover {
  background: #475569;
  color: #e2e8f0;
}

/* ---------- Restaurant Grid Section ---------- */
html.dark .restaurant-grid-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

html.dark .restaurant-grid-title {
  color: #e2e8f0;
}

html.dark .result-count-maritime {
  color: #94a3b8;
}

/* ---------- Restaurant Cards ---------- */
html.dark .restaurant-card-maritime {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html.dark .restaurant-card-maritime:hover {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(74, 158, 184, 0.3);
}

html.dark .restaurant-card-name {
  color: #e2e8f0;
}

html.dark .restaurant-card-maritime:hover .restaurant-card-name {
  color: var(--sea-foam);
}

html.dark .restaurant-rating .score {
  color: #e2e8f0;
}

html.dark .restaurant-rating .count {
  color: #94a3b8;
}

/* Region badges on cards (dark) */
html.dark .region-badge-maritime.bar-harbor {
  background: rgba(30, 58, 95, 0.3);
  color: #7dd3fc;
}

html.dark .region-badge-maritime.southwest {
  background: rgba(13, 148, 136, 0.2);
  color: #5eead4;
}

html.dark .region-badge-maritime.mount-desert {
  background: rgba(45, 106, 79, 0.2);
  color: #6ee7b7;
}

html.dark .region-badge-maritime.town-hill {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

/* Cuisine tags (dark) */
html.dark .cuisine-tag-maritime {
  background: rgba(157, 23, 77, 0.15);
  color: #f9a8d4;
}

/* Service tags (dark) */
html.dark .service-tag-maritime {
  background: rgba(107, 33, 168, 0.15);
  color: #c4b5fd;
}

/* ---------- View Toggle Buttons ---------- */
html.dark .view-toggle-btn {
  color: #94a3b8;
  background: #334155;
}

html.dark .view-toggle-btn:hover {
  color: #e2e8f0;
  background: #475569;
}

html.dark .view-toggle-btn.active {
  color: #e2e8f0;
  background: #1e293b;
  border-color: var(--sea-foam);
}

/* ---------- Empty State ---------- */
html.dark #empty-state h3 {
  color: #e2e8f0;
}

html.dark #empty-state p {
  color: #94a3b8;
}

html.dark #empty-state .bg-slate-100 {
  background: #334155;
}

html.dark #empty-state .text-slate-300 {
  color: #64748b;
}

html.dark #clearFiltersBtn {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

html.dark #clearFiltersBtn:hover {
  background: #475569;
}

/* ---------- Loading State ---------- */
html.dark #loadingMessage p {
  color: #94a3b8;
}

/* ---------- Skeleton Cards ---------- */
html.dark .skeleton-card {
  background: #1e293b !important;
}

html.dark .skeleton-card .bg-slate-200,
html.dark .skeleton-card [class*="bg-slate-200"] {
  background: #334155 !important;
}

html.dark .skeleton-card .border-slate-100 {
  border-color: #334155 !important;
}

/* ---------- Scroll to Top Button ---------- */
html.dark #scrollToTopBtn {
  background: var(--sea-foam);
  color: #0f172a;
}

html.dark #scrollToTopBtn:hover {
  background: #38bdf8;
}

/* ---------- Footer Wave Transition ---------- */
html.dark .footer-wave-top .shape-fill {
  fill: #1e293b;
}

/* ---------- Modal (dark) ---------- */
html.dark .modal-content {
  background: #1e293b !important;
  color: #e2e8f0;
}

html.dark .modal-close {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #cbd5e1;
}

html.dark .modal-close:hover {
  background: #334155 !important;
}

/* ---------- Dark Mode Toggle Button ---------- */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* When nav is scrolled in light mode */
.nav-scrolled .dark-mode-toggle {
  background: #f1f5f9;
  color: #475569;
}

.nav-scrolled .dark-mode-toggle:hover {
  background: #e2e8f0;
  color: var(--harbor-deep);
}

/* When nav is scrolled in dark mode */
html.dark .nav-scrolled .dark-mode-toggle {
  background: #334155;
  color: #94a3b8;
}

html.dark .nav-scrolled .dark-mode-toggle:hover {
  background: #475569;
  color: #e2e8f0;
}

/* Mobile dark mode toggle in dropdown menu */
.dark-mode-toggle-mobile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #f1f5f9;
  color: #475569;
}

.dark-mode-toggle-mobile:hover {
  background: #e2e8f0;
  color: var(--harbor-deep);
}

html.dark .dark-mode-toggle-mobile {
  background: #334155;
  color: #cbd5e1;
}

html.dark .dark-mode-toggle-mobile:hover {
  background: #475569;
  color: #e2e8f0;
}

/* ---------- Leaflet Map Popup (dark) ---------- */
html.dark .leaflet-popup-content-wrapper {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html.dark .leaflet-popup-tip {
  background: #1e293b;
}

html.dark .leaflet-popup-content a {
  color: var(--sea-foam);
}
