/* oi-ham.com — Samurai Blue (Cocoon-inspired) */

:root {
  --navy:        #19295a;
  --navy-mid:    #282d48;
  --header-bg:   #2b2c48;
  --border-light:#d3d6db;
  --body-bg:     #eceef8;
  --content-bg:  #ffffff;
  --text:        #333333;
  --text-muted:  #777777;
  --accent:      #19448e;
  --accent-hover:#e53900;
  --accent-light:#f3fafe;
  --card-hover:  #dee5f3;
  --card-border: #7086aa;
  --font: 'Yu Gothic','YuGothic','游ゴシック体','Hiragino Kaku Gothic ProN','Hiragino Sans',Meiryo,sans-serif;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--body-bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
#header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 200;
}

#header-in {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 60px;
}

.site-name-text-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-name-fallback {
  color: #fbfcfe;
  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: 0.04em;
}

/* ===== NAV ===== */
#navi {
  background: var(--header-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: sticky;
  top: 60px;
  z-index: 199;
}

#navi-in {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 20px;
}

.menu-header {
  display: flex;
  list-style: none;
  justify-content: center;
}

.menu-header li a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 14px;
  color: #fbfcfe;
  text-decoration: none;
  height: 56px;
  transition: background 0.2s;
  text-align: center;
  min-width: 100px;
}

.menu-header li a:hover,
.menu-header li.current a {
  background: rgba(255,255,255,0.2);
  color: #fbfcfe;
  text-decoration: none;
}

.item-label { font-weight: 600; font-size: 0.88rem; line-height: 1.2; }
.item-description { font-size: 0.62rem; color: rgba(255,255,255,0.55); margin-top: 3px; line-height: 1; }

/* ===== WRAP / LAYOUT ===== */
.wrap {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 20px;
}

#container {
  background: var(--body-bg);
  min-height: calc(100vh - 116px);
}

#contents {
  padding: 24px 0 48px;
}

#contents-in {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ===== MAIN ===== */
#main {
  flex: 1;
  min-width: 0;
  background: var(--content-bg);
  padding: 30px 28px;
  border-radius: var(--radius);
}

/* ===== SIDEBAR ===== */
#sidebar {
  width: 376px;
  flex-shrink: 0;
}

.widget {
  background: var(--content-bg);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 16px 14px 14px;
}

/* Sidebar headings — Samurai Blue diamond-bullet style */
.widget-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--navy-mid);
  background: none;
  position: relative;
  padding: 8px 0 4px 26px;
  margin-bottom: 14px;
  border-bottom: 6px double var(--navy-mid);
}

.widget-title::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 6px;
  left: 10px;
  background: var(--navy-mid);
  transform: rotate(50deg);
}

.widget-title::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  top: 18px;
  left: 3px;
  background: var(--navy);
  transform: rotate(20deg);
}

.widget-content {
  font-size: 0.82rem;
}

/* ===== ENTRY CARD WRAPPER (list pages) ===== */
.entry-card-wrap {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 1em;
  padding: 1.5%;
  transition: all 0.5s;
  overflow: hidden;
}

.entry-card-wrap:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(0,0,0,0.24);
  text-decoration: none;
  color: var(--text);
}

/* Fallback: bare .entry-card without wrapper (e.g. older pages) */
.entry-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 1em;
  padding: 1.5%;
  transition: all 0.5s;
  overflow: hidden;
  background: var(--content-bg);
}

.entry-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(0,0,0,0.24);
}

/* Clearfix for float layout */
.entry-card-wrap::after,
.entry-card::after {
  content: "";
  display: table;
  clear: both;
}

.entry-card-thumb {
  float: left;
  width: 280px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d0ddf5 0%, #e4eaf8 100%);
  margin-top: 3px;
}

.entry-card-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.entry-card-content {
  margin-left: 292px;
  padding: 4px 8px 4px 16px;
}

.entry-card-title {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 8px;
}

.entry-card-title a {
  color: var(--text);
  text-decoration: none;
}

.entry-card-title a:hover { color: var(--accent); text-decoration: none; }

.entry-card-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-card-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.entry-cat-label {
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  padding: 2px 8px;
  border-radius: 2px;
}

/* ===== ARTICLE PAGE ===== */
.article {
  background: var(--content-bg);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.article-title {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.45;
  margin-bottom: 14px;
  color: var(--text);
}

.article-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.entry-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}

/* Article H2 — Samurai Blue exact style */
.entry-content h2 {
  padding: .6em 1em;
  background-color: var(--navy);
  border-right: 10px solid var(--border-light);
  border-left: 30px double var(--border-light);
  border-radius: 7px;
  color: #f5f3f3;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 2rem 0 1rem;
  position: relative;
}

.entry-content h2::after {
  position: absolute;
  left: -10px;
  bottom: 0;
  content: '';
  height: 100%;
  border-left: 10px solid #fbfcfe;
}

/* Article H3 — diagonal stripe */
.entry-content h3 {
  padding: .4em 2em;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: bold;
  margin: 1.6rem 0 0.8rem;
  background-image: repeating-linear-gradient(
    45deg,
    var(--navy) 0%, var(--navy) 7%,
    #fbfcfe 7%, #fbfcfe 8%,
    var(--navy) 8%, var(--navy) 9%,
    var(--border-light) 9%, var(--border-light) 91%,
    var(--navy) 91%, var(--navy) 92%,
    #fbfcfe 92%, #fbfcfe 93%,
    var(--navy) 93%
  );
}

/* Article H4 — double-square */
.entry-content h4 {
  font-size: 1rem;
  font-weight: bold;
  position: relative;
  padding: 0 0 4px 32px;
  border-bottom: 2px solid var(--navy);
  margin: 1.5rem 0 0.8rem;
}

.entry-content h4::before,
.entry-content h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--navy);
  margin: auto;
}

.entry-content h4::before { top: -20px; left: 0; }
.entry-content h4::after  { top: -8px;  left: 6px; }

/* Article H5 */
.entry-content h5 {
  font-size: 0.95rem;
  font-weight: bold;
  border-bottom: 2px solid var(--border-light);
  position: relative;
  padding-bottom: 4px;
  margin: 1.3rem 0 0.7rem;
}

.entry-content h5::after {
  content: "";
  display: block;
  position: absolute;
  border-bottom: 2px solid var(--navy);
  bottom: -3px;
  left: 0;
  width: 15%;
}

.entry-content p { margin-bottom: 1rem; }

.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content li { margin-bottom: 0.4rem; }
.entry-content strong { font-weight: bold; }
.entry-content a { color: var(--accent); }

.entry-content blockquote {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #444;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Tables — Samurai Blue zebra */
.entry-content table, table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.entry-content th, th {
  color: #f5f3f3;
  background: linear-gradient(#282d48 0%, #4d5aa2 100%);
  padding: 10px 14px;
  text-align: left;
}

.entry-content td, td {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
}

.entry-content tr:nth-of-type(2n) td,
tr:nth-of-type(2n) td { background: var(--border-light); }

.entry-content tr:nth-of-type(2n+1) td,
tr:nth-of-type(2n+1) td { background: #fbfcfe; }

/* ===== HOME HERO ===== */
.home-hero {
  background: var(--header-bg);
  color: #fff;
  padding: 56px 20px;
  text-align: center;
}

.home-hero-title {
  font-size: 1.9rem;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.4;
}

.home-hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.8;
}

.home-hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--header-bg);
  padding: 10px 28px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.15s;
}

.home-hero-btn:hover { opacity: 0.88; text-decoration: none; color: var(--header-bg); }

/* ===== PAGE TITLE ===== */
.page-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.page-header-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text);
  border-left: 5px solid var(--navy);
  padding-left: 14px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { color: var(--border-light); }

/* ===== SEARCH WIDGET ===== */
.search-box { display: flex; gap: 6px; }

.search-edit {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-family: var(--font);
}

.search-submit {
  padding: 7px 12px;
  background: linear-gradient(var(--navy) 0%, #3f4a8c 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
}

.search-submit:hover { opacity: 0.85; }

/* ===== SIDEBAR LISTS ===== */
.cat-list { list-style: none; }
.cat-list li { border-bottom: 1px solid var(--border-light); padding: 7px 0; }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { font-size: 0.82rem; color: var(--accent); display: flex; justify-content: space-between; }

.cat-count {
  background: #f0f0f0;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 10px;
}

.recommended-list { list-style: none; padding: 0; margin: 0; }
.recommended-list li { border-bottom: 1px solid var(--border-light); padding: 8px 0; }
.recommended-list li:last-child { border-bottom: none; }
.recommended-list a { font-size: 0.82rem; color: var(--text); line-height: 1.5; display: block; }
.recommended-list a:hover { color: var(--accent); text-decoration: none; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.tag-cloud a {
  background: #f0f0f0;
  color: #555;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition: background 0.15s;
}

.tag-cloud a:hover { background: var(--card-hover); color: var(--navy); text-decoration: none; }

/* ===== FOOTER ===== */
#footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.8rem;
}

#footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
#footer a:hover { color: #fff; }

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  list-style: none;
}

.footer-nav li { border-left: 1px solid rgba(255,255,255,0.25); }
.footer-nav li:last-child { border-right: 1px solid rgba(255,255,255,0.25); }

.footer-nav a {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  padding: 4px 18px;
  text-decoration: none;
}

.footer-nav a:hover { color: #fff; }

/* ===== ARTICLE EYECATCH ===== */
.article-eyecatch { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; }
.article-eyecatch img { width: 100%; height: auto; display: block; }

/* ===== SHARE BUTTONS ===== */
.share-buttons {
  margin: 2rem 0 1rem;
  padding: 16px 20px;
  background: var(--accent-light);
  border-radius: var(--radius);
  border: 1px solid #c8d8ee;
}

.share-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.share-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s;
}

.share-btn:hover { opacity: 0.82; text-decoration: none; }
.share-x    { background: #000; color: #fff; }
.share-line { background: #06C755; color: #fff; }
.share-copy { background: var(--navy); color: #fff; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }

.page-num {
  display: inline-block;
  padding: 7px 13px;
  border: 2px solid var(--navy);
  border-radius: 99px;
  background: var(--border-light);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.page-num:hover, .page-num.current {
  background: var(--navy);
  color: #fbfcfe;
  border-color: var(--border-light);
  text-decoration: none;
}

/* ===== CAROUSEL (Slick multi-card) ===== */
#carousel {
  background: var(--header-bg);
  padding: 14px 0 28px;
}

#carousel-in {
  position: relative;
}

.carousel-entry-card-wrap {
  display: block;
  text-decoration: none;
  color: var(--text);
  outline: none;
  padding: 0 4px;
}

.carousel-entry-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--content-bg);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-light);
}

.carousel-entry-card-wrap:hover .carousel-entry-card {
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  background: var(--card-hover);
}

.carousel-entry-card-thumb {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.carousel-entry-card-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.cat-label {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 2px;
  line-height: 1.3;
}

.carousel-entry-card-content {
  padding: 6px 8px 7px;
}

.carousel-entry-card-title {
  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Slick overrides — Samurai Blue style */
#carousel .slick-prev,
#carousel .slick-next {
  width: 28px;
  height: 28px;
  z-index: 10;
  top: 40%;
}

#carousel .slick-prev { left: -8px; }
#carousel .slick-next { right: -8px; }

#carousel .slick-prev:before,
#carousel .slick-next:before {
  color: rgba(255,255,255,0.75);
  font-size: 26px;
}

#carousel .slick-dots {
  bottom: -20px;
}

#carousel .slick-dots li button:before {
  color: rgba(255,255,255,0.5);
  font-size: 8px;
  opacity: 1;
}

#carousel .slick-dots li.slick-active button:before {
  color: #fff;
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  #main { padding: 24px 20px; }
  #sidebar { width: 310px; }
  .entry-card-thumb { width: 220px; }
  .entry-card-content { margin-left: 232px; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  #header-in { height: 52px; }
  #navi { top: 52px; }
  #carousel .slick-prev { left: 0; }
  #carousel .slick-next { right: 0; }
  .menu-header { flex-wrap: wrap; }
  .menu-header li a { height: auto; padding: 8px 10px; min-width: unset; }
  #contents-in { flex-direction: column; }
  #main { width: 100%; padding: 20px 16px; }
  #sidebar { width: 100%; }
  .entry-card-wrap { padding: 2%; }
  .entry-card-thumb { float: none; width: 100%; margin-bottom: 12px; }
  .entry-card-thumb img { aspect-ratio: 16/9; }
  .entry-card-content { margin-left: 0; padding: 0; }
  .home-hero-title { font-size: 1.4rem; }
  .entry-content h2 { padding: .5em 0.4em; }
  .entry-content h3 { padding: .4em 1em; }
}

@media (max-width: 480px) {
  .entry-content h2 { padding: .6em 0.3em; }
}


/* ===== SPEECH BALLOON ===== */
.speech-wrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 20px 0;
  clear: both;
}
.sbp-r { flex-direction: row-reverse; }
.sbp-l { flex-direction: row; }
.speech-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 68px;
}
.speech-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ddd;
  margin: 0;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.speech-icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.speech-name {
  font-size: 0.72rem;
  text-align: center;
  margin-top: 4px;
  color: #666;
}
.speech-balloon {
  position: relative;
  border-radius: 8px;
  padding: 12px 16px;
  flex: 1;
  min-width: 0;
  line-height: 1.7;
}
.speech-balloon p { margin: 0 0 8px; }
.speech-balloon p:last-child { margin-bottom: 0; }
.sbp-r .speech-balloon {
  background: #e8f0fe;
  border: 1.5px solid #19448e;
}
.sbp-r .speech-balloon::before {
  content: '';
  position: absolute;
  top: 17px;
  right: -13px;
  border: 9px solid transparent;
  border-left-color: #19448e;
}
.sbp-r .speech-balloon::after {
  content: '';
  position: absolute;
  top: 19px;
  right: -10px;
  border: 7px solid transparent;
  border-left-color: #e8f0fe;
}
.sbp-l .speech-balloon {
  background: #f5f5f5;
  border: 1.5px solid #ccc;
}
.sbp-l .speech-balloon::before {
  content: '';
  position: absolute;
  top: 17px;
  left: -13px;
  border: 9px solid transparent;
  border-right-color: #ccc;
}
.sbp-l .speech-balloon::after {
  content: '';
  position: absolute;
  top: 19px;
  left: -10px;
  border: 7px solid transparent;
  border-right-color: #f5f5f5;
}
@media (max-width: 480px) {
  .speech-person { width: 52px; }
  .speech-icon { width: 48px; height: 48px; }
  .speech-name { font-size: 0.65rem; }
  .speech-balloon { padding: 10px 12px; }
}
