:root {
  --primary: #1e40af;
  --secondary: #2563eb;
  --bg: #f3f4f6;
  --text: #374151;
  --white: #ffffff;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 24px;
}

/* HERO */
.hero {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.hero h1 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 12px;
}

/* CATEGORIES */
.categories h2 {
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.category-card h3 {
  color: var(--secondary);
  margin-bottom: 8px;
}

/* TRUST */
.trust {
  background: var(--white);
  margin-top: 40px;
  padding: 30px;
  border-radius: var(--radius);
}

.trust ul {
  list-style: none;
}

.trust li {
  margin-bottom: 8px;
}

/* HEADER */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e40af;
  text-decoration: none;
}

.nav a {
  margin-left: 18px;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
}

.nav a:hover {
  color: #2563eb;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* FOOTER */
.site-footer {
  background: #111827;
  color: #d1d5db;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-about h4,
.footer-links h4 {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding: 14px;
  border-top: 1px solid #1f2933;
  font-size: 0.9rem;
}

/* TOOL PAGE */
.tool-header {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.tool-header h1 {
  color: #1e40af;
  margin-bottom: 8px;
}

.tool-box {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.tool-box textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  resize: vertical;
}

.tool-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.tool-results div {
  background: #f3f4f6;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.tool-content h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  color: #2563eb;
}

.tool-content ul {
  padding-left: 20px;
}

.tool-content li {
  margin-bottom: 6px;
}

.tool-input {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 14px;
}

.tool-btn {
  background: #2563eb;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.tool-btn:hover {
  background: #1e40af;
}

.result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 0.95rem;
}

/* CATEGORY PAGE */
.category-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.tool-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.tool-card h3 {
  color: #2563eb;
  margin-bottom: 6px;
}

.tool-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 14px;
  resize: vertical;
}

.tool-output {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  margin-top: 16px;
  font-family: monospace;
}

.tts-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 12px;
  margin-top: 14px;
}

.stop-btn {
  background: #9ca3af;
}

.stop-btn:hover {
  background: #6b7280;
}

@media (max-width: 640px) {
  .tts-controls {
    grid-template-columns: 1fr;
  }
}

.json-actions {
  display: flex;
  gap: 12px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.json-error {
  margin-top: 12px;
  color: #b91c1c;
  font-size: 0.95rem;
}


/* ===============================
   FORCE DESKTOP NAV (CRITICAL)
   =============================== */

.nav {
  display: flex !important;
  align-items: center;
  gap: 18px;
}

/* DESKTOP MEGA MENU ONLY */
/* =====================================
   DESKTOP MEGA MENU (FINAL – CLEAN)
   ===================================== */

.nav {
  display: flex !important;
  align-items: center;
  gap: 18px;
}

.mega-parent {
  position: relative;
}

.mega-menu {
  display: none;
  position: absolute;
  top: 110%;

  /* CENTER THE MENU */
  left: 10%;
  transform: translateX(-60%);

  /* RESPONSIVE WIDTH */
  width: min(1000px, 95vw);

  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  z-index: 9999;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.site-header {
  overflow: visible;
}


.mega-parent:hover > .mega-menu {
  display: grid;
}



.mega-column h4 {
  color: #1e40af;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.mega-column a {
  display: block;
  text-decoration: none;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.mega-column a:hover {
  color: #2563eb;
}

/* HIDE TOGGLE ON DESKTOP */
@media (min-width: 901px) {
  .menu-toggle {
    display: none !important;
  }
}

.header-container {
  position: relative;
}

/* SERP PREVIEW */
.serp-preview {
  margin-top: 24px;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  max-width: 600px;
}

.serp-title {
  color: #1a0dab;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.serp-url {
  color: #006621;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.serp-description {
  color: #4b5563;
  font-size: 0.95rem;
}
