/* ==========================================================================
   Projects Styles - Bolt IoT
   ========================================================================== */

/* Projects Listing */
.projects-hero {
  background: #f8f9fa;
  color: #333;
  padding: 40px 20px;
  border-bottom: 1px solid #e0e0e0;
}
.projects-hero-inner {
  display: flex;
  gap: 40px;
  max-width: 1170px;
  margin: 0 auto;
  align-items: flex-start;
}
.projects-hero-left {
  flex: 1;
  min-width: 0;
}
.projects-hero-right {
  flex: 0 0 380px;
}
.projects-hero h1 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 36px;
  margin-bottom: 10px;
  color: #333;
}
.projects-hero p {
  font-family: 'open_sansregular', sans-serif;
  font-size: 16px;
  color: #555;
  margin: 0 0 20px;
}
.projects-hero-form {
  max-width: 400px;
}
.projects-hero-form .hs-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.projects-hero-form .hs-form .hs-email {
  flex: 1;
  min-width: 180px;
}
.projects-hero-form .hs-form input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'open_sansregular', sans-serif;
}
.projects-hero-form .hs-form .hs-submit {
  flex: 0 0 auto;
}
.projects-hero-form .hs-form input[type="submit"] {
  background: #25a55f;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'open_sansregular', sans-serif;
  cursor: pointer;
  transition: background 0.3s;
}
.projects-hero-form .hs-form input[type="submit"]:hover {
  background: #1e8a4e;
}
.projects-hero-terms {
  font-family: 'open_sansregular', sans-serif;
  font-size: 11px;
  color: #888;
  margin-top: 10px;
}
.projects-hero-terms a {
  color: #25a55f;
  text-decoration: underline;
}
/* Featured card in hero */
.projects-hero-featured {
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px;
}
.projects-hero-featured h3 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 8px;
  color: #333;
}
.projects-hero-featured p {
  font-size: 14px;
  color: #555;
  margin: 0 0 12px;
}
.projects-hero-featured a.projects-hero-cta {
  display: inline-block;
  background: #25a55f;
  color: #fff;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-family: 'open_sansregular', sans-serif;
  transition: background 0.3s;
}
.projects-hero-featured a.projects-hero-cta:hover {
  background: #1e8a4e;
}

/* Project Grid */
.projects-listing {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 15px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.project-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.project-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card-body {
  padding: 15px;
}
.project-card-body h3 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 16px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.project-card-body h3 a {
  color: #333;
  text-decoration: none;
}
.project-card-body h3 a:hover {
  color: #25a55f;
}
.project-card-meta {
  font-family: 'open_sansregular', sans-serif;
  font-size: 12px;
  color: #888;
}
.project-card-meta span { margin-right: 10px; }

/* Pagination (reuses blog pagination styles conceptually) */
.projects-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 40px 0;
  font-family: 'open_sansregular', sans-serif;
}
.projects-pagination a {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}
.projects-pagination a:hover,
.projects-pagination .active {
  background: #25a55f;
  color: #fff;
  border-color: #25a55f;
}

/* Project Detail */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}
.project-detail-header {
  margin-bottom: 30px;
}
.project-detail-header h1 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 32px;
  line-height: 1.3;
  color: #333;
  margin: 0 0 15px;
}
.project-detail-meta {
  font-family: 'open_sansregular', sans-serif;
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
}
.project-detail-meta span { margin-right: 15px; }
.project-featured-img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 30px;
}

/* Project Body */
.project-body {
  font-family: 'open_sansregular', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}
.project-body h2 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 24px;
  margin: 35px 0 15px;
  color: #333;
  border-bottom: 2px solid #9bdf46;
  padding-bottom: 8px;
}
.project-body h3 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 20px;
  margin: 25px 0 10px;
  color: #333;
}
.project-body p {
  margin: 0 0 15px;
}
.project-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 15px 0;
  border: 1px solid #e0e0e0;
}
.project-body ul, .project-body ol {
  padding-left: 25px;
  margin: 0 0 15px;
}
.project-body li {
  margin-bottom: 8px;
}
.project-body a {
  color: #25a55f;
  text-decoration: underline;
}

/* Hardware Components */
.components-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.components-table th {
  background: #25a55f;
  color: #fff;
  padding: 12px 15px;
  text-align: left;
  font-family: 'nexa_boldregular', sans-serif;
}
.components-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
}
.components-table tr:nth-child(even) {
  background: #f9f9f9;
}

/* Step Sections */
.project-step {
  margin: 25px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid #9bdf46;
}
.project-step h3 {
  margin-top: 0;
  color: #25a55f;
}

/* Code Blocks */
.project-body pre {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 15px 0;
}
.project-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}
.project-body p code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  color: #c7254e;
}

/* Related Projects */
.project-related {
  padding: 30px 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 30px;
}
.project-related h3 {
  font-family: 'nexa_boldregular', sans-serif;
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}
.project-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-related-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.project-related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.project-related-card h4 {
  padding: 12px;
  font-family: 'open_sansregular', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.project-related-card h4 a {
  color: #333;
  text-decoration: none;
}
.project-related-card h4 a:hover {
  color: #25a55f;
}

/* CTA */
.project-cta {
  text-align: center;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 6px;
  margin: 30px 0;
}
.project-cta p {
  font-size: 16px;
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-hero-right {
    flex: 0 0 300px;
  }
}
@media (max-width: 768px) {
  .projects-hero-inner {
    flex-direction: column;
  }
  .projects-hero-right {
    flex: none;
    width: 100%;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-related-grid {
    grid-template-columns: 1fr;
  }
  .project-detail-header h1 {
    font-size: 24px;
  }
  .components-table {
    display: block;
    overflow-x: auto;
  }
}
