/*
Theme Name: Erodga Theme
Theme URI: https://erodga.com
Description: FANZA素人動画アフィリエイト専用テーマ
Author: erodga
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: erodga
*/

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #2c2c2c;
  background: #f7f8fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #1a73e8; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1557b0; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrap {
  display: flex;
  gap: 35px;
  padding-top: 25px;
  padding-bottom: 60px;
}

.main-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 25px;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ===== Header ===== */
.site-header {
  background: #1a1a2e;
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-title a { color: #fff; }
.site-title a:hover { text-decoration: none; opacity: 0.9; }

.site-description {
  font-size: 0.72em;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  gap: 22px;
}

.desktop-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88em;
  font-weight: 500;
  transition: color 0.2s;
}

.desktop-nav a:hover { color: #fff; }

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px;
}

.mobile-nav {
  display: none;
  background: #1a1a2e;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.active { display: block; }

.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.7);
  padding: 10px 20px;
  font-size: 0.92em;
  transition: background 0.2s, color 0.2s;
}

.mobile-nav a:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* ===== Sort & Filter Bar ===== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-size: 0.85em;
}

.sort-bar a {
  color: #666;
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

.sort-bar a.active,
.sort-bar a:hover {
  background: #1a1a2e;
  color: #fff;
  text-decoration: none;
}

.sort-bar .separator {
  color: #ddd;
}

.perpage-selector {
  margin-left: auto;
}

.perpage-selector a {
  margin: 0 3px;
}

/* ===== Video Grid ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}

.video-card {
  display: block;
  color: #2c2c2c;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #2c2c2c;
}

.video-card .thumb {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: #f0f0f0;
}

.video-card .product-code {
  font-size: 0.72em;
  color: #999;
  margin-top: 8px;
  padding: 0 10px;
  letter-spacing: 0.03em;
}

.video-card .card-title {
  font-size: 0.83em;
  font-weight: 600;
  margin-top: 4px;
  padding: 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.video-card .card-date {
  font-size: 0.72em;
  color: #aaa;
  margin-top: 4px;
  padding: 0 10px;
}

.video-card .card-actress {
  font-size: 0.72em;
  color: #1a73e8;
  margin-top: 2px;
  padding: 0 10px 10px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.88em;
  color: #333;
  transition: all 0.2s;
}

.pagination span.current {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.pagination a:hover {
  background: #f5f5f5;
  text-decoration: none;
  border-color: #ccc;
}

/* ===== Single Video Page ===== */
.breadcrumb {
  font-size: 0.82em;
  color: #999;
  padding: 12px 0;
  margin-bottom: 15px;
}

.breadcrumb a { color: #1a73e8; }
.breadcrumb .sep { margin: 0 6px; color: #ccc; }

.single-video-header h1 {
  font-size: 1.35em;
  margin-bottom: 12px;
  line-height: 1.5;
  font-weight: 700;
  color: #1a1a2e;
}

/* Product Info Block */
.product-info-block {
  margin-bottom: 12px;
  font-size: 0.88em;
  color: #666;
}

.product-info-block p {
  margin: 4px 0;
}

.product-info-block a { color: #1a73e8; }

/* PR Badge - subtle rounded pill */
.pr-badge {
  display: inline-block;
  font-size: 0.7em;
  color: #999;
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 10px;
  margin: 5px 0 12px;
  letter-spacing: 0.03em;
}

.main-image-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.main-image-wrap img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* CTA Button - full width red */
.cta-button {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 0.95em;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
  margin: 20px 0;
}

.cta-button:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-button-red { background: #e53935; }
.cta-button-red:hover { background: #c62828; }

/* Dual Buttons - side by side */
.dual-buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.dual-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: 0.92em;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
  flex: 1;
  min-width: 160px;
}

.dual-btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.dual-btn-green { background: #43a047; }
.dual-btn-green:hover { background: #2e7d32; }

.dual-btn-gray { background: #616161; }
.dual-btn-gray:hover { background: #424242; }

/* Section Headings - consistent left border accent */
.section-heading {
  font-size: 1.1em;
  font-weight: 700;
  padding: 8px 0 8px 14px;
  margin: 28px 0 16px;
  border-left: 4px solid #1a1a2e;
  color: #1a1a2e;
  line-height: 1.4;
}

/* Actress Section - inline display */
.actress-section {
  margin: 18px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.actress-label {
  font-size: 0.9em;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

.actress-section a {
  color: #1a73e8;
  font-weight: 500;
}

/* Sample Video Section */
.sample-video-section {
  margin: 24px 0;
}

.sample-video-section h2 {
  font-size: 1.1em;
  font-weight: 700;
  padding: 8px 0 8px 14px;
  margin-bottom: 12px;
  border-left: 4px solid #1a1a2e;
  color: #1a1a2e;
}

/* Sample Video - responsive 16:9 iframe container */
.sample-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  margin-bottom: 8px;
}

.sample-video-wrap iframe,
.sample-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sample-video-note {
  font-size: 0.8em;
  color: #aaa;
}

/* Maker/Actress Links */
.maker-actress-links {
  margin: 24px 0;
  padding: 18px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.88em;
  border: 1px solid #eee;
}

.maker-actress-links p {
  margin: 5px 0;
}

.maker-actress-links a {
  color: #1a73e8;
}

/* Sample Gallery */
.sample-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.sample-gallery img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.sample-gallery img:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* Post Metadata Section - clean card style after FAQ */
.post-metadata-section {
  margin: 30px 0;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.meta-row {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88em;
  display: flex;
  gap: 8px;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  font-weight: 600;
  color: #666;
  white-space: nowrap;
  min-width: 100px;
}

.meta-value {
  color: #333;
}

.meta-value a { color: #1a73e8; }

/* Metadata Table */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88em;
}

.meta-table th,
.meta-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

.meta-table tr:last-child th,
.meta-table tr:last-child td {
  border-bottom: none;
}

.meta-table th {
  background: transparent;
  width: 120px;
  font-weight: 600;
  white-space: nowrap;
  color: #666;
}

.meta-table td a { color: #1a73e8; }

/* FAQ Section */
.faq-section {
  margin: 30px 0;
}

.faq-section h2 {
  font-size: 1.1em;
  font-weight: 700;
  padding: 8px 0 8px 14px;
  margin-bottom: 16px;
  border-left: 4px solid #1a1a2e;
  color: #1a1a2e;
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-question {
  font-weight: 600;
  padding: 14px 18px;
  background: #fafafa;
  font-size: 0.92em;
}

.faq-question::before {
  content: "Q. ";
  color: #e53935;
  font-weight: 700;
}

.faq-answer {
  padding: 14px 18px;
  font-size: 0.88em;
  line-height: 1.8;
  color: #444;
}

.faq-answer::before {
  content: "A. ";
  color: #1a73e8;
  font-weight: 700;
}

/* Related Works */
.related-works {
  margin: 30px 0;
}

.related-works h2 {
  font-size: 1.1em;
  font-weight: 700;
  padding: 8px 0 8px 14px;
  margin-bottom: 16px;
  border-left: 4px solid #1a1a2e;
  color: #1a1a2e;
}

/* ===== Sidebar ===== */
.sidebar-widget {
  margin-bottom: 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

.sidebar-widget h3 {
  font-size: 0.92em;
  padding: 10px 14px;
  background: #1a1a2e;
  color: #fff;
  margin-bottom: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  border-bottom: 1px solid #f2f2f2;
}

.sidebar-widget li:last-child { border-bottom: none; }

.sidebar-widget li a {
  display: block;
  padding: 9px 14px;
  font-size: 0.84em;
  color: #333;
  transition: background 0.15s;
}

.sidebar-widget li a:hover {
  background: #f8f9fa;
  text-decoration: none;
}

/* Tag Cloud in Sidebar */
.tag-cloud,
.tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px;
}

.tag-cloud a,
.tagcloud a {
  display: inline-block;
  padding: 4px 10px;
  background: #f0f2f5;
  color: #555;
  border-radius: 14px;
  font-size: 0.8em;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}

.tag-cloud a:hover,
.tagcloud a:hover {
  background: #1a1a2e;
  color: #fff;
  text-decoration: none;
}

/* ===== Sticky Footer Bar ===== */
.sticky-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(26,26,46,0.97);
  backdrop-filter: blur(8px);
  padding: 10px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

.sticky-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.sticky-footer-title {
  color: rgba(255,255,255,0.9);
  font-size: 0.85em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.sticky-footer-btn {
  display: inline-flex;
  align-items: center;
  background: #e53935;
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.sticky-footer-btn:hover {
  background: #c62828;
  text-decoration: none;
  color: #fff;
}

/* ===== Footer ===== */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.5);
  padding: 24px 0;
  margin-top: 0;
  text-align: center;
  font-size: 0.78em;
}

.site-footer a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links { margin-bottom: 10px; }
.site-footer .footer-links a { margin: 0 12px; }

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 h1 { font-size: 2.2em; margin-bottom: 15px; color: #1a1a2e; }
.error-404 p { font-size: 1.05em; color: #888; line-height: 1.8; }

/* ===== Search ===== */
.search-header {
  margin-bottom: 20px;
}

.search-header h1 {
  font-size: 1.25em;
  font-weight: 700;
  color: #1a1a2e;
}

/* ===== Taxonomy Header ===== */
.taxonomy-header {
  margin-bottom: 20px;
}

.taxonomy-header h1 {
  font-size: 1.25em;
  font-weight: 700;
  color: #1a1a2e;
}

.taxonomy-header .count {
  font-size: 0.82em;
  color: #999;
  margin-top: 5px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .sidebar { width: 260px; }
}

@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }

  .content-wrap {
    flex-direction: column;
    padding-bottom: 80px; /* space for sticky footer bar */
  }

  .main-content {
    padding: 18px;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar { width: 100%; }

  .desktop-nav { display: none; }
  .mobile-menu-toggle { display: block; }

  .sample-gallery { grid-template-columns: repeat(3, 1fr); }

  .sort-bar { font-size: 0.8em; gap: 8px; }

  .single-video-header h1 { font-size: 1.12em; }

  .dual-buttons {
    flex-direction: column;
  }

  .dual-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sample-gallery { grid-template-columns: repeat(3, 1fr); }
  .meta-table th { width: 90px; }

  .sticky-footer-bar {
    padding: 8px 12px;
  }

  .sticky-footer-title {
    font-size: 0.78em;
  }
}
