/* ============================================================
   俳句FAN：共通ベースデザイン
   ファイル：/portal-css/portal-base.css

   役割：
   - 俳句FAN全体の共通デザイン土台
   - 色、幅、余白、見出し、カード、メタ情報、ラベル、クレジットを管理
   - ニュース・公募・結社一覧・トップページ固有の差分は各CSSで管理する
============================================================ */


/* ============================================================
   1. 共通変数
============================================================ */

:root {
  --hf-color-main: #8f1f3f;
  --hf-color-main-dark: #6f1831;

  --hf-color-accent: #9b7a3b;
  --hf-color-accent-dark: #7e622f;

  --hf-color-green: #6f7f4f;
  --hf-color-green-dark: #56623f;

  --hf-color-text: #2f2a24;
  --hf-color-subtext: #5f574f;
  --hf-color-muted: #8f877e;

  --hf-color-bg: #faf7ef;
  --hf-color-card: #fffdf8;
  --hf-color-white: #ffffff;

  --hf-color-border: #e6ddcf;
  --hf-color-border-light: #f0e7dc;

  --hf-shadow-card: 0 5px 16px rgba(80, 60, 35, 0.055);
  --hf-shadow-card-hover: 0 10px 24px rgba(80, 60, 35, 0.10);
  --hf-shadow-section: 0 10px 30px rgba(80, 60, 35, 0.055);

  --hf-radius-small: 10px;
  --hf-radius-card: 16px;
  --hf-radius-section: 22px;

  --hf-width-main: 1040px;
  --hf-width-wide: 1240px;

  --hf-gap-list: 14px;
}


/* ============================================================
   2. 共通リセット
============================================================ */

.hf-section,
.hf-top-layout,
.hf-side-box,
.hf-kessha-page {
  color: var(--hf-color-text);
}

.hf-section *,
.hf-top-layout *,
.hf-side-box *,
.hf-kessha-page * {
  box-sizing: border-box;
}


/* ============================================================
   3. 共通セクション
============================================================ */

.hf-section {
  max-width: var(--hf-width-main);
  margin: 56px auto;
  padding: 40px;

  background: var(--hf-color-card);
  border: 1px solid var(--hf-color-border);
  border-radius: var(--hf-radius-section);
  box-shadow: var(--hf-shadow-section);
}


/* ============================================================
   4. 共通セクション見出し
============================================================ */

.hf-section-header {
  margin: 0 0 26px;
}

.hf-section-title {
  position: relative;
  display: inline-block;

  margin: 0 0 16px;
  padding: 0 0 10px;

  color: var(--hf-color-text);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.4;
}

.hf-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 64px;
  height: 3px;

  background: var(--hf-color-accent);
  border-radius: 999px;
}

.hf-section-title-main {
  display: block;
}

.hf-section-subtitle {
  display: block;

  margin-top: 4px;

  color: var(--hf-color-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hf-section-lead {
  margin: 0;

  color: var(--hf-color-subtext);
  font-size: 0.95rem;
  line-height: 1.8;
}


/* ============================================================
   5. 共通リスト
============================================================ */

.hf-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hf-gap-list);

  margin: 0 !important;
  padding: 0 !important;

  list-style: none !important;
}

.hf-list > .hf-list-card {
  margin: 0 !important;
}


/* ============================================================
   6. 共通カード
============================================================ */

.hf-list-card {
  display: grid;
  grid-template-rows: auto auto;
  align-content: space-between;

  min-height: 124px;
  padding: 18px 20px 16px;

  background: var(--hf-color-white);
  border: 1px solid var(--hf-color-border);
  border-radius: var(--hf-radius-card);
  box-shadow: var(--hf-shadow-card);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.hf-list-card:hover {
  transform: translateY(-2px);
  border-color: #c8ad83;
  background: var(--hf-color-card);
  box-shadow: var(--hf-shadow-card-hover);
}


/* ============================================================
   7. 共通カードタイトル
============================================================ */

.hf-card-title {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;

  color: var(--hf-color-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.65;
}

/* Lightningなどテーマ側の見出し装飾を打ち消す */
.hf-card-title::before,
.hf-card-title::after {
  content: none !important;
  display: none !important;
}

.hf-card-title a {
  display: block;

  margin: 0 !important;
  padding: 0 !important;
  border: none !important;

  color: var(--hf-color-text);
  text-decoration: none;
}

.hf-card-title a:hover {
  color: var(--hf-color-accent-dark);
  text-decoration: underline;
}


/* ============================================================
   8. 共通メタ情報
============================================================ */

.hf-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;

  margin: 14px 0 0 !important;
  padding: 0 !important;

  border: none !important;
  box-shadow: none !important;

  color: var(--hf-color-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.hf-card-meta::before,
.hf-card-meta::after {
  content: none !important;
  display: none !important;
}

.hf-meta-item {
  display: inline-flex;
  align-items: center;

  margin: 0 !important;
  padding: 0 !important;
  border: none !important;

  color: var(--hf-color-muted);
}


/* ============================================================
   9. 共通ラベル
============================================================ */

.hf-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  padding: 4px 10px;

  border-radius: 999px;
  background: var(--hf-color-accent);
  color: #fff;

  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}


/* ============================================================
   10. 共通クレジット
============================================================ */

.hf-credit {
  margin-top: 22px;
  padding-top: 14px;

  border-top: 1px solid var(--hf-color-border-light);

  color: var(--hf-color-muted);
  font-size: 0.80rem;
  line-height: 1.7;
  text-align: right;
}

.hf-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted #d2c8bc;
}

.hf-credit a:hover {
  color: var(--hf-color-accent-dark);
}


/* ============================================================
   11. 空メッセージ
============================================================ */

.hf-empty-message {
  max-width: var(--hf-width-main);
  margin: 32px auto;
  padding: 18px 20px;

  background: var(--hf-color-card);
  border: 1px solid var(--hf-color-border);
  border-radius: var(--hf-radius-card);

  color: var(--hf-color-subtext);
  font-size: 0.95rem;
  line-height: 1.8;
}


/* ============================================================
   12. 共通ボタン
============================================================ */

.hf-side-main-button {
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--hf-color-accent);
  color: #fff !important;

  text-align: center;
  text-decoration: none !important;
  font-weight: 700;

  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.hf-side-main-button:hover {
  background: var(--hf-color-accent-dark);
  color: #fff !important;
  text-decoration: none !important;
}


/* ============================================================
   13. トップページ内の共通調整
============================================================ */

.hf-top-tab-panel .hf-section {
  margin: 0;
  padding: 34px 36px;
}

.hf-top-main .hf-list {
  grid-template-columns: 1fr;
}


/* ============================================================
   14. スマホ共通
============================================================ */

@media (max-width: 768px) {

  .hf-section {
    margin: 32px 14px;
    padding: 24px 18px;
    border-radius: 18px;
  }

  .hf-section-title {
    font-size: 1.35rem;
  }

  .hf-section-lead {
    font-size: 0.9rem;
  }

  .hf-list {
    gap: 12px;
  }

  .hf-list-card {
    min-height: auto;
    padding: 16px;
  }

  .hf-card-meta {
    margin-top: 12px !important;
    font-size: 0.8rem;
  }

  .hf-credit {
    text-align: left;
  }

  .hf-top-tab-panel .hf-section {
    padding: 22px 18px;
  }
}