/* IS Machine Pte Ltd — Shared Stylesheet */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: rgb(55, 53, 47);
  max-width: 900px;
  margin: 1.5em auto;
  padding: 0 1.25em 3em;
}

/* ── Site Header (logo left + nav right) ─────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.75em 0 0.5em;
}

.logo-link {
  flex-shrink: 0;
}

.page-logo {
  width: 120px;
  height: auto;
  display: block;
}

/* ── Navigation ──────────────────────────────────────────── */
nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 4px;
}

.nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

nav a {
  display: inline-block;
  background: #d3e5ef;
  color: rgb(55, 53, 47);
  font-weight: 700;
  font-size: 0.95em;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

nav a:hover {
  background: #b5d0e5;
}

nav a.active {
  background: #7aaecc;
  color: #fff;
}

/* ── Dividers ────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid rgba(55, 53, 47, 0.16);
  margin: 1.25em 0;
}

/* ── Callout Blocks ──────────────────────────────────────── */
.callout {
  background: rgba(241, 241, 239, 1);
  border-radius: 4px;
  padding: 1em 1.25em;
  display: flex;
  gap: 0.75em;
  margin: 0.75em 0;
}

.callout .callout-icon {
  font-size: 1.4em;
  flex-shrink: 0;
  line-height: 1.5;
}

.callout .callout-body {
  flex: 1;
}

/* ── Images ──────────────────────────────────────────────── */
figure {
  margin: 0.75em 0;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

figure a {
  display: block;
}

/* ── Photo Grid (machining page) ─────────────────────────── */
.photo-grid {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 0.75em 0;
}

.photo-grid figure {
  flex: 1;
  min-width: 130px;
  margin: 0;
}

.photo-grid figure img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
}

/* ── Two-column Grid (autothreading screenshots) ─────────── */
.img-grid-2 {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 0.75em 0;
}

.img-grid-2 figure {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.img-grid-2 figure img {
  width: 100%;
  height: auto;
}

/* ── Details / Summary Toggles ───────────────────────────── */
details {
  margin: 0.6em 0;
  border: 1px solid rgba(55, 53, 47, 0.16);
  border-radius: 4px;
  overflow: hidden;
}

summary {
  font-weight: 600;
  font-size: 1.1em;
  line-height: 1.4;
  padding: 0.65em 1em;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #fafafa;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▶  ";
  font-size: 0.75em;
  color: #666;
}

details[open] > summary::before {
  content: "▼  ";
}

.details-content {
  padding: 0.5em 1.25em 1.25em;
}

.details-content ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.details-content li {
  margin: 0.4em 0;
}

/* ── Headings ────────────────────────────────────────────── */
h1, h2, h3 {
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 1em 0 0.4em;
}

h2.blue-bg {
  background: #d3e5ef;
  padding: 0.3em 0.75em;
  border-radius: 3px;
}

/* ── Text highlights ─────────────────────────────────────── */
.hl-red {
  color: #E03E3E;
}

.hl-gray {
  color: #787774;
}

/* ── Video ───────────────────────────────────────────────── */
video {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.video-portrait {
  max-width: 340px;
}

.video-portrait video {
  width: 100%;
  height: auto;
}

/* ── Used Machine Cards ──────────────────────────────────── */
.used-card {
  border: 1px solid rgba(55, 53, 47, 0.18);
  border-radius: 6px;
  padding: 1.25em;
  margin: 1em 0;
}

.used-card figure img {
  max-width: 360px;
}

.used-title {
  margin: 0 0 0.75em;
  font-size: 1.1em;
}

.used-status {
  font-size: 0.85em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
}

.used-status.available {
  background: #d1fae5;
  color: #065f46;
}

.used-status.sold {
  background: #fee2e2;
  color: #991b1b;
}

.used-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin-bottom: 1em;
}

.used-specs th,
.used-specs td {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.1);
}

.used-specs th {
  width: 140px;
  color: #555;
  font-weight: 600;
}

.used-btn-wa {
  display: inline-block;
  background: #22c55e;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.95em;
}

.used-btn-wa:hover {
  background: #16a34a;
}

/* ── Contact Bar ─────────────────────────────────────────── */
.contact-bar {
  margin: 1.25em 0 0.5em;
  font-size: 1.1em;
  font-weight: 700;
}

.contact-bar a {
  text-decoration: none;
  color: rgb(55, 53, 47);
  margin-right: 1.5em;
}

.contact-bar a:hover {
  text-decoration: underline;
}

/* ── Copyright ───────────────────────────────────────────── */
.copyright {
  background: #d3e5ef;
  padding: 0.4em 1em;
  border-radius: 3px;
  margin: 0.5em 0;
  font-size: 0.88em;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  body {
    padding: 0 0.75em 2em;
    font-size: 15px;
  }

  .photo-grid figure {
    min-width: 100px;
  }

  .photo-grid figure img {
    height: 130px;
  }

  nav a {
    font-size: 0.9em;
  }
}
