@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.2
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* Custom Header System for Front Page */

/* Hide original Cocoon header on pages using custom header */
body.front-page-layout .header,
body.front-page-layout #header,
body.front-page-layout #header-menu,
body.category .header,
body.category #header,
body.category #header-menu,
body.archive .header,
body.archive #header,
body.archive #header-menu {
  display: none !important;
}

/* Ensure our custom menu header is always visible */
body.front-page-layout #menu-header-bar,
body.category #menu-header-bar,
body.archive #menu-header-bar {
  display: block !important;
}

/* Front page padding adjustment */
body.front-page-layout,
body.category,
body.archive {
  padding-top: 0 !important;
}

/* When scrolled, add padding since sticky header becomes fixed */
body.front-page-layout.scrolled,
body.category.scrolled,
body.archive.scrolled {
  padding-top: 60px !important;
}

/* Alternative body class for when sticky header is fixed */
body.front-page-layout.header-fixed,
body.category.header-fixed,
body.archive.header-fixed {
  padding-top: 60px !important;
}

/* Ensure content doesn't get hidden behind fixed sticky header */
body.front-page-layout.scrolled #content,
body.front-page-layout.header-fixed #content,
body.category.scrolled #content,
body.category.header-fixed #content,
body.archive.scrolled #content,
body.archive.header-fixed #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Custom front header container */
.custom-front-header {
  position: relative !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: #ffffff !important;
}

/* Title header bar: Title on Left End - Top Row */
.title-header-bar {
  background: #f8f9fa !important;
  border-bottom: 1px solid #e9ecef !important;
  height: 60px !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  position: relative !important;
  top: 0 !important;
}

.title-header-bar .header-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.title-header-bar .header-title {
  flex-shrink: 0 !important;
}

.title-header-bar .header-title a {
  color: #333 !important;
  font-size: 20px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Menu header bar: Menu items with space-between - Second Row */
.menu-header-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e9ecef !important;
  height: 60px !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.menu-header-bar .header-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.menu-header-bar .header-nav {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  justify-content: center !important;
}

.menu-header-bar .header-menu-list {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  min-height: 40px !important;
  align-items: center !important;
}

.menu-header-bar .header-menu-list li {
  white-space: nowrap !important;
  flex: none !important;
}

.menu-header-bar .header-menu-list li a {
  color: #333 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  transition: color 0.3s ease !important;
  padding: 10px 15px !important;
  display: block !important;
}

.menu-header-bar .header-menu-list li a:hover {
  color: #007bff !important;
}

/* Ensure fallback menu is highly visible */
.menu-header-bar .fallback-menu,
.sticky-header-bar .fallback-menu {
  background: rgba(0, 123, 255, 0.05) !important;
  border-radius: 4px !important;
  padding: 5px 10px !important;
}

/* Sticky header bar: Title + Menu (shown when scrolled) */
.sticky-header-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e9ecef !important;
  height: 60px !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.sticky-header-bar .header-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sticky-header-bar .sticky-title {
  flex-shrink: 0 !important;
  margin-right: 30px !important;
}

.sticky-header-bar .sticky-title a {
  color: #333 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.sticky-header-bar .sticky-nav {
  display: flex !important;
  align-items: center !important;
  flex-grow: 1 !important;
  justify-content: flex-end !important;
}

.sticky-header-bar .sticky-menu-list {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

.sticky-header-bar .sticky-menu-list li {
  margin-left: 20px !important;
  white-space: nowrap !important;
}

.sticky-header-bar .sticky-menu-list li a {
  color: #333 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  transition: color 0.3s ease !important;
  padding: 5px 10px !important;
}

.sticky-header-bar .sticky-menu-list li a:hover {
  color: #007bff !important;
}

/* Ensure all menu items are visible */
.menu-header-bar .header-nav,
.menu-header-bar .header-nav ul,
.menu-header-bar .header-nav li,
.menu-header-bar .header-nav a,
.sticky-header-bar .sticky-nav,
.sticky-header-bar .sticky-nav ul,
.sticky-header-bar .sticky-nav li,
.sticky-header-bar .sticky-nav a {
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.menu-header-bar .header-nav ul,
.sticky-header-bar .sticky-nav ul {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.menu-header-bar .header-nav li,
.sticky-header-bar .sticky-nav li {
  display: list-item !important;
}

/* Force menu header bar to be visible */
.menu-header-bar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 60px !important;
}

.menu-header-bar .header-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}





/* Override all possible Cocoon width restrictions */
body.front-page-layout #content,
body.front-page-layout #content-in,
body.front-page-layout .content,
body.front-page-layout .content-in,
body.front-page-layout .wrap,
body.front-page-layout .main,
body.front-page-layout .main-in,
body.front-page-layout .site-wrap,
body.front-page-layout .site-wrap-in,
body.front-page-layout .container-wrap,
body.front-page-layout .container-wrap-in,
body.front-page-layout #main,
body.front-page-layout #main-in,
body.front-page-layout .content-wrap,
body.front-page-layout .content-wrap-in {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Ensure body and html allow full width */
html body.front-page-layout {
  max-width: none !important;
  width: 100% !important;
}

/* Force proper flex behavior for header */
.main-header-bar .header-container * {
  box-sizing: border-box !important;
}

/* Override any potential inline styles or theme customizer settings */
body.front-page-layout * {
  max-width: none !important;
}

/* Restore max-width only for our custom container */
body.front-page-layout .container {
  max-width: 1200px !important;
}

/* Container for consistent layout */
.container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure the container takes full width on front page */
body.front-page-layout .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  width: calc(100% - 40px) !important;
  box-sizing: border-box !important;
}

/* Section Titles */
.section-title {
  font-size: 24px;
  font-weight: bold;
  color: #233B6C;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 3px solid #233B6C;
}

/* Full width container for pickup articles */
.full-width-container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 20px;
  box-sizing: border-box;
}

.full-width-container .section-title {
  max-width: 1200px;
  margin: 0 auto 30px auto;
}

/* Top Latest Articles Section (First 7 Articles) */
.top-latest-articles-section {
  padding: 40px 0 60px 0;
  background-color: #fff;
}

.top-latest-articles-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  max-width: 1200px;
  margin: 0 auto;
}

.top-article-item.main-article {
  grid-row: 1 / 3;
  grid-column: 1;
  aspect-ratio: 6 / 4;
}

.top-article-item.sub-article {
  aspect-ratio: 3 / 2; /* Consistent aspect ratio for all sub articles */
}

.top-article-item.sub-article:nth-child(2) {
  grid-row: 1;
  grid-column: 2;
}

.top-article-item.sub-article:nth-child(3) {
  grid-row: 1;
  grid-column: 3;
}

.top-article-item.sub-article:nth-child(4) {
  grid-row: 1;
  grid-column: 4;
}

.top-article-item.sub-article:nth-child(5) {
  grid-row: 2;
  grid-column: 2;
}

.top-article-item.sub-article:nth-child(6) {
  grid-row: 2;
  grid-column: 3;
}

.top-article-item.sub-article:nth-child(7) {
  grid-row: 2;
  grid-column: 4;
}

.top-article-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
}

.top-article-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.top-article-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  height: 100%;
  flex-direction: column;
  position: relative;
}

.top-article-item.main-article a {
  flex-direction: column;
}

.top-article-item.sub-article a {
  flex-direction: column;
  position: relative;
}

.top-article-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.top-article-item.main-article::before {
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.8) 100%);
}

/* Remove thumbnail display since we're using background images */
.top-article-item .article-thumbnail {
  display: none;
}

.top-article-item .article-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  z-index: 2;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.top-article-item.main-article .article-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  z-index: 2;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.top-article-item.sub-article .article-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  z-index: 2;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.top-article-item .article-title {
  font-weight: bold;
  line-height: 1.3;
  color: white;
}

.top-article-item.main-article .article-title {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.4;
  color: white;
}

.top-article-item.sub-article .article-title {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.3;
  color: white;
}

.top-article-item .article-excerpt {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
}

.top-article-item .article-meta {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
}

/* No image placeholder */
.no-image {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 18px;
}

/* New Articles Section (10 Articles in 5x2 Grid) */
.new-articles-section {
  padding: 60px 0;
  background-color: #f8f9fa;
}

.new-articles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.new-article-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.new-article-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.new-article-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.new-article-item .article-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.new-article-item .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.new-article-item:hover .article-image img {
  transform: scale(1.05);
}

.new-article-item .article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.new-article-item .article-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #2c3e50;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.new-article-item .article-meta {
  color: #6c757d;
  font-size: 12px;
  margin-top: auto;
}

/* Latest Articles Section */
.latest-articles-section {
  padding: 40px 0 60px 0;
  background-color: #f8f9fa;
  margin-top: 20px;
}

.latest-articles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 20px;
}

.latest-article-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.latest-article-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.latest-article-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.latest-article-item .article-thumbnail {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.latest-article-item .article-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}

.latest-article-item .article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.latest-article-item:hover .article-thumbnail img {
  transform: scale(1.05);
}

.latest-article-item .article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.latest-article-item .article-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #2c3e50;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.latest-article-item .article-meta {
  font-size: 13px;
  color: #7f8c8d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.latest-article-item .article-meta::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #233B6C;
}

/* No Image Placeholders */
.no-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 32px;
}

.no-image-placeholder.small {
  font-size: 20px;
}

/* Categories Section */
.categories-section {
  padding: 60px 0;
  background-color: white;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.category-item {
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
  min-height: 140px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Add gradient overlay for better text readability */
.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  transition: all 0.4s ease;
  z-index: 1;
}

/* Default elegant gradient background for categories without images */
.category-item.default-bg {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #3a6b9a 100%);
}

.category-item.default-bg::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.category-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.category-item:hover::before {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
}

.category-item.default-bg:hover::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
}

.category-item a {
  text-decoration: none;
  color: white;
  display: block;
  width: 100%;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.category-content {
  text-align: center;
}

.category-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.category-item:hover .category-name {
  transform: translateY(-2px);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

/* Popular Articles and Banner Section */
.popular-banner-section {
  padding: 60px 0;
  background-color: #f8f9fa;
}

.popular-banner-wrapper {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.popular-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 16px;
}

.popular-article-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.popular-article-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.popular-article-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  padding: 12px;
  height: 100%;
}

.popular-article-item .article-thumbnail {
  width: 64px;
  height: 64px;
  margin-right: 12px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #f8f9fa;
}

.popular-article-item .article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.popular-article-item:hover .article-thumbnail img {
  transform: scale(1.1);
}

.popular-article-item .article-title {
  font-size: 14px;
  line-height: 1.4;
  color: #2c3e50;
  margin: 0;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Banner Area */
.banner-area {
  position: sticky;
  top: 120px;
}

.banner-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.ad-placeholder {
  height: 480px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
}

.ad-placeholder::before {
  content: '📢';
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
}

/* Monthly Present Section */
.monthly-present-section {
  padding: 60px 0;
  background-color: white;
}

.present-placeholder {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
  padding: 48px;
  text-align: center;
  border-radius: 16px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 18px;
  box-shadow: 0 8px 32px rgba(255, 193, 7, 0.3);
  position: relative;
  overflow: hidden;
}

.present-placeholder::before {
  content: '🎁';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
}

.present-placeholder::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

/* Writer Introduction Section */
.writer-intro-section {
  padding: 60px 0;
  background-color: #f8f9fa;
}

.writer-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.writer-item {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.writer-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.writer-avatar {
  margin-bottom: 20px;
  position: relative;
}

.writer-avatar img {
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.writer-item:hover .writer-avatar img {
  transform: scale(1.1);
}

.writer-name {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.writer-posts-count {
  font-size: 14px;
  color: #7f8c8d;
  margin: 0;
  padding: 6px 12px;
  background-color: #e9ecef;
  border-radius: 20px;
  display: inline-block;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  .top-latest-articles-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
  
  .top-article-item.main-article {
    grid-row: 1 / 3;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(2) {
    grid-row: 1;
    grid-column: 2;
  }
  
  .top-article-item.sub-article:nth-child(3) {
    grid-row: 2;
    grid-column: 2;
  }
  
  .top-article-item.sub-article:nth-child(4) {
    grid-row: 3;
    grid-column: 1 / 3;
  }
  
  .top-article-item.sub-article:nth-child(5) {
    grid-row: 4;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(6) {
    grid-row: 4;
    grid-column: 2;
  }
  
  .top-article-item.sub-article:nth-child(7) {
    display: none; /* Hide 7th article on tablet */
  }

  .latest-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
  
  .popular-banner-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .popular-articles-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .new-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
  
  .writer-intro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*834px以下*/
@media screen and (max-width: 834px){
  .container {
    padding: 0 15px;
  }
  
  .top-latest-articles-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, 200px);
    height: auto;
  }
  
  .top-article-item.main-article {
    grid-row: 1;
    grid-column: 1;
  }
  
  .top-article-item.sub-article {
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(7) {
    display: block; /* Show 7th article on mobile */
  }
  
  .top-article-item a {
    flex-direction: row;
  }
  
  .top-article-item.main-article a {
    flex-direction: column;
  }
  
  .top-article-item.main-article .article-thumbnail {
    height: 60%;
  }
  
  .top-article-item.sub-article .article-thumbnail {
    width: 40%;
    height: 100%;
  }
  
  .latest-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .new-articles-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
  }
  
  .popular-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .banner-area {
    position: static;
  }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .front-page-layout {
    padding-top: 0;
  }
  
  .section-title {
    font-size: 20px;
    margin-bottom: 24px;
  }
  
  .top-latest-articles-section,
  .new-articles-section,
  .latest-articles-section,
  .categories-section,
  .popular-banner-section,
  .monthly-present-section,
  .writer-intro-section {
    padding: 40px 0;
  }
  
  .top-latest-articles-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, 200px);
    height: auto;
  }
  
  .top-article-item.main-article {
    grid-row: 1;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(2) {
    grid-row: 2;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(3) {
    grid-row: 3;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(4) {
    grid-row: 4;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(5) {
    grid-row: 5;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(6) {
    grid-row: 6;
    grid-column: 1;
  }
  
  .top-article-item.sub-article:nth-child(7) {
    grid-row: 7;
    grid-column: 1;
    display: block;
  }
  
  .top-article-item.main-article a,
  .top-article-item.sub-article a {
    flex-direction: row;
  }
  
  .top-article-item.main-article .article-thumbnail,
  .top-article-item.sub-article .article-thumbnail {
    width: 40%;
    height: 100%;
  }
  
  .top-article-item.sub-article .article-content {
    padding: 10px;
  }
  
  .top-article-item.sub-article .article-title {
    font-size: 13px;
  }

  .latest-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;
  }
  
  .latest-article-item .article-thumbnail {
    height: 100px;
  }
  
  .latest-article-item .article-content {
    padding: 12px;
  }
  
  .latest-article-item .article-title {
    font-size: 13px;
    line-height: 1.3;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .new-articles-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(10, 1fr);
    gap: 16px;
  }
  
  .popular-banner-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .popular-articles-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
  }
  
  .popular-article-item a {
    padding: 8px;
    flex-direction: column;
    text-align: center;
  }
  
  .popular-article-item .article-thumbnail {
    width: 100%;
    height: 60px;
    margin-right: 0;
    margin-bottom: 8px;
  }
  
  .popular-article-item .article-title {
    font-size: 12px;
  }
  
  .banner-area {
    position: static;
  }
  
  .ad-placeholder {
    height: 200px;
    font-size: 14px;
  }
  
  .writer-intro-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .writer-item {
    padding: 24px 16px;
  }
  
  .present-placeholder {
    padding: 32px 20px;
    font-size: 16px;
  }
  
  .present-placeholder::before {
    font-size: 36px;
    margin-bottom: 12px;
  }
}

/* Custom Footer for Front Page */
.custom-front-footer {
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
  color: white;
  margin-top: 40px;
  padding: 40px 0 20px 0;
}

.footer-container {
  width: 1200px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

.footer-content {
  display: flex !important;
  align-items: flex-start !important;
  gap: 40px !important;
  margin-bottom: 30px !important;
  width: 100% !important;
  max-width: 1160px !important; /* Account for padding */
}

.footer-title {
  flex: 0 0 calc(40% - 16px) !important; /* 2/5 of the width minus gap */
  max-width: calc(40% - 16px) !important;
}

.footer-title h3 {
  margin: 0 !important;
  font-size: 24px !important;
  font-weight: bold !important;
  color: white !important;
}

.footer-categories {
  flex: 0 0 calc(60% - 24px) !important; /* 3/5 of the width minus gap */
  max-width: calc(60% - 24px) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 15px 20px !important;
}

.footer-category-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  display: inline-block;
}

.footer-category-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* Hide standard footer on pages using custom footer */
body.front-page-layout .footer,
body.front-page-layout #footer,
body.front-page-layout .site-footer,
body.category .footer,
body.category #footer,
body.category .site-footer,
body.archive .footer,
body.archive #footer,
body.archive .site-footer,
body.single .footer,
body.single #footer,
body.single .site-footer {
  display: none !important;
}

/* Hide any potential sidebar on pages using custom layout */
body.front-page-layout .sidebar,
body.front-page-layout #sidebar,
body.front-page-layout .widget-area,
body.front-page-layout aside,
body.category .sidebar,
body.category #sidebar,
body.category .widget-area,
body.category aside,
body.archive .sidebar,
body.archive #sidebar,
body.archive .widget-area,
body.archive aside,
body.single .sidebar,
body.single #sidebar,
body.single .widget-area,
body.single aside {
  display: none !important;
}

/* Responsive footer */
@media (max-width: 750px) {
  .footer-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .footer-title {
    flex: none;
  }
  
  .footer-title h3 {
    font-size: 20px;
  }
  
  .footer-categories {
    gap: 10px 15px;
  }
  
  .footer-category-link {
    font-size: 13px;
    padding: 5px 10px;
  }
}

/* Category Page Styles */
.category-page-section {
  padding: 40px 0 60px 0;
  background-color: #f8f9fa;
}

.category-content-wrapper {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.category-main-content {
  /* Main content area styling */
}

.category-sidebar {
  /* Sidebar styling */
}

.category-sidebar .ad-area {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.category-sidebar .ad-placeholder {
  padding: 40px 20px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
}

.category-header {
  margin-bottom: 40px;
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  width: 100%;
  position: relative;
}

/* Add overlay for background images to improve text readability */
.category-header[style*="background-image"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.category-header .container {
  position: relative;
  z-index: 2;
}

.category-title {
  font-size: 32px;
  font-weight: bold;
  margin: 0 0 16px 0;
  color: white;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.6),
    0 0 2px rgba(0, 0, 0, 1);
}

.category-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(0, 0, 0, 1);
}

.category-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.category-article-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.category-article-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-article-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.category-article-item .article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.category-article-item .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-article-item:hover .article-image img {
  transform: scale(1.05);
}

.category-article-item .article-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-article-item .article-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: #2c3e50;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-article-item .article-excerpt {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-article-item .article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #7f8c8d;
  margin-top: auto;
}

.category-article-item .article-category {
  background-color: #e9ecef;
  color: #6c757d;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.category-pagination {
  text-align: center;
  margin-top: 40px;
}

.category-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  margin: 0;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #6c757d;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 44px;
  text-align: center;
  line-height: 1;
}

.category-pagination .page-numbers:hover,
.category-pagination .page-numbers.current {
  background-color: #233B6C;
  color: white;
  border-color: #233B6C;
}

.category-pagination .page-numbers.prev,
.category-pagination .page-numbers.next {
  background-color: #f8f9fa;
  font-weight: 600;
  padding: 12px 20px;
  width: auto;
  min-width: auto;
}

.no-posts {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Breadcrumb Styles */
.breadcrumb-nav {
  background-color: #f8f9fa;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  display: inline-block;
  padding: 0 8px;
  color: #6c757d;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
}

@media (max-width: 750px) {
  .breadcrumb {
    font-size: 12px;
  }
  
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 4px;
  }
}

/* Category Popular Articles */
.category-popular-articles {
  margin-top: 60px;
  padding: 40px 0;
  background: #f8f9fa;
  border-radius: 12px;
}

.category-popular-articles .section-title {
  text-align: center;
  margin-bottom: 30px;
  color: #233B6C;
  font-size: 24px;
  font-weight: 700;
}

.category-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.category-popular-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-popular-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.category-popular-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-popular-item .article-thumbnail {
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.category-popular-item .article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-popular-item .article-content {
  padding: 15px;
}

.category-popular-item .article-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-popular-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 8px;
  color: #6c757d;
}

@media (max-width: 750px) {
  .category-popular-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .category-popular-articles .section-title {
    font-size: 20px;
  }
  
  .category-popular-item .article-thumbnail {
    height: 100px;
  }
  
  .category-popular-item .article-content {
    padding: 12px;
  }
  
  .category-popular-item .article-title {
    font-size: 13px;
  }
}

.no-posts p {
  font-size: 18px;
  color: #6c757d;
  margin: 0;
}

/* Responsive styles for category page */
@media screen and (max-width: 768px) {
  .category-content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .category-posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .category-header {
    padding: 60px 20px;
    margin-bottom: 30px;
  }
  
  .category-title {
    font-size: 24px;
  }
  
  .category-article-item .article-content {
    padding: 20px;
  }
  
  .category-article-item .article-title {
    font-size: 16px;
  }
  
  .category-article-item .article-image {
    height: 160px;
  }
}

/* Child Categories Section */
.child-categories-section {
  margin-top: 40px;
  padding: 30px 0;
  background: white;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.child-categories-section .section-title {
  text-align: center;
  margin-bottom: 24px;
  color: #233B6C;
  font-size: 20px;
  font-weight: 700;
}

.child-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.child-category-item {
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  overflow: hidden;
  transition: all 0.3s ease;
}

.child-category-item:hover {
  border-color: #233B6C;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 59, 108, 0.15);
}

.child-category-item a {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.child-category-content {
  text-align: center;
}

.child-category-name {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
}

.child-category-count {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* Full Width Sections */
.full-width-section {
  margin-top: 60px;
  padding: 60px 0;
  background: white;
}

.full-width-section:nth-of-type(even) {
  background: #f8f9fa;
}

.full-width-section .section-title {
  text-align: center;
  margin-bottom: 40px;
  color: #233B6C;
  font-size: 28px;
  font-weight: 700;
}

/* Monthly Present Section Full Width */
.category-monthly-present.full-width-section .monthly-present-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Writer Introduction Section Full Width */
.category-writer-intro.full-width-section .writer-intro-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sidebar Height Matching */
.category-sidebar {
  position: sticky;
  top: 140px;
  height: fit-content;
}

.category-sidebar .ad-area {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-sidebar .ad-placeholder {
  padding: 40px 20px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments for child categories */
@media screen and (max-width: 768px) {
  .child-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .child-category-item a {
    padding: 15px;
  }
  
  .child-category-name {
    font-size: 14px;
  }
  
  .child-category-count {
    font-size: 12px;
  }
  
  .full-width-section {
    margin-top: 40px;
    padding: 40px 0;
  }
  
  .full-width-section .section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  
  .category-sidebar {
    position: static;
  }
  
  .category-sidebar .ad-area {
    min-height: 200px;
  }
}

@media screen and (max-width: 480px) {
  .child-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .full-width-section .section-title {
    font-size: 20px;
  }
}

/* Single Post Page Styles */
.single-page-section {
  padding: 40px 0 60px 0;
  background-color: #f8f9fa;
}

.single-content-wrapper {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.single-main-content {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Single Article Hero */
.single-article-hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

/* Single Post Header */
.single-header {
  background: #233B6C;
  padding: 40px 40px 30px 40px;
  position: relative;
  z-index: 2;
}

.single-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.single-meta-divider {
  height: 1px;
  background: #ffffff;
  margin: 0 0 20px 0;
  opacity: 0.8;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.single-meta time {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.single-category a {
  background: #ffffff;
  color: #233B6C;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.single-category a:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* Featured Image */
.single-featured-image {
  width: 100%;
  margin: 0;
  position: relative;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

/* Single Content */
.single-content {
  padding: 40px;
  line-height: 1.8;
  font-size: 16px;
  color: #333;
}

.single-content p {
  margin-bottom: 20px;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-content h2,
.single-content h3,
.single-content h4 {
  color: #233B6C;
  margin: 32px 0 16px 0;
  font-weight: 600;
}

.single-content h2 {
  font-size: 22px;
  border-left: 4px solid #233B6C;
  padding-left: 16px;
}

.single-content h3 {
  font-size: 20px;
}

.single-content h4 {
  font-size: 18px;
}

/* Tags */
.single-tags {
  padding: 20px 40px 40px 40px;
  border-top: 1px solid #e9ecef;
}

.single-tags h3 {
  font-size: 16px;
  font-weight: 600;
  color: #233B6C;
  margin: 0 0 12px 0;
}

.single-tags .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-tags .tag-list a {
  background: #f8f9fa;
  color: #6c757d;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.single-tags .tag-list a:hover {
  background: #233B6C;
  color: white;
  border-color: #233B6C;
}

/* Related Articles */
.single-related-articles {
  margin-top: 60px;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 12px;
}

.single-related-articles .section-title {
  text-align: center;
  margin-bottom: 30px;
  color: #233B6C;
  font-size: 24px;
  font-weight: 700;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.related-article-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.related-article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.related-article-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.related-article-item .article-image {
  height: 160px;
  overflow: hidden;
}

.related-article-item .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-article-item:hover .article-image img {
  transform: scale(1.05);
}

.related-article-item .article-content {
  padding: 20px;
}

.related-article-item .article-title {
  font-size: 16px;
  font-weight: 600;
  color: #233B6C;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.related-article-item .article-meta time {
  font-size: 12px;
  color: #6c757d;
}

/* Single Sidebar */
.single-sidebar {
  position: sticky;
  top: 140px;
  height: fit-content;
}

.single-sidebar .ad-area {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-sidebar .ad-placeholder {
  padding: 40px 20px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Full Width Sections for Single Page */
.single-monthly-present.full-width-section .monthly-present-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.single-writer-intro.full-width-section .writer-intro-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.single-writer-intro .featured-writer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.single-writer-intro .featured-writer .writer-avatar {
  flex-shrink: 0;
}

.single-writer-intro .featured-writer .writer-info {
  flex: 1;
}

.single-writer-intro .featured-writer .writer-name {
  font-size: 24px;
  margin-bottom: 8px;
}

.single-writer-intro .featured-writer .writer-bio {
  margin-top: 12px;
  color: #6c757d;
  line-height: 1.6;
}

/* Bottom Breadcrumb */
.single-bottom-breadcrumb {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e9ecef;
}

/* Responsive Design for Single Page */
@media screen and (max-width: 768px) {
  .single-content-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .related-articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .single-header {
    padding: 30px 20px 20px 20px;
  }
  
  .single-title {
    font-size: 28px;
    margin-bottom: 16px;
  }
  
  .single-meta-divider {
    margin: 0 0 16px 0;
  }
  
  .single-content {
    padding: 30px 20px;
  }
  
  .single-related-articles {
    padding: 30px 20px;
  }
  
  .single-writer-intro .featured-writer {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .single-writer-intro .featured-writer .writer-name {
    font-size: 20px;
  }
  
  .single-sidebar {
    position: static;
  }
  
  .single-sidebar .ad-area {
    min-height: 200px;
  }
}

@media screen and (max-width: 480px) {
  .single-header {
    padding: 20px 16px 16px 16px;
  }
  
  .single-title {
    font-size: 24px;
    margin-bottom: 14px;
  }
  
  .single-meta-divider {
    margin: 0 0 14px 0;
  }
  
  .single-content {
    padding: 20px 16px;
  }
  
  .single-related-articles {
    padding: 20px 16px;
  }
  
  .related-article-item .article-image {
    height: 120px;
  }
  
  .related-article-item .article-content {
    padding: 16px;
  }
  
  .related-article-item .article-title {
    font-size: 14px;
  }
}
