/* Base Styles */
:root {
  --primary-color: #2563eb;
  --secondary-color: #f59e0b;
  --text-color: #0f172a;
  --light-text: #64748b;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --shadow-sm: 0 2px 4px rgba(15,23,42,.05);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.1), 0 2px 4px -1px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.1), 0 4px 6px -2px rgba(15,23,42,.05);
  --border-radius: 12px;
  --container-padding: 1rem;
  --section-spacing: 2rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, video, svg, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-color);
  background: radial-gradient(circle at top left, rgba(102, 126, 234, 0.18), transparent 24%),
              radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 18%),
              var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: #2563eb;
  transition: color 0.25s ease, transform 0.25s ease;
}
a:hover,
a:focus-visible {
  color: #1d4ed8;
  transform: translateY(-1px);
  outline: none;
}

button,
input,
select,
textarea {
  font: inherit;
  border-radius: 14px;
}

button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.sponsor-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.sponsor-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.sponsor-banner img {
  max-height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 12px rgba(15, 23, 42, 0.12));
}

.sponsor-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1e3a8a;
  text-transform: uppercase;
}

.proud-sponsors {
  background: linear-gradient(180deg, #fef6ed 0%, #fbf0e4 100%);
  padding: 3rem 0;
}

.proud-sponsors .container {
  display: grid;
  gap: 1.5rem;
}

.proud-sponsors h2 {
  margin: 0 auto 0.5rem;
  color: #1e293b;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
}

.proud-sponsors p {
  max-width: 820px;
  margin: 0 auto;
  color: #475569;
  line-height: 1.8;
  font-size: 1rem;
}

.sponsor-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-radius: 28px;
  background: white;
  border: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 42px rgba(245, 158, 11, 0.18);
}

.sponsor-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.sponsor-card h3 {
  margin: 0 0 0.35rem;
  color: #b45309;
  font-size: 1.2rem;
}

.sponsor-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: 0.98rem;
}

.sponsor-card .sponsor-meta {
  margin-top: 1rem;
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Responsive Typography */
html {
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

/* Hero Section */
.hero {
  position: relative;
  height: 50vh;
  min-height: 300px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%), url('/public/images/mycity/top.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.3));
}

.hero-content { 
  position: relative; 
  z-index: 1; 
  padding: 0 var(--container-padding);
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.hero-download-area {
  margin-top: 1.5rem;
  text-align: center;
}

.download-btn {
  background: #10b981;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  background: rgba(16, 185, 129, 0.9);
}

.download-btn:hover {
  background: rgba(5, 150, 105, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  color: white;
  text-decoration: none;
}

.download-btn i {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .hero-download-area {
    margin-top: 1rem;
  }
  
  .download-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

.brand { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(2.5rem, 10vw, 4rem);
  margin: 0 0 1rem; 
  text-shadow: 0 4px 16px rgba(0,0,0,.6);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle { 
  margin: 0.5rem 0 0; 
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 2vw, 1.5rem);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* Container */
.container { 
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem var(--container-padding);
  /* Prevent any child from breaking out */
  overflow-x: hidden;
}

@media (min-width: 480px) {
  .container {
    padding: 1.25rem var(--container-padding);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 2rem var(--container-padding);
  }
}

/* Sections */
section { 
  margin: var(--section-spacing) 0;
  position: relative;
}

section:first-child {
  margin-top: 0;
}

section:last-child {
  margin-bottom: 0;
}
/* Section Headings */
section h2 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  padding-bottom: 0.75rem;
}

section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.section-link:hover,
.section-link:focus-visible {
  color: #2563eb;
  border-color: #2563eb;
}

/* Cards Grid */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Card Styles */
.card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

#community-achievement .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

#community-achievement .stat-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

#community-achievement .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
}

#community-achievement .stat-number {
  min-width: 3ch;
  display: inline-block;
}

#community-achievement .stat-label {
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

#community-achievement .stat-note {
  margin: 0;
  color: var(--light-text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.18);
}

.card:hover img {
  transform: scale(1.05);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

@media (max-width: 480px) {
  .card img {
    height: 160px;
  }
}

.card:hover img {
  transform: scale(1.03);
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
}

.card p {
  margin: 0.5rem 0 0;
  color: var(--light-text);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.card .meta {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--light-text);
}
/* Rating stars */
.rating-stars {
  color: #e2e8f0; /* Light gray for empty stars */
  font-size: 1em;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  margin: 0.25rem 0;
}

.rating-stars::before {
  content: '★★★★★';
  display: block;
}

.rating-stars .stars {
  color: #f59e0b; /* Gold color for filled stars */
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
}

.rating-stars[data-rating="1"] .stars { width: 20%; }
.rating-stars[data-rating="1.5"] .stars { width: 30%; }
.rating-stars[data-rating="2"] .stars { width: 40%; }
.rating-stars[data-rating="2.5"] .stars { width: 50%; }
.rating-stars[data-rating="3"] .stars { width: 60%; }
.rating-stars[data-rating="3.5"] .stars { width: 70%; }
.rating-stars[data-rating="4"] .stars { width: 80%; }
.rating-stars[data-rating="4.5"] .stars { width: 90%; }
.rating-stars[data-rating="5"] .stars { width: 100%; }

/* Update card ratings */
.card .rating { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
  margin: 0.25rem 12px; 
  font-size: 0.9em;
}

.card .rating .stars { 
  color: #f59e0b; 
  letter-spacing: 2px; 
  font-size: 1em;
}

.card .rating .star {
  font-size: 1em;
  color: #f59e0b;
}

.card .rating .star.half,
.card .rating .star.empty {
  color: #94a3b8;
  opacity: 0.85;
}

.card .rating .score { 
  color: #64748b; 
  font-size: 0.9em;
  margin-left: 4px;
}

/* Update review stars */
.comments .stars {
  color: #f59e0b;
  letter-spacing: 2px;
  margin-right: 6px;
}

/* Rating input */
.stars-input .star {
  color: #e2e8f0; /* Light gray for empty stars */
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.2s ease;
}

.stars-input .star.active,
.stars-input .star:hover,
.stars-input .star:hover ~ .star {
  color: #f59e0b; /* Gold color for active/hover stars */
}
.card .score { font-size: 12px; color: #64748b; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-body { padding-bottom: 4px; }
.card .desc { margin: 0 12px 12px; color: #475569; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; /* Fallback for browsers that don't support line-clamp */ max-height: 2.7em; }

.api-demo { background: #eef2ff; border: 1px solid #c7d2fe; padding: 14px; border-radius: 10px; }

/* Details page */
.hero-small { height: 32vh; min-height: 220px; }
.back-link { color: #e2e8f0; text-decoration: none; display: inline-block; margin-bottom: 8px; }
.details .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.details .gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 12px; }
.chips li { background: #e2e8f0; color: #0f172a; border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.text-input, .text-area { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; margin: 8px 0; }
.text-area { min-height: 90px; resize: vertical; }
.btn { background: #0ea5e9; color: white; border: none; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
.btn:hover { background: #0284c7; }
.rating-summary { margin-bottom: 8px; color: #334155; }
.comments { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.comments li { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.comments .meta { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.stars-input { display: inline-flex; gap: 6px; margin: 6px 0; }
.stars-input .star { background: transparent; border: none; font-size: 22px; color: #e2e8f0; cursor: pointer; padding: 0; }
.stars-input .star.active, .stars-input .star:hover, .stars-input .star:hover ~ .star { color: #f59e0b; }

/* Menu Section */
#menu-section { margin: 32px 0; }

.menu-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 16px;
  margin-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.menu-categories::-webkit-scrollbar {
  height: 6px;
}

.menu-categories::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.menu-categories::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.menu-category-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.menu-category-btn:hover {
  background: #e2e8f0;
}

.menu-category-btn.active {
  background: #0ea5e9;
  color: white;
}

.menu-category {
  margin-bottom: 32px;
}

.menu-category h3 {
  margin: 0 0 12px;
  font-size: 1.5em;
  color: #0f172a;
  position: relative;
  padding-bottom: 8px;
}

.menu-category h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: #0ea5e9;
  border-radius: 3px;
}

.menu-category-desc {
  color: #64748b;
  margin: 0 0 20px;
  font-size: 0.95em;
}

.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.menu-item {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.menu-item h4 {
  margin: 0;
  font-size: 1.1em;
  color: #0f172a;
}

.menu-item-price {
  color: #0ea5e9;
  font-weight: 600;
  font-size: 1.1em;
  white-space: nowrap;
  margin-left: 12px;
}

.menu-item-desc {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.9em;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-items-grid {
    grid-template-columns: 1fr;
  }
  
  .menu-category h3 {
    font-size: 1.3em;
  }
  
  .menu-item {
    padding: 14px;
  }
}

/* ====================================================
   GLOBAL MOBILE SAFETY NET
   ==================================================== */

/* Prevent any element from causing horizontal scroll */
@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  /* Tables that may overflow */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Prevent pre/code blocks from breaking layout */
  pre, code {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Gallery grids on detail pages */
  .details .gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  }

  .details .gallery img {
    height: 160px;
  }

  /* Section headings on small screens */
  section h2 {
    font-size: 1.4rem;
  }

  /* Chips / tags */
  .chips {
    gap: 6px;
  }

  .chips li {
    font-size: 11px;
    padding: 5px 9px;
  }
}

/* Touch-friendly tap targets */
a, button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Inline elements keep display */
span, strong, em, b, i {
  display: inline;
  min-height: unset;
}

/* Anchors that are block-level links need block display */
a.card-link, a.action-btn, a.btn, a.download-btn, a.nav-link, a.dropdown-item {
  display: flex;
}
a.action-btn, a.btn, a.download-btn {
  display: inline-flex;
  justify-content: center;
}
a.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

