@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Rockgym.jp 専用のCocoon子テーマリッチデザイン (Premium Portal Edition)
Theme URI: https://wp-cocoon.com/
Author: わいひら
Template: cocoon-master
Version: 1.1.4
*/

/* ==========================================================
 * 基本設定 (Variables & Base)
 * ========================================================== */
:root {
  --main-color: #FFC042;
  --main-color-dark: #E6A72B;
  --text-color: #334155;
  --text-muted: #64748B;
  --bg-color: #F8FAFC;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
  --highlight-underline: #FFF4E0;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  color: var(--text-color) !important;
  background-color: var(--bg-color);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--main-color-dark);
}

/* ==========================================================
 * ヘッダートップバー (.premium-top-bar)
 * ========================================================== */
.premium-top-bar {
  background: var(--white);
  color: var(--text-color);
  font-size: 11px;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-sns-icons a {
  background: #777;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 14px;
  margin-left: 5px;
}

.header-sns-icons a:hover {
  color: var(--main-color);
}

/* ==========================================================
 * メインヘッダー (.premium-header)
 * ========================================================== */
.site-header.premium-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
}

.site-title-img {
  max-height: 50px;
  width: auto;
}

.header-navi .navi-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  align-items: flex-end;
}

.header-navi .navi-list li a {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  display: block;
  position: relative;
  white-space: nowrap;
}

.header-navi .navi-list li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--main-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.header-navi .navi-list li a:hover::after {
  width: 100%;
}

.nav-search-google {
  width: 210px;
  display: flex;
  align-items: flex-end;
  margin-left: 5px;
  transform: scale(0.9);
  transform-origin: right bottom;
  margin-bottom: -1px;
}

.nav-highlight a {
  background: var(--main-color) !important;
  color: var(--white) !important;
  border: 2px solid var(--white) !important;
  border-radius: 4px; /* ボタン風 */
  padding: 8px 18px !important;
  transition: all 0.5s ease !important;
  box-sizing: border-box;
}

.nav-highlight a::after { display: none; }
.nav-highlight a:hover { 
  background: var(--white) !important; 
  border-color: var(--main-color) !important;
  color: #333333 !important; 
  transform: none; 
  box-shadow: none; 
}


/* ==========================================================
 * トップページ (.front-page-main)
 * ========================================================== */
.front-section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* セクションタイトル */
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

.section-title i {
  color: var(--main-color);
}

/* --- Hero (注目記事) --- */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.hero-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hero-img {
  position: relative;
  /* height removed to respect 16:9 aspect-ratio */
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-card:hover .hero-img img {
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
}

.hero-badge {
  background: var(--main-color);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero-title {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* --- クロス検索 --- */
.search-box-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.dummy-search-ui {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-select {
  padding: 12px 20px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  font-size: 15px;
  min-width: 200px;
  color: var(--text-color);
}

.search-btn {
  background: var(--main-color);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.search-btn:hover {
  background: var(--main-color-dark);
}

.search-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 15px;
}

/* --- マップ検索 --- */
.map-embed-card {
  background: var(--white);
  border-radius: 12px;
  padding: 15px;
  box-shadow: var(--shadow-md);
}

.map-embed-card iframe {
  border-radius: 8px;
}

/* --- 都道府県検索 --- */
.prefecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
}

.pref-group {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.pref-region {
  font-size: 16px;
  font-weight: bold;
  border-left: 4px solid var(--main-color);
  padding-left: 10px;
  margin-bottom: 20px;
}

.pref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pref-tags a {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
}

.pref-tags a:hover {
  background: var(--main-color);
  color: var(--white);
  border-color: var(--main-color);
}

.pref-note {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

/* --- タグクラウド --- */
.tag-cloud-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.tag-cloud-card a {
  display: inline-block;
  margin: 0 8px 12px 0;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px !important; /* オーバーライド */
  color: var(--text-color);
}

.tag-cloud-card a:hover {
  background: var(--main-color);
  color: var(--white);
  border-color: var(--main-color);
}

/* ==========================================================
 * フッター (カスタムレイアウト)
 * ========================================================== */
.site-footer.premium-footer {
  background-color: var(--main-color) !important; /* #FFC042 */
  color: var(--white);
  padding: 40px 0 20px;
  margin-top: 60px;
  border-top: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-left {
  flex: 0 0 300px;
}

.footer-logo {
  margin-bottom: 10px;
}

.footer-catchphrase {
  font-size: 13px;
  color: var(--white);
  opacity: 0.9;
}

.footer-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-pref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.footer-pref-list a {
  color: var(--white) !important;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.footer-main-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-main-links a {
  color: var(--white) !important;
  font-size: 14px;
  font-weight: bold;
}

.footer-separator {
  color: rgba(255,255,255,0.5);
}

.footer-sub-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.footer-sub-links a {
  color: var(--white) !important;
  font-size: 12px;
  opacity: 0.8;
}

.footer-sub-links a:hover,
.footer-main-links a:hover,
.footer-pref-list a:hover {
  text-decoration: underline !important;
  color: var(--white) !important;
  opacity: 1;
  background-color: transparent !important;
}

.footer-bottom {
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

@media screen and (max-width: 834px) {
  .footer-inner {
    flex-direction: column;
  }
  .footer-left {
    flex: auto;
    width: 100%;
    margin-bottom: 20px;
  }
}

/* ==========================================================
 * その他のスタイル (エントリーカードなど)
 * ========================================================== */
.entry-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid var(--border-color) !important;
  transition: all 0.3s ease;
}

.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.entry-card-thumb img {
  border-radius: 12px 12px 0 0;
  transition: transform 0.5s ease;
}

.entry-card:hover .entry-card-thumb img {
  transform: scale(1.03);
}

/* ==========================================================
 * モバイル対応 (レスポンシブ)
 * ========================================================== */
@media screen and (max-width: 834px){
  .site-header.premium-header { position: static !important; } /* モバイル版はロゴ追従させない */
  .header-navi .navi-list { display: none; }
  .header-inner { padding: 10px 15px; }
  .front-section { padding: 40px 15px; }
  .prefecture-grid { grid-template-columns: 1fr; }
  .search-box-card { padding: 20px; }
  .search-select { width: 100%; min-width: auto; }
}

/* ==========================================================
 * サイドバー＆メインレイアウト強制 (2カラム対応)
 * ========================================================== */
.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.main {
  width: 66%;
}

.premium-sidebar {
  width: 30%;
  display: block !important;
}

@media screen and (max-width: 834px){
  .main, .premium-sidebar {
    width: 100%;
  }
}

/* ==========================================================
 * アーカイブ一覧 (カード型縦並び)
 * ========================================================== */
.archive-entries .entry-card-wrap {
  display: flex !important;
  flex-direction: column !important;
}

.archive-entries .entry-card-thumb {
  width: 100% !important;
}

.archive-entries .entry-card-content {
  width: 100% !important;
  padding: 15px !important;
  margin: 0 !important;
  text-align: left !important;
}

.archive-entries .entry-card-badge {
  display: inline-block !important;
  margin: 0 0 10px 0 !important; /* Left align fix */
}

.archive-entries .entry-card-title {
  text-align: left !important;
  font-size: 14px !important;
  font-weight: bold !important;
  line-height: 1.5 !important;
  color: var(--text-color);
  margin: 0 !important;
  
  /* Proper rendering to prevent vertical cutoff */
  display: block !important;
  overflow: visible !important;
  max-height: none !important; 
  height: auto !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
}

.archive-entries .a-wrap:hover .entry-card-title,
.archive-entries .entry-card:hover .entry-card-title {
  color: var(--main-color-dark) !important;
  text-decoration: underline !important;
}

/* --- アーカイブ 3列グリッド & バッジ --- */
@media screen and (min-width: 835px) {
  .archive-entries {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
  }
}

.entry-card-badge {
  background: var(--main-color);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-table;
  margin-bottom: 8px;
}

/* ==========================================================
 * サムネイル比率 16:9
 * ========================================================== */
.hero-img, .entry-card-thumb, .popular-entry-card-thumb, .related-entry-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hero-img img, .entry-card-thumb img, .popular-entry-card-thumb img, .related-entry-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================
 * 投稿ページ (single.php) のリッチデザイン
 * ========================================================== */
.entry-content h2 {
  position: relative;
  background: transparent !important;
  padding: 15px 0 15px 15px;
  margin: 40px 0 20px;
  font-size: 24px;
  font-weight: bold;
  border-left: 5px solid var(--main-color) !important;
  border-radius: 0;
  box-shadow: none; /* remove box shadow */
  border-bottom: 1px solid var(--border-color);
}

.entry-content h2::before, .entry-content h3::before {
  display: none !important;
}

.entry-content h3 {
  border-bottom: 2px dashed var(--main-color);
  padding-bottom: 5px;
  font-size: 20px;
  margin: 30px 0 15px;
  font-weight: bold;
}

.entry-content h4 {
  font-size: 18px;
  margin: 25px 0 15px;
  padding-left: 12px;
  border-left: 4px solid var(--main-color-dark);
  font-weight: bold;
  color: var(--text-color);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.entry-content th {
  background-color: var(--main-color);
  color: var(--white);
  padding: 12px 15px;
  font-weight: bold;
  border: 1px solid var(--main-color-dark);
  text-align: center !important; /* 中央揃え */
}

.entry-content td {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.entry-content tr:nth-child(even) td {
  background-color: #fafafa;
}

.entry-content tr:hover td {
  background-color: #fff8eb;
}

/* サイドバーのカスタマイズ */
.premium-sidebar .widget {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.premium-sidebar .widget-title {
  font-size: 18px;
  font-weight: bold;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: var(--text-color);
}

/* ==========================================================
 * カテゴリ・タグの各リンク マウスオーバー
 * ========================================================== */
.post-meta-custom .post-category-link {
  background: var(--main-color);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-block;
}
.post-meta-custom .post-category-link:hover {
  background: var(--main-color-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.custom-post-tags .post-tag-link {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-color);
  transition: all 0.3s;
  display: inline-block;
}
.custom-post-tags .post-tag-link:hover {
  background: var(--main-color);
  border-color: var(--main-color);
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-decoration: none !important;
}

/* 人気記事ランキングのカスタマイズ */
.popular-widget {
  counter-reset: popular-rank;
}
.popular-widget .a-wrap, 
.popular-widget .popular-entry-card-link {
  position: relative;
  display: flex !important;
  margin-bottom: 15px;
  gap: 12px;
  align-items: center;
}
.popular-widget .popular-entry-card-thumb,
.popular-widget .widget-entry-card-thumb {
  position: relative;
  width: 110px !important;
  flex-shrink: 0;
}
.popular-widget .popular-entry-card-thumb::before,
.popular-widget .widget-entry-card-thumb::before {
  counter-increment: popular-rank;
  content: counter(popular-rank);
  position: absolute;
  top: 0;
  left: 0;
  background: var(--main-color);
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
  padding: 2px 7px;
  z-index: 2;
  border-radius: 0 0 6px 0;
}
.popular-widget .popular-entry-card-title,
.popular-widget .widget-entry-card-title {
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.popular-widget .a-wrap:hover .popular-entry-card-title,
.popular-widget .popular-entry-card-link:hover .popular-entry-card-title,
.popular-widget .a-wrap:hover .widget-entry-card-title {
  color: var(--main-color-dark) !important;
  text-decoration: underline;
}
.popular-widget .a-wrap:hover img,
.popular-widget .popular-entry-card-link:hover img {
  opacity: 0.85;
}
/* Cocoonデフォルトの順位を非表示 */
.popular-widget .popular-entry-card-rank,
.popular-widget .widget-entry-card-rank {
  display: none !important;
}

/* ==========================================================
 * ブログカード (Blogcard)
 * ========================================================== */
.blogcard {
  border: 1px solid #E2E8F0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.blogcard-date {
  display: none !important;
}

/* ==========================================================
 * 投稿ページ (目次・リンク)
 * ========================================================== */
.toc {
  margin-left: 0 !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

.toc-title {
  text-align: left !important;
}

.entry-content a {
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline !important;
}

/* ==========================================================
 * ブログカード ホバーエフェクト
 * ========================================================== */
.blogcard {
  transition: all 0.3s ease !important;
}

.blogcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  border-color: var(--main-color) !important;
}
