/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f6f6fc;
  --surface: #0e063d;
  --text: #141414;
  --muted: #041e38;
  --accent: #0216c7;
  --radius: 14px;
  --measure: 65ch;
  --nav-height: 52px;
}

html, body {
  height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(246,246,252,0.98), rgba(246,246,252,0.95));
  backdrop-filter: blur(8px);
  padding: 8px 0;
  z-index: 120;
  border-bottom: 1px solid rgba(12,18,30,0.08);
  box-shadow: 0 2px 8px rgba(12,18,30,0.04);
}

.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2.2vw, 28px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
}

.primary-nav {
  display: flex;
  gap: clamp(14px, 2.6vw, 26px);
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 0 6px;
  height: var(--nav-height);
  transition: all 0.3s ease;
}

.primary-nav a {
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  border-radius: 6px;
  transition: color 200ms ease, background-color 200ms ease;
  position: relative;
  display: block;
}

/* Animated underline effect for hover and active states */
.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(2, 22, 199, 0.7));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Hover effect - show underline on pointer devices */
@media (hover: hover) {
  .primary-nav a:hover::after {
    transform: scaleX(1);
  }
}

/* Focus effect for keyboard navigation */
.primary-nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Active/current page state - persistent highlight */
.primary-nav a.active,
.primary-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 800;
}

.primary-nav a.active::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
}

/* ===== Hero Section ===== */
.hero {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-top: var(--nav-height);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 20px;
}

.lead {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto 30px;
}

/* ===== Cards ===== */
.tools-grid, .category-cards, .tips-grid, .faq-grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.tools-grid, .faq-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.category-cards, .tips-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tool-card, .category-card, .tip-card, .faq-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover, .category-card:hover, .tip-card:hover, .faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.tool-card-header, .tool-details, .category-details, .tip-content {
  margin-bottom: 15px;
}

.feature-tag {
  background: rgba(102,126,234,0.1);
  color: #667eea;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

/* ===== Tables ===== */
.comparison-table {
  overflow-x: auto;
  margin: 40px 0;
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th, .comparison-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

.comparison-table th {
  background: #f8f9ff;
  color: #333;
  border-bottom: 2px solid #667eea;
  font-weight: 600;
}

.comparison-table tr:hover {
  background: #f8f9ff;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: white;
  color: #667eea;
}

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-amazon {
  background: #ff9900;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  width: 100%;
  font-weight: 600;
}

.btn-amazon:hover {
  background: #e68a00;
  transform: translateY(-2px);
}

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  padding: 48px 20px 28px;
}

.site-footer a {
  color: #cbd5f5;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 36px;
  padding-top: 18px;
  font-size: 0.9rem;
  text-align: center;
  color: #94a3b8;
}

.affiliate-disclaimer {
  margin-top: 10px;
  font-weight: 600;
  color: #e5e7eb;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 130;
  }

  .primary-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms ease;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
  }

  .primary-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 14px 12px;
    border-radius: 4px;
    border-left: 4px solid transparent;
    margin-bottom: 4px;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  }

  /* Mobile active state - left border highlight */
  .primary-nav a.active,
  .primary-nav a[aria-current="page"] {
    background-color: rgba(2, 22, 199, 0.08);
    border-left-color: var(--accent);
  }

  .primary-nav a::after {
    display: none;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .lead {
    font-size: 1rem;
  }
}

/* ===== Sticky Menu Click JS ===== */
/* Add this JS in your <script> tag or external JS file */
