/* FixItCalc.com — Home Improvement & DIY Calculators */
/* Design System — Clean, Professional, Mobile-First */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.logo-text span {
  color: var(--primary);
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--text-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-links a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #2563eb 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-search input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  font-size: 1rem;
  outline: none;
  color: var(--text);
}

.hero-search button {
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.hero-search button:hover {
  background: var(--primary-dark);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Section Headers */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
}

.calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.calc-card-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.calc-card-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.calc-card-content p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Calculator Page */
.calc-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.calc-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.calc-page .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.calc-page .breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.calc-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.15s;
  background: var(--bg);
  color: var(--text);
}

.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);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 500px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.btn-calculate {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5rem;
}

.btn-calculate:hover {
  background: var(--primary-dark);
}

/* Results */
.results {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: none;
}

.results.visible {
  display: block;
}

.results h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

.result-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Unit toggle */
.unit-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 1rem;
}

.unit-toggle button {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.15s;
}

.unit-toggle button.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Ad placeholder */
.ad-placeholder {
  background: var(--border-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-page { padding: 1.5rem 1rem 3rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow-md); }
  .mobile-menu-btn { display: block; }
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

/* Trust badges */
.trust-section {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem 0;
  color: var(--text-light);
  font-size: 0.85rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Category filter */
.category-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cat-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.15s;
}

.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Quick calculator on homepage */
.quick-calc {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  margin: 3rem auto;
}

.quick-calc h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}
