/*
Pages for つむぎ舎
ページ固有のスタイル
*/

/* Hero Section - フロントページ */
.top-carousel {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background-color: #111;
}

.top-carousel-track,
.top-carousel-slide {
  position: absolute;
  inset: 0;
}

.top-carousel-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.top-carousel-slide.is-active {
  opacity: 1;
}

.top-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 1;
}

.top-carousel-copy {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px;
}

.top-carousel-logo {
  display: block;
  width: min(76vw, 720px);
  height: auto;
  margin: 0 auto 28px;
}

.top-carousel .hero-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-carousel .hero-subtext {
  margin-bottom: 0.5em;
  font-size: 1.1rem;
  font-weight: 400;
}

.top-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.top-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.top-carousel-dot.is-active {
  background: #fff;
}

@media (max-width: 767px) {
  .top-carousel,
  .top-carousel-copy {
    min-height: 100vh;
    min-height: 100svh;
  }

  .top-carousel-copy {
    padding: 96px 24px 84px;
  }

  .top-carousel-logo {
    width: min(86vw, 420px);
    margin-bottom: 20px;
  }
}

.hero {
  position: relative;
  background-image: url();
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #ffffff;
  text-align: center;
  padding: 120px 20px;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

.hero .hero-text {
  margin-bottom: 0.5em;
  font-weight: 700;
}

.hero .hero-subtext {
  font-size: 1.1rem;
  font-weight: 400;
}

/* TOPページ各セクション */
.about-preview {
  text-align: center;
}

.about-preview .container {
  max-width: 800px;
}

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

.about-content .lead-text {
  font-size: 1.1em;
  font-weight: 400;
  margin-bottom: 2em;
  line-height: 1.8;
}

.about-content h3 {
  font-size: 24px;
  margin-top: 2em;
  margin-bottom: 1em;
  text-align: left;
}

.about-content p {
  text-align: left;
  margin-bottom: 1.5em;
  line-height: 1.8;
}

@media (max-width: 767px) {
  .about-content .lead-text br {
    display: none;
  }
}

/* Services Grid */
.services-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-content {
  padding: 20px;
}

.service-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
}

.service-card p {
  margin: 0 0 15px 0;
  color: var(--color-secondary);
  line-height: 1.6;
}

/* Founder Preview Section */
.founder-preview .container {
  max-width: 800px;
}

.founder-profile-preview {
  background-color: #fff;
  border: 1px solid var(--color-border);
  padding: 25px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.founder-profile-preview:not(:last-child) {
  margin-bottom: 30px;
}

.founder-profile-preview h3 {
  font-size: 22px;
  margin-bottom: 0.2em;
}

.founder-profile-preview .founder-title {
  font-weight: bold;
  color: #555;
  margin-bottom: 1.5em;
}

.founder-profile-preview p {
  font-size: 15px;
}

.founder-profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 20px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

/* Founder media-text blocks */
.founder-profile-preview .wp-block-media-text.alignwide.is-stacked-on-mobile,
.founder-content .wp-block-media-text.alignwide.is-stacked-on-mobile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  grid-template-columns: none !important;
}

.founder-profile-preview figure.wp-block-media-text__media,
.founder-content figure.wp-block-media-text__media {
  width: 150px !important;
  height: 150px !important;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px auto;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.founder-profile-preview figure.wp-block-media-text__media img,
.founder-content figure.wp-block-media-text__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.founder-profile-preview .wp-block-media-text__content,
.founder-content .wp-block-media-text__content {
  text-align: center !important;
  max-width: 800px;
  padding: 0 20px !important;
}

.founder-profile-content {
  flex: 1;
}

.founder-profile {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.founder-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 30px;
}

.founder-content {
  max-width: 700px;
  text-align: left;
  padding: 0 20px;
}

.founder-content h2 {
  text-align: center;
  margin-bottom: 10px;
}

.founder-title {
  font-weight: bold;
  color: #555;
  text-align: center;
  margin-bottom: 20px;
}

@media (max-width: 767px) {
  .founder-profile-preview figure.wp-block-media-text__media {
    margin-bottom: 32px;
  }
}

@media (min-width: 992px) {
  .founder-profile-preview {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 30px;
  }
  
  .founder-profile-image {
    width: 200px;
    height: 200px;
    margin-bottom: 0;
    flex-shrink: 0;
    object-position: center top;
    aspect-ratio: 1 / 1;
  }
  
  .founder-profile-preview figure.wp-block-media-text__media,
  .founder-content figure.wp-block-media-text__media {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 30px auto !important;
  }
}

/* Company Preview Section */
.company-preview .container {
  max-width: 800px;
}

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

.company-content .definition-list {
  text-align: left;
  margin-bottom: 2em;
}

/* Single Post Styles */
.entry-title.center {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.entry-meta-top.center {
  text-align: center;
}

.entry-header {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Entry Content Responsive Layout */
@media (min-width: 768px) {
  .entry-content > p,
  .entry-content > ul,
  .entry-content > ol,
  .entry-content > blockquote,
  .entry-content > pre,
  .entry-content > table,
  .entry-content > h1,
  .entry-content > h2,
  .entry-content > h3,
  .entry-content > h4,
  .entry-content > h5,
  .entry-content > h6,
  .entry-content > .wp-block-group:not(.alignfull):not(.alignwide),
  .entry-content > .wp-block-heading,
  .entry-content > .wp-block-paragraph,
  .entry-content > .wp-block-list,
  .entry-content > .wp-block-quote,
  .entry-content > .wp-block-code,
  .entry-content > .wp-block-image:not(.alignfull):not(.alignwide),
  .entry-content > .wp-block-table {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .entry-content .wpcf7 {
    max-width: none;
  }
}

/* 記事本文のスタイル調整 */
.entry-content {
  font-size: 1.1em;
  letter-spacing: 0.05em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin-bottom: 1em;
}

.entry-content p {
  margin-bottom: 1.5em;
  font-weight: 300;
}

/* Text Center Utility Class */
.text-center {
  text-align: center !important;
}

/* Lead Text */
.lead-text {
  font-size: 18px;
  line-height: 1.8;
}

.entry-content .lead-text {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 2em;
}

.entry-content h2 {
  font-size: 24px;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--color-light-gray);
  margin-top: 2em;
  margin-bottom: 1em;
}

/* Illustration Content - Full Width */
.illustration-content {
  width: 100%;
  max-width: none;
}

.illustration-content > *,
.illustration-content > .wp-block-group,
.illustration-content > .wp-block-heading,
.illustration-content > .wp-block-paragraph,
.illustration-content > .wp-block-list,
.illustration-content > .wp-block-image,
.illustration-content > .wp-block-table {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Goods Content - Full Width */
.goods-content {
  width: 100%;
  max-width: none;
}

.goods-content > *,
.goods-content > .wp-block-group,
.goods-content > .wp-block-heading,
.goods-content > .wp-block-paragraph,
.goods-content > .wp-block-list,
.goods-content > .wp-block-image,
.goods-content > .wp-block-table {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Event Content - Full Width */
.event-content {
  width: 100%;
  max-width: none;
}

.event-content > *,
.event-content > .wp-block-group,
.event-content > .wp-block-heading,
.event-content > .wp-block-paragraph,
.event-content > .wp-block-list,
.event-content > .wp-block-image,
.event-content > .wp-block-table {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Post Type Labels */
.post-type-label {
  display: inline-block;
  padding: 4px 8px;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  border-radius: 3px;
  margin-bottom: 10px;
}

.illustration-label {
  background-color: #e74c3c;
}

/* Post Date */
.post-date {
  color: #777;
  font-size: 0.9em;
}

.signature {
  margin-top: 2em;
  text-align: right;
}

/* CTA Sections */
.cta-section {
  text-align: center;
  margin-top: 2em;
}

.cta-section p {
  margin-bottom: 20px;
}

.cta-section .btn {
  margin: 0 10px;
}

/* Special Layouts */
.alignwide {
  max-width: 1200px;
}

.alignfull {
  max-width: none;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-secondary);
}

/* Goods Product Layout - ショッピングページ風レイアウト */
.goods-product-layout {
  display: grid;
  gap: 40px;
  margin: 40px 0;
}

@media (min-width: 768px) {
  .goods-product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
  }
}

/* 画像ギャラリー部分 */
.goods-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.goods-main-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f5f5f5;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-product-image:hover {
  transform: scale(1.05);
}

.no-image-placeholder {
  color: var(--color-secondary);
  font-size: 1.1rem;
  text-align: center;
}

/* サムネイル画像一覧 */
.goods-thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnail-item {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail-item.active {
  border-color: var(--color-accent);
}

.thumbnail-item:hover {
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 商品情報部分 */
.goods-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.goods-details-card {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 25px;
}

.goods-details-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-light-gray);
  padding-bottom: 10px;
}

.goods-details {
  margin: 0;
}

.goods-details dt {
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.goods-details dt:first-child {
  margin-top: 0;
}

.goods-details dd {
  margin: 0 0 15px 0;
  padding: 8px 12px;
  background-color: var(--color-light-gray);
  border-radius: 4px;
  font-size: 0.95rem;
}

.goods-details dd a {
  color: var(--color-accent);
  text-decoration: underline;
}

.goods-details dd a:hover {
  color: var(--color-primary);
}

/* レスポンシブ調整 */
@media (max-width: 767px) {
  .goods-thumbnails {
    justify-content: center;
  }
  
  .thumbnail-item {
    width: 70px;
    height: 70px;
  }
  
  .goods-details-card {
    padding: 20px;
  }
}

/* Event Details */
.event-info {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 25px;
  margin-top: 30px;
}

.event-info h3 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-light-gray);
  padding-bottom: 10px;
}

.event-details {
  margin: 0;
}

.event-details dt {
  font-weight: bold;
  color: var(--color-primary);
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.event-details dt:first-child {
  margin-top: 0;
}

.event-details dd {
  margin: 0 0 15px 0;
  padding: 8px 12px;
  background-color: var(--color-light-gray);
  border-radius: 4px;
  font-size: 0.95rem;
}

.event-details dd a {
  color: var(--color-accent);
  text-decoration: underline;
}

.event-details dd a:hover {
  color: var(--color-primary);
}
