/*
 * StainlessMesh.com main stylesheet
 *
 * This stylesheet defines the core appearance of the StainlessMesh.com
 * website. It was created with performance and SEO in mind: the
 * styles are lean, responsive and avoid unnecessary bloat. Colors are
 * neutral and professional to evoke the industrial nature of stainless
 * steel, while typography leans on system fonts for fast rendering
 * without external downloads. Utility classes are provided for
 * spacing and layout consistency.
 */

/* Reset some default browser styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container wrapper */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo a {
  font-size: 1.4rem;
  font-weight: 700;
  color: #006699;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: #006699;
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  width: 30px;
  height: 25px;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle span {
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 2px;
}

@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  nav ul.open {
    max-height: 300px;
    border-bottom: 1px solid #e5e5e5;
  }

  nav li {
    padding: 0.8rem 1rem;
  }

  .nav-toggle {
    display: flex;
  }
}

/* Hero */
.hero {
  background-color: #eef4f7;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  color: #006699;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  color: #555;
}

.btn {
  display: inline-block;
  background-color: #006699;
  color: #ffffff;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn:hover,
.btn:focus {
  background-color: #00507a;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #006699;
  text-align: center;
}

/* Card grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #006699;
}

.card-body p {
  flex: 1 1 auto;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

.card-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.6rem;
  border: 1px solid #e5e5e5;
  text-align: left;
}

th {
  background-color: #f3f6f8;
  color: #006699;
  font-weight: 600;
}

/* Blog list */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-post {
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.blog-post:hover {
  transform: translateY(-3px);
}

.blog-post img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.blog-post-content {
  padding: 1rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.blog-post-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #006699;
}

.blog-post-content .meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.blog-post-content p {
  flex: 1 1 auto;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

.blog-post-content .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Article content */
article {
  margin-top: 2rem;
  line-height: 1.7;
}

article h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #006699;
}

article h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: #006699;
}

article h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #006699;
}

article p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #444;
}

article ul,
article ol {
  margin: 0 0 1rem 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
}

article a {
  color: #006699;
  text-decoration: underline;
}

article a:hover,
article a:focus {
  text-decoration: none;
}

/* Form styles */
form {
  max-width: 600px;
  margin: 1rem auto;
}

form .form-group {
  margin-bottom: 1rem;
}

form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button {
  background-color: #006699;
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form button:hover,
form button:focus {
  background-color: #00507a;
}

/* Footer */
footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 2rem 0;
}

.footer-col {
  flex: 1 1 200px;
  margin-bottom: 1rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #006699;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
}

.footer-col a:hover,
.footer-col a:focus {
  color: #006699;
}

.copyright {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: #777;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}