:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ffffff;
    --accent-color: #0099ff;
    --text-color: #cccccc;
    --bg-light: #2c2c2c;
}

body {
    margin: 0;
    /* さわらび明朝に変更 */
    font-family: 'Sawarabi Mincho', serif; 
    
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-contact {
    display: none;
}

.header-contact span {
    display: block;
    font-weight: 400;
}

.header-contact a {
    display: block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.header-contact a:hover {
    color: var(--accent-color);
}

.logo {
    font-family: 'Montserrat', 'Sawarabi Mincho', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: block;
    line-height: 1;
}

.logo-reading {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1;
}

.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.nav li {
    margin-left: 30px;
}

.nav a {
    font-family: 'Sawarabi Mincho', serif;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 400;
    font-size: 16px;
    position: relative;
    padding-bottom: 5px;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* ヘッダー右側 */
.header-right-items {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-info {
    font-family: 'Sawarabi Mincho', serif;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
}

.header-info span {
    display: block;
    font-weight: 400;
    white-space: nowrap;
}

.header-info-insta a {
    display: block;
    line-height: 0;
}

.header-info-insta img {
    height: 28px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.header-info-insta a:hover img {
    opacity: 0.7;
}

.mobile-nav-toggle {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}
.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: slideshow 24s infinite;
}

.hero-slideshow .slide:nth-child(1) { animation-delay: 0s; }
.hero-slideshow .slide:nth-child(2) { animation-delay: 6s; }
.hero-slideshow .slide:nth-child(3) { animation-delay: 12s; }
.hero-slideshow .slide:nth-child(4) { animation-delay: 18s; }

@keyframes slideshow {
    0%   { opacity: 0; transform: scale(1.05); }
    8.3% { opacity: 0.4; }
    25%  { opacity: 0.4; }
    33.3%{ opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

.hero-video {
    display: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    color: var(--secondary-color);
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 6vw;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.1em;
    text-shadow: 0 0 15px rgba(0,0,0,0.7);
    -webkit-text-stroke: 1px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

/* Section */
.section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #1a1a1a;
}

.bg-light {
    background-color: #ffffff;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0;
    font-weight: 700;
    color: #1a1a1a;
}

.section-subtitle {
    text-align: center;
    margin-top: 0;
    margin-bottom: 60px;
    color: #333333;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background-color: #f9f9f9;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 20px;
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #222222;
}

.card p {
    margin: 0;
    font-size: 0.9rem;
    color: #333333;
}

/* Button */
.btn-wrapper {
    text-align: center;
    margin-top: 50px;
}

.btn {
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.btn-wrapper .btn,
.about-text .btn {
    display: inline-block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: default;
    width: auto;
}

.btn-wrapper .btn a,
.about-text .btn a {
    display: inline-block;
    line-height: 0;
}
.btn-wrapper .btn a img,
.about-text .btn a img {
    display: block;
    margin: 0;
    padding: 0;
    transition: filter 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 0 0 rgba(0, 153, 255, 0));
}
.btn-wrapper .btn a:hover img,
.about-text .btn a:hover img {
    filter: drop-shadow(0 0 12px var(--accent-color)) brightness(1.1);
    transform: translateY(-2px);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}
.about-text {
    flex: 1;
}
.about-image {
    flex: 1;
}
.about-image img {
    width: 100%;
    height: auto;
}
.about-text h3 {
    font-size: 2rem;
    color: #222222;
    margin-bottom: 20px;
}
.about-text p {
    color: #333333;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #dddddd;
    background-color: #ffffff;
    color: #333333;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-content p {
    margin: 0;
    line-height: 1.2;
}

.footer-content p:nth-child(2) {
    order: -1;
}

.footer-content p:nth-child(5) {
    order: 1;
}

.footer-content img {
    height: auto;
    display: block;
}

.footer .logo {
    font-size: 20px;
    margin-bottom: 0;
    display: block;
    color: #1a1a1a;
}

.copyright {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #555555;
}

/* フッター内のリンクスタイル */
.copyright .footer-link {
    color: #555555;        /* 著作権表示と同じグレー */
    text-decoration: none; /* 下線を消す */
    transition: color 0.3s ease;
}

.copyright .footer-link:hover {
    color: var(--accent-color); /* ホバー時はアクセントカラー（青） */
}


/* Works Page Styles */

/* 検索ボックスのスタイル */
.search-container {
    text-align: center;
    margin-bottom: 30px; /* フィルターボタンとの間隔 */
}

#search-input {
    width: 90%;
    max-width: 500px;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #eeeeee;
    border-radius: 30px; /* ボタンに合わせて丸く */
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Sawarabi Mincho', serif; /* フォント合わせ */
    background-color: #f9f9f9;
    color: #333;
}

#search-input:focus {
    border-color: var(--accent-color); /* フォーカス時に青枠に */
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 153, 255, 0.1);
}

/* フィルターボタン（タグスタイルに変更） */
.filter-nav {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* ボタン同士の間隔を少し広げる */
}

.filter-btn {
    font-family: 'Sawarabi Mincho', serif;
    background-color: #f0f0f0; /* 背景を薄いグレーに（枠線ではなく塗りつぶし） */
    border: none; /* 枠線を削除 */
    border-radius: 30px; /* 丸みをつけて「タグ」のような形状に */
    color: #555555; /* 文字色を少し濃く */
    padding: 10px 24px; /* サイズを少し大きくして押しやすく */
    cursor: pointer;
    transition: all 0.3s ease; /* アニメーション設定 */
    font-size: 0.95rem;
    font-weight: 600; /* 文字を少し太く */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* うっすら影をつけて立体感を出す */
}

/* ホバー時の挙動 */
.filter-btn:hover {
    background-color: #e0e0e0; /* ホバー時は少し濃いグレーに */
    transform: translateY(-2px); /* 少し浮き上がる */
}

/* 選択中（Active）のデザイン */
.filter-btn.active {
    background-color: var(--accent-color); /* 青色背景 */
    color: #ffffff; /* 白文字 */
    box-shadow: 0 4px 10px rgba(0, 153, 255, 0.3); /* 青色の影 */
    transform: translateY(-2px);
}

.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.car-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-top: 3px solid var(--accent-color);
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.car-item.hide {
    display: none;
}

.car-item.load-hidden {
    display: none;
}

.gallery {
    margin-bottom: 25px;
}

.main-image {
    width: 100%;
    max-width: 80%;
    margin: 0 auto 15px auto;
    border: 1px solid #ddd;
    background-color: #000;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 80%;
    margin: 0 auto;
}

.thumbnails .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.thumbnails .thumb:hover {
    opacity: 1;
    border-color: #aaa;
}

.thumbnails .thumb.active {
    opacity: 1;
    border-color: var(--accent-color);
}
/* ▼▼▼ 追加: スマホ用パン（横移動）アニメーション定義 ▼▼▼ */
@keyframes slideshow-pan {
    0% {
        opacity: 0;
        background-position: 0% 50%; /* 開始：左端 */
    }
    8.3% {
        opacity: 0.4; /* フェードイン完了（元の設定値に準拠） */
    }
    25% {
        opacity: 0.4; /* 表示維持 */
    }
    33.3% {
        opacity: 0;
        background-position: 100% 50%; /* 終了：右端まで移動してフェードアウト */
    }
    100% {
        opacity: 0;
        background-position: 100% 50%;
    }
}
/* ▲▲▲ 追加ここまで ▲▲▲ */
/* Responsive & Mobile Styles */
@media (max-width: 768px) {
    .header-right-items {
        display: none;
    }
    
    .nav {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
        background: none;
        border: 1px solid var(--secondary-color);
        color: var(--secondary-color);
        padding: 10px;
        cursor: pointer;
    }
    
    .header-contact {
        display: none;
    }
    
    .hero h1 {
        font-size: 10vw;
    }
    .hero p {
        font-size: 1rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .about-content {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-content p:nth-child(2),
    .footer-content p:nth-child(5) {
        order: initial;
    }

    /* モバイルメニュー展開時 */
    .header-right-items.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 30px 0;
        z-index: 1000;
        border-top: 1px solid #444;
    }

    .header-right-items.active .nav {
        display: block;
        margin-bottom: 30px;
    }

    .header-right-items.active .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .header-right-items.active .nav li {
        margin: 0;
    }
    
    .header-right-items.active .nav a {
        font-size: 1.2rem;
    }

    .header-right-items.active .header-info {
        text-align: center;
        color: #cccccc;
        margin-bottom: 20px;
    }
    
    .header-right-items.active .header-info-insta {
        text-align: center;
    }
    
    .header-right-items.active .header-info-insta img {
        margin: 0 auto;
    }

    /* ▼▼▼ 制作例ページ（Works）のスマホ最適化 ▼▼▼ */
    /* 1. コンテナと枠の余白を縮小 */
    .container {
        padding: 0 15px;
    }
    .works-grid {
        gap: 30px; /* 車両ごとの間隔を詰める */
    }
    .car-item {
        padding: 15px; /* カード内の余白を減らして画像を大きく */
    }

    /* 2. 画像の幅制限（80%）を解除して画面幅一杯（100%）に */
    .main-image, 
    .thumbnails {
        max-width: 100%; 
    }

    /* 3. サムネイルを6列→4列に変更して、1つ1つを大きく表示 */
    .thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px; /* 隙間を微調整 */
    }
    
    .main-image {
        margin-bottom: 10px;
    }
	/* ▼▼▼ スマホ表示時のヒーロー画像設定（パン動作） ▼▼▼ */
    .hero-slideshow .slide {
        /* 画像を画面枠で切り取らず、高さを合わせて横にはみ出させる */
        background-size: auto 100%; 
        /* PC用のアニメーション名を、スマホ用のパンアニメーション名に変更 */
        animation-name: slideshow-pan;
    }
}