* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f6f7fb;
  color: #222;
}

/* Header */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e3e3e3;
}

.header-inner {
  max-width: 1080px;
  margin: auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 800;
}

.logo span {
  color: #3b82f6;
}

.menu {
  font-size: 20px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 36px 16px 20px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.hero p {
  font-size: 15px;
  color: #666;
}

/* Categories */
.categories {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px 20px;
}

.cat {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.cat.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Tools grid */
.tools {
  max-width: 1080px;
  margin: auto;
  padding: 10px 16px 60px;
  display: grid;
  gap: 16px;
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
  .tools {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet: 2 columns */
@media (min-width: 640px) and (max-width: 1023px) {
  .tools {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 639px) {
  .tools {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.tool-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.green { background: #6cc24a; }
.blue { background: #4aa3df; }
.cyan { background: #2bbcd6; }
.yellow { background: #f2c94c; color: #333; }
.purple { background: #9b59b6; }
.gray { background: #95a5a6; }

.tool-content h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.tool-content p {
  font-size: 14px;
  color: #666;
  margin: 0;
}


/* =====================================================
   DESKTOP CARD SPACING ADJUSTMENT (FINAL TUNE)
   ===================================================== */
@media (min-width: 900px) {

  body .tools {
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  body .tool-card {
    flex-direction: column;
    align-items: flex-start;

    padding: 18px;              /* reduced */
    min-height: 210px;          /* reduced */
    border-radius: 18px;
  }

  body .tool-icon {
    margin-bottom: 12px;        /* tighter */
  }

  body .tool-content h3 {
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 600;
  }

  body .tool-content p {
    font-size: 13.5px;
    line-height: 1.35;          /* tighter text */
  }
}
