/* style.css */
/* オクチミル トップページ（BeerCSS + カスタム） */

:root {
  --primary: #0066cc;
  --primary-dark: #004080;
  --page-bg: #f5f7fa;
  --section-spacing: 3.5rem;
  --content-max: 1200px;
}

/* ─── 全体 ─── */
body.page-top {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: #1a1a1a;
}

main {
  padding-bottom: 1rem;
}

/* セクション共通 */
.section {
  padding: var(--section-spacing) 1rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: #333;
}

.full-width {
  width: 100%;
  box-sizing: border-box;
}

/* カード内ボタンの左右余白を親の padding のみにする */
.card-feature .padding .button.full-width,
.card-feature .padding a.button.full-width {
  margin-left: 0;
  margin-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ─── ヘッダー（Nintendo.com 風：左ロゴ・右ナビ） ─── */
html {
  scroll-padding-top: 4rem; /* 固定ヘッダー分、アンカーで飛んだときに隠れないように */
}

#page-header.top.fixed {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.5rem;
  min-height: 4rem;
  box-sizing: border-box;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary);
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--primary);
  border-radius: 2rem;
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo-svg {
  display: block;
  height: 2.1rem;
  width: auto;
  font-family: "Lato", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-nav a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.header-nav a:hover {
  color: var(--primary);
  background: rgba(0, 102, 204, 0.06);
}


@media (max-width: 600px) {
  .header-inner {
    padding: 0 1rem;
    min-height: 3.5rem;
  }
  .header-nav {
    gap: 0;
  }
  .header-nav a {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
  }
}

/* ─── メインビジュアル（スライダー） ─── */
/* デバッグ: body の data-main-visual-debug="1" を外すと枠が消えます */
[data-main-visual-debug="1"] #main-visual { outline: 4px solid rgba(255,0,0,0.8); }
[data-main-visual-debug="1"] .main-visual .carousel { outline: 4px solid rgba(0,128,0,0.8); }
[data-main-visual-debug="1"] .main-visual .carousel-track { outline: 4px solid rgba(0,0,255,0.8); }
[data-main-visual-debug="1"] .main-visual .carousel-slide { outline: 2px solid rgba(255,165,0,0.9); }

body.page-top #main-visual.main-visual {
  position: relative !important;
  min-height: 70vh !important;
  height: 70vh !important;
  width: 100% !important;
  min-width: 100% !important;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.page-top .main-visual .carousel {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  width: 100% !important;
  height: 70vh !important;
  block-size: 70vh !important;
}

body.page-top .main-visual .carousel-track {
  display: flex;
  width: 300% !important;
  height: 70vh !important;
  min-height: 70vh !important;
  animation: main-visual-slide 15s ease-in-out infinite;
}

body.page-top .main-visual .carousel-slide {
  width: 33.333% !important;
  min-width: 33.333%;
  flex-shrink: 0;
  height: 70vh !important;
  min-height: 70vh !important;
  overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.4)),
    center/cover no-repeat url('https://placehold.co/1920x1080/0066cc/ffffff?text=OkuchiMill');
}

body.page-top .main-visual .carousel-slide img {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: cover;
  object-position: center center;
  display: block;
  vertical-align: top;
}

@keyframes main-visual-slide {
  0%, 28% { transform: translateX(0); }
  33%, 61% { transform: translateX(-33.333%); }
  66%, 94% { transform: translateX(-66.666%); }
  100% { transform: translateX(-66.666%); }
}

.main-visual-caption {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 2rem 1rem;
}

.main-visual .main-visual-lead {
  margin: 0.5rem 0 0;
  opacity: 0.95;
}

.main-visual .button {
  margin-top: 0.5rem;
}

/* ─── 特徴カード（ご利用の流れ） ─── */
.section-features .content {
  margin-bottom: 0.5rem;
}

.section-features .feature-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-feature,
.card-news {
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card-feature:hover,
.card-news:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-feature .padding,
.card-news .padding {
  padding: 1.25rem;
}

.card-news .padding {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-desc {
  margin: 0.25rem 0 1rem;
  color: #555;
  font-size: 0.95rem;
}

/* ─── オクチミルとは ─── */
.section-about .content {
  margin-bottom: 0.5rem;
}

.about-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.about-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.75rem;
}

.about-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* ─── お知らせ（横スクロール・Nintendo風・1～10件） ─── */
.section-news {
  padding-top: 2rem;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

.section-news .content {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.news-scroll {
  margin-left: 16px;
  margin-right: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0 0 0.5rem;
}

.news-scroll::-webkit-scrollbar {
  height: 6px;
}

.news-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.card-news-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: start;
}

.card-news-link:hover .card-news {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0 16px 0.5rem;
  width: max-content;
  max-width: none;
}

.card-news {
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: start;
}

.card-news .card-image-wrap {
  aspect-ratio: 16 / 9;
}

.card-news .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-news .padding {
  padding: 0.75rem;
}

.news-date {
  font-size: 0.7rem;
  color: #888;
  margin: 0 0 0.25rem;
}

.card-news h6 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-news .small-text {
  margin: 0;
  font-size: 0.8rem;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── フッター ─── */
#page-footer {
  background: #212121;
  color: #e0e0e0;
  padding: 2.5rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

#page-footer .content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: #b0b0b0;
}

.footer-links {
  font-size: 0.9rem;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.footer-links a {
  color: #b0b0b0;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links .separator {
  margin: 0 0.5rem;
  color: #666;
}

/* ─── レスポンシブ ─── */
@media (max-width: 600px) {
  :root {
    --section-spacing: 2rem;
  }

  #main-visual.main-visual {
    min-height: 60vh;
  }
  .main-visual-caption {
    padding: 1.5rem 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card-news {
    width: 200px;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-feature .padding,
  .card-news .padding {
    padding: 1rem;
  }
}

/* ─── news_detail ページ ─── */
.page-sub .page-header.page-header-news-detail {
  margin-top: 4rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.5rem 1rem 0.75rem;
}
.page-sub .page-header.page-header-news-detail h1 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}
.page-sub .page-header.page-header-news-detail .back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}
.page-sub .page-header.page-header-news-detail .back:hover {
  text-decoration: underline;
}
.news-detail-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}
.news-detail-body {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.news-detail-body .card-image-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  max-width: 100%;
}
.news-detail-body .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
}
.news-detail-body .padding {
  padding: 2rem;
}
.news-detail-date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}
.news-detail-body h2 {
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
  color: #333;
  line-height: 1.5;
}
.news-detail-body .news-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
}
.news-detail-body .news-body p {
  margin: 0 0 1rem;
}
.news-detail-body .news-body ul,
.news-detail-body .news-body ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

@media (max-width: 600px) {
  .news-detail-main {
    padding: 1.5rem 1rem 2rem;
  }
  .news-detail-body .padding {
    padding: 1.25rem 1rem;
  }
}

/* 既存：topic-bar（他ページ用） */
.topic-bar {
  background: #fff3e0;
  color: #e65100;
  text-align: center;
  padding: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #ffe082;
}

/* ────────────────────────────────────────────────
   ナビゲーションの調整（右のログインボタンを正方形に近づける）
───────────────────────────────────────────────── */

/* ログインボタンを正方形に近い形にする */
.button.square {
  min-width: 4.8rem;           /* 幅の下限 */
  height: 3.2rem;              /* 高さを固定して正方形に近づける */
  padding: 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

/* elevated（浮き上がり感）を少し強く */
.button.square.elevated {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 小さい画面でも押しやすく（vwベースで自然に縮小） */
.button.square {
  width: clamp(4.4rem, 13vw, 5.8rem);
  height: clamp(2.9rem, 9vw, 3.4rem);
  font-size: clamp(0.88rem, 3.3vw, 0.98rem);
}

/* ロゴの見た目を少し整える（任意だがおすすめ） */
.large-text.bold {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
}

/* コンテンツの左右余白を調整（横並びが窮屈にならないように） */
nav.top .content {
  padding: 0 1.25rem;
}