/* ===== CSS Variables — Premium Restaurant Design System ===== */
:root {
  /* Primary: Deep Forest Green (trust, quality, freshness) */
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #22c55e;
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;

  /* Secondary: Warm Charcoal */
  --secondary: #1c1917;
  --secondary-light: #44403c;
  --secondary-mid: #57534e;
  --secondary-50: #fafaf9;
  --secondary-100: #f5f5f4;
  --secondary-200: #e7e5e4;
  --secondary-300: #d6d3d1;

  /* Accent: Warm Amber/Gold */
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;

  /* Backgrounds */
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --bg-input: #f5f5f4;
  --bg-dark: #1c1917;

  /* Text */
  --text: #1c1917;
  --text-light: #57534e;
  --text-muted: #a8a29e;

  /* Borders & Effects */
  --border: #e7e5e4;
  --border-focus: #16a34a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* Sizing */
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-width: 1200px;
  --header-height: 68px;

  /* Fonts */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.site-header {
  background: var(--bg-dark);
  color: #fff;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.logo:hover { color: #fff; }

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

nav { display: flex; align-items: center; gap: 2px; }

nav a {
  color: rgba(255,255,255,0.65);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 0 calc(-50vw + 50%);
  width: 100vw;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1556910103-1c02745aae4d?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(28, 25, 23, 0.92) 0%,
    rgba(28, 25, 23, 0.78) 50%,
    rgba(28, 25, 23, 0.65) 100%
  );
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(22, 163, 74, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 680px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  display: block;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Main Content ===== */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* ===== Section Styles ===== */
.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-50);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  line-height: 1.7;
}

/* ===== Tool Cards Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(22, 163, 74, 0.15);
}

.tool-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.tool-card-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.icon-green  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.icon-amber  { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.icon-blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.icon-purple { background: linear-gradient(135deg, #faf5ff, #f3e8ff); }
.icon-rose   { background: linear-gradient(135deg, #fff1f2, #ffe4e6); }
.icon-teal   { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); }
.icon-orange { background: linear-gradient(135deg, #fff7ed, #ffedd5); }

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
  flex: 1;
  line-height: 1.6;
}

.tool-card .btn {
  align-self: flex-start;
}

/* ===== Tool Page Layout ===== */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}

.tool-main { min-width: 0; }

.tool-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

/* Tool Page Hero Banner */
.tool-hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  margin: 0 calc(-50vw + 50%);
  width: 100vw;
  margin-bottom: 32px;
}

.tool-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(28,25,23,0.5) 0%, rgba(28,25,23,0.85) 100%);
}

.tool-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
}

.tool-hero-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.tool-hero-content p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-top: 6px;
}

.tool-header {
  margin-bottom: 24px;
}

.tool-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.tool-header p {
  color: var(--text-light);
  font-size: 1rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }

/* ===== Tool Panels ===== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group { flex: 1; }

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--secondary-200);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

textarea { resize: vertical; min-height: 80px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 1px 3px rgba(22,163,74,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 12px rgba(22,163,74,0.35);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-dark);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 1px 3px rgba(245,158,11,0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 4px 12px rgba(245,158,11,0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--secondary-50);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: rgba(22,163,74,0.02); }

/* ===== Results / Summary ===== */
.result-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 20px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.result-box::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.result-box h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  display: block;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Info / Content Sections ===== */
.info-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.info-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.info-section p {
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.75;
}

.info-section ul {
  color: var(--text-light);
  padding-left: 20px;
  margin-bottom: 14px;
}

.info-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===== Features Grid (Homepage) ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 24px;
}

.feature {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
  background: var(--primary-50);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Ad Slots ===== */
.ad-slot {
  background: var(--secondary-50);
  border: 1px dashed var(--secondary-200);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 20px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot-sidebar { min-height: 250px; }

/* ===== Affiliate CTA ===== */
.affiliate-cta {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
}

.affiliate-cta h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.affiliate-cta p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

.footer-links h4 {
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  padding: 5px 0;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  text-align: center;
  color: rgba(255,255,255,0.35);
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ===== Toast / Notifications ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--secondary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
  font-weight: 500;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: var(--primary-dark); }
.toast-error { background: #dc2626; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-sidebar {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero { min-height: 420px; }
  .hero-content { padding: 60px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }

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

  .tool-hero { height: 180px; }

  nav { display: none; }
  nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-dark);
    padding: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .mobile-menu-btn { display: block; }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .ad-slot, .affiliate-cta, nav, .btn, .hero-bg, .tool-hero { display: none; }
  main { padding: 0; max-width: 100%; }
  .panel { border: 1px solid #ccc; break-inside: avoid; }
  .result-box { background: #f0f0f0 !important; color: #333 !important; }
  .result-box h3, .stat-value, .stat-label { color: #333 !important; }
}
