/* Professional Minimal Design - Unified for all tools */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --light: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --border-radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--light);
  color: var(--gray-800);
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

header h1:hover {
  opacity: 0.8;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.25rem 0;
  font-size: 0.9rem;
  position: relative;
}

nav a:hover {
  color: var(--primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1rem;
  line-height: 1.2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-box {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.search-box button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Main Content Layout */
.main-content {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Tools Content */
.tools-content {
  flex: 1;
}

.tools-section {
  margin: 0;
}

.tools-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  text-align: left;
}

.tools-simple-list {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.tools-simple-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tools-simple-list li {
  margin-bottom: 0.5rem;
}

.tools-simple-list a {
  color: var(--gray-800);
  text-decoration: none;
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: var(--transition);
  border-left: 3px solid var(--primary);
  font-size: 0.95rem;
}

.tools-simple-list a:hover {
  background: var(--gray-100);
  transform: translateX(3px);
  border-left-color: #7c3aed;
}

/* Sidebar */
.sidebar {
  flex: 0 0 250px;
}

.popular-tools {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.popular-tools h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.popular-tools ul {
  list-style: none;
}

.popular-tools li {
  margin-bottom: 0.75rem;
}

.popular-tools a {
  color: var(--gray-800);
  text-decoration: none;
  display: block;
  padding: 0.6rem;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 0.9rem;
}

.popular-tools a:hover {
  background: var(--gray-100);
  transform: translateX(3px);
}

.popular-tools a::before {
  content: '→';
  margin-right: 0.5rem;
  color: var(--primary);
  font-weight: bold;
}

/* Tool Page Styles */
.tool-page main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: var(--gray-600);
  font-size: 1.1rem;
}

.calculator-form {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button[type="submit"] {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-size: 1rem;
}

button[type="submit"]:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Beautiful Results */
#result {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border-top: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

#result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
}

#result h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#result h3::before {
  content: '✓';
  background: var(--success);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-main {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 1rem;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  text-align: center;
}

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

.result-card {
  background: var(--gray-100);
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
}

.result-card h4 {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.result-card p {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 0;
}

.result-comparison {
  background: #eff6ff;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--info);
}

.result-nutrition {
  background: #f0fdf4;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--success);
}

.result-warning {
  background: #fffbeb;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--warning);
}

.result-danger {
  background: #fef2f2;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--danger);
}

.comparison-box {
  background: #eff6ff;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  border-left: 4px solid #3b82f6;
}

.nutrition-info {
  background: #f0fdf4;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--success);
}

.map-placeholder {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  margin: 1rem 0;
}

.route-line {
  height: 4px;
  background: var(--primary);
  margin: 2rem 0;
  position: relative;
}

.route-points {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.start-point,
.end-point {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
}

.stops-info {
  background: #fffbeb;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  border-left: 4px solid var(--warning);
}

.eco-tip {
  background: #ecfdf5;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid var(--success);
}

/* Article Styles */
.tool-article {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.tool-article h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 2rem 0 1rem;
}

.tool-article h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 1.5rem 0 1rem;
}

.tool-article h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 1rem 0 0.5rem;
}

.tool-article p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--gray-600);
}

.tool-article ol,
.tool-article ul {
  margin: 1rem 0 1.5rem 1.5rem;
}

.tool-article li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.tool-article pre {
  background: var(--gray-100);
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  font-family: monospace;
  margin: 1rem 0;
}

.tool-article dl {
  margin: 1.5rem 0;
}

.tool-article dt {
  font-weight: 600;
  margin-top: 1rem;
  color: var(--secondary);
}

.tool-article dd {
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Footer - ALL ITEMS IN ONE ROW INCLUDING COPYRIGHT */
footer {
  background: var(--secondary);
  color: white;
  padding: 1.25rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  color: #cbd5e1;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.copyright {
  color: #94a3b8;
  font-size: 0.8125rem;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 992px) {
  .main-content {
    flex-direction: column-reverse;
  }
  
  .sidebar {
    flex: 0 0 auto;
  }
  
  .tools-simple-list ul {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero h2 {
    font-size: 1.75rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .result-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  nav {
    gap: 1rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .search-box {
    flex-direction: column;
  }

  .popular-tools {
    padding: 1.25rem;
  }

  .tools-simple-list {
    padding: 1.25rem;
  }

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

  .calculator-form,
  .tool-article,
  #result {
    padding: 1.5rem;
  }

  /* Footer responsive - stack on mobile */
  footer {
    padding: 1.5rem 1rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links,
  .social-icons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .copyright {
    text-align: center;
    margin-top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.375rem;
  }

  .tools-section h2 {
    font-size: 1.25rem;
  }

  .popular-tools,
  .tools-simple-list,
  .calculator-form,
  .tool-article,
  #result {
    padding: 1rem;
  }

  .popular-tools a,
  .tools-simple-list a {
    padding: 0.5rem;
  }

  .footer-links a,
  .social-icons a {
    margin: 0.125rem;
    font-size: 0.75rem;
  }
  
  .tools-simple-list ul {
    gap: 0.5rem;
  }
  
  .result-main {
    font-size: 1.125rem;
  }
}
