/*
Theme Name: FANZA紹介テーマ
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: FANZA作品を紹介するためのWordPressテーマ。ジャンル、女優、レーベル、シリーズ、メーカーのタグ付けに対応。
Version: 2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fanza-theme
*/

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-primary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* Navigation */
.main-navigation {
    margin-top: 16px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-secondary);
}

.main-navigation a:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Main Content */
.site-main {
    padding: 40px 0;
    min-height: 400px;
}

/* Single Post */
.single-post {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    line-height: 1.3;
}

.entry-meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

/* Main Image */
.main-image {
    margin-bottom: 32px;
    text-align: center;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Sample Video */
.sample-video {
    margin-bottom: 32px;
}

.sample-video h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.sample-video video {
    width: 100%;
    max-width: 900px;
    max-height: 600px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: block;
}

/* Image Gallery */
.image-gallery {
    margin-bottom: 32px;
}

.image-gallery h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.gallery-grid img:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* AV Details */
.av-details {
    margin-bottom: 32px;
    background: var(--bg-tertiary);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.av-details h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.av-details table {
    width: 100%;
    border-collapse: collapse;
}

.av-details th,
.av-details td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.av-details th {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    width: 180px;
    font-size: 14px;
}

.av-details td {
    background: var(--bg-primary);
}

.av-details tr:last-child th,
.av-details tr:last-child td {
    border-bottom: none;
}

/* Taxonomies */
.post-taxonomies {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.taxonomy-section {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.taxonomy-section strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    min-width: 100px;
}

.taxonomy-section a {
    display: inline-block;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.taxonomy-section a:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* Archive Page */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

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

.post-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-meta {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-card-no-image {
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.no-posts p {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
}

/* Entry Content */
.entry-content {
    margin-top: 24px;
    line-height: 1.7;
}

.entry-content p {
    margin-bottom: 16px;
}

.entry-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.entry-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--primary-dark);
}

/* Purchase Button */
.purchase-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin: 24px 0;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.purchase-button:hover {
    background: var(--primary-dark);
}

/* Footer */
.site-footer {
    background: var(--text-primary);
    color: var(--text-light);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-links {
    margin: 12px 0;
    font-size: 14px;
}

.footer-links span {
    margin: 0 8px;
    opacity: 0.5;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-notice {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Page Header */
.page-header {
    background: var(--bg-primary);
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 16px 0;
    }

    .site-title {
        font-size: 24px;
    }

    .single-post {
        padding: 24px;
    }

    .entry-title {
        font-size: 26px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 6px;
    }

    .main-navigation a {
        display: block;
        text-align: center;
    }

    .av-details {
        padding: 16px;
    }

    .av-details th {
        width: 100px;
        font-size: 12px;
        padding: 10px;
    }

    .av-details td {
        font-size: 14px;
        padding: 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .gallery-grid img {
        height: 150px;
    }

    .page-header {
        padding: 32px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 14px;
    }

    .taxonomy-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .taxonomy-section strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .entry-title {
        font-size: 22px;
    }

    .post-card-title {
        font-size: 16px;
    }

    .purchase-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .main-navigation,
    .purchase-button {
        display: none;
    }

    body {
        background: white;
    }

    .single-post {
        box-shadow: none;
        padding: 0;
    }
}
