:root {
  --primary: #2D5016;
  --primary-light: #3d6b1f;
  --primary-dark: #1f3810;
  --accent: #F97316;
  --accent-hover: #ea580c;
  --accent-light: #fb923c;
  --dark: #1F2937;
  --gray-dark: #374151;
  --gray: #6B7280;
  --gray-light: #D1D5DB;
  --light: #F9FAFB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.main-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.main-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

.main-header .container {
  position: relative;
  z-index: 1;
}

.main-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tagline {
  font-size: 1.4rem;
  margin-top: 1rem;
  opacity: 0.95;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 2rem;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.breadcrumb-nav a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-nav a:hover {
  color: var(--accent);
}

.breadcrumb-nav span {
  color: var(--gray);
}

/* Search Section */
.search-section {
  margin: -2rem auto 3rem;
  max-width: 900px;
  position: relative;
  z-index: 10;
}

.search-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1.25rem;
  pointer-events: none;
}

#searchBox {
  width: 100%;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  font-size: 1.1rem;
  border: 2px solid var(--gray-light);
  border-radius: 16px;
  background: var(--white);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

#searchBox:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 80, 22, 0.1), var(--shadow-lg);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.875rem 2rem;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

/* Statistics */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0 4rem;
}

.stat-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-card h3 {
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 800;
  line-height: 1;
}

.stat-card p {
  color: var(--gray-dark);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Restaurant Cards */
.restaurants-section {
  margin: 4rem 0 5rem;
}

.restaurants-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  color: var(--dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.restaurant-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 2rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  min-height: 100px;
}

.card-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.rating {
  background: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
  font-size: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.card-body {
  padding: 2rem 1.75rem;
  flex: 1;
}

.location,
.cuisine {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: var(--gray-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location {
  font-weight: 500;
  color: var(--dark);
}

.specialities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.tag {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--gray-dark);
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.contact {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--gray-light);
}

.contact p {
  margin: 0.75rem 0;
  color: var(--gray-dark);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-footer {
  padding: 1.5rem 1.75rem;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02));
  border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--accent-hover) 0%, #dc2626 100%);
}

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

/* Restaurant Detail Page */
.restaurant-detail {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 2rem 0 4rem;
  border: 1px solid rgba(0,0,0,0.05);
}

.detail-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 2.5rem;
  position: relative;
}

.detail-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.detail-body {
  padding: 3rem 2.5rem;
}

.detail-section {
  margin-bottom: 3rem;
}

.detail-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.info-item {
  padding: 1.5rem;
  background: var(--light);
  border-radius: 16px;
  border: 1px solid var(--gray-light);
}

.info-item strong {
  display: block;
  color: var(--primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.info-item span {
  font-size: 1.1rem;
  color: var(--dark);
  font-weight: 500;
}

.specialities-detail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.specialities-detail .tag {
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
}

/* Footer */
.main-footer {
  background: linear-gradient(135deg, var(--dark) 0%, #111827 100%);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
  text-align: center;
  position: relative;
}

.main-footer p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.website-credit {
  margin-top: 2.5rem;
}

.credit-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  text-decoration: none;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.credit-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(249, 115, 22, 0.4);
}

.credit-icon {
  font-size: 1.75rem;
}

.credit-arrow {
  font-size: 1.4rem;
  transition: transform 0.3s;
}

.credit-button:hover .credit-arrow {
  transform: translateX(8px);
}

/* Back to Directory Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: var(--white);
  color: var(--primary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border: 2px solid var(--primary);
  margin-bottom: 2rem;
}

.back-button:hover {
  background: var(--primary);
  color: white;
  transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
  .restaurants-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .main-header h1 {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-header h3 {
    font-size: 1.35rem;
  }

  .credit-button {
    flex-direction: column;
    gap: 10px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .detail-header h1 {
    font-size: 2rem;
  }

  .detail-body {
    padding: 2rem 1.5rem;
  }

  #searchBox {
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 3rem 0 4rem;
  }

  .main-header h1 {
    font-size: 1.875rem;
  }

  .restaurants-section h2 {
    font-size: 1.875rem;
  }

  .stat-card h3 {
    font-size: 2.75rem;
  }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

.scroll-arrow {
  font-weight: bold;
  font-size: 1.75rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.25rem;
  }

  .scroll-arrow {
    font-size: 1.5rem;
  }
}
