/*
Theme Name: Portfolio Unified
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 1サイト・固定ページ4つで4種類のポートフォリオを表示する統合テーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfolio-unified
Tags: portfolio, responsive, modern, custom-menu, featured-images
*/

/* リセット & ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* WordPress 管理バー表示時（ログイン時）: ナビを下にずらしてサイト名が見切れないようにする */
body.admin-bar .navbar {
    top: 32px;
}
body.admin-bar .hero {
    margin-top: 102px; /* 70 + 32 */
}
body.admin-bar .site-main,
body.admin-bar body.page .hero {
    margin-top: 122px; /* 90 + 32 */
}

/* 管理バーが高くなる幅（782px以下）では46px分ずらす */
@media screen and (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px;
    }
    body.admin-bar .hero {
        margin-top: 116px; /* 70 + 46 */
    }
    body.admin-bar .site-main,
    body.admin-bar body.page .hero {
        margin-top: 136px; /* 90 + 46 */
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    min-width: 0; /* 子要素が縮んで右端はみ出しを防ぐ */
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* ヒーローセクション */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 70px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image-placeholder,
.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    overflow: hidden;
}

.profile-image-placeholder svg {
    width: 200px;
    height: 200px;
}

.modern-initials-placeholder {
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.modern-initials-placeholder .initials-text {
    font-size: 5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

/* セクション共通スタイル */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ポートフォリオリンクカード（フロントページ） */
.portfolio-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-link-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-link-card h3 {
    padding: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.portfolio-link-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* プロフィール・実績・お問い合わせセクション（portfolio-theme と同様） */
.about {
    background: var(--bg-white);
}

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.works {
    background: var(--bg-white);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.work-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.work-image {
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.work-image-placeholder {
    color: var(--text-light);
    font-size: 1rem;
}

.work-content {
    padding: 1.5rem;
}

.work-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.work-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.work-content h3 a:hover {
    color: var(--primary-color);
}

.work-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.contact {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item strong {
    color: var(--text-dark);
    font-weight: 600;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item span {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

html {
    scroll-behavior: smooth;
}

/* ナビ右端はみ出し防止: 中〜小画面でメニュー間隔を詰め、必要なら折り返す */
@media (max-width: 992px) {
    .nav-menu {
        gap: 0.75rem;
    }
}

/* 固定ナビの下にコンテンツが隠れないよう余白を確保（タイトル見切れ防止） */
.site-main {
    margin-top: 90px;
    padding-top: 1rem;
}
body.home .site-main,
body.single .site-main,
body.page .site-main {
    margin-top: 90px;
}
body.single .entry-header,
body.page .entry-header {
    margin-top: 0;
    padding-top: 120px;
}
/* 固定ページテンプレートのヒーロー（4ポートフォリオ） */
body.page .hero {
    margin-top: 90px;
    padding-top: 2rem;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    body.admin-bar .nav-menu {
        top: 102px; /* 70 + 32: 管理バー表示時のモバイルメニュー位置 */
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-toggle {
        display: flex;
    }
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .contact-content {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    section {
        padding: 60px 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-card {
    animation: fadeInUp 0.6s ease-out;
}

/* --------------------------------------------------------------------------
 * WordPress コンテンツ内画像 および ブロックの汎用レイアウト修正
 * -------------------------------------------------------------------------- */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Gutenberg 画像ブロック関連 */
.wp-block-image {
    max-width: 100%;
    margin-bottom: 2rem;
    margin-top: 2rem;
}
.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}
.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}
figcaption,
.wp-caption-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
 * プライバシーポリシーページ
 * -------------------------------------------------------------------------- */
.privacy-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 60px;
    margin-top: 70px;
    text-align: center;
}

body.admin-bar .privacy-hero {
    margin-top: 102px;
}

.privacy-hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.privacy-hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    font-weight: 300;
}

.privacy-content-wrapper {
    background: var(--bg-light);
    padding: 60px 0 80px;
}

.privacy-article {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 3.5rem;
}

.privacy-meta {
    text-align: right;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.privacy-last-updated {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
}

/* プライバシーポリシー本文スタイル */
.privacy-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.privacy-body h2:first-child {
    margin-top: 0;
}

.privacy-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.8rem;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.privacy-body p {
    font-size: 1rem;
    line-height: 1.9;
    color: #374151;
    margin-bottom: 1.25rem;
}

.privacy-body ul,
.privacy-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
    padding-left: 0.5rem;
}

.privacy-body li {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 0.5rem;
    position: relative;
}

.privacy-body ul li::marker {
    color: var(--primary-color);
}

.privacy-body a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.privacy-body a:hover {
    border-bottom-color: var(--primary-color);
}

.privacy-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* テーブルスタイル（プライバシーポリシー内で使用する場合） */
.privacy-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.privacy-body th,
.privacy-body td {
    padding: 0.85rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.privacy-body th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.privacy-body tr:last-child td {
    border-bottom: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .privacy-hero {
        padding: 80px 0 40px;
    }

    .privacy-hero-title {
        font-size: 2rem;
    }

    .privacy-article {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }

    .privacy-body h2 {
        font-size: 1.3rem;
    }

    .privacy-body h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .privacy-hero {
        padding: 70px 0 30px;
    }

    .privacy-hero-title {
        font-size: 1.6rem;
    }

    .privacy-hero-subtitle {
        font-size: 1rem;
    }

    .privacy-article {
        padding: 1.5rem 1.25rem;
    }
}
