/*
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Template: cocoon-master
Version: 1.1.3
*/

/************************************
** 0. 全体の余白調整
************************************/
#content,
#container,
#main,
#header-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/************************************
** 1. 最上段ブルーライン
************************************/
.top-blue-line {
  width: 100%;
  height: 10px;
  background: #1EB5E8;
}


/************************************
** 2. ロゴ＋右側ボタン
************************************/
.hn-header-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: #ffffff;
}

.hn-logo img {
  height: 80px;
  width: auto;
}

.hn-top-buttons {
  display: flex;
  gap: 16px;
}

.hn-top-buttons .hn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: #ffffff;
  color: #0052c2;
  border-radius: 8px;
  border: 1px solid #aac6ff;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: 0.2s ease;
}

.hn-top-buttons .hn-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}


/************************************
** 3. アイコンショートカット帯（本命）
************************************/
.header-shortcuts {
    position: sticky;       /* スクロール追従 */
    top: 0;                 
    z-index: 1000;          
    background: #fff;
    padding: 8px 0;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: -35px;   /* ★ スライダーへ重ねる */
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* アイコンデザイン */
.header-shortcuts .shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 14px;
  color: #333;
  transition: 0.2s ease;
}

.header-shortcuts .shortcut i {
  font-size: 28px;
  margin-bottom: 4px;
}

.header-shortcuts .shortcut:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* アイコン色 */
.shortcut-home i { color: #0080ff; }
.shortcut-hospital i { color: #4c9f38; }
.shortcut-outpatient i { color: #ff7f50; }
.shortcut-department i { color: #8a4fff; }
.shortcut-access i { color: #0097a7; }
.shortcut-medical i { color: #e84393; }


/************************************
** 4. スライダー
************************************/
.carousel,
.carousel-container,
.slick-slider,
.slick-track {
  margin-top: 0 !important;
  padding-top: 0 !important;
  position: relative;
  z-index: 1;
}


/************************************
** 5. グローバルナビ完全削除
************************************/
#navi, 
#navi-container,
.global-nav,
#global-nav,
#header .navi,
.header-in,
.header-bar,
.navi,
.navi-in,
#navi-in,
#header-container .navi {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}
/****************************************
  スマホ（～768px）最適化：決定版
****************************************/
@media (max-width: 768px) {

  /***** ロゴと3ボタン行 *****/
  .hn-header-topbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 8px 0 !important;
    gap: 8px !important;
  }

  .hn-logo img {
    height: 48px !important;
  }

  /***** 3ボタン横並び（折り返しなし）*****/
  .hn-top-buttons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
  }

  .hn-top-buttons .hn-btn {
    flex: 1 1 auto !important;     /* 均等幅 */
    padding: 8px 6px !important;
    font-size: 13px !important;
    white-space: nowrap !important; /* 改行しない */
    text-align: center !important;
  }

  /***** ショートカット帯 *****/
  .header-shortcuts {
    padding: 4px 0 !important;
    margin-bottom: -20px !important;
  }

  .header-shortcuts .shortcut i {
    font-size: 22px !important;
  }

  .header-shortcuts .shortcut {
    font-size: 11px !important;
  }

  /***** スライダー画像（横スクロール防止） *****/
  .carousel img,
  .slick-slide img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  /***** ページ全体の横スクロール禁止 *****/
  html, body {
    overflow-x: hidden !important;
  }
}
/* スマホ：パンくず非表示 */
@media (max-width: 768px) {
  .breadcrumb,
  #breadcrumb,
  .breadcrumb-container {
    display: none !important;
  }
}
/* スマホ：ショートカット帯の文字を消す */
@media (max-width: 768px) {
  .header-shortcuts .shortcut span {
    display: none !important;
  }

  /* アイコンを中央に揃えて均等幅に */
  .header-shortcuts .shortcut {
    width: 16.6% !important; /* 6個で均等 */
    flex: 0 0 16.6% !important;
  }
}
@media (max-width: 768px) {

  /* カード全体を親幅に合わせて縮小 */
  .entry-card-wrap,
  .entry-card,
  .entry-card-thumb {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  /* カードのテキストが縦に伸びないように */
  .entry-card-content {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* サムネイル画像も横幅100%でトリミング */
  .entry-card-thumb img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}
/* ------------------------------------
   スマホ専用：ショートカット文字を短縮
------------------------------------ */
@media (max-width: 768px) {

  /* 6アイコンを均等幅に */
  .header-shortcuts {
    display: flex !important;
    justify-content: space-between !important;
  }

  .header-shortcuts .shortcut {
    width: 16.66% !important;  /* 6等分 */
    text-align: center !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  /* ▼ 各アイコンのテキスト短縮（内容だけ上書き） */
  .shortcut-home span { content: "ホーム"; }
  .shortcut-hospital span { content: "案内"; }
  .shortcut-outpatient span { content: "外来"; }
  .shortcut-department span { content: "部門"; }
  .shortcut-access span { content: "交通"; }
  .shortcut-medical span { content: "関係者"; }

  /* span の内容を置き換えるための疑似要素 */
  .header-shortcuts .shortcut span::before {
    content: attr(data-sp-label);
  }
  .header-shortcuts .shortcut span {
    font-size: 11px !important;
  }
}
/* ------------------------------------------------------
   スマホ専用：ショートカットの文字を短縮して6等分に
------------------------------------------------------ */
@media (max-width: 768px) {

  /* 6アイコンを横一列で均等に並べる */
  .header-shortcuts {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4px 0 !important;
  }

  /* 1個あたりの幅を 6 等分 */
  .header-shortcuts .shortcut {
    width: 16.6% !important;
    text-align: center !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* アイコンのサイズ */
  .header-shortcuts .shortcut i {
    font-size: 22px !important;
    margin-bottom: 2px !important;
  }

  /* ▼ スマホは data-sp の文字を強制表示 */
  .header-shortcuts .shortcut span {
    display: none !important; /* 元の長い文字を非表示 */
  }

  .header-shortcuts .shortcut::after {
    content: attr(data-sp);   /* 短縮版テキストを表示 */
    font-size: 11px !important;
    margin-top: 2px;
  }
}
@media (max-width: 768px) {
  .hanawa-card-container {
      display: block !important;
      padding: 0 !important;
  }
}
/* スマホ：受診案内カードを横4つ・アイコン＋短い文字だけ */
@media (max-width: 768px) {

  /* 親コンテナを4列のグリッドに */
  .hanawa-card-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    padding: 0 6px !important;
  }

  /* 各カードの見た目 */
  .hanawa-card {
    text-align: center !important;
    padding: 8px 4px !important;
  }

  /* アイコンを少し小さめに中央寄せ */
  .hanawa-card .hanawa-card-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto 4px auto !important;
  }

  /* 元の長いタイトルは隠す */
  .hanawa-card h3 {
    font-size: 0 !important;   /* テキスト自体は残して見えなくする */
    margin: 0 !important;
  }

  /* ▼ 各カードのラベルを「初診／再診／医師／健診」に短縮表示 */
  .hanawa-card:nth-child(1) h3::after {
    content: "初診";
  }
  .hanawa-card:nth-child(2) h3::after {
    content: "再診";
  }
  .hanawa-card:nth-child(3) h3::after {
    content: "医師";
  }
  .hanawa-card:nth-child(4) h3::after {
    content: "健診";
  }

  .hanawa-card h3::after {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
  }

  /* 説明文と「詳しくはこちら」ボタンは非表示 */
  .hanawa-card p,
  .hanawa-card .hanawa-btn {
    display: none !important;
  }
}
