/* 
 * カスタムスタイル
 * APARTMENTテーマ用
 * バージョン: 1.1.0 - テスト用
 */

/* 基本スタイル */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh; /* ビューポートの高さいっぱいに */
    height: 100%;
}

body {
    overflow-x: hidden;
    background-color: #DDDDDD; /* デフォルト背景色をグレーに変更 */
    position: relative;
}

/* ノイズテクスチャの追加 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05; /* ノイズの透明度 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 0;
}

/* トップページの背景色 */
body.home {
    background-color: #f9f9f9; /* トップページのみ異なる背景色 */
}

/* WORKSページ専用のスタイル */
body.works-page-body {
    background-color: #DDDDDD; /* 背景色をグレーに */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* メニュー展開時のスクロール無効化 */
body.menu-open {
    overflow: hidden;
}

/* コンテンツのz-indexを上げる */
#page, #content, .site-header, .hero-section, .archive-grid, 
.single-project-container, .about-container, .contact-container {
    position: relative;
    z-index: 1;
}

/* ヘッダー */
.site-header {
    padding: 15px 20px;
    width: 100%;
    z-index: 100;
    box-sizing: border-box;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    opacity: 1;
    animation: none;
}

/* トップページのみ fixed にする */
body.home .site-header {
    position: fixed;
}

/* トップページ以外のヘッダーメニューリンク */
.site-header.not-home .main-navigation a {
    color: #333; /* 黒テキストに変更 */
}

.site-header.not-home .main-navigation a:after {
    background-color: #333; /* 下線も黒に変更 */
}

/* トップページ以外のハンバーガーメニューアイコン */
.site-header.not-home .menu-icon, 
.site-header.not-home .menu-icon:before, 
.site-header.not-home .menu-icon:after {
    background-color: #333; /* 黒に変更 */
}

/* トップページ以外でメニュー展開時のハンバーガーアイコン */
.site-header.not-home .toggled .menu-icon:before,
.site-header.not-home .toggled .menu-icon:after {
    background-color: #ffffff; /* メニュー開いたときは白に戻す */
}

/* ロゴ */
.site-branding {
    display: inline-block;
    flex: 0 0 auto;
    max-width: 70%;
    position: relative;
}

.site-branding img {
    max-height: 30px;
    width: 180px;
    height: auto;
    display: block;
    transition: opacity 0.4s ease;
}

/* 洗練されたロゴアニメーション */
.site-branding::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.site-branding::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 1;
}

.site-branding:hover::before {
    transform: scaleX(1);
}

.site-branding:hover img {
    opacity: 0.9;
}

.site-branding a {
	position: relative;
	display: inline-block;
}

.site-branding a.white::after {
	content: 'MEISHIN';
	position: absolute;
	top: 120%;
	left: -1px;
	font-size: 26px;
	font-weight: 100;
	margin-top: 4px;
	color: #fff;
	white-space: nowrap;
}

.site-branding a.black::after {
	content: 'MEISHIN';
	position: absolute;
	top: 120%;
	left: -1px;
	font-size: 26px;
	font-weight: 100;
	margin-top: 4px;
	color: #333;
	white-space: nowrap;
}
@media screen and (max-width: 480px) {
	.site-branding a.white::after,
	.site-branding a.black::after {font-size: 20px;}
}
/* トップページ以外のロゴアニメーション色調整 */
.site-header.not-home .site-branding::before {
    background-color: #333;
}

/* ナビゲーション */
.main-navigation {
    display: inline-flex;
    align-items: center;
    height: 30px;
    flex: 0 0 auto;
}

.main-navigation ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

/* モバイルメニューの表示/非表示 - 強化版 */
@media screen and (max-width: 768px) {
    /* 通常時はメニュー非表示 - 複数のセレクタで確実に非表示にする */
    #primary-menu,
    .main-navigation ul#primary-menu,
    .main-navigation ul {
        display: none !important;
    }
    
    /* メニュー開いたときだけ表示 */
    body.menu-open #primary-menu,
    body.menu-open .main-navigation ul#primary-menu,
    body.menu-open .main-navigation ul {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        margin: 0;
        padding: 60px 0 0 0;
        z-index: 9999;
        justify-content: center;
        align-items: center;
        overflow-y: auto;
    }
    
    /* メニュー内のリンク色を白に固定 */
    .main-navigation li a,
    .site-header.not-home .main-navigation li a {
        color: #ffffff !important;
        font-size: 24px;
        letter-spacing: 2px;
        padding: 10px 0;
        display: inline-block;
        position: relative;
        font-weight: 300;
    }
    
    /* フォーカス時の下線も白に固定 */
    .main-navigation a:after,
    .site-header.not-home .main-navigation a:after {
        background-color: #ffffff !important;
        height: 1px;
    }
}

/* PCでは常にメニューを表示 */
@media screen and (min-width: 769px) {
    #primary-menu,
    .main-navigation ul#primary-menu,
    .main-navigation ul {
        display: flex !important;
        position: static;
        background-color: transparent;
        height: auto;
        width: auto;
    }
    
    .menu-toggle {
        display: none !important;
    }
}

.main-navigation li {
    margin-left: 30px;
}

.main-navigation a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
    font-weight: 300;
}

.main-navigation a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.main-navigation a:hover:after {
    width: 100%;
}

/* メニュートグル（モバイル用） */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 0;
    position: relative;
    z-index: 10000;
}

/* ハンバーガーアイコン */
.menu-icon, 
.menu-icon:before, 
.menu-icon:after {
    background-color: #ffffff;
    width: 24px;
    height: 2px;
    position: absolute;
    transition: all 0.3s ease;
}

.menu-icon {
    top: 14px;
    left: 3px;
}

.menu-icon:before, 
.menu-icon:after {
    content: '';
    left: 0;
}

.menu-icon:before {
    top: -8px;
}

.menu-icon:after {
    top: 8px;
}

/* トグル時のアイコン変化 */
.toggled .menu-icon {
    background-color: transparent;
}

.toggled .menu-icon:before {
    top: 0;
    transform: rotate(45deg);
    background-color: #ffffff;
}

.toggled .menu-icon:after {
    top: 0;
    transform: rotate(-45deg);
    background-color: #ffffff;
}

/* メニュー開いた時のボタン位置調整 */
body.menu-open .menu-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
}

/* トップページのヒーローセクション */
.hero-section {
    height: 100vh;
    background-image: url('../images/backgrounds/apartment-hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.hero-description {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

/* フッター */
.home .site-footer {
    display: none; /* フロントページでフッターを非表示 */
}

/* レスポンシブデザイン */
@media screen and (max-width: 768px) {
    .site-header {
        padding: 10px 15px;
        flex-wrap: nowrap;
    }
    
    .site-branding {
        flex: 1 1 auto;
        max-width: calc(100% - 50px);
    }
    
    .site-branding img {
        max-width: 100%;
        width: 150px;
    }
    
    .main-navigation {
        flex: 0 0 auto;
        width: auto;
        margin-top: 0;
    }
    
    /* モバイルメニュートグルボタン */
    .menu-toggle {
        display: block;
        margin-left: 10px;
    }
    
    /* モバイルメニュー内の項目 */
    .main-navigation li {
        margin: 15px 0;
        display: block;
        text-align: center;
    }
    
    /* モバイルメニュー内のリンク */
    .main-navigation li a {
        font-size: 24px;
        letter-spacing: 2px;
        padding: 10px 0;
        display: inline-block;
        position: relative;
        font-weight: 300;
    }
    
    /* モバイルメニュー内のラインアニメーション */
    .main-navigation li a:after {
        height: 1px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
} 

/* 画面が非常に小さい場合の調整 */
@media screen and (max-width: 480px) {
    .site-header {
        padding: 10px;
    }
    
    .site-branding img {
        max-width: 130px;
        width: 130px;
    }
    
    .main-navigation li a {
        font-size: 20px;
    }
}

/* JavaScriptが動作しない場合の代替策 */
.toggled ~ #primary-menu,
.main-navigation.toggled #primary-menu {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    margin: 0;
    padding: 60px 0 0 0; /* 上部にパディングを追加してボタン用のスペースを確保 */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

/* アーカイブページのスタイル */
.archive-header {
    padding: 60px 20px 60px;
    text-align: center;
    background-color: #DDDDDD; /* 背景色を変更 */
}

body.page-template-page-works,
.works-page {
    background-color: #DDDDDD; /* WORKSページの背景色を設定 */
}

.page-title {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 2px;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

/* グリッドレイアウト - 柔軟に対応 */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 自動的に列数を調整 */
    width: 100%;
    margin: 0 auto;
    grid-gap: 0; /* 隙間なし */
    background-color: #DDDDDD; /* グリッド全体の背景色 */
}

/* 画面幅に応じた列数の調整 */
@media screen and (min-width: 768px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr); /* 768px以上で3列 */
    }
}

@media screen and (min-width: 992px) {
    .archive-grid {
        grid-template-columns: repeat(4, 1fr); /* 992px以上で4列 */
    }
}

@media screen and (min-width: 1200px) {
    .archive-grid {
        grid-template-columns: repeat(5, 1fr); /* 1200px以上で5列 */
    }
}

@media screen and (min-width: 1600px) {
    .archive-grid {
        grid-template-columns: repeat(6, 1fr); /* 1600px以上で6列 */
    }
}

@media screen and (min-width: 2000px) {
    .archive-grid {
        grid-template-columns: repeat(7, 1fr); /* 2000px以上で7列 */
    }
}

@media screen and (min-width: 2400px) {
    .archive-grid {
        grid-template-columns: repeat(8, 1fr); /* 2400px以上で8列 */
    }
}

/* カードスタイル */
.archive-card {
    position: relative;
    margin: 0;
    overflow: hidden;
    background-color: #DDDDDD;
    transition: transform 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.archive-card:hover {
    transform: translateY(-5px);
    z-index: 1;
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #eee;
    aspect-ratio: 4/3; /* アスペクト比を固定 */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を正しく表示 */
    display: block;
    transition: transform 0.3s ease;
}

.card-link:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 15px;
    background-color: #DDDDDD;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
}

.card-date {
    font-size: 0.9rem;
    color: #777;
}

/* ページネーション */
.pagination {
    text-align: center;
    padding: 30px 0;
    background-color: #DDDDDD;
    width: 100%;
}

.pagination .page-numbers {
    padding: 5px 10px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
}

.pagination .page-numbers.current {
    background: #333;
    color: #fff;
}

/* WORKS固有のスタイル - フッターを非表示 */
.works-page + .site-footer,
.works-page-body .site-footer {
    display: none;
}

/* フルハイトのためのユーティリティクラス */
.full-height-container {
    min-height: 100vh;
    background-color: #DDDDDD;
}

/* 投稿詳細ページ（プロジェクト詳細）のスタイル */
.single-project-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    padding-top: 60px; /* marginではなくpaddingに変更 */
    background-color: #DDDDDD; /* 背景色を統一 */
}

.single-project {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.project-article {
    margin: 0;
    padding: 0;
}

.project-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* 左側：メイン画像（アイキャッチ） */
.project-main-image {
    width: 60%;
    margin: 0;
    padding: 0;
    position: relative; /* 矢印のために相対位置に */
    overflow: hidden; /* はみ出した部分を隠す */
    aspect-ratio: 4/3; /* アスペクト比を固定 */
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.project-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: all 0.3s ease; /* 画像切り替え時のスムーズな効果 */
}

/* 右側：グリッド画像とプロジェクト情報 */
.project-details {
    width: 40%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* 縦方向に並べる */
}

/* 画像グリッド */
.project-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    flex: 0 0 auto; /* flex-growを0に変更して、自然なサイズを維持 */
    line-height: 0; /* 行間の余白を削除 */
    font-size: 0; /* インライン要素間の余白を削除 */
    overflow: hidden; /* はみ出した部分を隠す */
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

/* プロジェクトギャラリー機能のスタイル */
.grid-image {
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    display: block;
    overflow: hidden;
    cursor: pointer; /* カーソルをポインターに変更 */
    position: relative; /* 相対位置を設定 */
    transition: opacity 0.2s ease; /* 透明度のみの遷移効果に変更 */
}

.grid-image:hover {
    opacity: 0.85; /* ホバー時の透明度を調整 */
}

.grid-image.active-image {
    outline: 2px solid #333; /* アクティブ時に枠線を表示 */
    outline-offset: -2px; /* 枠線をボーダー内側に設定 */
    opacity: 1; /* アクティブ時は透明度100% */
    z-index: 2; /* 他の要素より前面に表示 */
}

.grid-image.active-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1); /* 白い半透明のオーバーレイ */
    pointer-events: none; /* マウスイベントを阻害しない */
}

.grid-image img {
    width: 100%;
    height: 100%; /* 高さを100%に設定 */
    display: block;
    object-fit: cover;
    vertical-align: top; /* 画像の下部の余白を削除 */
    transition: transform 0.3s ease; /* 画像変更時の遷移効果 */
}

/* プロジェクト情報 */
.project-info {
    padding: 30px;
    margin-top: auto; /* 下寄せにするための設定 */
}

.project-title {
    font-size: 28px;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.project-meta {
    display: flex;
    margin-bottom: 16px; /* 項目間の余白を増やす */
    align-items: baseline;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

.meta-label {
    width: 120px; /* ラベル幅を増やす */
    font-weight: normal;
    color: #333;
    font-size: 14px;
}

.meta-value {
    flex: 1;
    font-size: 15px;
    color: #000;
    letter-spacing: 0.5px;
}

/* プロジェクトコンテンツ */
.project-content {
    padding: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ナビゲーションを非表示にする */
.project-navigation {
    display: none;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .project-images-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .project-images-grid {
        grid-template-columns: repeat(3, 1fr); /* 2列から3列に変更 */
    }
}

@media (max-width: 768px) {
    .single-project-container {
        padding-top: 50px;
    }
    
    .project-layout {
        flex-direction: column;
    }
    
    .project-main-image,
    .project-details {
        width: 100%;
    }
    
    .project-images-grid {
        grid-template-columns: repeat(3, 1fr); /* スマホでも3列表示に */
    }
    
    .project-info {
        padding: 20px;
        margin-top: 0; /* スマホでは下寄せしない */
    }
}

/* スライドショーコンテナとスライド */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
	object-position: top;
}

/* フェードアニメーション */
.fade {
    animation-name: fade;
    animation-duration: 0.15s;
	animation-timing-function: ease-out;
}

@keyframes fade {
    from {opacity: 0.4}
    to {opacity: 1}
}

/* ABOUTページのスタイル */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 60px;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-title {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

.info-table tr {
    border-bottom: 1px solid #ccc;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table th {
    width: 30%;
    padding: 20px 10px;
    text-align: left;
    font-weight: 500;
    vertical-align: top;
    color: #333;
}

.info-table td {
    width: 70%;
    padding: 20px 10px;
    font-weight: 300;
    line-height: 1.6;
    color: #000;
}

/* ABOUTページのレスポンシブ対応 */
@media (max-width: 768px) {
    .about-title {
        font-size: 2.2rem;
    }
    
    .info-table th {
        width: 40%;
    }
    
    .info-table td {
        width: 60%;
    }
}

@media (max-width: 576px) {
    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }
    
    .info-table th {
        padding-bottom: 5px;
        border-bottom: none;
    }
    
    .info-table td {
        padding-top: 5px;
        padding-bottom: 20px;
    }
    
    .about-title {
        font-size: 2rem;
    }
}

/* CONTACTページのスタイル */
.contact-container {
    max-width: 800px; /* 幅を狭くして見やすくする */
    margin: 0 auto;
    padding: 60px 20px 60px;
    background-color: #DDDDDD; /* 背景色を統一 */
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-title {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.contact-content {
    max-width: 600px; /* フォームの最大幅を設定 */
    margin: 0 auto;
    background-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

/* Contact Form 7のモダンスタイリング */
.wpcf7 label {
    display: block;
    margin-bottom: 30px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: none;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
    border-bottom-color: #333;
    outline: none;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.wpcf7 textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7 .wpcf7-submit {
    display: inline-block;
    padding: 15px 40px;
    background-color: #333;
    color: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}

.wpcf7 .wpcf7-submit:hover {
    background-color: #555;
}

/* 送信ボタンのコンテナを中央揃えに */
.wpcf7 p:last-of-type {
    text-align: center;
    margin-top: 20px;
}

/* バリデーションメッセージのスタイル */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

.wpcf7 form .wpcf7-response-output {
    margin: 30px 0 0;
    padding: 15px;
    border: none;
    border-radius: 3px;
    font-size: 0.9rem;
    text-align: center;
}

.wpcf7 form.invalid .wpcf7-response-output {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.wpcf7 form.sent .wpcf7-response-output {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

/* CONTACTページのレスポンシブ対応 */
@media (max-width: 768px) {
    .contact-title {
        font-size: 2.2rem;
    }
    
    .wpcf7 .wpcf7-submit {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .contact-container {
        padding: 40px 15px;
    }
    
    .contact-title {
        font-size: 2rem;
    }
}

/* コンタクトページのサイドバーを非表示 */
.page-id-contact #secondary,
.page-id-contact .widget-area,
body.page-contact #secondary,
body.page-contact .widget-area {
    display: none !important;
}

/* コンタクトページのメインコンテンツを全幅に */
.page-id-contact #primary,
.page-id-contact .content-area,
body.page-contact #primary,
body.page-contact .content-area {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ページ遷移アニメーション - 削除 */
/* .fade-transition {
    animation: fadeIn 0.15s cubic-bezier(0.33, 1, 0.68, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
} */

/* 要素ごとのアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 各要素のアニメーション適用 */
.animated {
    opacity: 0;
}

.animated.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* ディレイを変えて順番に表示させる */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* ヘッダー要素のアニメーション - 削除 */
/* .site-header {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.1s;
} */

/* タイトル、説明文のアニメーション */
.hero-title, .page-title, .project-title, .about-title, .contact-title {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.hero-description, .project-meta, .info-table, .contact-content {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

/* WORKSアーカイブページのカードアニメーション */
.archive-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* カードの行ごとに遅延を増やす */
.archive-card:nth-child(3n+1) {
    animation-delay: 0.2s;
}

.archive-card:nth-child(3n+2) {
    animation-delay: 0.3s;
}

.archive-card:nth-child(3n+3) {
    animation-delay: 0.4s;
}

/* プロジェクト詳細ページ */
.project-main-image {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
}

.project-images-grid {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

/* フォーム要素のアニメーション */
.wpcf7 p {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.wpcf7 p:nth-child(1) {
    animation-delay: 0.3s;
}

.wpcf7 p:nth-child(2) {
    animation-delay: 0.4s;
}

.wpcf7 p:nth-child(3) {
    animation-delay: 0.5s;
}

.wpcf7 p:nth-child(4) {
    animation-delay: 0.6s;
}

/* モバイル対応 - アニメーションを軽減 */
@media (max-width: 768px) {
    .animated, .site-header, .hero-title, .page-title, 
    .project-title, .about-title, .contact-title,
    .hero-description, .project-meta, .info-table, 
    .contact-content, .archive-card, .project-main-image,
    .project-images-grid, .wpcf7 p {
        animation-duration: 0.4s;
    }
}