/* リセットと基本スタイル */
@import url('https://cdn.jsdelivr.net/npm/noto-sans-jp@4.0.0/css/noto-sans-jp.min.css');
/* フォントのフォールバック設定 */
:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #0D47A1;
    --background-color: #f9f9f9;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --white: #fff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    background-color: #555;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #0D47A1;
}

/* ヘッダー */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none !important;
    color: inherit;
    display: inline-block;
}

.logo-link:hover,
.logo-link:focus,
.logo-link:active {
    text-decoration: none !important;
    color: inherit;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 15px;
}

.nav-links a.active {
    color: #0D47A1;
    font-weight: 700;
}

.nav-links a:hover {
    color: #2196F3;
}



.nav-links a:hover {
    color: #666;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
}

/* メインビジュアル */
.main-visual {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* 背景图片容器 */
.bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    animation: slowPan 30s ease-in-out infinite alternate;
    z-index: 0;
}

/* 背景缓慢移动动画 */
@keyframes slowPan {
    0% {
        transform: translate(-10%, -10%) scale(1.2);
    }
    100% {
        transform: translate(0, 0) scale(1.3);
    }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slider-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 0 20px;
    color: #fff;
    z-index: 10;
}

.slider-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: block;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
}

.slider-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: block;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
    max-width: 90%;
    margin: 0 auto 30px;
}

.slider-content .btn {
    display: inline-block;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 500;
    max-width: 200px;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slider-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slider-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slider-content .btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-weight: 500;
}

.slider-content .btn:hover {
    background-color: #fff;
}

/* 会社概要 */
.about {
    padding: 100px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.about-image,
.company-image {
    flex: 1;
    min-width: 300px;
}

.about-image img,
.company-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 実績紹介 */
.works {
    padding: 100px 0;
    background-color: #f9f9f9;
    margin-top: 100px;
}

.work-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 -10px;
}

.work-item {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px 30px;
}

.work-item .project-gallery {
    width: 100%;
}

.work-item .project-gallery .main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .work-item {
        flex: 0 0 100%;
        margin: 0 10px 30px;
    }
}

.work-category {
    margin-bottom: 60px;
}

.work-category h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    border-left: 4px solid #0D47A1;
    padding-left: 15px;
}

.work-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.work-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.work-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.work-item:hover {
    transform: translateY(-5px);
}

.work-images {
    display: block;
    padding: 0;
    height: auto;
}

.work-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

/* スマホ用レスポンシブ調整 */
@media (max-width: 576px) {
    .work-image {
        height: 200px;
    }
}

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

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

.work-info {
    padding: 20px;
}

.work-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.work-info p {
    font-size: 14px;
    color: #666;
}

/* お問い合わせ */
.about {
    padding: 100px 0;
    background-color: #fff;
    margin-top: 100px;
}

/* お問い合わせ */
.contact {
    padding: 50px 0;
    background-color: #f9f9f9;
    margin-top: 100px;
}

/* モバイルデバイスでのデフォルト間隔の復元 */
@media (max-width: 768px) {
    .contact,
    .about,
    .works {
        margin-top: 0;
    }
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.contact-info p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

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

/* フッター */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo h2 {
    font-size: 24px;
    margin: 0;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: #ddd;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    margin-top: 30px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
    width: 100%;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links ul {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
}

/* 合并自根目录style.css的样式 */
:root {
    --primary-color: #333;
    --secondary-color: #777;
    --accent-color: #0088cc;
    --background-color: #f9f9f9;
    --white: #fff;
    --black: #000;
    --light-gray: #e0e0e0;
    --medium-gray: #888;
    --dark-gray: #444;
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

/* カテゴリーナビゲーションスタイル */
.category-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px 10px 0;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
}

.category-link:hover,
.category-link.active {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

/* アニメーション効果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* お問い合わせページのレスポンシブ対応 */
@media (max-width: 768px) {
    .contact {
        padding-top: 100px;
    }
}

.work-item {
    animation: fadeIn 0.6s ease-out;
    position: relative;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* グリッドレイアウト */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* ワークアイテムの内部構造 */
.work-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.work-item img {
    width: 100%;
    height: auto;
    display: block;
}

.work-item .main-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.work-item .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.work-item .main-image:hover img {
    transform: scale(1.05);
}

/* project-gallery スタイル */
.work-item .project-gallery {
    position: relative;
    overflow: hidden;
}

/* work-info スタイル */
.work-item .work-info {
    padding: 20px;
}

.work-item h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.work-item .project-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.work-item .project-details p {
    margin: 5px 0;
}

/* サムネイルスタイル */
.thumbnails {
    display: flex;
    overflow-x: auto;
    padding: 15px;
    gap: 10px;
    background-color: var(--background-color);
    scrollbar-width: thin;
    scrollbar-color: var(--medium-gray) var(--light-gray);
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}

.thumbnails::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 3px;
}

.thumbnail {
    width: 75px !important;
    height: 75px !important;
    max-width: 75px !important;
    max-height: 75px !important;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    background-color: #fff;
    opacity: 0.8;
    flex-shrink: 0;
    object-fit: cover !important;
    display: block !important;
    transition: all 0.2s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #333 !important;
    opacity: 1 !important;
}

/* カテゴリーナビゲーションスタイル */
.category-nav {
    margin: 20px 0 30px 0;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.category-nav li {
    margin: 0;
}

.category-link {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-link:hover {
    color: #2196F3;
    background-color: #f0f7ff;
    text-decoration: none;
}

.category-link.active {
    color: #fff;
    background-color: #2196F3;
    border-color: #1976D2;
}

/* カテゴリーコンテナスタイル */
.work-category {
    margin-bottom: 50px;
}

.work-category h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8rem;
    padding-bottom: 10px;
    /*border-bottom: 2px solid #0D47A1;*/
}

/* ワークアイテムコンテナ */
.work-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* モーダルビュースタイル */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    cursor: pointer;
}

.modal-backdrop img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1051;
}

.modal-close:hover {
    color: var(--light-gray);
    transform: scale(1.1);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .category-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .category-link {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .work-item .main-image img {
        height: 200px;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .work-item .content {
        padding: 15px;
    }
    
    .work-category h2 {
        font-size: 1.5rem;
    }
    
    .work-item h3 {
        font-size: 1.1rem;
    }
}

/* スピンナーアニメーション */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1100;
}

/* ノープロジェクト表示 */
.no-projects {
    text-align: center;
    padding: 50px 20px;
    color: var(--secondary-color);
    font-size: 1.1rem;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    margin-top: 20px;
}

/* ホバーエフェクトの強化 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .slider-content h2 {
        font-size: 32px;
    }
    .slider-content p {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 15px 0;
        min-width: 280px;
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* モバイルメニューの背景マスク */
    .menu-mask {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .menu-mask.active {
        display: block;
        animation: fadeInMask 0.3s ease;
    }

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

    .nav-links li {
        margin: 0;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }

    .nav-links a {
        font-size: 16px;
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: block !important;
        position: relative;
        z-index: 1001;
        margin-left: auto;
        padding: 10px;
        width: 48px;
        height: 48px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Font Awesomeアイコン表示の修正 */
    .menu-toggle i,
    .menu-toggle .menu-icon {
        color: #333 !important;
        font-size: 28px;
        font-weight: normal;
        display: block !important;
    }

    .slider-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

    .slider-content p {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
    }

    .slider-content h2 {
        font-size: 30px;
    }

    .slider-content p {
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links ul {
        margin-top: 20px;
    }
}

/* 読み込み中のスタイル */
.loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.loading::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}