body {
    font-size: 13.2px;
    font-family: "a-otf-ud-reimin-pr6n", sans-serif;
    color: #505159
}

a:visited {
    color: #3E3E3E !important;
}

li{
    list-style: none;
}

.sp{
    display: none;
}

/* Gutenberg モバイル改行スタイル */
br.sp-only {
    display: none;
}

/* モバイル改行用brタグ */
br.mobile-break {
    display: none !important;
}

/* ギャラリートップでのmobile-breakクラス非表示 */
.pc-gallery-layout br.mobile-break,
.mobile-current-title br.mobile-break {
    display: none !important;
}

/* 従来のspbrタグも念のため非表示 */
spbr {
    display: none;
}

/* デスクトップでspbrタグを完全に隠す */
spbr,
spbr::before,
spbr::after {
    display: none !important;
    content: none !important;
}

/* PC表示時（769px以上）でmobile-breakクラスを確実に非表示 */
@media (min-width: 769px) {
    br.mobile-break {
        display: none !important;
    }
    
    /* ギャラリートップ専用 */
    .mobile-current-title br.mobile-break,
    .pc-gallery-layout br.mobile-break,
    #current-portfolio-title br.mobile-break {
        display: none !important;
    }
}

@media (max-width: 768px) {
    br.sp-only {
        display: block;
    }
    
    /* モバイル時にmobile-breakクラスのbrタグを表示 */
    br.mobile-break {
        display: block !important;
    }
    
    
    /* 従来のspbrタグ対応（念のため） */
    spbr {
        display: inline !important;
        font-size: 0 !important;
        line-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        color: transparent !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    /* spbrの直前で改行 */
    spbr::before {
        content: "\A" !important;
        white-space: pre !important;
        display: inline !important;
        font-size: inherit !important;
        line-height: inherit !important;
        color: transparent !important;
    }
}

.container {
    max-width: 970px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.content {
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
}

.content figure {
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: 970px;
    width: 100%;
    min-height: 600px;
}

@media (max-width: 640px) {
    #home.container {
        padding: 0;
    }
#home .content {
    position: relative;
    width: 100%;
    z-index: 1;
    margin: 0 auto;
    padding: 0 ;
    overflow: hidden;
}
.home-nav-height {
    height: 100%;
}

#home .content figure img {
        margin-top: 0;
        position: absolute;
        top: 0;
        left: -131px;
        transform: translate(60px, 0);
        width: 800px;
        object-fit: contain;
        ;
    }
    #home .content figure img ::before{
        content: "";
        display:flex;
        padding-top: 100%;
    }
}

.content figure img {
    width: 100%;
    max-width: 778px;
}

a:link {
    color: #3E3E3E !important;
    text-decoration: none;
}

a:hover {
    color: rgb(36, 35, 35)E3E !important;
    text-decoration: underline;
}

/* ヘッダーロゴ */
.header-logo {
    /* text-align: center; */
    /* padding: 20px 0; */
}

.header-logo img {
    max-width: 373px;
    height: auto;
    width: auto;
}

/* ページヘッダー */
.page-header {
    margin-bottom: 50px;
}

.page-title {
    font-size: 16.5px;
    font-weight: 300;
    margin-top: 90px;
    margin-bottom: 1rem;
    text-align: center;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.updated-date, .parent-page {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.page-thumbnail {
    width: 100%;
    margin-top: 1rem;
}

.page-thumbnail img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 子ページグリッド */
.child-pages {
    margin: 3rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.child-pages h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.child-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.child-page-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.child-page-item h4 {
    margin-bottom: 0.5rem;
}

.child-page-item h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.child-page-item h4 a:hover {
    color: #34495e !important;
}

.child-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.child-thumbnail {
    text-align: center;
}

.child-thumbnail img {
    border-radius: 4px;
    max-width: 100px;
    height: auto;
}

/* パンくずナビ */
.breadcrumb {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    color: #666;
}

.breadcrumb a {
    color: #007cba;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ページ分割 */


.page-pagination {
    text-align: center;
    margin: 2rem 0;
}

.page-number {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #007cba;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .page-title {
        font-size: 1rem;
    }
    
    .page-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .child-pages-grid {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb ol {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .breadcrumb li:not(:last-child)::after {
        display: none;
    }
}
.main-navigation {
    padding-top: 45px;
    padding-bottom: 4rem;
}
.main-nav {
    position: relative;
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: left;
    margin: 0;
    padding: 0;
}

#home .main-nav {
    margin-left: 8.33333%;
}

#home.container {
    /* min-height: 100vh; */
    position: relative;
    top: -15px;
    z-index: 1;
}

#home .content h1 {
    font-size: 18px;
    font-weight: 300;
    text-align: left;
    margin-bottom: 2rem;
}

.main-nav li {
    margin: 0;
}

.main-nav a {


    text-decoration: none;
}

.main-nav a:hover {
    color: rgb(36, 35, 35) !important;
    text-decoration: underline;
}

/* サブメニュー（プルダウン）のスタイル */
.main-nav {
    position: relative;
}

.main-nav li {
    position: relative;
}

.main-nav .sub-menu {
    font-size: 13px;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 150px;
    /* padding: 6px 0; */
    margin: 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.main-nav .sub-menu li {
    margin: 0;
    width: 100%;
}

.main-nav .sub-menu a {
    display: block;
    padding: 8px 20px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.main-nav .sub-menu a:hover {
    background-color: #f5f5f5;
    color: #333 !important;
    text-decoration: none;
}

.main-nav .sub-menu li:last-child a {
    border-bottom: none;
}

/* プルダウンの表示制御 */
.main-nav li:hover > .sub-menu,
.main-nav .menu-item-has-children.active > .sub-menu,
.main-navigation .main-nav li:hover > .sub-menu,
.main-navigation .main-nav .menu-item-has-children.active > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* 親メニュー項目にサブメニューがある場合の矢印 */
.main-nav .menu-item-has-children > a::after {
    content: " ▼";
    font-size: 8px;
    color: #666;
    margin-left: 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        padding-left: 20px;
    }
    
    .main-nav .menu-item-has-children > a::after {
        content: " ►";
    }
    
    .main-nav .menu-item-has-children:hover > .sub-menu {
        display: block;
    }
}

/* ホームページ専用モバイルメニュー */
.home-mobile-navigation {
    display: none;
}

@media (max-width: 768px) {
    .home-mobile-navigation {
        display: block;
        margin-top: 2rem;
        margin-bottom: 4rem;
        position: relative;
        z-index: 1500;
    }
    
    .home-mobile-nav {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .home-mobile-nav li {
        position: relative;
        margin: 0;
    }
    
    .home-mobile-nav > li > a {
        display: flex;
        align-items: center;
        position: relative;
        min-height: 54px;
        padding: 0.8rem 1rem;
        color: #333;
        /* text-decoration: none; */
        /* font-weight: 400; */
        /* border: 1px solid #ddd; */
        /* border-radius: 4px; */
        /* background-color: #fff; */
        transition: all 0.3s ease;
        box-sizing: border-box;
    }
    
    /* メニューテキスト部分 */
    .home-mobile-nav .menu-item-has-children > a {
        justify-content: space-between;
        min-height: 54px;
    }
    
    .home-mobile-nav > li > a:hover {
        background-color: #f8f9fa;
        color: #333 !important;
        text-decoration: none;
    }
    
    /* サブメニューのスタイル */
    .home-mobile-nav .sub-menu {
        list-style: none;
        margin: 0.5rem 0 0 0;
        padding: 0;
        background-color: #f8f9fa;
        border-radius: 4px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0.3s ease;
        pointer-events: auto;
    }
    
    .home-mobile-nav .sub-menu li {
        margin: 0;
    }
    
    .home-mobile-nav .sub-menu a {
        display: block;
        width: 100%;
        padding: 0.1rem 1.7rem;
        color: #666;
        text-decoration: none;
        font-size: 0.9rem;
        border-bottom: 1px solid #e9ecef;
        transition: all 0.3s ease;
        text-align: left;
        pointer-events: auto;
        cursor: pointer;
        z-index: 1;
        position: relative;
    }
    
    .home-mobile-nav .sub-menu a:hover {
        background-color: #e9ecef;
        color: #333 !important;
        text-decoration: none;
    }
    
    .home-mobile-nav .sub-menu li:last-child a {
        border-bottom: none;
    }
    
    /* サブメニューがある項目の矢印 */
    .home-mobile-nav .menu-item-has-children > a::after {
        content: "▼";
        font-size: 0.65rem;
        color: #666;
        display: inline-block;
        transition: transform 0.3s ease;
        vertical-align: middle;
        flex-shrink: 0;
    }
    
    .home-mobile-nav .menu-item-has-children.active > a::after {
        transform: rotate(180deg);
    }
    
    /* ホバーでサブメニュー表示 */
    .home-mobile-navigation .home-mobile-nav .menu-item-has-children:hover > .sub-menu {
        max-height: 200px !important;
        opacity: 1 !important;
        padding: 0.5rem 0 !important;
        visibility: visible !important;
    }
    
    /* クリックでサブメニュー表示（JavaScriptと組み合わせ） */
    .home-mobile-navigation .home-mobile-nav .menu-item-has-children.active > .sub-menu {
        max-height: 200px !important;
        opacity: 1 !important;
        padding: 0.5rem 0 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* タッチフィードバック */
    .home-mobile-nav .menu-item-has-children > a.touching {
        background-color: #e9ecef;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    /* タッチデバイス用のタップ領域拡大 */
    @media (pointer: coarse) {
        .home-mobile-nav > li > a,
        .home-mobile-nav .menu-item-has-children > a {
            min-height: 48px;
            display: flex;
            align-items: center;
            -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        }
    }
}

a {
    
font-weight: 300;
font-style: normal;
}

#about table{
 border: none;
 table-layout: auto;
 /* margin-bottom: 160px; */
}

#about td{
	padding:15px 12px;
	font-size:14px;

    margin-bottom: 20px;
    border: none;
	}
#about th{ 
    padding:15px 12px;
	font-size:14px;

	font-weight:normal;
    border: none;
    text-align: left;
    max-width: 215px;
    min-width: 100px;
	}	
	
#about h1{
	margin-top:42px;
	font-size:16px;

	}
#habout hr{
	margin:15px 0px 15px 0px ;
	
	}	
#about h2{
	margin-top:15px;
	margin-bottom:24px;
	margin-left:-15px;
	font-size:15px;

	}
	
#about h2 span{
	font-size:13px;
	
	}	

#about tr {
    border-bottom: #D4D4D4 solid 1px;
}

#about tbody{
    border: none;
}

/* Bootstrap風サブメニューのスタイル */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

.col-lg-8 {
    width: 66.66666667%;
    float: left;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}

.col-lg-offset-2 {
    margin-left: 16.66666667%;
}

.sub-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    text-align: center;
}

.sub-menu.concept {
    margin-bottom: 50px;
}

.sub-menu li {
    margin: 0 5px;
    position: relative;
}

.sub-menu li a {
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
}

.sub-menu li a:hover {
    color: rgb(36, 35, 35);
    text-decoration: underline;
}

/* 区切り線のスタイル */
.sub-menu li:not(:has(a)) {
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin: 0 10px;
}

/* ドロップダウンメニューのスタイル */
.dropdown-toggle {
    position: relative;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    background-clip: padding-box;
}

.dropdown-menu li {
    margin: 0;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 3px 20px;
    clear: both;
    font-weight: normal;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
    color: #262626;
    text-decoration: none;
    background-color: #f5f5f5;
}

/* ドロップダウンの表示制御 */
.dropdown-toggle:hover + .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

/* WOW アニメーション用のクラス */
.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}

.fadeIn {
    animation-name: fadeIn;
}

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

.mag-bottom-50px {
    margin-bottom: 50px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .col-lg-8 {
        width: 100%;
    }
    
    .col-lg-offset-2 {
        margin-left: 0;
    }
    
    .sub-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .sub-menu li:not(:has(a)) {
        display: none;
    }
}    


.footer-navigation {
    /* margin-top: 80px; */
    /* margin-bottom: 50px; */
    max-width: 960px;
    margin: 80px auto;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    margin: 0;
    padding: 0;
    gap: 1.2rem;
}

ul.footer-nav > li:not(:last-child)::after {
    content: "|";
    margin-left: 1.2rem;
    color: #666;
}

.footer-nav li a {
    color: #3E3E3E;
    text-decoration: none;
}

/* フッターナビゲーションのサブメニュー */
.footer-nav li {
    position: relative;
}

.footer-nav .sub-menu {
    position: absolute;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 180px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    text-align: left;
}

.footer-nav .sub-menu li {
    margin: 0;
    width: 100%;
}


.footer-nav .sub-menu a {
    display: block;
    padding: 6px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.footer-nav .sub-menu a:hover {
    background-color: #f5f5f5;
    color: #333;
}

.footer-nav .sub-menu li:last-child a {
    border-bottom: none;
}

/* フッターメニューのプルダウン表示制御 */
.footer-nav li:hover > .sub-menu {
    display: block;
}

/* フッターメニューの親項目矢印（上向き） */
.footer-nav .menu-item-has-children > a::after {
    content: " ▼";
    color: #666;
    font-size: 8px;
    margin-left: 5px;
}


/* サブメニューがある項目の区切り線調整 */
.footer-nav .menu-item-has-children::after {
    content: "|";
    margin-left: 1.2rem;
    color: #666;
}


#concept {
line-height: 3.4em;
font-size: 13.5px;
}
.concept_name{
text-align: right;

}

/* ポートフォリオ（作品ギャラリー）スタイル */
.portfolio-filter {
    margin: 2rem 0;
    text-align: center;
}

.filter-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.filter-nav a {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-nav a:hover,
.filter-nav a.active {
    background: #3E3E3E;
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.portfolio-item {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}



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

.portfolio-thumbnail {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.portfolio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-thumbnail img {
    transform: scale(1.05);
}

.portfolio-thumbnail.no-image {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #333;
}

.portfolio-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    color: #666;
    flex-direction: column;
}

.portfolio-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #666;
}

.portfolio-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 3px;
    text-decoration: none;
}

.category-tag:hover {
    background: #3E3E3E;
    color: white;
}

/* 個別作品ページ */
.portfolio-single {
    max-width: 970px;
    margin: 0 auto;
}

.portfolio-header {
    margin-bottom: 2rem;
    text-align: center;
}

.portfolio-header .portfolio-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.portfolio-meta-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.meta-table {
    display: grid;
    gap: 0.5rem;
}

.meta-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: #333;
}

.meta-value {
    color: #666;
}

.portfolio-gallery {
    margin: 2rem 0;
}

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

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.portfolio-content {
    margin: 2rem 0;
    line-height: 1.8;
}

.portfolio-content h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #333;
}

.portfolio-blog {
    text-align: center;
    margin: 2rem 0;
}

.portfolio-blog a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3E3E3E;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.portfolio-blog a:hover {
    background: #2c3e50;
}

.portfolio-navigation {
    margin: 3rem 0;
    border-top: 1px solid #eee;
    padding-top: 2rem;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.nav-previous,
.nav-next,
.nav-archive {
    text-align: center;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-links a {
    display: block;
    padding: 1rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background: #e9ecef;
}

.nav-label {
    font-size: 0.9rem;
    color: #666;
    display: block;
    margin-bottom: 0.25rem;
}

.nav-title {
    font-weight: 600;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .filter-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .meta-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .nav-previous,
    .nav-next {
        text-align: center;
    }
}

/* Works List Page Styles */
#works-list {
    background: white;
    min-height: 100vh;
}

#works-list .container {
    max-width: 1200px;
}

#works-list h1 {
    font-size: 18px;
    font-weight: 300;
    color: #333;
    text-align: left;
    margin-bottom: 2rem;
}

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

.works-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.works-table tbody tr:hover {
    background-color: #f8f9fa;
}

.works-table td {
    padding: 8px 12px;
    font-size: 13.2px;
    vertical-align: middle;
    border: none;
}

.works-table td:first-child {
    font-weight: 300;
    min-width: 200px;
}

.works-table td a {
    color: #3E3E3E;
    text-decoration: none;
    transition: color 0.3s ease;
}

.works-table td a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

.works-table td img {
    vertical-align: middle;
}

/* Navigation Menu Styles (works-list specific) */
#works-list #menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
}

#works-list #menu li {
    position: relative;
}

#works-list #menu li a {
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}

#works-list #menu li a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

#works-list .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 120px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#works-list .dropdown-menu li {
    width: 100%;
    margin: 0;
}

#works-list .dropdown-menu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#works-list .dropdown-menu a:hover {
    background-color: #f5f5f5;
}

#works-list .dropdown-toggle:hover + .dropdown-menu,
#works-list .dropdown-menu:hover {
    display: block;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.copy01 {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.mag-bottom-50px {
    margin-bottom: 50px;
}

.mag-bottom-30px {
    margin-bottom: 30px;
}

/* Responsive adjustments for works list */
@media (max-width: 768px) {
    #works-list .col-lg-offset-2 {
        margin-left: 0;
    }
    
    #works-list .col-lg-9,
    #works-list .col-lg-8 {
        width: 100%;
        padding: 0 15px;
    }
    
    .works-table {
        font-size: 12px;
    }
    
    .works-table td {
        padding: 10px 8px;
    }
    
    #works-list #menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    #works-list .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 0.5rem;
    }
    
    .copy01 {
        text-align: center;
        margin-left: 0;
    }
}

/* ギャラリーページスタイル */
#gallery-index {
    background: white;
}

#gallery-index .container {
    /* margin: 160px auto; */
    max-width: 1024px;
}

@media (max-width: 640px) {
    #gallery-index {
        /* max-height: 17vh; */
        height: auto;
        margin-bottom: 2rem;
        min-height: auto;
    }
    #gallery-index .container {
        margin: 10px auto;
        padding: 0 1rem;
    }
}


#gallery-index .gallery-content {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

/* ギャラリーページヘッダー */
.gallery-header {
    padding: 3rem 0 2rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 3rem;
}

.gallery-header .page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.gallery-header .page-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-header .page-description p {
    margin-bottom: 1rem;
}

.gallery-header .page-description p:last-child {
    margin-bottom: 0;
}

/* プリローダー */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#status {
    width: 50px;
    height: 50px;
}

/* ポートフォリオリスト */
.portfolio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-list li {
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.portfolio-list li:hover {

    padding-left: 10px;
}

.portfolio-list li:last-child {
    border-bottom: none;
}

.portfolio-link-item {
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    display: block;
    transition: color 0.3s ease;
    list-style: 1.2em;
    padding: 3px 0;
}


.portfolio-link-item:hover {
    color: #2c3e50;
    text-decoration: underline;
    /* padding: 3px 0; */
}

/* メイン画像表示エリア */
.featured-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 300px;
}

.main-display-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    background: #fff;
}

.main-display-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.concept02 {
    width: 30%;
}

#main-image-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
    min-height: 450px;
    margin: auto;
    width: 78%;
}

#main-image-link {
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* ギャラリーメニュー */
#gallery-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
}

#gallery-menu li {
    position: relative;
}

#gallery-menu li a {
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s ease;
}

#gallery-menu li a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

#gallery-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 120px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#gallery-menu .dropdown-menu li {
    width: 100%;
    margin: 0;
}

#gallery-menu .dropdown-menu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#gallery-menu .dropdown-menu a:hover {
    background-color: #f5f5f5;
}

#gallery-menu .dropdown-toggle:hover + .dropdown-menu,
#gallery-menu .dropdown-menu:hover {
    display: block;
}

/* アニメーション効果 - 一時的に無効化 */
.wow {
    visibility: visible !important;
}

.wow.animated {
    visibility: visible;
}

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

.fadeIn {
    animation-name: fadeIn;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    #gallery-index .col-lg-offset-2 {
        margin-left: 0;
    }
    
    #gallery-index .col-lg-8,
    #gallery-index .col-lg-5,
    #gallery-index .col-lg-7 {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .main-display-image {
        max-height: 300px;
        max-width: 100%;
    }
    
    .featured-image-container {
        text-align: center;
        min-height: 200px;
        padding: 10px 0;
    }
    
    #main-image-container {
        margin-top: 20px;
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    /* ギャラリーコンテンツのモバイルレイアウト */
    #gallery-index .gallery-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* メイン画像を最初に表示 */
    #gallery-index .img-heihei {
        order: 1;
        margin-bottom: 2rem;
    }
    
    /* ポートフォリオリストを2番目に表示 */
    #gallery-index .concept02 {
        order: 2;
        padding: 1rem;
    }
    
    /* メニューを最後に表示 */
    #gallery-index .content {
        order: 3;
    }
    
    #gallery-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    #gallery-menu .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 0.5rem;
    }
    
    .portfolio-list li {
        text-align: center;
        margin-bottom: 10px;
    }
    
    #main-image-container {
        margin-top: 0;
        margin-bottom: 1rem;
    }
    
    /* ギャラリーヘッダー - タブレット */
    .gallery-header {
        padding: 2rem 0 1.5rem 0;
        margin-bottom: 2rem;
    }
    
    .gallery-header .page-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .gallery-header .page-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Swiper Gallery Layout */

/* PC用レイアウト */
.pc-gallery-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 5rem;
}

.portfolio-list-container {
    flex: 0 0 40%;
    max-width: 40%;
}

.pc-image-container {
    flex: 1;
}

.portfolio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-item {
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    padding-left: 10px;
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.portfolio-item.active {
    background-color: #e9ecef;
}

.portfolio-item:last-child {
    border-bottom: none;
}

.portfolio-link-item {
    font-size: 12.6px;
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    display: block;
    /* padding: 8px 0; */
    transition: color 0.3s ease;
}

.portfolio-link-item:hover {
    color: #2c3e50;
    text-decoration: none;
}

/* PC用従来の画像表示 */
.featured-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 300px;
}

.main-display-image {
    max-width: 100%;
    max-height: 460px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    background: #fff;
}

.main-display-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

#main-image-link {
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* PC Swiper フェード効果のスタイル */
.pc-gallery-swiper {
    overflow: hidden;
}

.pc-gallery-swiper .swiper-slide {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.pc-gallery-swiper .swiper-slide-active {
    opacity: 1;
}

/* ギャラリーローディング表示 */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery-loading p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* 画像読み込み中のスタイル */
.gallery-main-image,
.mobile-main-image,
.mobile-thumb-image {
    transition: opacity 0.3s ease;
}

.gallery-main-image:not([src]),
.mobile-main-image:not([src]),
.mobile-thumb-image:not([src]) {
    opacity: 0;
}


/* モバイル用レイアウト */
.mobile-gallery-layout {
    display: none;
    flex-direction: column;
    box-sizing: border-box;
}

.mobile-main-swiper-container {
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
    max-height: 40vh;
    overflow: hidden;
}

.mobile-main-image {
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: contain;
    display: block;
}

.mobile-current-title {
    flex: 0 0 auto;
    text-align: center;
    margin: 0.5rem 0;
    padding: 0 1rem;
    min-height: 2.5rem;
}

.mobile-current-title h3 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #2c3e50;
    margin: 0;
}

/* ギャラリータイトル内のモバイル改行 */
.mobile-current-title h3 br.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-current-title h3 br.mobile-break {
        display: block !important;
    }
}
.mobile-thumbs-container-wrapper {
    flex: 0 0 auto;
    min-height: 320px;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Instagram風3カラムグリッド（通常スクロール対応） */
.mobile-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 0.5rem;
    overflow-y: auto;
    padding-right: 4px; /* スクロールバー用の余白 */
    padding-bottom: 100px; /* 下部に十分な余白を追加（最後の行が見えるように） */
    /* スクロール最適化 */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* グリッドレイアウト設定 - 自然な高さを維持 */
    grid-auto-rows: auto;
    align-content: start;
    /* スクロール領域の設定 */
    box-sizing: border-box;
    /* 高さは内容に応じて自動調整、親の高さに制限されない */
    /* height: 100%; */
    min-height: 100%;
    max-height: none;
    /* スクロールバーのスタイル */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* shadcn/ui風のカスタムスクロールバー（通常スクロール用） */
.mobile-thumbs-grid::-webkit-scrollbar {
    width: 6px;
}

.mobile-thumbs-grid::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.mobile-thumbs-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.mobile-thumbs-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 重複定義は上記の統合されたセレクタに含まれています */

/* 通常スクロール用のフェード効果 */
.mobile-thumbs-container {
    flex: 1;
    min-height: 0;
    overflow: scroll;
     /* flexからblockに変更してグリッドの自然な高さを許可 */
    position: relative;
    height: 100%; /* 親の高さを継承 */
}

.mobile-thumbs-container::after {
    content: '';
    position: sticky;
    display: inline-block;
    /* inset: 0; */
    bottom: -1px;
    left: 0;
    right: 0;
    height: 30px;
    width: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
    opacity: 1; /* 常時表示 */
    transition: opacity 0.3s ease;
    z-index: 1; /* フェード効果を前面に */
}

.mobile-thumb-item {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    /* iOS Safari対応 - 明示的な高さ指定 */
    width: 100%;
    /* 画像読み込み前のレイアウト安定化 */
    background-color: #f5f5f5;
    /* アスペクト比を確実に維持 */
    min-height: 80px;
    max-height: none;
}

/* 空のサムネイルアイテム（グリッド整列用） */
.mobile-thumb-item.mobile-thumb-empty {
    background-color: #f0f0f0 !important;
    cursor: default;
    /* 空のアイテムは薄い灰色で表示してグリッドの整列を維持 */
    opacity: 0.3;
    /* アスペクト比は維持してグリッドの整列を保つ */
    aspect-ratio: 1;
    /* ポインターイベントを無効化 */
    pointer-events: none;
    /* 境界線を薄く表示 */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.mobile-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    /* iOS Safari対応 */
    flex-shrink: 0;
    display: block;
    /* 画像読み込み前の表示安定化 */
    background-color: #f0f0f0;
    min-height: 80px; /* 最小高さを設定してレイアウト崩れを防ぐ */
}

.mobile-thumb-item.active .mobile-thumb-image {
    border-color: #007cba;
    opacity: 0.8;
}

.mobile-thumb-item:hover .mobile-thumb-image {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Swiperを非表示にしてグリッドを使用 */
.mobile-thumbs-swiper {
    display: none;
}

.no-portfolio-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

@media (max-width: 768px) {
    /* ヘッダーロゴのモバイル調整 */
    .header-logo {
        padding: 15px 0;
    }
    
    .header-logo img {
        max-width: 280px;
        width: 75%;
    }
    
    /* モバイルでPCレイアウトを非表示 */
    .pc-gallery-layout {
        display: none;
    }
    
    /* モバイルレイアウトを表示 */
    .mobile-gallery-layout {
        display: block !important;
        padding: 0;
        box-sizing: border-box;
    }
    
    .mobile-main-image {
        max-height: 35vh;
    }
    
    .mobile-current-title h3 {
        font-size: 1rem;
    }
    
    /* サムネイル領域の調整 */
    .mobile-thumbs-container-wrapper {
        margin-bottom: 10px;
    }
    
    /* モバイルでのグリッド調整 */
    .mobile-thumbs-grid {
        gap: 1px;
        /* iOS Safari対応 - より明示的なグリッド設定 */
        grid-auto-rows: auto;
        /* スクロール問題の修正 */
        max-height: none;
        min-height: 0;
    }
    
    .mobile-thumb-image {
        border-width: 1px;
    }
    
    /* iOS Safari対応 - アスペクト比の代替 */
    .mobile-thumb-item::before {
        content: '';
        display: block;
        padding-top: 100%;
    }
    
    .mobile-thumb-item {
        position: relative;
    }
    
    .mobile-thumb-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .mobile-main-image {
        max-height: 30vh;
    }
    
    .mobile-current-title h3 {
        font-size: 12.3px;
    }
    
    .mobile-thumbs-container {
        padding: 0 0.5rem;
    }
    
    .mobile-current-title {
        margin: 0.25rem 0;
    }
    
    /* 小さな画面でのサムネイル領域調整 */
    .mobile-thumbs-container-wrapper {
        min-height: 280px;
        max-height: 350px;
    }
    
    .mobile-gallery-layout {
        padding: 0;
    }
    
    /* 小さな画面でのスクロール余白調整 */
    .mobile-thumbs-grid {
        padding-bottom: 120px; /* より多くの余白を確保 */
    }
}

/* ========================================
   Instagram風シンプルグリッド（モバイル専用）
   ======================================== */
.mobile-thumbs-grid-simple {
    display: none; /* デスクトップでは非表示 */
}

@media (max-width: 768px) {
    /* 既存のモバイルレイアウトを無効化 */
    .mobile-main-swiper-container,
    .mobile-current-title,
    .mobile-thumbs-container-wrapper {
        display: none !important;
    }
    
    /* Instagram風シンプルグリッドを表示 */
    .mobile-thumbs-grid-simple {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
        padding: 0;
        width: 100%;
        margin: 0;
    }
    
    .mobile-grid-item {
        position: relative;
        display: block;
        overflow: hidden;
        aspect-ratio: 1 / 1; /* 正方形を保つ */
        text-decoration: none;
    }
    
    .mobile-grid-image-wrapper {
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: #f0f0f0;
    }
    
    .mobile-grid-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.2s ease;
    }
    
    /* タップ時の視覚的フィードバック */
    .mobile-grid-item:active .mobile-grid-image {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .main-display-image {
        max-height: 250px;
        max-width: 95%;
    }
    
    .featured-image-container {
        min-height: 150px;
        padding: 5px 0;
    }
    
    #main-image-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 5px 0;
    }
    
    .portfolio-list li {
        text-align: left;
        margin-bottom: 8px;
        font-size: 0.9rem;
    }
    
    #gallery-index .mag-bottom-50px {
        margin-bottom: 30px;
    }
    
    /* ギャラリーヘッダー - スマートフォン */
    .gallery-header {
        padding: 1.5rem 0 1rem 0;
        margin-bottom: 1.5rem;
    }
    
    .gallery-header .page-title {
        font-size: 1.8rem;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
    }
    
    .gallery-header .page-description {
        font-size: 0.9rem;
        padding: 0 1.5rem;
    }
    
    /* 小さい画面でのグリッド調整 */
    .mobile-thumbs-grid-simple {
        gap: 1px;
        padding: 0;
    }
}

/* ポートフォリオ詳細ページスタイル */
#portfolio-single {
    background: white;
    min-height: 100vh;
}

/* PC用ポートフォリオレイアウト */
.pc-portfolio-layout {
    display: flex;
    padding: 2rem 0;
}

.pc-portfolio-container {
    display: flex;
    width: 100%;
    gap: 2rem;
}

.pc-portfolio-thumbnails {
    width: 300px;
    flex-shrink: 0;
}

.pc-thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 75px);
    gap: 2px;
    margin-bottom: 2rem;
}

.pc-thumb-item {
    width: 75px;
    height: 75px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border-radius: 0;
}

.pc-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pc-thumb-item:hover img {
    transform: scale(1.05);
}

.pc-thumb-item.active {
    opacity: 0.7;
}

.pc-back-to-gallery {
    text-align: center;
}

.back-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background: #e9ecef;
    text-decoration: none;
}

.pc-portfolio-main {
    flex: 1;
}

.pc-main-image-container {
    margin-bottom: 2rem;
}

.pc-main-image-container img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.pc-portfolio-info {
    padding: 1rem 0;
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 1.6rem;
    line-height: 1.4;
}

/* タイトル内のステータス部分を80%のサイズに */
.portfolio-status {
    font-size: 0.8em;
}

/* ギャラリーページの現在のタイトルでもステータスを80%に */
.mobile-current-title .portfolio-status,
.portfolio-list .portfolio-status {
    font-size: 0.8em;
}

.portfolio-meta {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.55;
}

.meta-item {
    margin-bottom: 0.5rem;
}

/* モバイル用ポートフォリオレイアウト */
.mobile-portfolio-layout {
    display: none;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-portfolio-main-container {
    margin-bottom: 1rem;
}

.mobile-portfolio-main-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 4px;
}

.mobile-portfolio-thumbs-container {
    margin-bottom: 2rem;
}

.mobile-portfolio-thumbs-swiper {
    padding: 0 1rem;
}

.mobile-portfolio-thumbs-swiper .swiper-slide {
    width: auto;
    margin-right: 0.25rem;
}

.mobile-portfolio-thumb-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mobile-portfolio-thumbs-swiper .swiper-slide-thumb-active .mobile-portfolio-thumb-image {
    opacity: 0.7;
}

.mobile-portfolio-info {
    padding: 0 1rem;
}

.mobile-portfolio-info .portfolio-title {
    font-size: 1.2rem;
    margin-bottom: 1.6rem;
}

.mobile-portfolio-info .portfolio-meta {
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.mobile-back-to-gallery {
    text-align: center;
    margin-top: 2rem;
}
.mobile-meta-item-wrapper {

    display: flex;
    gap: 1.2rem;
}
/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* モバイルでPCレイアウトを非表示 */
    .pc-portfolio-layout {
        display: none !important;
    }
    
    /* モバイルレイアウトを表示 */
    .mobile-portfolio-layout {
        display: flex !important;
    }
    
    .mobile-portfolio-main-image {
        max-height: 50vh;
    }
    
    .mobile-portfolio-info .portfolio-title {
        font-size: 1.1rem;
    }
    
    .mobile-portfolio-info .portfolio-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        flex-direction: column;
        gap:0.2rem;
    }

}

@media (min-width: 769px) {
    .mobile-portfolio-info .portfolio-meta {
        font-size: 0.8rem;
        flex-wrap: wrap;
        flex-direction: row;
        
    }
    /* PCでモバイルレイアウトを非表示 */
    .mobile-portfolio-layout {
        display: none !important;
    }

    
    /* PCレイアウトを表示 */
    .pc-portfolio-layout {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .mobile-portfolio-info {
        padding: 0 0.5rem;
    }
    
    .mobile-portfolio-info .portfolio-title {
        font-size: 1rem;
    }
    
    .mobile-portfolio-thumbs-swiper {
        padding: 0 0.5rem;
    }
    
    .mobile-portfolio-thumb-image {
        width: 50px;
        height: 50px;
    }
}

/* スライドショーコンテナ */
.slideshow-container {
    position: relative;
    background: #f9f9f9;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slideshow {
    position: relative;
    display: block;
}

.main-gallery-display {
    display: block;
    text-decoration: none;
}

.main-gallery-display img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* サムネイルギャラリー */
.thumbs {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.thumbs li {
    margin: 0 0 10px 0;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.thumbs li:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.thumbs a.thumb {
    display: block;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thumbs a.thumb img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbs a.thumb:hover img {
    transform: scale(1.1);
}

/* キャプションコンテナ */
.caption-container {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    margin-top: 3rem;
}

.image-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.image-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.image-desc a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.image-desc a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ギャラリーナビゲーション */
#gallery-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

#gallery-nav li a {
    color: #3E3E3E;
    text-decoration: none;
    font-weight: 300;
    padding: 0.5rem 0;
    display: block;
    transition: all 0.3s ease;
}

#gallery-nav li a:hover {
    color: #2c3e50;
    text-decoration: underline;
    transform: translateY(-2px);
}

/* PhotoSwipeカスタマイズ */
.pswp {
    z-index: 1500;
}

.pswp__bg {
    background: rgba(0, 0, 0, 0.85);
}

/* レスポンシブ対応 - ポートフォリオ詳細 */
@media (max-width: 992px) {
    #portfolio-single .col-lg-offset-2,
    #portfolio-single .col-lg-offset-4 {
        margin-left: 0;
    }
    
    #portfolio-single .col-lg-8,
    #portfolio-single .col-lg-4 {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .slideshow-container {
        margin-bottom: 2rem;
    }
    
    .main-gallery-display img {
        max-height: 300px;
    }
    
    .thumbs {
        max-height: 200px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .thumbs li {
        flex: 0 0 calc(25% - 10px);
        margin: 0;
    }
    
    .thumbs a.thumb img {
        max-height: 60px;
    }
}

@media (max-width: 768px) {
    #gallery-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .caption-container {
        padding: 1.5rem 0;
        margin-top: 1.5rem;
    }
    
    .image-title {
        font-size: 1.3rem;
    }
    
    .thumbs li {
        flex: 0 0 calc(33.333% - 10px);
    }
}

@media (max-width: 480px) {
    .main-gallery-display img {
        max-height: 250px;
    }
    
    .thumbs li {
        flex: 0 0 calc(50% - 10px);
    }
    
    .thumbs a.thumb img {
        max-height: 50px;
    }
    
    .image-desc {
        font-size: 0.9rem;
    }
    
    #portfolio-single .mag-bottom-50px,
    #portfolio-single .mag-bottom-30px {
        margin-bottom: 20px;
    }
}


#concept p {
    margin-bottom: 50px;
    text-align: center;
}

#concept .concept_name {
    text-align: right;
    font-size: 14px;
    font-weight: 300;
    margin-top: 80px;
    margin-bottom: 80px;
}

#profile{
    margin-top: 80px;
    margin-bottom: 80px;
}

#profile h2 {
    font-size: 14.5px;
    margin-top: 80px;
    font-weight: 300;
    margin-bottom: 20px;
}

#profile h2 span {
    font-size: 13.2px;
}

#profile p {
    margin:0 2rem;
    margin-bottom: 160px;
    line-height: 1.85em;
}


#fee ul {
    margin-bottom: 160px;
}

#fee li {
    margin-bottom: 10px;
}

#fee li a {
    text-decoration: none;
}   

#fee .list_sub {
    margin-top: 30px;
    margin-left: 0.8rem;
    margin-bottom: 10px;
}

#footer p {
    font-size: 10px;
    color: #666;
    text-align: right;
}

/* ========================================
   ハンバーガーメニュー（モバイル用）
   ======================================== */
/* ホームのモバイル表示時のみ表示  */   
.home-mobile-navigation {
    display: none;
}
@media (max-width: 640px) {
   .home-mobile-navigation {
        display: block;
        position: relative;
        z-index: 1500;
    }
   }

/* homeページ専用メニューボタン（デフォルトは非表示） */
.home-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 300;
    color: #333;
    padding: 10px 0;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.home-menu-toggle:hover {
    color: #2c3e50;
}

.home-menu-toggle:focus {
    outline: none;
}

/* ハンバーガーメニューボタン */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: fixed;
    top: 20px;
    right: 15px;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

/* ハンバーガーメニューが開いた時の×アニメーション */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
}

/* デスクトップメニューをモバイルで非表示 */
.desktop-nav {
    display: block;
}

/* モバイル用ナビゲーション */
.mobile-navigation {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    max-width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding-top: 60px;
    box-sizing: border-box;
}

.mobile-navigation.active {
    right: 0;
}

/* モバイルメニューリスト */
.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav li a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.mobile-nav li a:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

/* サブメニュー */
.mobile-nav .sub-menu {
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: auto;
}

.mobile-navigation .mobile-nav .menu-item-has-children.active .sub-menu {
    max-height: 300px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* モバイルメニューのタッチフィードバック */
.mobile-nav .menu-item-has-children > a.touching {
    background-color: #e9ecef;
    transform: scale(0.98);
    transition: all 0.1s ease;
}

/* タッチデバイス用のタップ領域拡大（モバイルメニュー） */
@media (pointer: coarse) {
    .mobile-nav li a,
    .mobile-nav .menu-item-has-children > a {
        min-height: 54px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}

.mobile-nav .sub-menu li a {
    padding-left: 40px;
    font-size: 14px;
    color: #666;
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1;
    position: relative;
}

.mobile-nav .sub-menu li a:hover {
    background-color: #e9ecef;
    color: #333;
}

/* サブメニュートグルボタン */
.submenu-toggle::after {
    content: '+';
    float: right;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.menu-item-has-children.active .submenu-toggle::after {
    transform: rotate(45deg);
}

/* モバイル用オーバーレイ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* デスクトップ表示（769px以上）でのhomeページ設定 */
@media (min-width: 769px) {
    /* homeページではデスクトップメニューを表示 */
    .page-template-page-home .desktop-nav {
        display: block;
    }
    
    /* homeページではMENUボタンを非表示 */
    .page-template-page-home .home-menu-toggle,
    .home .home-menu-toggle,
    body.page-id-2 .home-menu-toggle,
    #home .home-menu-toggle {
        display: none !important;
    }
}

/* モバイルレスポンシブ */
@media (max-width: 768px) {
    .menu-container {
       margin-top: 20px;
    }
    /* ハンバーガーボタンを表示 */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* homeページではハンバーガーボタンを非表示にしてMENUボタンを表示 */
    .page-template-page-home .mobile-menu-toggle,
    .home .mobile-menu-toggle,
    body.page-id-2 .mobile-menu-toggle,
    #home .mobile-menu-toggle {
        display: none !important;
    }
    
    .page-template-page-home .home-menu-toggle,
    .home .home-menu-toggle,
    body.page-id-2 .home-menu-toggle,
    #home .home-menu-toggle {
        display: block !important;
    }
    
    /* homeページでもデスクトップメニューを非表示（モバイル時） */
    .page-template-page-home .desktop-nav {
        display: none;
    }
    
    /* デスクトップメニューを非表示 */
    .desktop-nav {
        display: none !important;
    }
    
    /* モバイルメニューを表示可能に */
    .mobile-navigation {
        display: block;
    }
    
    /* オーバーレイの基本設定（非表示のまま） */
    .mobile-menu-overlay {
        display: none;
    }
    
    /* homeページではオーバーレイを非表示 */
    .page-template-page-home .mobile-menu-overlay,
    .home .mobile-menu-overlay,
    body.page-id-2 .mobile-menu-overlay,
    #home .mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* ヘッダーロゴの小画面調整 */
    .header-logo {
        padding: 10px 0;
        text-align: left;
    }
    
    .header-logo img {
        max-width: 285px;
        width: 100%;
    }
    
    /* スマートフォンでのメニュー幅調整 */
    .mobile-navigation {
        width: min(280px, 75vw);
        max-width: 280px;
    }
    
    .mobile-nav li a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .mobile-nav .sub-menu li a {
        padding-left: 30px;
        font-size: 13px;
    }
    
    /* スマートフォンでのハンバーガーボタン位置調整 */
    .mobile-menu-toggle {
        top: 15px;
        right: 10px;
        width: 28px;
        height: 28px;
        outline: none;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg);
        outline: none;
    }
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
        outline: none;
    }
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg);
        outline: none;
    }
    
    .hamburger-line {
        width: 28px;
        height: 2.5px;
    }
}


#newbuild h2{
    font-size: 15.8px;
    margin-top: 15px;
    margin-bottom: 25px;
    font-weight: 300;
}

#newbuild li{
    margin-bottom: 10px;
}

hr{
    margin: 25px 0px 25px 0px ;
    border-top: 1px solid #dfdfdf !important;
}

#access li{
    margin-bottom: 10px;
}

#access li:nth-child(even){
    margin-left: 1rem;
    margin-bottom: 2.3rem;
}

#access ul {
    margin: 80px 0px 25px 0px ;
}

/* コンタクト・アクセスページのモーダルフォーム */
.contact-action {
    text-align: center;
    margin: 3rem 0;
}

.contact-modal-trigger {
    display: inline-block;
    /* background: #2c3e50; */
    color: white !important;
    /* padding: 15px 40px; */
    text-decoration: none !important;
    /* border-radius: 8px; */
    /* font-size: 1.1rem; */
    /* font-weight: 500; */
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2); */
}

.contact-modal-trigger:hover {
    /* background: #34495e !important; */
    color: #9cacb1 !important;
    /* transform: translateY(-2px); */
    /* box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3); */
}

/* モーダルオーバーレイ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* モーダルコンテナ */
.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90vw;
    max-height: min(90vh, 100dvh - 2rem);
    display: flex;
    flex-direction: column;
    transform: scale(0.8) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* モーダルヘッダー */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 2rem;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 0.8rem;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

/* モーダルコンテンツ */
.modal-content {
    padding: 1.2rem 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin-top: 3rem;
}

/* フォームスタイル */
.contact-form .form-group {
    margin-bottom: 0.8rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.contact-form .required {
    color: #e74c3c;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    margin: auto;
    padding: 5px 16px;
    border: 1px solid #e9e8e8;
    background-color: rgb(0 0 0 / 5%);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.contact-form textarea {
    height: 120px;
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

/* ハニーポット（スパム対策） */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* フォームアクション */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin: 1rem 0 4rem 0;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e1e8ed;
    background: white;
    flex-shrink: 0;
}

.btn-cancel,
.btn-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-submit {
    background: #2c3e50;
    color: white;
}

.btn-submit:hover:not(:disabled) {
    background: #34495e;
}

.btn-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* ローディング */
.form-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* メッセージ */
.form-message {
    margin-top: 1rem;
    padding: 0;
    font-size: 0.95rem;
    border-radius: 6px;
    min-height: 0;
    transition: all 0.3s ease;
}

.form-message:not(:empty) {
    padding: 12px 16px;
    min-height: 20px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    white-space: pre-line;
}

/* body.modal-open でスクロールを無効化 */
body.modal-open {
    overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-container {
        width: 95vw;
        margin: 1rem;
        max-height: min(95vh, 100dvh - 2rem, calc(100vh - env(keyboard-inset-height, 0px) - 2rem));
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 0 1.5rem 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
    
    .contact-modal-trigger {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98vw;
        margin: 0.5rem;
        max-height: min(98vh, 100dvh - 1rem, calc(100vh - env(keyboard-inset-height, 0px) - 1rem));
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 0 1rem 1rem;
    }
    
    .form-actions {
        padding: 1rem 1rem 1rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
}

/* iOS Safari対応 */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .modal-container {
            max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem);
        }
    }
    
    @media (max-width: 480px) {
        .modal-container {
            max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
        }
    }
}

/* モバイルキーボード表示時の対応 */
@media (max-width: 768px) and (max-height: 500px) {
    .modal-container {
        max-height: 90vh;
        margin: 0.5rem;
    }
    
    .modal-content {
        padding: 0 1rem 1rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
}

/* サブメニュー機能の強化 */

/* デスクトップメニューのサブメニュー */
.main-nav .menu-item-has-children {
    position: relative;
}

.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 200px;
    list-style: none;
    /* padding: 10px 0; */
    margin: 0;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.main-nav .sub-menu li {
    margin: 0;
    padding: 0;
}

.main-nav .sub-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.main-nav .sub-menu a:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

/* ホバーとクリックの両方でサブメニュー表示 */
.main-nav .menu-item-has-children:hover .sub-menu,
.main-nav .menu-item-has-children.active .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* モバイルメニューのサブメニュー（古いルール - 削除済み） */
/* 新しいアニメーション設定は各セクションで個別に定義されています */

.mobile-nav .sub-menu li,
.home-mobile-nav .sub-menu li {
    margin: 0;
    padding: 0;
}

.mobile-nav .sub-menu a,
.home-mobile-nav .sub-menu a {
    display: block;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mobile-nav .sub-menu a:hover,
.home-mobile-nav .sub-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

/* サブメニューアニメーション */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* サブメニュートグルボタンのスタイル */
.submenu-toggle {
    position: relative;
}

.mobile-nav .submenu-toggle::after,
.home-mobile-nav .submenu-toggle::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.mobile-nav .menu-item-has-children.active .submenu-toggle::after,
.home-mobile-nav .menu-item-has-children.active .submenu-toggle::after {
    transform: translateY(-50%) rotate(45deg);
}

/* デスクトップメニューのトグルボタン */
.main-nav .submenu-toggle::after {
    content: '▼';
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.main-nav .menu-item-has-children.active .submenu-toggle::after {
    transform: rotate(180deg);
}

/* ========================================
   Instagram Links in Footer (Desktop only)
   ======================================== */
.instagram-links {
    text-align: right;
    margin-bottom: 15px;
    margin-top: 20px;
}

.instagram-links a {
    display: inline-block;
    margin-left: 12px;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    transition: opacity 0.3s ease;
}

.instagram-links a:hover {
    opacity: 0.7;
}

.instagram-links a:visited {
    color: #999 !important;
}

.instagram-links img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 3px;
    opacity: 0.6;
}

.instagram-links span {
    vertical-align: middle;
}

/* モバイルでフッターのInstagramリンクを非表示 */
@media (max-width: 768px) {
    .instagram-links {
        display: none;
    }
}

/* ========================================
   Instagram Links in Mobile Menu
   ======================================== */
.mobile-instagram-links {
    display: none; /* デスクトップでは非表示 */
}

@media (max-width: 768px) {
    .mobile-instagram-links {
        display: block;
        padding: 20px 0 10px;
        margin-top: 20px;
        border-top: 1px solid #e0e0e0;
        text-align: center;
    }
    
    .mobile-instagram-links a {
        display: block;
        padding: 10px 0;
        text-decoration: none;
        color: #505159;
        font-size: 13.2px;
        transition: opacity 0.3s ease;
    }
    
    .mobile-instagram-links a:hover {
        opacity: 0.7;
    }
    
    .mobile-instagram-links a:visited {
        color: #505159 !important;
    }
    
    .mobile-instagram-links img {
        width: 20px;
        height: 20px;
        vertical-align: middle;
        margin-right: 5px;
    }
    
    .mobile-instagram-links span {
        vertical-align: middle;
    }
}

/* ========================================
   Works List Page Styles
   ======================================== */
/* 共通スタイル */
#works-list .works-list-container {
    margin: 20px;
}

#works-list .work-row {
    border-bottom: 1px solid #eee;
}

#works-list .work-title a {
    color: #333;
    text-decoration: none;
}

#works-list .work-title a:hover {
    color: #666;
}

#works-list .portfolio-status {
    display: inline-block;
    font-size: 0.8em;
    padding: 2px 0;
    margin-left: 8px;
    vertical-align: middle;
    color: #666;
}

/* PC用スタイル（768px以上） */
@media (min-width: 768px) {
    /* ヘッダー行とデータ行を横並びにする */
    #works-list .works-header,
    #works-list .work-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
    }

    /* Bootstrapのfloatを無効化 */
    #works-list .works-header > [class*='col-'],
    #works-list .work-row > [class*='col-'] {
        float: none;
        box-sizing: border-box;
    }

    /* 各列の幅を明示的に指定 */
    #works-list .works-header > .col-md-4,
    #works-list .work-row > .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    #works-list .works-header > .col-md-3,
    #works-list .work-row > .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    #works-list .works-header > .col-md-2,
    #works-list .work-row > .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    #works-list .works-header > .col-md-1,
    #works-list .work-row > .col-md-1 {
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    #works-list .works-header {
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
        margin-bottom: 0;
        font-size: 13px;
        font-weight: bold;
        letter-spacing: 0.05em;
    }

    /* ヘッダーとデータ行の列を完全に揃える */
    #works-list .works-header > div,
    #works-list .work-row > div {
        padding-left: 15px;
        padding-right: 15px;
    }

    #works-list .work-row {
        padding: 12px 0;
        transition: background-color 0.3s ease;
    }

    #works-list .work-row:hover {
        background-color: #f9f9f9;
    }

    #works-list .work-title {
        font-size: 13.2px;
        font-weight: normal;
        line-height: 1.6;
    }

    #works-list .work-meta {
        font-size: 13.2px;
        color: #505159;
        line-height: 1.6;
    }

    #works-list .work-meta-item {
        display: inline;
        margin: 0;
    }
}

/* モバイル用スタイル（767px以下） */
@media (max-width: 767px) {
    #works-list .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    #works-list .works-header {
        display: none !important;
    }

    #works-list .work-row {
        display: block !important;
        padding: 15px 0;
        position: relative;
        flex-wrap: wrap !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* モバイルでは各列のflex設定をリセット */
    #works-list .work-row > [class*='col-'] {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        float: none !important;
    }

    #works-list .work-title {
        margin-bottom: 5px;
        font-size: 16px;
        padding-right: 30px;
        padding-left: 0;
        font-weight:normal;
    }

    #works-list .work-meta {
        font-size: 12px;
        color: #888;
        margin-bottom: 2px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #works-list .work-meta-item {
        display: inline-block;
        margin-right: 10px;
    }

    /* ブログアイコンを右上に絶対配置 */
    #works-list .work-meta.icon-col {
        position: absolute !important;
        top: 18px;
        right: 0;
        width: auto !important;
        max-width: none !important;
        margin: 0;
        padding: 0 !important;
    }
}

/* Mail Button */
.mail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #505159;
    background-color: transparent;
    color: #505159;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13.2px;
    font-family: "a-otf-ud-reimin-pr6n", sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mail-button:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('http://xs982438.xsrv.jp/test/wp-content/themes/morita/images/mail.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

}

.mail-button:hover {
    background-color: #505159;
    color: #ffffff;
    text-decoration: none;
}

.mail-button:hover:before {
    filter: invert(1);
}

.mail-button:visited {
    color: #505159;
}

.mail-button:hover:visited {
    color: #ffffff;
}

/* Works List - Photo Icon */
.photo-icon {
    display: inline-block;
    margin-left: 8px;
    color: #878787;
    vertical-align: middle;
    line-height: 1;
    transition: all 0.3s ease;
}

.photo-icon svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.work-link-with-gallery {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
}

.work-link-with-gallery:hover {
    color: #505159;
    text-decoration: none;
}

.work-link-with-gallery:hover .photo-icon {
    opacity: 0.7;
}

.work-link-no-gallery {
    color: #878787;
    cursor: default;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .photo-icon {
        margin-left: 6px;
        margin-bottom:4px;
    }
    
    .photo-icon svg {
        width: 17px;
        height: 17px;
    }
}

/* ドロップダウンメニューのページトップ移動を防ぐ */
.submenu-toggle {
    cursor: pointer;
}

.submenu-toggle:focus {
    outline: none;
}

/* ハッシュリンクによるスクロールを無効化 */
html {
    scroll-behavior: auto;
}

/* サブメニューのホバー・アクティブ状態の改善 */
.menu-item-has-children > .submenu-toggle:hover,
.menu-item-has-children > .submenu-toggle:focus,
.menu-item-has-children.active > .submenu-toggle {
    text-decoration: none;
}

/* 写真クレジットのスタイル */
.photo-credit {
    display: block;
    width: 100%;
    color: #666;
    font-size: 0.9em;
    margin-top: 0.5em;
    margin-bottom: 0.8em;
    line-height: 1.4;
}

.photo-credit p {
    margin: 0;
    line-height: 1.4;
}

.photo-credit p + p {
    margin-top: 0.3em;
}

.photo-credit a {
    color: #666;
    text-decoration: underline;
}

.photo-credit a:hover {
    color: #333;
    text-decoration: none;
}

/* 抜粋コンテンツのスタイル */
.excerpt-content {
    display: block;
    width: 100%;
    margin-top: 0.5em;
    line-height: 1.5;
}

header{
    position: relative;
    width: 100%;
	min-height:60px;
    /* inset:0; */
}
main{
    position:relative
}
#top{
    display: flex;
    flex-direction: column;
    justify-content:center;
    /* align-items:center; */
    min-height: calc(100Vh - 100px);
}

footer{
    position: absolute;
    /* height:100%; */
    width:100%;
    bottom: 8px;
}
#about{
    margin-top:45px;
    margin-bottom:80px;
}
article{
    padding-bottom:2rem;
}

#page-30,#page-32,#page-40,#page-42,#page-38,#page-20{
    padding-bottom:5rem;
}

/* Instagramアイコン付きメニュー */
.menu-insta-icon a::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23505159'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* モバイル版でのInstagramアイコン調整 */
@media (max-width: 768px) {
    .menu-insta-icon a::before {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
}

/* ドロップダウンメニューの位置調整（PC版） */
@media (min-width: 769px) {
    .main-navigation .menu-item-has-children {
        position: relative;
    }
    
    .main-navigation .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999;
        min-width: 200px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border: 1px solid #e0e0e0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    /* ドロップダウンが画面下部で見切れる場合は上向きに表示 */
    .main-navigation .menu-item-has-children:hover .sub-menu,
    .main-navigation .menu-item-has-children:focus-within .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* 画面下部での上向き表示 */
    .main-navigation .menu-item-has-children.dropup .sub-menu {
        top: auto;
        bottom: 100%;
        transform: translateY(10px);
    }
    
    .main-navigation .menu-item-has-children.dropup:hover .sub-menu,
    .main-navigation .menu-item-has-children.dropup:focus-within .sub-menu {
        transform: translateY(0);
    }
    
    .main-navigation .sub-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation .sub-menu li:last-child {
        border-bottom: none;
    }
    
    .main-navigation .sub-menu a {
        display: block;
        padding: 12px 20px;
        color: #505159;
        text-decoration: none;
        font-size: 13px;
        transition: all 0.2s ease;
    }
    
    .main-navigation .sub-menu a:hover {
        background-color: #f8f8f8;
        color: #333;
    }
}
.main-menu-title {
    display: flex;
    align-items: center;
    font-size: 1.025em;
}

/* メインメニュータイトル装飾 */
.main-menu-title::after {
    content: "｜";
    margin-left: 0.5rem;
    color: #666;
    font-weight: normal;
}

/* モバイル表示時は長いダッシュに変更 */
@media (max-width: 768px) {
    .main-menu-title::after {
  border-top: 1px solid #ccc;
  content: "";
  width: 38px;
  }
}