/*                                                                                                                                                                            
  Theme Name: GeneratePress Child                                                                                                                                               
  Template: generatepress                                                                                                                                                       
  */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  max-width: none;
  padding-top: 50px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  /* デスクトップ用のflexを解除 */
  .site-header .inside-header {
    display: block !important;
    height: auto !important;
    padding: 8px 10px !important;
  }

  .site-header .site-branding,
  .site-header .main-title,
  .site-header p,
  #mobile-menu-control-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header .inside-header * {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* モバイル用ハンバーガーは表示 */
  #mobile-menu-control-wrapper {
    display: block !important;
  }

  /* メニュー本体は隠す */
  #site-navigation {
    display: none !important;
  }

  /* toggled時にメニュー表示 */
  #site-navigation.toggled {
    display: block !important;
  }

  #site-navigation ul {
    display: block !important;
  }

  #site-navigation li {
    display: block !important;
  }

  .main-navigation li,
  .menu li {
    display: block !important;
  }

  .menu-item > a {
    display: block !important;
    padding: 12px 20px !important;
    height: auto !important;
    line-height: normal !important;
  }

  .site-header .inside-header.grid-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .site-header .site-branding {
    text-align: left !important;
    flex: 1 !important;
  }

  /* ハンバーガーボタンは表示 */
  .menu-toggle,
  #menu-toggle,
  button.menu-toggle {
    display: inline-block !important;
    visibility: visible !important;
  }

  /* ヘッダーを確実に上に */
  .site-header {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
  }

  .site-header .inside-header,
  .site-header .grid-container {
    max-width: 100% !important;
    overflow: hidden !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }

  body {
    padding-top: 50px !important;
  }

  /* ヒーロー - 固定解除して通常フローに */
  .single-hero,
  .page-hero,
  .archive-hero {
    position: static !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 200px !important;
    z-index: -1 !important;
    margin-top: 0 !important;
    clip-path: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .single-hero::before,
  .page-hero::before,
  .archive-hero::before {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .single-spacer,
  .page-spacer,
  .archive-spacer {
    display: none !important;
  }

  .single-hero-title,
  .page-hero-title,
  .archive-hero-title {
    font-size: 22px;
  }

  .single-hero-thumb,
  .page-hero-thumb {
    max-height: 100px;
  }

  .single-spacer,
  .page-spacer,
  .archive-spacer {
    height: 150px;
  }

  /* コンテンツ幅調整 */
  .single .inside-article,
  .page-content-wrapper,
  .single-comments-card,
  .single-content-wrapper {
    margin: 20px 10px !important;
    padding: 20px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .single-content-wrapper,
  .page-content-wrapper {
    width: auto !important;
  }

  .entry-content img,
  .entry-content iframe,
  .entry-content video {
    max-width: 100% !important;
    height: auto !important;
  }

  .archive-posts-list {
    padding: 10px;
  }

  .archive-post-item {
    grid-template-columns: 70px 1fr;
    padding: 15px;
  }

  .archive-post-thumb img {
    width: 70px;
    height: 70px;
  }
}

.main-navigation,
.primary-menu,
.menu,
.site-header .inside-header {
  background: transparent;
}

.site-header .inside-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  height: 50px;
}

.main-navigation {
  display: flex !important;
  align-items: center !important;
}

.main-navigation ul,
.menu {
  display: flex !important;
  align-items: center !important;
  margin: 0;
  padding: 0;
}

.main-navigation li,
.menu li {
  display: flex;
  align-items: center;
}

.menu-item > a {
  text-decoration: none !important;
  border: none !important;
  padding: 0 15px !important;
  line-height: normal !important;
  height: auto !important;
  display: inline-block !important;
  background: linear-gradient(currentColor, currentColor) no-repeat center bottom !important;
  background-size: 0% 2px !important;
  padding-bottom: 3px !important;
  transition: background-size 0.3s ease !important;
}

.menu-item > a:hover {
  background-size: 100% 2px !important;
}

.sidebar,
#right-sidebar {
  display: none;
}

.site-content {
  display: block;
  overflow: visible;
  max-width: none;
  padding: 0 !important;
  margin: 0 !important;
}

#primary,
.content-area {
  width: 100%;
  max-width: none;
  padding: 0 !important;
  margin: 0 !important;
}

.inside-article,
article,
.entry-content,
.site-main,
#primary,
.content-area {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  overflow: visible;
}

.wp-block-cover {
  width: 100vw !important;
  max-width: none !important;
  margin-left: -50vw !important;
  left: 50% !important;
  position: relative;
  margin-top: -50px;
  padding-top: 50px;
  clip-path: ellipse(120% 100% at 50% 0%);
}

.wp-block-latest-posts {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  list-style: none;
}

.wp-block-latest-posts li {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px 20px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wp-block-latest-posts__featured-image {
  grid-row: 1 / 4;
  grid-column: 1;
  margin: 0;
}

.wp-block-latest-posts__featured-image img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
}

.wp-block-latest-posts li a.wp-block-latest-posts__post-title {
  grid-column: 2;
  grid-row: 1;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.wp-block-latest-posts__post-excerpt {
  grid-column: 2;
  grid-row: 2;
  font-size: 15px;
  color: #666;
  margin: 0;
}

.wp-block-latest-posts__post-date {
  grid-column: 2;
  grid-row: 3;
  font-size: 12px;
  color: #aaa;
}

/* ========== 投稿ヒーロー ========== */

.single-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: ellipse(120% 100% at 50% 0%);
    z-index: 10;
    overflow: hidden;
}

.single-hero::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: -1;
}

.single-spacer {
    display: none;
}

.single-content-wrapper {
    position: relative;
    z-index: 1;
    background: transparent;
}

.single-hero-thumb {
    position: absolute;
    max-height: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    z-index: 1;
}

.single-hero-title {
    position: absolute;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.8),
        0 4px 12px rgba(0,0,0,0.6),
        0 0 20px rgba(0,0,0,0.4);
    text-align: center;
    padding: 0 20px;
    margin: 0;
    z-index: 2;
}

/* ========== 投稿ページ用 ========== */

.single .inside-article {
  max-width: 800px;
  margin: 40px auto !important;
  padding: 40px !important;
  background: #fff !important;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.single .entry-header {
  margin-bottom: 20px;
}

.single .entry-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.single .entry-meta,
.single .post-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 20px;
}

.single .post-image img,
.single .wp-post-image {
  max-width: 200px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 20px;
}

.single .entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

.single .post-navigation,
.single-content-wrapper .post-navigation {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px 40px;
}

.single .nav-links,
.single-content-wrapper .nav-links {
  display: flex;
  justify-content: space-between;
}

.single .nav-previous,
.single .nav-next {
  font-size: 16px;
}

.single .nav-previous a,
.single .nav-next a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.single .nav-previous a:hover,
.single .nav-next a:hover {
  color: #666;
}

/* ========== 固定ページ ========== */

.page-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: ellipse(120% 100% at 50% 0%);
    z-index: 10;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: -1;
}

.page-hero-thumb {
    position: absolute;
    max-height: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    z-index: 1;
}

.page-hero-title {
    position: absolute;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.8),
        0 4px 12px rgba(0,0,0,0.6),
        0 0 20px rgba(0,0,0,0.4);
    text-align: center;
    padding: 0 20px;
    margin: 0;
    z-index: 2;
}

.page-spacer {
    display: none;
}

.page-content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.page-content-wrapper .entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

/* ========== カテゴリ・アーカイブページ ========== */

.archive-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: ellipse(120% 100% at 50% 0%);
    z-index: 10;
    overflow: hidden;
}

.archive-hero::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: -1;
}

.archive-hero-title {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    text-align: center;
    margin: 0;
    z-index: 2;
}

.archive-spacer {
    display: none;
}

.archive-content-wrapper {
    position: relative;
    z-index: 1;
    background: transparent;
}

.archive-posts-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    list-style: none;
}

.archive-post-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.archive-post-thumb {
    grid-row: 1 / 4;
    grid-column: 1;
    margin: 0;
}

.archive-post-thumb img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

.archive-post-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.archive-post-title:hover {
    color: #666;
}

.archive-post-excerpt {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px;
    color: #666;
    margin: 0;
}

.archive-post-date {
    grid-column: 2;
    grid-row: 3;
    font-size: 12px;
    color: #aaa;
}

.archive-pagination {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.archive-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.archive-pagination a,
.archive-pagination span {
    padding: 8px 16px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
}

.archive-pagination a:hover {
    background: #eee;
}

.archive-pagination .current {
    background: #333;
    color: #fff;
}

/* ========== ダウンロードボタン ========== */

.download-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
}

.download-btn-mac a,
.download-btn-win a,
.download-btn-linux a {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #fff !important;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download-btn-mac a:hover,
.download-btn-win a:hover,
.download-btn-linux a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.download-btn-mac a {
    background: linear-gradient(135deg, #333 0%, #555 100%);
}

.download-btn-win a {
    background: linear-gradient(135deg, #0078d4 0%, #00a2ed 100%);
}

.download-btn-linux a {
    background: linear-gradient(135deg, #f57900 0%, #ffb347 100%);
}

/* フッタークレジット非表示 */
.copyright-bar {
    font-size: 0;
}
.copyright-bar .copyright {
    font-size: 14px;
}
.copyright-bar a {
    display: none;
}

/* コメント欄 */
.single-comments-card {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
}

.single-content-wrapper .comments-area,
.single .comments-area {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.single-content-wrapper .comments-title,
.single .comments-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 30px;
}

.single-content-wrapper .comment-list,
.single .comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.single-content-wrapper .comment,
.single .comment {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.single-content-wrapper .comment:last-child,
.single .comment:last-child {
  border-bottom: none;
}

.single-content-wrapper .comment-author,
.single .comment-author {
  font-weight: bold;
  color: #333;
}

.single-content-wrapper .comment-meta,
.single .comment-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

.single-content-wrapper .comment-content,
.single .comment-content {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.single-content-wrapper .comment-reply-title,
.single .comment-reply-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-top: 30px;
  margin-bottom: 20px;
}

.single-content-wrapper .comment-form input[type="text"],
.single-content-wrapper .comment-form input[type="email"],
.single-content-wrapper .comment-form textarea,
.single .comment-form input[type="text"],
.single .comment-form input[type="email"],
.single .comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.single-content-wrapper .comment-form textarea,
.single .comment-form textarea {
  min-height: 150px;
}

.single-content-wrapper .comment-form input[type="submit"],
.single .comment-form input[type="submit"] {
  background: #333;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.single-content-wrapper .comment-form input[type="submit"]:hover,
.single .comment-form input[type="submit"]:hover {
  background: #555;
}