/* NIIGATA MEDICAL — ORIGINAL B CARD DESIGN
   元のB案：写真＋ネイビー／ブルーのグラデーション・4列・番号・英語併記。
   その他のデザインやページは変更しません。2026-10-31
*/
.section-dept .dept-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.section-dept .dept-card {
    position:relative;
    display:block;
    min-height:242px;
    padding:26px;
    overflow:hidden;
    border-radius:4px;
    color:#fff;
    background-repeat:no-repeat;
    background-size:cover;
    background-position:center;
    box-shadow:0 1px 4px rgba(20,49,82,.10);
    isolation:isolate;
    text-shadow:0 1px 2px rgba(0,21,49,.10);
    transition:transform .2s ease,box-shadow .2s ease;
}
.section-dept .dept-card:hover {transform:translateY(-3px);box-shadow:0 13px 27px rgba(17,48,86,.18)}
.section-dept .dept-card::after {border:1px solid rgba(255,255,255,.28)}
.section-dept .dept-topline {
    position:absolute;left:26px;top:22px;
    display:flex;align-items:center;gap:12px;
    font-family:Georgia,'Times New Roman',serif;
    font-weight:400;font-size:17px;letter-spacing:.07em;
    line-height:1.5;color:rgba(255,255,255,.85);
}
.section-dept .dept-number-line {display:block;width:32px;border-top:1px solid rgba(255,255,255,.65)}
.section-dept .dept-name-wrap {
    position:absolute;left:26px;right:20px;top:36%;
    display:flex;flex-direction:column;gap:0;
}
.section-dept .dept-title {
    font-family:var(--serif);
    font-size:clamp(24px,2.05vw,33px);line-height:1.4;
    font-weight:500;letter-spacing:.045em;
    color:#fff;
}
.section-dept .dept-english {
    display:block;font-family:Georgia,'Times New Roman',serif;
    font-size:15px;letter-spacing:.08em;line-height:1.45;
    color:rgba(255,255,255,.96);
}
.section-dept .dept-caption {
    position:absolute;left:26px;right:61px;bottom:26px;
    margin:0;padding:0;
    max-width:none;
    font-size:15px;line-height:1.65;
    font-weight:500;letter-spacing:.02em;
    color:#fff;
}
.section-dept .dept-arrow {
    position:absolute;right:25px;bottom:25px;
    font-family:Georgia,'Times New Roman',serif;
    font-size:32px;line-height:1;
    color:#fff;
}
/* 元のB案に合わせ、カードごとに鮮やかな青・青緑・ネイビーを重ねる。 */
.section-dept .dept-internal {
    background-image:linear-gradient(0deg,rgba(7,54,98,.91) 0%,rgba(21,106,160,.68) 53%,rgba(23,95,150,.72) 100%),url('images/area-joetsu.webp');
}
.section-dept .dept-pediatrics {
    background-image:linear-gradient(0deg,rgba(1,74,98,.94) 0%,rgba(20,113,135,.70) 54%,rgba(30,121,141,.68) 100%),url('images/dept-pediatrics.webp');
}
.section-dept .dept-orthopedics {
    background-image:linear-gradient(0deg,rgba(7,30,75,.94) 0%,rgba(20,73,128,.70) 55%,rgba(27,83,140,.70) 100%),url('images/dept-internal.webp');
}
.section-dept .dept-dermatology {
    background-image:linear-gradient(0deg,rgba(34,49,72,.92) 0%,rgba(58,84,112,.65) 55%,rgba(95,119,137,.62) 100%),url('images/dept-dermatology.webp');
}
.section-dept .dept-ophthalmology {
    background-image:linear-gradient(0deg,rgba(11,46,87,.94) 0%,rgba(42,99,155,.64) 55%,rgba(34,107,151,.65) 100%),url('images/dept-ophthalmology.webp');
}
.section-dept .dept-ent {
    background-image:linear-gradient(0deg,rgba(16,51,79,.94) 0%,rgba(53,103,140,.67) 55%,rgba(44,109,145,.68) 100%),url('images/dept-ent.webp');
}
.section-dept .dept-obgyn {
    background-image:linear-gradient(0deg,rgba(30,51,86,.94) 0%,rgba(70,93,146,.69) 55%,rgba(63,89,153,.68) 100%),url('images/dept-obgyn.webp');
}
.section-dept .dept-dentistry {
    background-image:linear-gradient(0deg,rgba(6,67,93,.94) 0%,rgba(46,115,137,.67) 55%,rgba(42,130,145,.66) 100%),url('images/dept-dentistry.webp');
}
.section-dept .dept-other {
    background-image:linear-gradient(0deg,rgba(30,49,79,.94) 0%,rgba(80,99,134,.69) 55%,rgba(72,96,137,.67) 100%),url('images/dept-other.webp');
}
@media(max-width:1100px) {
    .section-dept .dept-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
    .section-dept .dept-card {min-height:242px;}
    .section-dept .dept-title{font-size:29px;}
}
@media(max-width:880px) {
    .section-dept .dept-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
    .section-dept .dept-card {min-height:242px;}
}
@media(max-width:600px) {
    /* 英語・短い説明まで読める幅を確保するため1列 */
    .section-dept .dept-grid {grid-template-columns:1fr;gap:13px;}
    .section-dept .dept-card {min-height:245px;padding:22px 25px;}
    .section-dept .dept-topline{left:25px;top:19px;font-size:17px;}
    .section-dept .dept-name-wrap{left:25px;top:33%;right:20px;}
    .section-dept .dept-title{font-size:31px;}
    .section-dept .dept-english{font-size:16px;}
    .section-dept .dept-caption{left:25px;right:70px;bottom:22px;font-size:16px;line-height:1.55;}
    .section-dept .dept-arrow{right:24px;bottom:23px;font-size:32px;}
}
@media(prefers-reduced-motion:reduce) {
    .section-dept .dept-card{transition:none}
}

/*
  NIIGATA MEDICAL — B案のグラデーション微調整
  ★ b-cards.cssのいちばん下に追記してください。
  4列レイアウト、写真、文字、リンク、SSIには変更を加えません。
  上：透明感 ／ 中：青み ／ 下：濃いネイビーで可読性を確保。
*/
.section-dept .dept-internal {
  background-image:
    linear-gradient(180deg,
      rgba(70,159,213,.29) 0%,
      rgba(37,112,180,.46) 48%,
      rgba(6,42,93,.94) 100%
    ),
    url("images/area-joetsu.webp");
}

.section-dept .dept-pediatrics {
  background-image:
    linear-gradient(180deg,
      rgba(81,187,200,.28) 0%,
      rgba(36,131,160,.45) 48%,
      rgba(4,70,101,.94) 100%
    ),
    url("images/dept-pediatrics.webp");
}

.section-dept .dept-orthopedics {
  background-image:
    linear-gradient(180deg,
      rgba(65,133,204,.30) 0%,
      rgba(29,88,172,.48) 48%,
      rgba(7,30,87,.95) 100%
    ),
    url("images/dept-internal.webp");
}

.section-dept .dept-dermatology {
  background-image:
    linear-gradient(180deg,
      rgba(141,177,188,.29) 0%,
      rgba(66,110,140,.44) 48%,
      rgba(34,51,77,.93) 100%
    ),
    url("images/dept-dermatology.webp");
}

.section-dept .dept-ophthalmology {
  background-image:
    linear-gradient(180deg,
      rgba(92,168,210,.29) 0%,
      rgba(48,111,182,.45) 48%,
      rgba(10,47,98,.94) 100%
    ),
    url("images/dept-ophthalmology.webp");
}

.section-dept .dept-ent {
  background-image:
    linear-gradient(180deg,
      rgba(87,157,188,.30) 0%,
      rgba(43,107,149,.45) 48%,
      rgba(10,54,88,.94) 100%
    ),
    url("images/dept-ent.webp");
}

.section-dept .dept-obgyn {
  background-image:
    linear-gradient(180deg,
      rgba(141,159,198,.30) 0%,
      rgba(89,111,168,.47) 48%,
      rgba(31,50,92,.94) 100%
    ),
    url("images/dept-obgyn.webp");
}

.section-dept .dept-dentistry {
  background-image:
    linear-gradient(180deg,
      rgba(82,177,191,.28) 0%,
      rgba(40,120,153,.46) 48%,
      rgba(5,65,98,.94) 100%
    ),
    url("images/dept-dentistry.webp");
}

.section-dept .dept-other {
  background-image:
    linear-gradient(180deg,
      rgba(148,176,192,.29) 0%,
      rgba(80,108,146,.45) 48%,
      rgba(31,50,89,.94) 100%
    ),
    url("images/dept-other.webp");
}

/* 明るい部分の上にある小さな番号を読みやすくする */
.section-dept .dept-topline {
  color: #fff;
  text-shadow: 0 1px 3px rgba(2, 25, 55, .9), 0 0 8px rgba(2, 25, 55, .35);
}
