/*
Theme Name: fx-fun
Author: Taketoshi
Version: 1.1
Description: fx-funのオリジナルテーマ + SEO対応記事ページ
*/

/* --- アフィリエイトバナー --- */
.affiliate-banner {
  width: 100%;
  max-width: 100%;
  /* text-align: center; */
  margin: 1.5em 0;
}

.affiliate-banner img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* --- ベーススタイル --- */
html {
  font-size: 16px;
}
body {
  font-family: "Arial, sans-serif";
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
  font-size: 1rem;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

/* --- Back to Top Button --- */
#back-to-top {
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- ヘッダー --- */
.site-header {
  background: linear-gradient(90deg, #009ee9 60%, #0083df 100%);
  color: #fff;
  padding: 1.5rem 0;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 75rem;
  margin: 0 auto;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-title {
  font-size: 2em;
  font-weight: bold;
  color: #fff;
}
.site-title,
.logo-link {
  text-decoration: none !important;
}
.site-description {
  font-size: 1em;
  margin-left: 0.5em;
  color: #ffd700;
}

/* --- ナビゲーション --- */
.site-navigation .nav-menu {
  display: flex;
  gap: 2em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-navigation .nav-menu li {
  display: inline;
}
.site-navigation .nav-menu li a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 0.25em;
  transition: background 0.2s, color 0.2s;
}
.site-navigation .nav-menu li a:hover {
  background: #ffd700;
  color: #0072c1;
}

/* --- 検索フォーム --- */
.site-search {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.site-search input[type="search"] {
  padding: 0.375em 0.75em;
  border-radius: 0.25em;
  border: none;
}
.site-search button {
  background: #ffd700;
  color: #0072c1;
  border: none;
  border-radius: 0.25em;
  padding: 0.375em 1em;
  font-weight: bold;
  cursor: pointer;
}

/* --- ヒーローセクション --- */
.hero-section {
  background: url("assets/images/hero-background.svg") no-repeat center
    center/cover;
  padding: 3.75rem 1.25rem;
  text-align: center;
  color: #fff;
}
.hero-content {
  background: rgba(0, 0, 0, 0.5);
  display: inline-block;
  padding: 2em 1.5em;
  border-radius: 0.75em;
  margin-top: 2em;
  color: #fff;
  box-shadow: 0 0.25em 1.5em rgba(0, 0, 0, 0.15);
}
.hero-section h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
  color: #fff;
}
.hero-section p {
  font-size: 1.5em;
  color: #fff;
  margin: 0 0 0.75em 0;
}

/* --- カルーセル --- */
.swiper-container {
  width: 100%;
  max-width: 75rem;
  margin: 0 auto;
  overflow: hidden;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.75em;
}

/* --- カテゴリー一覧 --- */
.category-list {
  margin: 2.5em 0 2em 0;
}
.category-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-card {
  background: #fff;
  border-radius: 0.75em;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
  overflow: hidden;
}
.category-card a {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  padding: 1.2em 1em;
  color: #222;
  text-decoration: none;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-0.25em) scale(1.03);
  box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.13);
}
.cat-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-info {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}
.cat-name {
  font-size: 1.15em;
  font-weight: bold;
  color: #0073aa;
}
.cat-desc {
  font-size: 0.97em;
  color: #555;
}
.cat-count {
  font-size: 0.92em;
  color: #888;
}

/* --- カード --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18.75em, 1fr));
  gap: 1.25em;
  padding: 1.25em;
}
.card {
  background: #fff;
  border-radius: 0.5em;
  box-shadow: 0 0.125em 0.625em rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-0.3125em);
}
.card img {
  width: 100%;
  height: auto;
}
.card .text {
  padding: 0.9375em;
}

/* --- マーケットタイム --- */
.market-times {
  display: flex;
  gap: 2em;
  justify-content: center;
  margin: 2em 0 1em 0;
}
.market-time {
  background: #f5f5f5;
  border-radius: 0.5em;
  padding: 1em 2em;
  text-align: center;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.07);
}
.market-time .label {
  display: block;
  font-weight: bold;
  color: #0073aa;
  margin-bottom: 0.5em;
}
.market-time .time {
  font-size: 1.5em;
  color: #333;
}

/* 最新記事とランキングの h2 スタイル */
.category-list h2,
.article-list h2,
.top-ranking h2 {
  font-size: 2rem; /* フォントサイズを大きく */
  font-weight: bold; /* 太字 */
  color: #0073aa; /* ブルー系の色 */
  text-align: center; /* 中央揃え */
  margin-bottom: 1.5rem; /* 下に余白 */
  margin-top: 5.5rem; /* 上に余白 */
  position: relative; /* 装飾用 */
}

.category-list h2::after,
.article-list h2::after,
.top-ranking h2::after {
  content: ""; /* 擬似要素で装飾を追加 */
  display: block;
  width: 50px; /* 下線の幅 */
  height: 3px; /* 下線の高さ */
  background-color: #ffd700; /* ゴールド系の色 */
  margin: 0.5rem auto 0; /* 中央揃え */
  border-radius: 3px; /* 角を丸く */
}

/* --- フッター --- */
.site-footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 1.25em 0;
  position: relative;
  bottom: 0;
  width: 100%;
}
.site-footer .footer-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0.625em 0 0 0;
  display: flex;
  justify-content: center;
  gap: 1.875em;
}
.site-footer .footer-navigation li {
  display: inline;
}
.site-footer .footer-navigation a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.site-footer .footer-navigation a:hover {
  color: #ffd700;
  text-decoration: underline;
}

/* Cookie 同意バーのスタイル */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #333333bd; /* 半透明の背景 */
  color: #fff;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none; /* 初期状態では非表示 */
}

.cookie-consent p {
  margin: 0;
  font-size: 0.9rem;
}

.cookie-consent a {
  color: #ffd700;
  text-decoration: underline;
}

.cookie-consent-btn {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  margin-left: 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 0.25rem;
}

.cookie-consent-btn:hover {
  background-color: #005a87;
}

/* 共通スタイル: プライバシーポリシーとAboutページ */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background-color: #fff;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  line-height: 1.8;
  font-size: 1rem;
  color: #333;
}

.page-content h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #0073aa;
  display: inline-block;
  padding-bottom: 0.5rem;
}
.page-content-header {
  text-align: center;
}

.page-content h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #0073aa;
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  position: relative;
}

.page-content h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background-color: #ffd700;
  margin: 0.5rem auto 0;
  border-radius: 3px;
}

.page-content h3 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #40485b;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-left: 4px solid #ffd700;
  padding-left: 0.75rem;
}

.page-content p {
  margin-bottom: 1.5rem;
  color: #555;
}

.page-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.page-content ul li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: #0073aa;
  text-decoration: underline;
}

.page-content a:hover {
  color: #005a87;
}

/* サイトマップのスタイル */
.sitemap {
  list-style: none;
  padding-left: 0;
  margin: 2rem 0;
}

.sitemap > li {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.sitemap > li > a {
  color: #0073aa;
  text-decoration: none;
}

.sitemap > li > a:hover {
  color: #005a87;
  text-decoration: underline;
}

.sitemap ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.sitemap ul li {
  margin-bottom: 0.5rem;
}

.sitemap ul li a {
  color: #555;
  text-decoration: none;
}

.sitemap ul li a:hover {
  color: #333;
  text-decoration: underline;
}

/* --- 投稿ページ --- */
.site-main {
  max-width: 50em;
  margin: 0 auto;
  padding: 2.5em 1.25em;
  background: #fff;
  box-shadow: 0 0.25em 1.25em rgba(0, 0, 0, 0.05);
  border-radius: 0.5em;
}
.entry-title {
  font-size: 2.2em;
  color: #0072c1;
  margin-bottom: 0.625em;
}
.post-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 1.25em;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 0.375em;
  margin-bottom: 1.25em;
}
.post-excerpt {
  font-size: 1.1em;
  font-weight: 500;
  margin-bottom: 1.875em;
}
.entry-content {
  line-height: 1.8;
  font-size: 1.05em;
}
.post-cta {
  background: #f9f9f9;
  border-left: 0.25em solid #0072c1;
  padding: 1em;
  margin: 2.5em 0;
  font-weight: bold;
}
.cta-button {
  display: inline-block;
  margin-top: 0.625em;
  padding: 0.625em 1.25em;
  background: #ffd700;
  color: #000;
  text-decoration: none;
  border-radius: 0.25em;
  font-weight: bold;
}
.related-posts ul {
  padding-left: 1.2em;
}
.post-author {
  margin-top: 2.5em;
  padding: 1em;
  background: #f0f0f0;
  border-radius: 0.375em;
}

/* --- 見出し・装飾 --- */
.entry-content h2 {
  font-size: 1.8em;
  color: #40485b;
  border-left: 0.375em solid #ffd700;
  padding-left: 0.75em;
  margin: 2.5em 0 1.25em 0;
  font-family: "Segoe UI", sans-serif !important;
  border-bottom-width: 0.125em;
  border-bottom-style: inset;
}
.entry-content h3 {
  font-size: 1.4em;
  color: #0072c1;
  border-left: 0.25em solid #ccc;
  padding-left: 0.625em;
  margin: 1.875em 0 0.9375em 0;
  font-family: "Segoe UI", sans-serif;
}
.entry-content p {
  font-family: "Noto Sans JP", sans-serif;
  margin: 1em 0;
}
.entry-content strong {
  color: #d63333;
  font-weight: bold;
  background-color: #fff8dc;
  padding: 0.125em 0.25em;
  border-radius: 0.125em;
}
.highlight {
  background-color: #ffffcc;
  padding: 0.125em 0.375em;
  border-radius: 0.25em;
  font-weight: bold;
}
.entry-content ul,
.entry-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.25em;
}
.entry-content ul {
  list-style: disc;
}
.entry-content ol {
  list-style: decimal;
}
.note-box {
  background: #e0f7fa;
  border-left: 0.3125em solid #00acc1;
  padding: 1em;
  margin: 1.875em 0;
  border-radius: 0.375em;
}
.warning-box {
  background: #fff3cd;
  border-left: 0.3125em solid #ffc107;
  padding: 1em;
  margin: 1.875em 0;
  border-radius: 0.375em;
}

/* --- ノート風もくじ --- */
.toc-notebook {
  background: repeating-linear-gradient(
    to bottom,
    #fff,
    #fff 2em,
    #e0e0e0 2.0625em
  );
  border: 0.125em solid #ccc;
  border-radius: 0.625em;
  padding: 1em 1.25em;
  margin: 1.5em 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 2;
  box-shadow: 0 0.125em 0.3125em rgba(0, 0, 0, 0.1);
}
.toc-notebook h2 {
  margin-top: 0;
  font-size: 1.25em;
  font-weight: bold;
  color: #2c3e50;
  border-bottom: none;
  padding-bottom: 0.3125em;
}
.toc-notebook ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.625em;
}
.toc-notebook ul li a {
  text-decoration: none;
  color: #2980b9;
  font-weight: bold;
  display: block;
  padding: 0.25em 0;
  transition: all 0.3s;
}
.toc-notebook ul li a:hover {
  color: #1abc9c;
}

/* --- テーブル --- */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  background: #fff;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.05);
  font-size: 1em;
}
.responsive-table th,
.responsive-table td {
  border: 1px solid #e0e0e0;
  padding: 0.75em 1em;
  text-align: left;
}
.responsive-table th {
  background: #f5f8fa;
  color: #0073aa;
  font-weight: bold;
}
.responsive-table tr:nth-child(even) {
  background: #f9fbfc;
}
.responsive-table caption {
  caption-side: top;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  padding: 0.5em 0;
}

/* --- 最新記事一覧ページのスタイル --- */
.view-all-articles {
  text-align: center;
  margin: 2rem 0;
}

.view-all-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
}

.view-all-link:hover {
  background-color: #005a87;
}

#economicCalendarWidget {
  width: 100%;
  max-width: 800px; /* 最大幅を800pxに制限 */
  height: auto; /* 高さを自動調整 */
  aspect-ratio: 4 / 3; /* 幅と高さの比率を維持 */
  margin: 0 auto; /* 中央揃え */
}

/* ランキング記事一覧ページのスタイル */
/* 最新記事一覧ページのスタイル */
.latest-articles,
.ranking-articles {
  text-align: center;
  max-width: 75rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  background-color: #fff;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
}
.contact-header {
  text-align: center;
}
.latest-articles h1,
.ranking-articles h1 {
  font-size: 2.5rem; /* 大きめのフォントサイズ */
  font-weight: bold; /* 太字 */
  color: #333; /* ダークグレー */
  text-align: center; /* 中央揃え */
  margin-bottom: 2rem; /* 下に余白 */
  border-bottom: 2px solid #0073aa; /* 下線を追加 */
  display: inline-block; /* 下線をテキスト幅に合わせる */
  padding-bottom: 0.5rem; /* 下線との間隔を調整 */
}

/* コンタクトフォーム7 */
.contact-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background-color: #fff;
  box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

.contact-page h1 {
  font-size: 2.5rem; /* フォントサイズ */
  font-weight: bold; /* 太字 */
  color: #333; /* テキスト色 */
  text-align: center; /* 中央揃え */
  margin-bottom: 2rem; /* 下に余白 */
  border-bottom: 2px solid #0073aa; /* 下線を追加 */
  display: inline-block; /* 下線をテキスト幅に合わせる */
  padding-bottom: 0.5rem; /* 下線との間隔を調整 */
}

/* Contact Form 7 のフォーム全体のスタイル */
.contact-form {
  max-width: 800px;
}

/* フォーム内の入力フィールド */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  font-size: 1rem;
  box-sizing: border-box;
}

/* 送信ボタン */
.contact-form input[type="submit"] {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.contact-form input[type="submit"]:hover {
  background-color: #005a87;
}

/* --- レスポンシブ --- */
@media (max-width: 1024px) {
  .swiper-slide img {
    /* 必要ならここに記述 */
  }
}
@media (max-width: 800px) {
  .category-cards {
    flex-direction: column;
    gap: 1em;
    align-items: stretch;
  }
  .category-card {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  #economicCalendarWidget {
    max-width: 100%; /* モバイルでは幅を画面いっぱいに */
    aspect-ratio: 16 / 9; /* 比率を16:9に変更 */
  }
  .header-inner,
  .logo-area,
  .site-navigation .nav-menu,
  .site-footer .footer-navigation ul {
    flex-direction: column;
    gap: 1em;
    align-items: center;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .site-title {
    font-size: 1.5em;
  }
  .hero-section h1 {
    font-size: 2em;
  }

  /* コンタクトフォーム7 */
  .contact-form {
    padding: 1.5rem 1rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  .contact-form input[type="submit"] {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}
@media (max-width: 600px) {
  .swiper-slide img {
    border-radius: 0.5em;
  }
  .market-times {
    flex-direction: column;
    gap: 1em;
    align-items: center;
  }
  .market-time {
    width: 90%;
    padding: 1em;
  }
  .article-list h2,
  .top-ranking h2 {
    padding: 0.5em;
  }
  .responsive-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  .responsive-table th,
  .responsive-table td {
    min-width: 120px;
    padding: 0.5em 0.75em;
    font-size: 0.98em;
  }
  html {
    font-size: 15px;
  }
  body {
    font-size: 0.94rem;
    padding: 0 0.25em;
  }
  .site-title {
    font-size: 1.2em;
  }
  .site-description {
    font-size: 0.95em;
    margin-left: 0.25em;
  }
  .hero-section {
    padding: 2em 0.375em;
  }
  .hero-content {
    padding: 1.125em 0.5em;
    margin-top: 1em;
    font-size: 1em;
  }
  .hero-section h1 {
    font-size: 1.3em;
    margin-bottom: 0.3em;
  }
  .hero-section p {
    font-size: 1em;
  }
  .category-card {
    flex: 1 1 160px;
  }
  .cards {
    padding: 0.5em;
    gap: 0.75em;
    grid-template-columns: 1fr;
  }
  .card .text {
    padding: 0.5em;
    font-size: 0.98em;
  }
  .site-main {
    padding: 1em 0.25em;
    max-width: 100%;
  }
  .entry-title {
    font-size: 1.3em;
  }
  .post-meta {
    font-size: 0.85em;
  }
  .post-thumbnail img {
    border-radius: 0.25em;
    margin-bottom: 0.625em;
  }
  .post-cta {
    padding: 0.625em;
    margin: 1.5em 0;
    font-size: 1em;
  }
  .cta-button {
    padding: 0.5em 0.75em;
    font-size: 1em;
  }
  .site-footer {
    padding: 0.75em 0;
    font-size: 0.95em;
  }
  .site-footer .footer-navigation ul {
    gap: 0.75em;
    flex-direction: column;
    align-items: center;
  }
  .note-box,
  .warning-box {
    padding: 0.625em;
    margin: 1em 0;
    font-size: 0.98em;
  }
  .toc-notebook {
    padding: 0.625em 0.5em;
    font-size: 0.98em;
  }
  .toc-notebook h2 {
    font-size: 1.1em;
    padding-bottom: 0.125em;
  }
  .entry-content h2 {
    font-size: 1.6em;
  }
  .swiper-pagination {
    position: initial !important;
  }

  .latest-articles h1,
  .ranking-articles h1 {
    font-size: 2rem; /* フォントサイズを少し小さく */
  }
}
