/* General styles */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f3f6fa 0%, #dbeafe 100%);
  color: #1e293b;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 1rem; /* base font size for scaling */
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2vw;
  padding-right: 2vw;
  box-sizing: border-box;
  word-break: break-word;
}

/* Header bar: blue/grey gradient */
header {
  background: linear-gradient(90deg, #334155 60%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(30, 41, 59, 0.13);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #2563eb;
  padding: 0;
  margin: 0;
}

.header-bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  height: 48px;
}

.header-logo img {
  height: 40px; /* 32px * 1.25 = 40px */
  width: auto;
  max-height: 50px; /* 40px * 1.25 = 50px */
  max-width: 50px;
  border-radius: 4px;
  margin-right: 10px;
  background: #fff;
  border: 1px solid #60a5fa;
  object-fit: contain;
  padding: 2px;
  display: block;
  box-sizing: border-box;
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 1px;
  line-height: 1;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  height: auto; /* allow height to grow if wrapping */
  margin-left: 24px; /* space between title and links */
}

nav a {
  padding: 4px 14px;
  border-radius: 4px;
  color: #e0e7ef;
  text-decoration: none;
  margin: 0 2px;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}

nav a:hover {
  background: #2563eb;
  color: #fff;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 36px;
  margin: 48px auto 0 auto;
  padding: 0 32px;
  max-width: 1200px;
}

.product-card {
  background: #f1f5f9;
  border: 1px solid #60a5fa;
  border-radius: 14px;
  padding: 22px 16px 16px 16px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.08);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.13);
  border-color: #2563eb;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: #e0e7ef;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.07);
}

.product-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #2563eb;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.product-card .price {
  font-weight: bold;
  color: #1e40af;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 1.1rem;
}

/* Single product page */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 48px auto;
  padding: 0 32px;
  max-width: 1100px;
  background: #f1f5f9;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.10);
}

.product-image img {
  max-width: 100%;
  border-radius: 10px;
  background: #e0e7ef;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.08);
}

.product-actions {
  display: flex;
  gap: 18px;
  margin: 28px 0;
}

/* Project page (classic style, copy of product styles) */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 48px auto;
  padding: 0 32px;
  max-width: 1100px;
  background: #f1f5f9;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.10);
}

.project-image img {
  max-width: 100%;
  border-radius: 10px;
  background: #e0e7ef;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.08);
}

.project-actions {
  display: flex;
  gap: 18px;
  margin: 28px 0;
}

.button {
  padding: 12px 22px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
}

.ebay-button {
  background-color: #2563eb;
  color: white;
  border: none;
}

footer {
  background: #334155;
  color: #e0e7ef;
  text-align: center;
  padding: 24px 0 12px 0;
  margin-top: 48px;
  border-top: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -2px 12px rgba(30, 41, 59, 0.08);
}

/* Project grid cards - match product card style */
.project-card {
  background: #f1f5f9;
  border: 1px solid #60a5fa;
  border-radius: 14px;
  padding: 22px 16px 16px 16px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.08);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.13);
  border-color: #2563eb;
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: #e0e7ef;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.07);
}

/* Project grid - match product grid style */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 36px;
  margin: 48px auto 0 auto;
  padding: 0 32px;
  max-width: 1200px;
}

/* Single project page - match product page style */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 48px auto;
  padding: 0 32px;
  max-width: 1100px;
  background: #f1f5f9;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30, 41, 59, 0.10);
}

.project-image img {
  max-width: 100%;
  border-radius: 10px;
  background: #e0e7ef;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.08);
}

/* Add project responsiveness to match product responsiveness */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 10px;
  }
  .product {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 10px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 10px;
  }
  .project {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 10px;
  }
}

@media (max-width: 600px) {
  header, .product, .product-grid, .project, .project-grid {
    padding: 0 4px;
  }
  .product-grid, .project-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .product, .project {
    margin: 24px 0;
  }
}

@media (max-width: 700px) {
  .header-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 8px;
    height: auto;
  }
  .header-logo {
    height: auto;
    margin-bottom: 4px;
  }
  nav {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  nav a {
    margin: 2px 0;
    padding: 6px 10px;
    font-size: 1rem;
    white-space: normal;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Image hover and fullscreen styles */
.zoomable-img {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.zoomable-img:hover {
  transform: scale(1.05);
}

.fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: zoom-out;
}

.fullscreen-img {
  max-width: 90vw;
  max-height: 90vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.flex-row {
  display: flex;
  gap: 2%;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.flex-row img,
.flex-row iframe {
  width: 45%;
  max-width: 22rem;         /* Responsive max width */
  aspect-ratio: 16 / 10;    /* Keeps images/iframes proportional */
  height: auto;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: 0.5rem;
  display: block;
  box-sizing: border-box;
}

/* For single images in a row, center them and limit width */
.flex-row:only-child img,
.flex-row:only-child iframe {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 56.25rem) { /* 900px -> 56.25rem */
  .flex-row img,
  .flex-row iframe {
    width: 90%;
    max-width: 100%;
  }
}

@media (max-width: 37.5rem) { /* 600px -> 37.5rem */
  .flex-row {
    flex-direction: column;
    gap: 1rem;
  }
  .flex-row img,
  .flex-row iframe {
    width: 100%;
    max-width: 100%;
  }
}

.blog-project-header {
  position: static !important;
  top: 3rem;
  z-index: 10;
  padding-top: 1.5rem; /* Add this line */
  padding-bottom: 1.5rem; /* Add this line */
}