/* =============================================
   知的財産ページ専用スタイル
   /agri/css/ip.css
   ============================================= */

#page_ip {
  width: 100%;
}

/* -------------------------------------------
   メインビジュアル
------------------------------------------- */
#page_ip .mainvisual {
  position: relative;
  width: 100%;
  overflow: hidden;
}

#page_ip .mainvisual img {
  width: 100%;
  height: auto;
  display: block;
}

#page_ip .mainvisual_title {
  position: absolute;
  bottom: 30px;
  left: 50px;
}

#page_ip .mainvisual_title h1 {
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin: 0;
}

#page_ip .mainvisual_title p {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  margin: 4px 0 0;
  letter-spacing: 0.1em;
}

/* -------------------------------------------
   セクション共通
------------------------------------------- */
.ip_section {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.section_header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.section_no {
  font-weight: bold;
  color: #4caf50;
  font-family: 'Arial', sans-serif;
  line-height: 1;
  font-size: 1.25em;
}

.section_header h1,
.section_header h2 {
  font-weight: bold;
  color: #333;
  margin: 0;
  font-size: 1.25em;
}

.section_body p {
  line-height: 1.8;
  color: #444;
  margin-bottom: 12px;
}

/* -------------------------------------------
   知的財産保有状況
------------------------------------------- */
.ip_update {
  color: #888;
  text-align: right;
  margin-bottom: 16px !important;
}

.ip_status_list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.ip_status_item {
  flex: 1;
  min-width: 180px;
  background: #f5f9f5;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
}

.ip_status_label {
  display: block;
  color: #555;
  margin-bottom: 10px;
}

.ip_status_num {
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: #2e7d32;
  line-height: 1;
}

.ip_status_unit {
  font-size: 1.2rem;
  font-weight: normal;
  color: #555;
  margin-left: 4px;
}

/* -------------------------------------------
   テーブル共通
------------------------------------------- */
.ip_table_title {
  font-weight: bold;
  color: #333;
  margin: 32px 0 12px;
  padding-left: 10px;
  border-left: 4px solid #4caf50;
}

.ip_table_wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ip_table {
  width: 100%;
  border-collapse: collapse;
}

.ip_table thead tr {
  background: #2e7d32;
  color: #fff;
}

.ip_table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
}

.ip_table tbody tr {
  border-bottom: 1px solid #e0e0e0;
}

.ip_table tbody tr:nth-child(even) {
  background: #f5f9f5;
}

.ip_table tbody tr:hover {
  background: #e8f5e9;
}

.ip_table tbody td {
  padding: 10px 14px;
  color: #444;
  vertical-align: top;
}

.col_no     { width: 4%;  white-space: nowrap; }
.col_num    { width: 20%; white-space: nowrap; }
.col_date   { width: 16%; white-space: nowrap; }
.col_name   { width: auto; }
.col_status { width: 12%; white-space: nowrap; }
.col_class  { width: 22%; }

/* 商標テーブル専用カラム幅 */
.ip_table.trademark .col_no       { width: 6%; }
.ip_table.trademark .col_num      { width: 20%; }
.ip_table.trademark .col_name     { width: 40%; }
.ip_table.trademark .col_class    { width: 34%; }
.ip_table tbody td:nth-child(2) {
  white-space: nowrap;
}

.ip_table tbody td:nth-child(3) {
  white-space: nowrap;
}

/* -------------------------------------------
   関連コンテンツ
------------------------------------------- */
.ip_related_box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 28px 32px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.ip_related_box p {
  color: #666;
  margin-bottom: 10px !important;
}

.ip_related_link {
  display: inline-block;
  font-weight: bold;
  color: #2e7d32;
  text-decoration: none;
  line-height: 1.6;
  border-bottom: 1px solid #2e7d32;
  padding-bottom: 2px;
}

.ip_related_link span {
  font-weight: normal;
}

.ip_related_link:hover {
  color: #1b5e20;
  border-bottom-color: #1b5e20;
}

/* -------------------------------------------
   レスポンシブ
------------------------------------------- */
@media screen and (max-width: 768px) {

  #page_ip .mainvisual_title {
    bottom: 16px;
    left: 20px;
  }

  .ip_section {
    margin-bottom: 40px;
    padding: 0 16px;
  }

  .ip_status_list {
    gap: 12px;
  }

  .ip_status_item {
    min-width: 140px;
    padding: 18px 14px;
  }

  .ip_status_num {
    font-size: 2.4rem;
  }

  .ip_table thead th,
  .ip_table tbody td {
    padding: 8px 10px;
  }

  .ip_related_box {
    padding: 20px 18px;
  }
}

@media screen and (max-width: 768px) {

  /* テーブルのスクロールを解除してカード形式に変更 */
  .ip_table_wrap {
    overflow-x: visible;
  }

  .ip_table thead {
    display: none;
  }

  .ip_table tbody tr {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
  }

  .ip_table tbody tr:nth-child(even) {
    background: #f5f9f5;
  }

  .ip_table tbody td {
    display: block;
    padding: 4px 0;
    white-space: normal;
    border: none;
  }

  /* ラベルを疑似要素で表示 */
  .ip_table tbody td:nth-child(1)::before { content: "No　"; font-weight: bold; color: #2e7d32; }
  .ip_table tbody td:nth-child(2)::before { content: "登録番号　"; font-weight: bold; color: #2e7d32; }
  .ip_table tbody td:nth-child(3)::before { content: "登録日　"; font-weight: bold; color: #2e7d32; }
  .ip_table tbody td:nth-child(4)::before { content: "発明の名称　"; font-weight: bold; color: #2e7d32; }

  /* 出願審査中テーブルの状況列 */
  .ip_table tbody td:nth-child(5)::before { content: "状況　"; font-weight: bold; color: #2e7d32; }

  /* 商標テーブル */
  .ip_table.trademark tbody td:nth-child(3)::before { content: "登録商標　"; font-weight: bold; color: #2e7d32; }
  .ip_table.trademark tbody td:nth-child(4)::before { content: "区分　"; font-weight: bold; color: #2e7d32; }

}

