/* ============================================================
   CRUD Explorer Support Site – Modern CSS
   Design: Clean, dark-header, sidebar layout, mobile-friendly
   ============================================================ */

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-primary: #1a6fc4;
  --clr-primary-dark: #12519a;
  --clr-accent: #e84a2f;
  --clr-bg: #f4f6f9;
  --clr-surface: #ffffff;
  --clr-border: #dde3ec;
  --clr-text: #2c3444;
  --clr-text-muted: #6b7280;
  --clr-header-bg: #1b2a40;
  --clr-header-text: #e8edf4;
  --clr-nav-bg: #f9fafb;
  --clr-nav-hover: #e8f0fb;
  --clr-nav-active: #1a6fc4;
  --sidebar-width: 220px;
  --header-height: 60px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --font-sans: 'Segoe UI', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

html { font-size: 15px; }

body {
  font-family: var(--font-sans);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  min-width: 320px;
}

a:link, a:visited  { color: var(--clr-primary); text-decoration: none; }
a:hover            { text-decoration: underline; color: var(--clr-primary-dark); }

h1, h2, h3, h4 { line-height: 1.3; }

table { border-collapse: collapse; }

img { max-width: 100%; height: auto; display: block; }

/* ── Site Header ── */
#masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--clr-header-bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

#siteName {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-header-text);
  letter-spacing: .02em;
}

#siteName a { color: inherit; }

/* Hide unused Dreamweaver subglobalNav elements */
.subglobalNav, .skipLinks,
#tl, #tr { display: none !important; }

/* ── Page Layout ── */
#pagecell1 {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  position: static;
  width: auto;
  left: auto;
  right: auto;
  top: auto;
  background: none;
}

/* ── Sidebar Nav ── */
#pageNav {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--clr-surface);
  border-right: 1px solid var(--clr-border);
  padding: 24px 0 32px;
  font-size: .875rem;
  float: none;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

#pageNav a:link, #pageNav a:visited {
  color: var(--clr-text);
  display: block;
  padding: 5px 18px;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
#pageNav a:hover {
  background: var(--clr-nav-hover);
  color: var(--clr-nav-active);
  text-decoration: none;
}

#sectionLinks {
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 12px;
}

#sectionLinks a {
  font-weight: 600;
  color: var(--clr-primary) !important;
}

.relatedLinks {
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 4px;
}

.relatedLinks h3 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--clr-text-muted);
  padding: 8px 10px 4px;
}

.relatedLinks h3 a { color: inherit !important; font-weight: inherit; }

.relatedLinks ul {
  list-style: none;
  padding: 0;
}

.relatedLinks ul ul {
  padding-left: 12px;
  list-style: none;
}

/* ── Main Content ── */
#content {
  flex: 1;
  min-width: 0;
  margin: 0;
  border-left: none;
  padding: 32px 40px 48px;
}

/* breadcrumb + page title */
#breadCrumb {
  font-size: .8rem;
  color: var(--clr-text-muted);
  margin-bottom: 4px;
}
#breadCrumb a { color: var(--clr-text-muted); }

#pageName {
  padding: 0 0 20px;
  border-bottom: 2px solid var(--clr-border);
  margin-bottom: 28px;
}

#pageName h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-primary-dark);
  border: none;
  padding: 0;
}

/* ── Hero / Feature Block ── */
.feature {
  text-align: center;
  padding: 32px 16px 24px;
  background: linear-gradient(135deg, #1b2a40 0%, #1a6fc4 100%);
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}

.feature img { margin: 0 auto 12px; }

.feature h3 {
  color: #d6e8ff;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.8;
  margin-top: 8px;
}

/* ── Story / Article Sections ── */
.story h3:empty { display: none; }

.story h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-primary-dark);
  border-left: 4px solid var(--clr-primary);
  padding-left: 10px;
  margin: 28px 0 12px;
}

.story p { margin-bottom: 16px; }

.story p:first-child { margin-top: 0; }

/* Tables */
.story table {
  border-collapse: collapse;
  width: 100%;
  max-width: 600px;
  margin: 12px 0 20px;
  font-size: .9rem;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.story table th {
  background: var(--clr-primary);
  color: #fff;
  padding: 8px 12px;
  text-align: center;
}

.story table td {
  border: 1px solid var(--clr-border);
  padding: 7px 12px;
  text-align: center;
  background: var(--clr-surface);
}

/* テーブルの角丸は overflow:hidden + table 自体の border-radius で制御 */

/* Screenshot captions */
.story p > strong:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--clr-text-muted);
  font-size: .85rem;
}

.story p > img, .story p > br + img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* Update list */
.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .9rem;
}

.news-list li:last-child { border-bottom: none; }

.news-date {
  color: var(--clr-text-muted);
  white-space: nowrap;
  min-width: 90px;
  font-size: .8rem;
  padding-top: 2px;
}

/* ── Download CTAs ── */
.dl-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, box-shadow .18s;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.btn-primary,
.btn-primary:link,
.btn-primary:visited {
  background: var(--clr-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--clr-primary-dark); color:#fff; text-decoration:none; }

.btn-secondary,
.btn-secondary:link,
.btn-secondary:visited {
  background: var(--clr-surface);
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}
.btn-secondary:hover { background: var(--clr-nav-hover); text-decoration:none; }

/* ── Footer ── */
#siteInfo {
  border-top: 1px solid var(--clr-border);
  margin-top: 48px;
  padding: 16px 0 0;
  font-size: .8rem;
  color: var(--clr-text-muted);
}

#siteInfo a { color: var(--clr-text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  #pagecell1 { flex-direction: column; }

  #pageNav {
    width: 100%;
    min-width: unset;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 0;
  }

  #content { padding: 20px 16px 32px; }

  #content img { width: 100% !important; height: auto !important; }

  .feature { padding: 20px 12px; }
}
