/*
Theme Name: Toyokotsu News
Description: 東洋交通 新着情報用の軽量カスタムテーマ
Version: 1.0
Author: Toyokotsu
Text Domain: toyokotsu-news
*/

/* ========================================
   Blog Layout
   ======================================== */
.news-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 15px 15px 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.news-main {
  flex: 1;
  min-width: 0;
}
.news-sidebar {
  width: 280px;
  flex-shrink: 0;
}

/* ========================================
   Card Grid
   ======================================== */
.post-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.post-card {
  width: calc(50% - 10px);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s, transform 0.3s;
  overflow: hidden;
}
.post-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}
.post-card a {
  display: block;
  text-decoration: none;
  color: #333;
}
.post-card .card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 486 / 290;
  background: #f0f0f0;
}
.post-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-card:hover .card-thumb img {
  transform: scale(1.05);
}
.post-card .cat-label {
  position: absolute;
  top: 0;
  right: 0;
  background: #18a4f0;
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  font-weight: bold;
}
.post-card .card-body {
  padding: 15px;
}
.post-card .card-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  margin: 0 0 8px;
}
.post-card .card-date {
  font-size: 13px;
  color: #999;
  margin: 0 0 10px;
}
.post-card .card-date::before {
  content: "\f073";
  font-family: "Font Awesome 5 Free";
  margin-right: 5px;
}
.post-card .card-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* NO IMAGE fallback */
.post-card .card-thumb.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}
.post-card .card-thumb.no-image::after {
  content: "NO IMAGE";
  font-size: 20px;
  font-weight: bold;
  color: #ccc;
  letter-spacing: 3px;
}

/* ========================================
   Sidebar
   ======================================== */
.news-sidebar .widget {
  margin-bottom: 25px;
}
.news-sidebar .widgettitle {
  background: #18a4f0;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  padding: 10px 15px;
  margin: 0 0 0;
  border-radius: 3px 3px 0 0;
}
.news-sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #eee;
  border-top: none;
}
.news-sidebar .widget ul li {
  border-bottom: 1px solid #eee;
}
.news-sidebar .widget ul li:last-child {
  border-bottom: none;
}
.news-sidebar .widget ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}
.news-sidebar .widget ul li a:hover {
  background: #f8f8f8;
}
.news-sidebar .widget ul li a::after {
  content: "\276F";
  color: #18a4f0;
  font-size: 14px;
  font-weight: bold;
}

/* Archive Accordion */
.news-sidebar .archive-accordion {
  border: 1px solid #eee;
  border-top: none;
}
.news-sidebar .archive-year-item {
  border-bottom: 1px solid #eee;
}
.news-sidebar .archive-year-item:last-child {
  border-bottom: none;
}
.news-sidebar .archive-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.news-sidebar .archive-year-header:hover {
  background: #f8f8f8;
}
.news-sidebar .widget .archive-year-header a {
  display: inline;
  padding: 0;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}
.news-sidebar .widget .archive-year-header a::after {
  content: none;
}
.news-sidebar .widget .archive-year-header a:hover {
  color: #18a4f0;
  background: none;
}
.news-sidebar .archive-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #18a4f0;
  border-radius: 4px;
  color: #18a4f0;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.news-sidebar .archive-toggle:hover {
  background: #18a4f0;
  color: #fff;
}
.news-sidebar .archive-months {
  border: none;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.news-sidebar .archive-months li a {
  padding-left: 30px;
  font-size: 13px;
}

/* Search widget */
.news-sidebar .widget_search {
  margin-bottom: 25px;
}
.news-sidebar .widget_search .search-form {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 3px;
  overflow: hidden;
}
.news-sidebar .widget_search .search-field {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.news-sidebar .widget_search .search-submit {
  background: #fff;
  border: none;
  border-left: 1px solid #ddd;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
}

/* ========================================
   Single Post
   ======================================== */
.single-post-article {
  background: #fff;
  padding: 30px;
}
.single-post-article .entry-meta {
  margin-bottom: 15px;
}
.single-post-article .entry-meta .cat-label {
  background: #18a4f0;
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  font-weight: bold;
  margin-right: 10px;
}
.single-post-article .entry-meta .post-date {
  font-size: 13px;
  color: #999;
}
.single-post-article .entry-title {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  margin: 0 0 20px;
  color: #333;
}
.single-post-article .entry-thumb {
  margin-bottom: 25px;
}
.single-post-article .entry-thumb img {
  max-width: 100%;
  height: auto;
}
.single-post-article .entry-content {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}
.single-post-article .entry-content p {
  margin-bottom: 1.5em;
}
.single-post-article .entry-content img {
  max-width: 100%;
  height: auto;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 14px;
  text-decoration: none;
  border: 1px solid #ddd;
  color: #333;
  font-size: 14px;
}
.pagination .current {
  background: #18a4f0;
  color: #fff;
  border-color: #18a4f0;
}
.pagination a:hover {
  background: #f5f5f5;
}

/* Post navigation (single) */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.post-nav a {
  color: #18a4f0;
  text-decoration: none;
  font-size: 14px;
}
.post-nav a:hover {
  text-decoration: underline;
}

/* ========================================
   Responsive
   ======================================== */
@media screen and (max-width: 767px) {
  .news-wrap {
    flex-direction: column;
    padding: 15px 10px;
  }
  .news-sidebar {
    width: 100%;
  }
  .post-card {
    width: 100%;
  }
  .single-post-article {
    padding: 15px;
  }
  .single-post-article .entry-title {
    font-size: 20px;
  }
}
