/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f9ff;
  margin: 0;
  padding: 0;
}

/* Guide Container */
.a4988-guide {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.a4988-header {
  background: linear-gradient(135deg, #1a6fc9, #0d4b8a);
  color: white;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.a4988-header h1 {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 600;
}

.a4988-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

/* Sections */
.a4988-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 25px;
}

.a4988-section h2 {
  color: #1a6fc9;
  border-bottom: 2px solid #4a8eff;
  padding-bottom: 8px;
  margin-top: 0;
  font-size: 24px;
}

/* Feature Cards */
.a4988-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.a4988-feature-card {
  background: #e6f0ff;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #4a8eff;
}

.a4988-feature-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.a4988-icon {
  margin-right: 8px;
  font-size: 20px;
}

/* Tables */
.a4988-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.a4988-specs, 
.a4988-pin-table,
.a4988-microstep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.a4988-specs th, 
.a4988-specs td,
.a4988-pin-table th,
.a4988-pin-table td,
.a4988-microstep-table th,
.a4988-microstep-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.a4988-specs th {
  background: #e6f0ff;
  color: #1a6fc9;
  font-weight: 600;
  width: 30%;
}

.a4988-pin-table th,
.a4988-microstep-table th {
  background: #1a6fc9;
  color: white;
  font-weight: 500;
}

/* Images */
.a4988-image {
  text-align: center;
  margin: 20px 0;
}

.a4988-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Notes */
.a4988-note {
  background: #e6f0ff;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #1a6fc9;
  margin: 15px 0;
  font-size: 14px;
}

/* Code Blocks */
.arduino-code {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 15px 0;
  tab-size: 4;
}

/* Steps */
.a4988-steps {
  padding-left: 20px;
}

.a4988-steps li {
  margin-bottom: 10px;
  font-size: 15px;
}

/* Troubleshooting */
.a4988-troubleshooting {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.a4988-issue {
  background: #ffece6;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #ff6b4a;
}

.a4988-issue h3 {
  margin-top: 0;
  color: #d84315;
}

.a4988-issue ul {
  padding-left: 20px;
  margin-bottom: 0;
}

/* Application Cards */
.a4988-applications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.a4988-application-card {
  background: #e6f0ff;
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #d0e0ff;
}

.a4988-application-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px 0;
  font-size: 16px;
}

/* Footer */
.a4988-footer {
  background: #e6f0ff;
  padding: 20px;
  border-radius: 8px;
}

.a4988-footer h2 {
  color: #1a6fc9;
  margin-top: 0;
}

.a4988-safety {
  padding-left: 20px;
}

.a4988-safety li {
  margin-bottom: 10px;
  font-size: 15px;
  list-style-type: none;
  position: relative;
  padding-left: 30px;
}

.a4988-safety li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 18px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .a4988-header h1 {
    font-size: 24px;
  }
  
  .a4988-features {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .a4988-specs th {
    width: 40%;
  }
  
  .a4988-troubleshooting {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .a4988-header {
    padding: 20px 15px;
  }
  
  .a4988-section {
    padding: 15px;
  }
  
  .a4988-specs th, 
  .a4988-specs td,
  .a4988-pin-table th,
  .a4988-pin-table td,
  .a4988-microstep-table th,
  .a4988-microstep-table td {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .a4988-features {
    grid-template-columns: 1fr;
  }
}