/* Page-specific CSS */
/* serviceページのみタイトルサイズ調整 */
.p-service .c-page-title {
  font-size: clamp(20px, 2.0vw, 28px);
}

/* company 見出しサイズ（トップと同等） */
.p-company .p-service-intro__title{
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.4 !important;
}

@media (max-width: 768px){
  .p-company .p-service-intro__title{
    font-size: 22px !important;
    line-height: 1.4 !important;
  }
}

/* ===== company page inserted content from PDF ===== */
.p-company-added{
  background:#fff;
  padding:4px 0 88px;
}

.p-company-block{
  margin-top: 56px;
}

.p-company-block:first-child{
  margin-top: 0;
}

.p-company-block__title{
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 34px;
  position: relative;
  padding-left: 18px;
  line-height: 1.2;
  text-align: left;
}

.p-company-block__title::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:6px;
  height:52px;
  background:#d60f1d;
}

.p-company-greeting{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:40px;
  align-items:start;
}

.p-company-greeting__image img{
  width:100%;
  height:auto;
  display:block;
}

.p-company-greeting__text{
  font-size:15px;
  line-height:2;
  color:#222;
}

.p-company-greeting__text p{
  margin:0 0 10px;
}

.p-company-greeting__signature{
  margin-top: 18px !important;
  text-align:right;
}

.p-company-philosophy__lead{
  font-size:22px;
  font-weight:700;
  margin:0 0 14px;
  line-height:1.6;
}

.p-company-philosophy__list{
  display:grid;
  gap:8px;
}

.p-company-philosophy__list p{
  font-size:15px;
  line-height:1.95;
  color:#222;
  margin:0;
}

.p-company-values{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:24px;
}

.p-company-values__item h3{
  font-size:20px;
  font-weight:700;
  margin:0 0 8px;
  line-height:1.5;
}

.p-company-values__item p{
  font-size:14px;
  line-height:1.9;
  color:#222;
  margin:0 0 14px;
}

.p-company-values__item img{
  width:100%;
  height:auto;
  display:block;
}

.p-company-profile{
  margin-top: 56px;
}

.p-company-profile .c-table{
  margin-top: 0;
}

@media (max-width: 900px){
  .p-company-greeting{
    grid-template-columns:1fr;
    gap:24px;
  }

  .p-company-values{
    grid-template-columns:1fr;
    gap:28px;
  }
}

@media (max-width: 768px){
  .p-company-added{
    padding:4px 0 88px;
  }

  .p-company-block{
    margin-top: 40px;
  }

  .p-company-block__title{
    font-size:24px;
    margin-bottom:24px;
  }

  .p-company-block__title::before{
    height:40px;
  }

  .p-company-greeting__text,
  .p-company-philosophy__list p{
    font-size:14px;
    line-height:1.9;
  }

  .p-company-philosophy__lead{
    font-size:18px;
    margin-bottom:12px;
  }

  .p-company-values__item h3{
    font-size:18px;
  }

  .p-company-values__item p{
    font-size:14px;
    line-height:1.85;
  }
}

/* company catch background */
.p-company .p-service-intro{
  background:#fff !important;
}

/* company headings: match service 業務案内 */
.p-company-block__title{
  display:flex;
  align-items:center;
  gap:14px;
  padding-left:0 !important;
  line-height:1.2;
  margin-bottom:34px;
  text-align:left;
}

.p-company-block__title::before{
  position:static !important;
  top:auto !important;
  left:auto !important;
  width:6px;
  height:28px;
  flex:0 0 6px;
  background:#d60f1d;
}

/* greeting image visible dummy photo */
.p-company-greeting{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:40px;
  align-items:start;
}

.p-company-greeting__image{
  background:#cfd6dc;
}

.p-company-greeting__image img{
  width:100%;
  height:auto;
  display:block;
}

@media (max-width: 768px){
  .p-company-block__title{
    gap:12px;
  }

  .p-company-block__title::before{
    height:24px;
  }

  .p-company-greeting{
    grid-template-columns:1fr;
    gap:24px;
  }
}

/* ===== company page consolidated additions ===== */
.p-title-line{
  font-size: 28px;
  font-weight: 700;
  position: relative;
  padding-left: 18px;
  margin:12px 0 28px;
  line-height: 1.2;
  text-align: left;
}
.p-title-line::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: #d60f1d;
}
.p-organization-chart{
  max-width: 700px;
  margin: 20px auto 0;
}
.p-organization-chart img{
  width: 100%;
  height: auto;
}
.p-history-table .c-table th{
  width: 180px;
  white-space: nowrap;
}
@media (max-width: 768px){
  .p-title-line{
    font-size: 24px;
    margin:12px 0 28px;
  }
  .p-history-table .c-table th{
    width: 100%;
    white-space: normal;
  }
}
  

/* ===== FIX: heading alignment unify ===== */
.p-title-line{
  margin-left:0 !important;
  padding-left:18px;
  text-align:left;
}

/* ===== FIX: table width unify ===== */
.c-table{
  width:100%;
  max-width:1000px;
  margin:0 auto;
}

.p-history-table .c-table,
.p-company-profile .c-table{
  max-width:1000px;
}

/* th width unify */
.c-table th{
  width:220px;
}

/* container alignment unify */
.l-container{
  width: min(100% - 40px, 1000px);
}

/* section inner alignment */
.l-section .l-container{
  margin:0 auto;
}


/* ===== company final alignment fix ===== */
.p-company-added > .l-container{
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.p-company-block,
.p-company-profile,
.p-history-table,
.p-organization-chart-wrap{
  width: 100%;
  margin-top: 56px;
}

.p-company-block__title{
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 0 !important;
  margin: 0 0 34px !important;
  line-height: 1.2;
  text-align: left !important;
  font-size: 28px;
  font-weight: 700;
}

.p-company-block__title::before{
  content: "";
  position: static !important;
  width: 6px;
  height: 28px;
  flex: 0 0 6px;
  background: #d60f1d;
}

.p-company-profile .c-table,
.p-history-table .c-table{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.p-company-profile .c-table th,
.p-history-table .c-table th{
  width: 220px !important;
}

.p-organization-chart{
  max-width: 700px;
  margin: 20px 0 0 !important;
}

@media (max-width: 768px){
  .p-company-block,
  .p-company-profile,
  .p-history-table,
  .p-organization-chart-wrap{
    margin-top: 40px;
  }

  .p-company-block__title{
    gap: 12px;
    margin-bottom: 24px !important;
    font-size: 24px;
  }

  .p-company-block__title::before{
    height: 24px;
  }

  .p-company-profile .c-table th,
  .p-history-table .c-table th{
    width: 100% !important;
  }

  .p-organization-chart{
    max-width: 100%;
  }
}

.p-company-philosophy__list{
  list-style:none;
  padding:0;
  margin:0;
}
.p-company-philosophy__list li{
  position:relative;
  padding-left:1.2em;
  line-height:1.9;
}
.p-company-philosophy__list li::before{
  content:"・";
  position:absolute;
  left:0;
}


/* philosophy card */
.p-philosophy-card{
  background:#fff;
  padding:32px 36px;
  border:1px solid #e6e6e6;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(0,0,0,0.05);
  margin-top:8px;
}
.p-philosophy-card__lead{
  margin:0 0 18px;
  font-size:22px;
  font-weight:700;
  line-height:1.6;
}
.p-philosophy-card__list{
  list-style:none;
  padding:0;
  margin:0;
}
.p-philosophy-card__list li{
  position:relative;
  padding-left:1.2em;
  line-height:1.9;
}
.p-philosophy-card__list li + li{
  margin-top:8px;
}
.p-philosophy-card__list li::before{
  content:"・";
  position:absolute;
  left:0;
}
@media (max-width: 768px){
  .p-philosophy-card{
    padding:24px 20px;
    border-radius:12px;
  }
  .p-philosophy-card__lead{
    font-size:18px;
    margin-bottom:14px;
  }
}


/* ===== FINAL WIDTH RESET : greeting to organization chart ===== */
/* Root cause cleanup:
   - old .l-container override forced 1000px
   - old .c-table override capped tables at 1000px
   These conflicted with the later company-specific 1200px rules.
*/

.l-container{
  width: min(100% - 40px, var(--container)) !important;
  max-width: var(--container) !important;
  margin-inline: auto !important;
}

.p-company-added > .l-container{
  width: min(100% - 40px, var(--container)) !important;
  max-width: var(--container) !important;
  margin-inline: auto !important;
}

.p-company-block,
.p-company-profile,
.p-history-table,
.p-organization-chart-wrap{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.p-company-profile .c-table,
.p-history-table .c-table{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  table-layout: auto !important;
}

.p-company-profile .c-table th,
.p-history-table .c-table th{
  width: 220px !important;
}

.p-organization-chart{
  width: 100% !important;
  max-width: 700px !important;
  margin: 20px auto 0 !important;
}

.p-organization-chart img{
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

@media (max-width: 768px){
  .l-container,
  .p-company-added > .l-container{
    width: min(100% - 24px, var(--container)) !important;
    max-width: var(--container) !important;
  }

  .p-company-profile .c-table th,
  .p-history-table .c-table th{
    width: 100% !important;
  }

  .p-organization-chart{
    max-width: 100% !important;
  }
}


/* ===== philosophy sample style ===== */
.p-philosophy-card{
  background: linear-gradient(135deg, #f6f8fb 0%, #eef3f8 100%);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 36px 38px 34px;
  box-shadow: 0 18px 34px rgba(16,39,82,.10);
  position: relative;
  overflow: hidden;
}
.p-philosophy-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 88% 72%, rgba(173,216,255,.18), transparent 18%),
    radial-gradient(circle at 82% 26%, rgba(255,255,255,.55), transparent 22%);
}
.p-philosophy-card__head{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:24px;
  padding-bottom:16px;
  border-bottom:2px solid rgba(130,158,190,.35);
  position:relative;
  z-index:1;
}
.p-philosophy-card__head::after{
  content:"";
  position:absolute;
  left:98px;
  bottom:-2px;
  width:180px;
  height:3px;
  background: linear-gradient(90deg, #d60f1d 0%, rgba(214,15,29,.05) 100%);
  border-radius:999px;
}
.p-philosophy-card__head-icon{
  width:84px;
  height:84px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 84px;
}
.p-philosophy-card__head-icon svg{
  width:72px;
  height:72px;
  stroke:#d60f1d;
  fill:none;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.p-philosophy-card__title{
  margin:0;
  color:#102752;
  font-size:clamp(28px, 3vw, 56px);
  line-height:1.2;
  letter-spacing:.04em;
  font-weight:800;
}
.p-philosophy-card__items{
  display:grid;
  gap:18px;
  position:relative;
  z-index:1;
}
.p-philosophy-card__item{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:18px;
  align-items:center;
  background:rgba(255,255,255,.82);
  border:2px solid #cfe0f1;
  border-radius:22px;
  padding:22px 24px 22px 20px;
  box-shadow:0 10px 20px rgba(16,39,82,.07);
  position:relative;
}
.p-philosophy-card__item::before{
  content:"";
  position:absolute;
  left:78px;
  top:18px;
  bottom:18px;
  width:1px;
  background:rgba(102,128,160,.28);
}
.p-philosophy-card__item-icon{
  width:72px;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-inline:auto;
}
.p-philosophy-card__item-icon svg{
  width:68px;
  height:68px;
  stroke:#d60f1d;
  fill:none;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.p-philosophy-card__item p{
  margin:0;
  font-size:clamp(17px, 1.45vw, 24px);
  line-height:1.85;
  color:#111;
  font-weight:500;
}
@media (max-width: 768px){
  .p-philosophy-card{
    padding:24px 18px 22px;
    border-radius:18px;
  }
  .p-philosophy-card__head{
    gap:12px;
    margin-bottom:16px;
    padding-bottom:12px;
  }
  .p-philosophy-card__head::after{
    left:64px;
    width:96px;
  }
  .p-philosophy-card__head-icon{
    width:56px;
    height:56px;
    flex-basis:56px;
  }
  .p-philosophy-card__head-icon svg{
    width:48px;
    height:48px;
  }
  .p-philosophy-card__title{
    font-size:26px;
    letter-spacing:.02em;
  }
  .p-philosophy-card__item{
    grid-template-columns:52px 1fr;
    gap:12px;
    padding:16px 14px 16px 14px;
    border-radius:14px;
  }
  .p-philosophy-card__item::before{
    left:50px;
    top:12px;
    bottom:12px;
  }
  .p-philosophy-card__item-icon{
    width:42px;
    height:42px;
  }
  .p-philosophy-card__item-icon svg{
    width:40px;
    height:40px;
  }
  .p-philosophy-card__item p{
    font-size:15px;
    line-height:1.8;
  }
}


/* ===== philosophy text overlay fix ===== */
.p-company-philosophy,
.p-philosophy-card{
  position: relative;
  z-index: 5;
  background: #ffffff !important;
  background-image: none !important;
  overflow: visible;
}

.p-company-philosophy::before,
.p-company-philosophy::after,
.p-philosophy-card::before,
.p-philosophy-card::after{
  content: none !important;
  display: none !important;
}

.p-philosophy-card__lead,
.p-philosophy-card__list,
.p-philosophy-card__list li,
.p-philosophy-card__list strong{
  position: relative;
  z-index: 6;
  color: #111 !important;
  background: transparent !important;
  background-image: none !important;
  text-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}
