/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 13px;
  color: #333;
  background: #f5f5f5;
  line-height: 1.6;
}

a {
  color: #c01733;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* =========================================
   Layout
   ========================================= */
#base {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border-top: 3px solid #c01733;
  border-bottom: 3px solid #c01733;
}

/* =========================================
   Header
   ========================================= */
#header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
}

#header h1 {
  width: 100%;
  font-size: 12px;
  color: #666;
  font-weight: normal;
  margin-bottom: 8px;
}

#header .logo {
  margin-right: auto;
}

#header .logo_jap {
  margin-left: auto;
}

#header .logo_jap a {
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

#header .logo_jap a:hover {
  text-decoration: none;
  opacity: 0.7;
}

/* =========================================
   Navigation
   ========================================= */
#navigation {
  background: #c01733;
}

#navigation ul {
  display: flex;
  list-style: none;
}

#navigation li {
  flex: 1;
}

#navigation a {
  display: block;
  color: #fff;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: bold;
  border-right: 1px solid rgba(255,255,255,0.2);
  transition: background 0.2s;
}

#navigation li:last-child a {
  border-right: none;
}

#navigation a:hover {
  background: rgba(0,0,0,0.15);
  text-decoration: none;
}

/* =========================================
   Contents (sidebar + main)
   ========================================= */
#contents {
  display: flex;
  gap: 20px;
  padding: 16px;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
  width: 200px;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 14px;
  color: #fff;
  background: #c01733;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: 2px;
}

.sidebar .sub-nav {
  list-style: none;
  margin-bottom: 12px;
}

.sidebar .sub-nav li {
  border-bottom: 1px solid #eee;
}

.sidebar .sub-nav li:last-child {
  border-bottom: none;
}

.sidebar .sub-nav a {
  display: block;
  padding: 8px 12px;
  color: #333;
  font-size: 13px;
}

.sidebar .sub-nav a:hover {
  background: #f5f5f5;
  color: #c01733;
  text-decoration: none;
  opacity: 1;
}

.sidebar .news-box {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
}

.sidebar .news-box h3 {
  font-size: 14px;
  color: #c01733;
  font-weight: bold;
  margin-bottom: 8px;
}

.sidebar .news-box p {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.sidebar .banner {
  margin-bottom: 12px;
}

.sidebar .banner img {
  display: block;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* =========================================
   Main Content
   ========================================= */
.main {
  flex: 1;
  min-width: 0;
}

/* Page title images (title.png direct children of main) */
.main > img {
  display: block;
  width: 100%;
  margin-bottom: 16px;
}

/* Section-level images (bar_rinen.png etc. as direct children of section) */
.main section > img {
  display: block;
  margin: 20px 0 12px;
}

/* First section image has no top margin */
.main section:first-of-type > img:first-child {
  margin-top: 0;
}

/* Section spacing */
.main section {
  margin-bottom: 24px;
}

/* h2 in main */
.main h2 {
  font-size: 14px;
  color: #c01733;
  font-weight: bold;
  margin-bottom: 8px;
}

.main p {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* Page title */
.page-title {
  font-size: 28px;
  color: #333;
  font-weight: bold;
  border-left: 5px solid #c01733;
  padding: 8px 0 8px 16px;
  margin-bottom: 24px;
}

/* Section title (replaces bar images) */
.main .section-title {
  font-size: 18px;
  color: #c01733;
  font-weight: bold;
  border-bottom: 2px solid #c01733;
  padding-bottom: 6px;
  margin: 28px 0 16px;
}

/* First section title needs no top margin */
section:first-of-type > .section-title {
  margin-top: 0;
}

/* Section header (h3 — was a div with images) */
.section-header {
  font-size: 15px;
  color: #c01733;
  font-weight: bold;
  border-left: 4px solid #c01733;
  padding: 4px 0 4px 10px;
  margin-bottom: 12px;
}

/* =========================================
   Index: Product Grid
   ========================================= */
.product-grid {
  margin-top: 16px;
}

.product-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dotted #ddd;
}

.product-content {
  display: flex;
  gap: 12px;
}

.product-section:last-child {
  border-bottom: none;
}

.product-icon {
  flex-shrink: 0;
  width: 70px;
}

.product-icon img {
  border: 1px solid #ddd;
  border-radius: 4px;
}

.product-text {
  flex: 1;
}

.product-text h2 {
  font-size: 13px;
  margin-bottom: 4px;
}

.product-text p {
  font-size: 12px;
}

/* =========================================
   Business Sections
   ========================================= */
.business-section {
  margin-bottom: 28px;
}

.business-content {
  display: flex;
  gap: 16px;
}

.business-icon {
  flex-shrink: 0;
  width: 180px;
}

.business-icon img {
  border: 1px solid #ddd;
  border-radius: 4px;
}

.business-text {
  flex: 1;
}

.business-text h2 {
  font-size: 14px;
  margin-bottom: 6px;
}

/* =========================================
   Company: Data Table
   ========================================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  border: 1px solid #ccc;
}

.data-table th,
.data-table td {
  border: 1px solid #ccc;
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #e7e7e7;
  width: 120px;
  font-weight: bold;
  vertical-align: middle;
}

.note {
  font-size: 11px;
  color: #666;
  font-weight: normal;
}

.image-border {
  border: 1px solid #ccc;
}

.philosophy-name {
  text-align: right;
  margin: 12px 0;
}

/* =========================================
   Recruit: Job Listings
   ========================================= */
.recruit {
  margin-bottom: 20px;
}

.recruit > p {
  margin-bottom: 16px;
}

.recruit dl {
  padding: 8px 16px;
  margin-bottom: 4px;
}

.recruit dt {
  font-weight: bold;
  color: #666600;
  margin-top: 8px;
  padding-bottom: 2px;
  border-bottom: 1px dotted #ccc;
}

.recruit dt:first-child {
  margin-top: 0;
}

.recruit dd {
  margin: 4px 0 0 16px;
  line-height: 1.7;
}

/* Recruit: Selection Process */
.recruit-method {
  padding: 0 8px;
}

.recruit-method h3 {
  margin: 16px 0 6px;
  line-height: 1;
}

.recruit-method h3 img {
  display: block;
}

.recruit-method p {
  margin: 0 0 12px 8px;
  line-height: 1.8;
  font-size: 13px;
}

/* =========================================
   Footer
   ========================================= */
#footer {
  text-align: center;
  padding: 16px;
  border-top: 1px solid #ddd;
}

#footer h2 {
  font-size: 11px;
  color: #999;
  font-weight: normal;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  #header {
    justify-content: center;
    text-align: center;
  }

  #header .logo,
  #header .logo_jap {
    margin: 4px auto;
  }

  #navigation ul {
    flex-direction: column;
  }

  #navigation a {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 12px;
  }

  #navigation li:last-child a {
    border-bottom: none;
  }

  #contents {
    flex-direction: column;
    padding: 12px;
  }

  .sidebar {
    width: 100%;
    order: 2;
  }

  .sidebar-title {
    max-width: 200px;
  }

  .main {
    order: 1;
  }

  .product-content {
    flex-direction: column;
  }

  .product-icon {
    width: 70px;
  }

  .business-content {
    flex-direction: column;
  }

  .business-icon {
    width: 100%;
    max-width: 200px;
  }

  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table th {
    border-bottom: none;
  }
}
