@charset "UTF-8";

:root {
  --main-color: #00008a;
  --accent-color: #00b4d8;
  --text-color: #333;
  --bg-color: #fff;
  --max-width: 960px;
  --content-max-width: 800px;

  --label-service: #0077b6;
  --label-facility: #2e8b57;
  --label-staff: #ff7f50;
}

/* リセット・基本 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
html,
body {
  height: 100%; /* ページ全体の高さを100%に */
}
body {
  font-family: "游ゴシック体", "Yu Gothic", "メイリオ", sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* ビューポート高さを確保 */
}
main {
  flex: 1; /* メイン領域を可変にして余白を埋める */
}

/* ヘッダー */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background: var(--main-color);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 80px; /* ヘッダー高さ固定 */
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.header-left {
  flex: 0 0 auto;
  text-align: left;
  margin: 0;
  padding: 0;
}

.logo-img {
  height: 100%; /* ロゴ画像の高さ＝ヘッダー高さ */
  display: block;
  margin: 0;
  padding: 0;
}

.header-center {
  flex: 1 1 auto;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 1.5rem; /* 全体の文字サイズは標準 */
  line-height: 1;
}

.site-title .small-text {
  font-size: 0.8em; /* 「ダイビングサービス」だけ小さく */
}

.header-right {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

/* ナビゲーション */
nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
}
nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
}
nav a:hover,
nav a.active {
  text-decoration: underline;
}

/* ドロップダウン */
nav ul li.dropdown {
  position: relative;
}
nav ul li .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--main-color);
  list-style: none;
  min-width: 180px;
  border-radius: 0 0 6px 6px;
  z-index: 1500;
}
nav ul li.dropdown:hover .dropdown-menu {
  display: block;
}
nav ul li .dropdown-menu li {
  border-top: 1px solid rgba(255,255,255,0.2);
}
nav ul li .dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: white;
}

/* ハンバーガー */
.menu-toggle {
  display: none;
  flex-direction: column;
  width: 30px;
  height: 25px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: white;
  margin: 4px 0;
}

/* ハンバーガーCSS制御 */
input#menu-toggle { display: none; }
@media (max-width: 768px) {
  nav ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    flex-direction: column;
    background: var(--main-color);
    position: absolute;
    right: 0;
    top: 60px;
    width: 220px;
    border-radius: 0 0 6px 6px;
  }
  input#menu-toggle:checked ~ nav ul {
    max-height: 600px;
  }
  nav ul li .dropdown-menu {
    display: block;
    position: relative;
    background: var(--main-color);
    margin-left: 1rem;
  }
  .menu-toggle { display: flex; }
}

/* すべてのアンカー対象要素に適用 */
[id] {
  scroll-margin-top: 80px; /* ヘッダーの高さに合わせる */
}

/* ヒーローエリア背景 */
.hero.live-camera {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem 1rem;
}

.hero-overlay {
  position: relative;
  width: 100%;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

.hero-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: none;
  padding: 0;
  border-radius: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* スライドショー */
.slideshow-container {
  position: relative;
  max-width: 80%;
  margin-bottom: 1rem;
  display: inline-block;
  padding: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #fff;
  border-radius: 8px;
}
.slideshow-container img {
  display: block;
  max-width: 100%;
  height: auto;
  border: none;
  border-radius: 4px;
  opacity: 1;
  transition: opacity 1s ease;
}
.slideshow-container img.fade-out {
  opacity: 0;
}

/* ライブカメラ情報 */
.live-info {
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
}

.live-info a {
  color: #00b4d8;
  text-decoration: underline;
}

/* デフォルト（PCでは中央揃え） */
.live-info .note {
  font-size: 0.8rem;
  color: #ddd;
  margin-top: 0.4rem;
  text-align: left;
  display: inline-block;
}

/* H2見出し */
h2 {
  font-size: 1.6rem;
  border-left: 5px solid var(--main-color);
  padding-left: 10px;
  margin-bottom: 1em;
  display: inline-block;
}
.features-section h2 { border-left-color: var(--label-service); }
.facility h2 { border-left-color: var(--label-facility); }
.staff h2 { border-left-color: var(--label-staff); }

/* カード */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease;
}
.card-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.card-label {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  color: #fff;
}
.card-label.service { background: var(--label-service); }
.card-label.facility { background: var(--label-facility); }
.card-label.staff { background: var(--label-staff); }
.card-detail {
  display: inline-block;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0.5rem;
}
.card-content .contact-links {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}
.card-content .contact-links a {
  color: var(--main-color);
  text-decoration: underline;
}
.card-content .contact-links a:hover {
  color: var(--accent-color);
}

/* アクセス */
.access-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.access-map iframe {
  width: 100%;
  height: 350px;
  border: none;
  border-radius: 6px;
}
@media (max-width: 1024px) {
  .access-map iframe { height: 300px; }
}
@media (max-width: 768px) {
  .access-map iframe { height: 250px; }
}

/* フッター */
footer {
  background: var(--main-color);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

/* ↑ボタン */
#back-to-top {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 10px 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2000;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--main-color);
}

/* スマホ対応 */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .access-container { grid-template-columns: 1fr; }
  .hero.live-camera {
    min-height: 70vh;
    padding: 1.5rem 1rem;
  }
  .hero-overlay h1 { font-size: 2rem; margin-bottom: 0.8rem; }
  .slideshow-container { max-width: 90%; }
}

/* PCではインライン表示（改行なし） */
.sp-br { display: inline; }
/* スマホでは改行して左揃え */
@media (max-width: 768px) {
  .sp-br { display: block; text-align: left; }
}

/* スタッフ紹介カードが1枚のとき中央寄せ＆幅制限 */
.staff .card-grid.single-card {
  display: flex;
  justify-content: center;
}
.staff .card-grid.single-card .card {
  max-width: 430px;
  width: 100%;
}

.br-sp { display: none; }
@media screen and (max-width: 768px) {
  .br-sp { display: inline; }
}

/* ============================
   news_view（ニュース詳細）用 追記
   既存デザインは変更せず、content-wrap配下にだけ作用
   ============================ */

/* セクション中央寄せ & 中身は左寄せ */
.features-section .content-wrap {
  display: inline-block;
  text-align: left;
  max-width: 100%;
  width: min(100%, 1080px); /* 横に広がりすぎない上限 */
}

/* 日付（📅なし・中間サイズ太字） */
.content-wrap .eyebrow-date{
  font-size: 1.1rem;  /* 本文より大、見出しより小 */
  font-weight: bold;
  color: #444;
  margin: 0 0 .6em 0;
}

/* タイトル */
.content-wrap .news-title{
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0 0 .8em 0;
}

/* 本文と画像 */
.content-wrap .content-body{ line-height: 1.9; }
.content-wrap .content-body img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 区切り線 */
.content-wrap .section-sep{
  border-top: 1px solid #e0e0e0;
  margin: 16px 0;
}

/* 添付サムネ：インラインブロックで自然幅／間隔2px */
.content-wrap .attachments{ font-size: 0; margin-top: 12px; }
.content-wrap .attachments .att{
  display: inline-block;
  vertical-align: top;
  margin: 2px;          /* ← 数ピクセルの間隔 */
  font-size: initial;
  text-align: center;
}
.content-wrap .att-thumb{ display: inline-block; overflow: hidden; }
.content-wrap .att-thumb .thumb-img{
  display: block;
  width: auto;          /* PHPで生成した固定サムネサイズをそのまま利用 */
  height: auto;
  cursor: pointer;
}
.content-wrap .att-thumb .file-link{ display: inline-block; }
.content-wrap .att-thumb .file-link img{ display: block; }
.content-wrap .att-name{
  font-size: .9rem;
  color: #444;
  word-break: break-all;
  max-width: 100%;
}

/* スライドショー（ID版のフェードもサポート） */
#slideshow { transition: opacity 1s ease; }
#slideshow.fade-out { opacity: 0; }

/* ============================
   新着情報（一覧）リスト＋画像対応
   ============================ */

.news-list {
  list-style: none;
  padding-left: 0;
  border-top: 1px solid #ddd;
}

.news-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.news-date {
  font-weight: bold;
  color: #555;
  white-space: nowrap;
}

.news-title {
  flex: 1;
}

/* 画像付きニュース */
.news-item.with-thumb {
  align-items: flex-start;
}

.news-item.with-thumb .news-date {
  margin-bottom: 0.2rem;
}

.news-thumb {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.news-text {
  display: flex;
  flex-direction: column;
}

/* SPレイアウト */
@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-thumb {
    width: 100%;
    height: auto;
  }
}

/* ============================
   各種リンク（取引先・外部サイト 一覧）
   ============================ */

.links-list {
  list-style: none;
  padding-left: 0;
  border-top: 1px solid #ddd;
}

.links-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
}

.links-list a {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--main-color);
  font-weight: bold;
  text-decoration: none;
}

.links-list a:hover {
  text-decoration: underline;
  color: var(--accent-color);
}

/* 外部リンクアイコン ↗ */
.ext-icon {
  font-size: 0.9rem;
  margin-left: 0.3rem;
  opacity: 0.7;
}

/* 説明文（任意） */
.links-list p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}
/* ============================
   各種リンク（画像付き対応）
   ============================ */

.links-list .link-item {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  align-items: flex-start;
}

.link-thumb {
  flex-shrink: 0;
}

.link-thumb .link-img {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.link-body {
  flex: 1;
}

.link-body a {
  font-size: 1.1rem;
  color: var(--main-color);
  font-weight: bold;
  text-decoration: none;
}

.link-body a:hover {
  text-decoration: underline;
  color: var(--accent-color);
}

.link-body p {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}

/* スマホ（縦並び） */
@media (max-width: 768px) {
  .links-list .link-item {
    flex-direction: column;
  }

  .link-thumb .link-img {
    width: 100%;
    height: auto;
  }
}

/* ============================
   セクション共通レイアウト
   （サービス/施設/スタッフ/アクセス/新着/各種リンク）
   ============================ */

.features-section,
.facility,
.staff,
#access,
.news-section,
.links-section {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

.features-section,
.facility,
.staff,
.news-section,
.links-section {
  margin-bottom: 4rem;
}

/* ================================
   セクション内 h2 を左に少し出す
   ================================ */
.features-section h2,
.facility h2,
.staff h2,
#access h2,
.news-section h2,
.links-section h2 {
  margin-left: -0.8rem;   /* ← 左に少し出す */
}
