/* ===========================
   Branch Info Styles
   =========================== */

/* ベース変数 */
:root{
  --gap: 24px;
  --card-border: #e6e6e6;
  --muted: #666;
  --primary: #0055aa;
  --secondary: #ffffff;
  --btn-radius: 8px;
  --tag-bg: #f5f5f5;
  --tag-border: #dedede;
}

/* 全体レイアウト */
.branch-wrapper{
  display:flex;
  gap:var(--gap);
  flex-wrap:wrap;
  align-items:stretch; /* カラム高さ揃え */
  margin-bottom:32px;
}
.branch-col{
  flex:1 1 320px;
  min-width:260px;

  display:flex;
  flex-direction:column;
  gap:24px;
}
.branch-col-btn{
  text-align: center;
}

/* 見出し */
.branch-heading{
  font-size: 22px;
  font-weight: 700;
  color: #222;
}
@media (max-width:1024px){
  .branch-heading { 
    font-size:18px; 
  }
}


/* 部署テキスト・リスト */
.branch-text{ margin:0 0 12px; color:var(--muted); line-height:1.6; }
.branch-list{ margin:0 0 12px; padding-left:1.05em; color:var(--muted); }

/*ボタンwrapper*/
.branch-cta{
  margin-top: auto;
  margin-bottom:16px;
  text-align: center;
}

/* ボタン（リンクはボタン見た目に） */
/* ベース */
.btn{
  display: inline-block;
  width: 75%;               /* 親コンテナ幅の75%（モバイル時は下で上書き） */
  max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--btn-radius);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent; /* デフォルトは透明。各モディファイアで色付け */
  box-sizing: border-box;
  cursor: pointer;          /* 元の定義の cursor を保持 */
}

/* モディファイア（色・ボーダー） */
.btn--primary{
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary); /* primary はボーダーも同色に */
}
.btn--secondary{
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--tertiary{
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary); /* tertiary は特別にボーダー指定 */
}

/* モバイルではボタンを横幅100%にする（優先） */
@media (max-width:767px){
  .btn{
    width: 100%;
    display: block;
    text-align: center;
  }
}


/* map（レスポンシブ） */
.branch-map-wrap{
  position:relative;
  width:100%;
  padding-bottom:56.25%; /* 16:9 */
  overflow:hidden;
  border-radius:8px;
  border:1px solid var(--color-primary-light);
  margin-bottom:12px;
}
.branch-map-wrap iframe,
.branch-map-wrap embed,
.branch-map-wrap object{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  border:0;
}


/* =========================
   共通カードスタイル（事務局・技術センター・部署を統一）
   ========================= */

   
/* branch：2列 */
.branch-offices{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:16px;
  justify-content:flex-start;
  align-items:stretch;
}


/* dept：3列 */
.dept-area{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  justify-content:flex-start;
  align-items:stretch;
}
.card-info{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:16px;
}

.branch-card,
.dept-card{
  flex-grow: 0;          /* ← 伸びない */
  flex-shrink: 1;
  min-width: 200px;

  border:1px solid var(--card-border);
  border-radius:8px;
  padding:12px;
  box-sizing:border-box;
  background:#fff;

  display:flex;
  flex-direction:column;
  align-items:stretch;
}

/* Desktop */
@media (min-width:1025px){
  .branch-card{
    flex-basis: calc((100% - 16px) / 2); /* 2列 */
  }
  .dept-card{
    flex-basis: calc((100% - 32px) / 3); /* 3列 */
  }
}

@media (min-width:768px) and (max-width:1024px){
  .branch-card,
  .dept-card{
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width:767px){
  .branch-card,
  .dept-card{
    flex-basis:100%;
    min-width:0;
    padding:10px;
  }
}

.branch-card .branch-meta,
.dept-card .dept-meta{
  margin-bottom:16px;
}
.branch-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* タグ部分は別扱い（そのまま残す） */ 
.branch-term-tags {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center; 
} 
.branch-term-tag {
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:var(--color-band);
  border:1px solid var(--tag-border);
  text-decoration:none;
  color:var(--muted);
  font-size:13px; 
}

/*共通カード　見出しサイズ*/
.branch-card__head h3,
.dept-card h3 {
  font-size: 18px;
  font-weight: 700;
}
/*Tablet*/
@media (min-width:768px) and (max-width:1024px){
  .branch-card__head h3,
  .dept-card h3 {
    font-size: 16px;
  }
}
/*Mobile*/
@media (max-width:767px){
  .branch-card__head h3,
  .dept-card h3 {
    font-size: 14px;
  }
}


