/*
 Theme Name: Astra Child
 Template: astra
*/

/* ---------- 女優ページ 作品グリッド（4列） ---------- */
.works-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.5rem;
    padding: 1rem 0;
}

/* ---------- 作品カード基本スタイル ---------- */
.work-card {
    background: transparent !important;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s;
    border: none !important;
}
.work-card:hover {
    transform: translateY(-4px);
}
.work-card.popup-active,
.work-card.popup-active:hover {
    transform: none;
    transition: none;
}
.work-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}
.work-card-img {
    width: 100%;
    overflow: hidden;
}
.work-card-img:has(img) {
    aspect-ratio: 16 / 10;
}
.work-card-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0;
    display: none;
}
.work-card-img img.active {
    display: block;
}
.work-card-body {
    padding: 0.6rem 0.7rem;
    text-align: left;
}
.work-card .work-actress,
.work-card .work-actress p {
    color: #ffffff !important;
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-card .work-actress a,
.work-card .work-actress a:visited {
    color: #ffffff !important;
    text-decoration: none;
    margin-right: 6px;
}

.work-card .work-actress a:hover {
    color: #c8a96e !important;
}

/* ---------- 女優ページ 背景黒 ---------- */
.tax-actress_name #page,
.tax-actress_name .site-content,
.tax-actress_name #content,
.tax-actress_name .ast-container,
.tax-actress_name #primary,
.tax-actress_name .site-main,
.tax-actress_name .fp-main {
    background-color: #0d0d0d !important;
    background-image: none !important;
}
.tax-actress_name h1 {
    color: #e8e8e8 !important;
}

/* ---------- 検索窓（女優ページ） ---------- */
.tax-search-wrap {
    padding: 16px 0 8px;
    width: 560px;
}
.tax-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    max-width: 560px;
    background: #161616;
}
.tax-search-form:focus-within {
    border-color: #888;
}
.tax-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 14px;
    font-size: 14px;
    height: auto;
    box-shadow: none;
    background: transparent;
    color: #e8e8e8;
}
.tax-search-input::placeholder {
    color: #555;
}
.tax-search-btn {
    background: transparent;
    border: none;
    border-left: 1px solid #2a2a2a;
    padding: 0 14px;
    height: 40px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
}
.tax-search-btn:hover {
    color: #e8e8e8;
}

/* ---------- 検索結果ページ 背景黒 ---------- */
.search #page,
.search .site-content,
.search #content,
.search .ast-container,
.search #primary,
.search .site-main {
    background-color: #0d0d0d !important;
    background-image: none !important;
}
body.search h1,
body.search h2,
body.search h3,
body.search h4,
body.search p,
body.search .entry-title,
body.search .entry-title a,
body.search .page-title,
body.search .ast-archive-title,
body.search .no-results p,
body.search .trail-items,
body.search .trail-items a {
    color: #e8e8e8 !important;
}
.search a {
    color: #c8a96e !important;
}
.search a:hover {
    color: #fff !important;
}

/* ---------- Contact Form 7 ダーク対応 ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
}
.wpcf7 label,
.wpcf7 .wpcf7-form p {
    color: #333 !important;
}

/* ---------- トップページ フッターリンク ---------- */
.fp-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}
.fp-footer a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.fp-footer a:hover {
    color: #c8a96e;
}
.entry-title {
    color: #111 !important;
}
.entry-meta {
    display: none !important;
}


/* 画像なしカードは非表示 */
.work-card:not(:has(.work-card-img)) {
    display: none;
}

/* ---------- もっと見るボタン ---------- */
.fp-more-btn {
    margin-left: auto;
    font-size: 0.8rem;
    color: #c8a96e;
    text-decoration: none;
    letter-spacing: 0.08em;
    border: 1px solid #c8a96e;
    padding: 4px 12px;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.fp-more-btn:hover {
    background: #c8a96e;
    color: #0d0d0d;
}

/* ---------- 作品カード（新デザイン） ---------- */
.work-card-title {
    font-size: 1.0rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
    line-height: 1.5;
    color: #333 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.work-meta {
    font-size: 0.9rem;
    color: #555 !important;
    margin: 0.2rem 0;
}
.work-meta a {
    color: #555 !important;
    text-decoration: none;
}
.work-affiliate-btns {
    display: flex;
    gap: 8px;
    margin-top: 0.8rem;
}
.work-aff-btn {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #e8e8e8 !important;
    background: #1f1f1f;
    text-decoration: none;
    transition: background 0.2s;
}
.work-aff-btn:hover {
    background: #c8a96e;
    color: #0d0d0d !important;
    border-color: #c8a96e;
}

/* ---------- 言語切替ナビ ---------- */
.fp-lang-nav {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 9999;
    display: flex;
    gap: 8px;
}
.fp-lang-nav a {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #2a2a2a;
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 0.05em;
    transition: color 0.2s, border-color 0.2s;
}
.fp-lang-nav a:hover {
    color: #c8a96e;
    border-color: #c8a96e;
}

/* ---------- ヘッダー・フッター非表示（トップページのみ） ---------- */
body.home #masthead .main-header-bar,
body.home #masthead .ast-mobile-header-wrap,
body.home #masthead nav,
body.home #masthead .ast-primary-header-bar {
    display: none !important;
}

body.home #masthead {
    background: transparent !important;
    box-shadow: none !important;
    position: relative !important;
    min-height: 0 !important;
}

body.home #colophon {
    display: none !important;
}

/* ---------- archive-works: ヘッダー黒背景 ---------- */
body.post-type-archive-works #masthead,
body.post-type-archive-works #masthead .ast-primary-header-bar {
    background-color: #0d0d0d !important;
    border-bottom-color: #2a2a2a !important;
}
body.post-type-archive-works .site-title a,
body.post-type-archive-works .site-title a:hover {
    color: #c8a96e !important;
    font-size: 32px !important;
}
body.post-type-archive-works .ast-mobile-menu-trigger-minimal,
body.post-type-archive-works [data-section="section-header-mobile-trigger"] .ast-mobile-svg {
    fill: #e8e8e8 !important;
    color: #e8e8e8 !important;
}
/* ========== スマホ対応 ========== */
@media (max-width: 600px) {

  .fp-main {
    display: flex !important;
    flex-direction: column !important;
  }

  .fp-main > * {
    order: 10;
  }

  .fp-lang-nav {
    position: static !important;
    order: 1;
    top: auto !important;
    right: auto !important;
    padding: 10px 16px 0;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .fp-lang-nav a {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .fp-site-branding {
    position: static !important;
    order: 2;
    top: auto !important;
    left: auto !important;
    padding: 8px 16px 12px;
  }

  .fp-site-branding a {
    font-size: 22px;
  }

  .fp-search {
    order: 3;
    min-height: auto !important;
    padding: 32px 16px !important;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .tax-search-wrap {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
  }

  .tax-search-form {
    max-width: 100%;
  }

}

/* ---------- archive-works: Astraレイアウト上書き ---------- */
body.post-type-archive-works #page,
body.post-type-archive-works .site-content,
body.post-type-archive-works #content,
body.post-type-archive-works .ast-container,
body.post-type-archive-works #primary,
body.post-type-archive-works .site-main {
    background-color: #0d0d0d !important;
    background-image: none !important;
}
body.post-type-archive-works.ast-separate-container .ast-article-inner,
body.post-type-archive-works.ast-separate-container .ast-article-single,
body.post-type-archive-works.ast-separate-container .ast-archive-description {
    background-color: #0d0d0d !important;
    background-image: none !important;
}
body.post-type-archive-works #secondary {
    display: none !important;
}
body.post-type-archive-works .ast-container {
    display: block !important;
}
body.post-type-archive-works h1 {
    color: #e8e8e8 !important;
}