/* ======= Base ======= */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f8fa;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

/* ======= Utility Classes ======= */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: #94a3b8;
}

/* ======= Header ======= */
.site-header {
  background: #0e3b3a;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.logo {
  font-size: 28px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.brand-sub {
  font-size: 11px;
  opacity: 0.8;
  font-weight: 400;
}

/* Desktop Navigation */
.desktop-nav, .nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a, .nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-link:hover,
.nav-link.is-active {
  background: rgba(255,255,255,.2);
}

.desktop-nav .logout-btn, .logout-btn {
  background: #dc2626;
  margin-left: 10px;
  padding: 5px 16px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.desktop-nav .logout-btn:hover, .logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

/* Hamburger Menu (Mobile Only) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #0e3b3a 0%, #0a2d2c 100%);
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  overflow-y: auto;
  padding-top: 80px;
}

.mobile-menu.active {
  right: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.mobile-nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  font-size: 17px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(255,255,255,0.15);
  transform: translateX(5px);
}

.mobile-logout-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: 10px;
  margin-top: 20px;
  background: #dc2626;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 17px;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.mobile-logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.5);
}

/* ======= Hero ======= */
.hero {
  padding: 50px 20px;
  text-align: center;
  background: linear-gradient(135deg, #0e3b3a 0%, #13a39b 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
}

.hero--tight {
  padding: 40px 20px;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1, .hero h2 {
  font-size: 36px;
  margin-bottom: 14px;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0;
}

.hero .accent {
  color: #fbbf24;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero .lead {
  max-width: 700px;
  margin: 0 auto 26px;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.95;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(14, 59, 58, 0.9) 0%, rgba(19, 163, 155, 0.9) 100%);
  z-index: 1;
}

/* Search Forms */
#searchForm {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

#searchForm input {
  padding: 14px 18px;
  min-width: 300px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.95);
}

#searchForm input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
  background: #fff;
}

#searchForm button {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  background: #fbbf24;
  color: #0e3b3a;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

#searchForm button:hover {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(251, 191, 36, 0.4);
}

/* Searchbar (PHP version) */
.searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
}

.search-icon {
  font-size: 20px;
  position: absolute;
  left: 15px;
  pointer-events: none;
  z-index: 2;
}

.search-input {
  flex: 1;
  padding: 14px 18px 14px 45px;
  min-width: 300px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.95);
}

.search-input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
  background: #fff;
}

/* Suggestions Dropdown */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.suggestions.show {
  display: block;
}

.suggestions li {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
}

.suggestions li:last-child {
  border-bottom: none;
}

.suggestions li:hover,
.suggestions li:focus {
  background: #f1f5f9;
  outline: none;
}

/* Quick Chips */
.chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.chip {
  padding: 8px 16px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chip:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* ======= Map ======= */
.map-section {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  background: #fff;
}

#map, .map {
  width: 100%;
  max-width: 1200px;
  height: 600px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 2px solid #e5e7eb;
  overflow: hidden;
  touch-action: pan-x pan-y;
  position: relative;
}

.map-card {
  grid-area: map;
}

/* Main Grid (PHP version) */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding: 40px 20px;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-areas: "map panel";
  }
}

/* Prevent map from interfering with page scroll on mobile */
@media (max-width: 768px) {
  #map, .map {
    height: 450px;
    touch-action: manipulation;
  }
}

/* ======= Results Panel ======= */
.results-panel {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

.results-panel h3 {
  margin-top: 0;
  font-size: 24px;
  color: #0e3b3a;
  font-weight: 700;
  margin-bottom: 10px;
}

.results-panel p {
  color: #64748b;
  line-height: 1.6;
}

/* Panel (PHP version) */
.panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
  padding: 24px;
  grid-area: panel;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 24px;
  color: #0e3b3a;
  font-weight: 700;
  margin: 0;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.filter input {
  cursor: pointer;
}

/* Results List */
.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card */
.card {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.name {
  font-size: 16px;
  margin-bottom: 4px;
  color: #0e3b3a;
}

.address {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
}

.meta {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  background: #0e3b3a;
  color: #fff;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ======= Comments Section ======= */
.comments-section {
  background: linear-gradient(to bottom, #f8fafc 0%, #e5e7eb 100%);
  padding: 60px 20px;
  margin-top: 40px;
}

.comments-container {
  max-width: 1200px;
  margin: 0 auto;
}

.comments-title {
  font-size: 32px;
  color: #0e3b3a;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.comments-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 18px;
  margin-bottom: 40px;
  font-weight: 500;
}

/* Comment Form */
.comment-form {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 40px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.comment-form:focus-within {
  border-color: #13a39b;
  box-shadow: 0 6px 24px rgba(19, 163, 155, 0.15);
}

.comment-form textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: all 0.3s ease;
  min-height: 100px;
}

.comment-form textarea:focus {
  border-color: #13a39b;
  box-shadow: 0 0 0 3px rgba(19, 163, 155, 0.1);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.char-count {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
}

.btn-post {
  padding: 12px 30px;
  background: linear-gradient(135deg, #0e3b3a 0%, #13a39b 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(19, 163, 155, 0.3);
}

.btn-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(19, 163, 155, 0.4);
}

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

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.comment-card {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.comment-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comment-author {
  font-weight: 700;
  color: #0e3b3a;
  font-size: 16px;
}

.comment-time {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}

.comment-text {
  color: #334155;
  line-height: 1.7;
  font-size: 16px;
  margin: 0;
}






/* ======= Buttons ======= */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #0e3b3a;
}

.btn-primary:hover {
  background: #13a39b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 163, 155, 0.3);
}

.btn-google {
  background: #1a73e8;
}

.btn-google:hover {
  background: #1557b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-apple {
  background: #111;
}

.btn-apple:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ======= Map Popup ======= */
.popup-title {
  font-weight: 800;
  margin-bottom: 6px;
  color: #0e3b3a;
}

.popup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ======= Result Actions ======= */
.result-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ======= Responsive Design ======= */
@media (max-width: 768px) {
  /* Hide desktop nav, show hamburger */
  .desktop-nav, .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero adjustments */
  .hero h1, .hero h2 {
    font-size: 28px;
  }

  .hero .lead {
    font-size: 16px;
  }

  #searchForm, .searchbar {
    flex-direction: column;
    align-items: stretch;
  }

  #searchForm input, .search-input {
    min-width: 100%;
  }

  #searchForm button {
    width: 100%;
  }

  .search-icon {
    left: 15px;
  }

  .chips {
    gap: 8px;
  }

  .chip {
    font-size: 13px;
    padding: 6px 12px;
  }

  /* Comments section */
  .comments-title {
    font-size: 26px;
  }

  .comments-subtitle {
    font-size: 16px;
  }

  .comment-form {
    padding: 20px;
  }

  .comment-card {
    padding: 18px;
  }

  .form-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .btn-post {
    width: 100%;
  }

  /* Results panel */
  .results-panel, .panel {
    margin: 0 20px 30px;
  }

  /* Brand */
  .brand-title {
    font-size: 16px;
  }

  .brand-sub {
    font-size: 10px;
  }

  .logo {
    font-size: 24px;
  }

  /* Card row */
  .row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-header h1 {
    font-size: 20px;
  }

  .hero {
    padding: 35px 15px;
  }

  .hero h1, .hero h2 {
    font-size: 24px;
  }

  .comments-section {
    padding: 40px 15px;
  }

  .mobile-menu {
    width: 100%;
  }

  .wrap {
    padding: 0 15px;
  }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}