/*
Theme Name: Twenty Twenty-Five
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Five emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfive
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
  outline-width: 2px;
  outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation
  .wp-block-navigation-submenu
  .wp-block-navigation-item:not(:last-child) {
  margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation
  .wp-block-navigation-item
  .wp-block-navigation-item__content {
  outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation
  .wp-block-navigation-item
  ul.wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
  text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
  display: block;
}

/*
 * Custom stylish modern theme styles
 */
body {
  font-family: "Poppins", "Noto Sans JP", sans-serif;
  background-color: #2b2b2a;
  color: #a0a0a0;
  font-weight: 300;
  line-height: 1.7;
}

/* Container spacing adjustments for more generous margins */
.wp-site-blocks {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

/* Header spacing adjustments */
.wp-block-site-title {
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

/* Navigation spacing */
.wp-block-navigation {
  margin-bottom: 3rem;
}

.wp-block-navigation .wp-block-navigation-item {
  margin-right: 2.5rem;
}

/* Post and page content styling */
.wp-block-post-content,
.wp-block-page-content {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* Modern paragraph styling */
p {
  margin-bottom: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.2px;
}

/* Heading refinements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  margin-top: 3rem;
}

h1 {
  font-weight: 500;
}
h2 {
  font-weight: 450;
}
h3 {
  font-weight: 400;
}

/* Button styling */
.wp-element-button,
.wp-block-button__link {
  background-color: #a0a0a0;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1rem 2.5rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  background-color: transparent;
  border-color: #a0a0a0;
  color: #a0a0a0;
  transform: translateY(-1px);
}

/* List styling improvements */
ul,
ol {
  padding-left: 2rem;
  margin-bottom: 2rem;
}

li {
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

/* Quote block refinements */
.wp-block-quote {
  border-left: 3px solid #a0a0a0;
  padding-left: 2.5rem;
  margin: 3rem 0;
  font-style: italic;
  font-weight: 300;
}

/* Image spacing */
.wp-block-image {
  margin: 3rem 0;
}

/* Footer adjustments */
.wp-block-template-part[data-block-name*="footer"] {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(160, 160, 160, 0.2);
}

/* Archive and blog post list styling */
.wp-block-post {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
}

.wp-block-post:not(:last-child) {
  border-bottom: 1px solid rgba(160, 160, 160, 0.15);
}

/* Post meta styling */
.wp-block-post-date,
.wp-block-post-author {
  font-size: 0.85rem;
  color: #909090;
  font-weight: 300;
}

/* Search form styling */
.wp-block-search .wp-block-search__input {
  background-color: rgba(160, 160, 160, 0.05);
  border: 1px solid rgba(160, 160, 160, 0.2);
  color: #a0a0a0;
  font-family: "Poppins", "Noto Sans JP", sans-serif;
}

.wp-block-search .wp-block-search__button {
  background-color: #a0a0a0;
  font-family: "Poppins", sans-serif;
}

/* Japanese text optimization */
html:lang(ja) {
  font-family: "Noto Sans JP", "Poppins", sans-serif;
}

html:lang(ja) h1,
html:lang(ja) h2,
html:lang(ja) h3,
html:lang(ja) h4,
html:lang(ja) h5,
html:lang(ja) h6 {
  font-family: "Noto Sans JP", "Poppins", sans-serif;
  font-weight: 400;
}

/* Responsive typography - smaller base size */
@media (max-width: 768px) {
  body {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.1rem;
  }
  h5,
  h6 {
    font-size: 0.95rem;
  }
}

/* Enhanced modern spacing for larger screens */
@media (min-width: 1024px) {
  .wp-site-blocks {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 4rem;
    padding-right: 4rem;
  }

  .wp-block-post-content,
  .wp-block-page-content {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

/* Code blocks styling */
.wp-block-code {
  background-color: rgba(160, 160, 160, 0.08);
  border: 1px solid rgba(160, 160, 160, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
}

/* Table styling */
.wp-block-table {
  margin: 2.5rem 0;
}

.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table th,
.wp-block-table td {
  border: 1px solid rgba(160, 160, 160, 0.2);
  padding: 1rem;
  text-align: left;
}

.wp-block-table th {
  background-color: rgba(160, 160, 160, 0.05);
  font-weight: 500;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  background-color: rgba(160, 160, 160, 0.05);
  border: 1px solid rgba(160, 160, 160, 0.2);
  border-radius: 4px;
  color: #a0a0a0;
  font-family: "Poppins", "Noto Sans JP", sans-serif;
  padding: 0.8rem;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #a0a0a0;
  outline: none;
}

/* Grid Layout for Blog Posts */
.wp-block-post-template.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin: 0;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .wp-block-post-template.grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .wp-block-post-template.grid-layout {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

@media (min-width: 1440px) {
  .wp-block-post-template.grid-layout {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }
}

/* Post Grid Item Styling */
.post-grid-item {
  background-color: rgba(160, 160, 160, 0.02);
  border-radius: 12px;
  padding: 0;
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid rgba(160, 160, 160, 0.08);
  position: relative;
  cursor: pointer;
}

.post-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(160, 160, 160, 0.08);
  border-color: rgba(160, 160, 160, 0.15);
}

.post-grid-item .wp-block-post-featured-image {
  margin-bottom: 1.5rem !important;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.post-grid-item .wp-block-post-featured-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-grid-item:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

/* Post Grid Content */
.post-grid-item .wp-block-group > * {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.post-grid-item .wp-block-post-featured-image {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-bottom: 0 !important;
}

.post-grid-item .wp-block-post-date {
  color: #909090;
  font-size: 0.8rem;
  font-weight: 300;
  margin-bottom: 0.8rem;
  text-decoration: none;
}

.post-grid-item .wp-block-post-date:hover {
  color: #a0a0a0;
  text-decoration: none;
}

.post-grid-item .wp-block-post-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  font-weight: 500;
}

.post-grid-item .wp-block-post-title a {
  color: #a0a0a0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-grid-item .wp-block-post-title {
  position: relative;
}

.post-grid-item .wp-block-post-title a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  /* カード全体をカバーするために拡張 */
  top: calc(
    -1 * (var(--wp--preset--spacing--30) + 1.5rem +
          var(--wp--preset--spacing--20))
  );
  left: -1.5rem;
  right: -1.5rem;
  bottom: calc(-1 * var(--wp--preset--spacing--50));
}

.post-grid-item .wp-block-post-title a:hover {
  color: #ffffff;
  text-decoration: none;
}

.post-grid-item .wp-block-post-excerpt {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #909090;
  margin-bottom: 1.5rem;
}

.post-grid-item .wp-block-post-excerpt p {
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-grid-item .wp-block-post-excerpt .wp-block-post-excerpt__more-text {
  color: #a0a0a0;
  font-weight: 400;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.post-grid-item .wp-block-post-excerpt .wp-block-post-excerpt__more-text:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
  .wp-block-post-template.grid-layout {
    gap: 2rem;
    padding: 1rem 0;
  }

  .post-grid-item {
    margin-bottom: 1rem;
  }

  .post-grid-item .wp-block-post-title {
    font-size: 1rem;
  }

  .post-grid-item .wp-block-post-excerpt {
    font-size: 0.8rem;
  }
}

/* Header Styling */
.wp-block-site-title {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-left: 0;
  padding-left: 0;
}

.wp-block-site-title a {
  color: #a0a0a0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.wp-block-site-title a:hover {
  color: #ffffff;
}

/* Navigation Menu Styling */
.wp-block-navigation {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
}

.wp-block-navigation .wp-block-navigation-item {
  margin-left: 2rem;
}

.wp-block-navigation .wp-block-navigation-item a {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
  color: #ffffff;
  text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: #a0a0a0;
  transition: width 0.3s ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover::after {
  width: 100%;
}

/* Header Layout Adjustments */
.wp-block-group.alignwide {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Header container specific adjustments */
.wp-block-group.alignwide[style*="space-between"] {
  justify-content: space-between !important;
  align-items: center !important;
}

.wp-block-group.alignwide .wp-block-site-title {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  flex-shrink: 0;
}

.wp-block-group.alignwide .wp-block-navigation {
  margin: 0 !important;
  padding: 0 !important;
}

/* Header responsive adjustments */
@media (max-width: 768px) {
  .wp-block-navigation .wp-block-navigation-item {
    margin-left: 0.8rem;
  }

  .wp-block-navigation .wp-block-navigation-item a {
    font-size: 0.9rem;
  }

  .wp-block-group.alignwide {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .wp-block-site-title {
    font-size: 1.2rem !important;
  }
}

@media (min-width: 1024px) {
  .wp-block-group.alignwide {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}
