/* style.css - モバイルファースト版 (簡素化とテキスト左寄せ修正済み) */
:root {
    --main-color: #009999;
    --sub-color: #666666;
    --text-color: #000;
    --bg-color: #fff;
    --card-bg: #f8f8f8;
    --footer-bg: #333;
    --footer-text: #fff;
}

/* ----------------------------------------------------------------- */
/* 1. ベーススタイル (モバイルファースト - すべての画面に適用)        */
/* ----------------------------------------------------------------- */

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
}

/* HEADER (Mobile Default) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--main-color);
}

header.scrolled {
    height: 65px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--main-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* MOBILE NAVIGATION */
.menu-toggle {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    margin-left: 10px;
    order: 2;
}

nav {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    background: white;
    display: none;
    box-sizing: border-box;
    border-top: 1px solid #ddd;
}

nav.open {
    display: block;
    padding: 0;
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

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

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

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    padding: 12px 20px;
}

nav a:hover {
    color: var(--main-color);
    background: #f0f0f0;
}

.lang-switch {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
}

.lang-switch button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sub-color);
}

.lang-switch button.active {
    color: var(--main-color);
}

/* HERO */
.hero {
    height: 500px;
    background-image: url('../images/06224.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 40px;
}

.hero button {
    background: var(--main-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.hero button:hover {
    background: #007777;
}

/* Sections */
section {
    padding: 5px 20px;
    max-width: 1200px;
    margin: 0 auto;
    /* 修正: モバイルのテキストを左寄せに設定 */
    text-align: left;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    /* 修正: h2も左寄せに設定 */
    text-align: left;
}

p {
    font-size: 1rem;
    margin-bottom: 20px;
    /* 修正: pタグも左寄せに設定 */
    text-align: left;
}

/* --- NEWS & HISTORY (背景色: 白, 構造: タイトルと説明のみ) --- */
.columnpics {
    width: 300px;
    height: auto;
}

.profilepics {
    width: 300px;
    height: auto;
}

#news,
#history {
    background-color: var(--bg-color);
}

.coming-soon-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--main-color);
}

.coming-soon-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--main-color);
}


/* WORKS Grid (Mobile Default) */
.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.work-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    text-align: left;
}

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

.work-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.work-card h3 {
    font-size: 1.1rem;
    margin: 15px 15px 5px;
    color: var(--main-color);
}

.work-card p {
    font-size: 0.9rem;
    padding: 0 15px 15px;
    margin: 0;
}

/* ----------------------------------------------------------------- */
/* SERVICES DETAIL (業務内容詳細)                                    */
/* ----------------------------------------------------------------- */

.service-details {
    margin-top: 30px;
}

.minilab-description {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--main-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.service-details h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-top: 25px;
    margin-bottom: 10px;
    padding-left: 0;
}

.service-details ul {
    list-style-type: none;
    /* リストの点を非表示 */
    padding-left: 0;
    margin-bottom: 25px;
}

.service-details ul li {
    /* チェックマークSVGを挿入 - data URIはURLエンコードされている必要があります */
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="%23009999" d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>') no-repeat left 8px;
    background-size: 14px;
    padding-left: 25px;
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 1rem;
}

.service-details ul.guide-list li {
    background: none;
    /* 製作費目安はチェックマークなし */
    padding-left: 0;
    margin-bottom: 5px;
    font-weight: bold;
}


/* ----------------------------------------------------------------- */
/* PRODUCT (複数画像対応)                                             */
/* ----------------------------------------------------------------- */

.product-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.product-item {
    text-align: center;
    max-width: 100%;
    cursor: pointer;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.product-item-image {
    height: auto;
    width: 300px;
    /* ★重要: 画像の高さを固定 (モバイル) */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    /* アスペクト比を維持し、指定した高さ内に収める */
    display: block;
    margin: 0 auto;
}

.product-item-caption {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 8px;
    padding: 0 5px;
    text-align: center;
}

.products-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.products-image {
    width: auto;
    height: 300px
}

.product-text {
    font-weight: 700;
    color: var(--main-color);
}

.product-test-text {
    display: flex;
    justify-content: center;
}

video {
    display: flex;
    width: 100%;
    margin: 0 auto;
}

/* --- VIDEOS --- */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 30px auto 10px;
    max-width: 800px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#videoCaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--sub-color);
    margin-top: 10px;
}


/* MODAL (省略) */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

#modalCaption {
    text-align: center;
    color: #ccc;
    margin: 10px 0;
}

#modalClose {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.button-style {
    background: var(--main-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.button-style:hover {
    background: #007777;
}

/* FOOTER (Mobile Default) */
#footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 20px;
    /* フッター全体は中央寄せを維持 */
    text-align: center;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

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

#footerSiteLogo {
    font-size: 1.2rem;
    font-weight: bold;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--main-color);
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

/* SCROLL TO TOP BUTTON (Mobile Default) */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--main-color);
    color: white;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, opacity 0.3s;
    line-height: 0;
}

#scrollToTopBtn:hover {
    background-color: #007777;
}


/* ----------------------------------------------------------------- */
/* 2. タブレット以上 (Tablet: 768px - スタイルを上書き)              */
/* ----------------------------------------------------------------- */
@media (min-width: 768px) {

    /* HEADER */
    header {
        height: 80px;
        padding: 0 40px;
    }

    .logo-img {
        height: 60px;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* NAVIGATION */
    .menu-toggle {
        display: none;
    }

    nav {
        position: static;
        display: flex !important;
        flex-direction: row;
        width: auto;
        border-top: none;
        background: none;
    }

    nav ul {
        flex-direction: row;
        gap: 20px;
        padding: 0;
    }

    nav ul li {
        border-bottom: none;
    }

    nav a {
        padding: 0;
        background: none;
        font-size: 1rem;
    }

    /* HERO */
    .hero {
        height: 600px;
        padding: 0 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    /* SECTIONS */
    section {
        padding: 40px 40px;
        text-align: left;
    }

    h2,
    p {
        text-align: left;
    }

    /* WORKS Grid */
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    /* PRODUCT */
    .product-item-image {
        height: 250px;
        /* タブレットで高さを調整 */
    }

    /* FOOTER */
    .footer-nav ul {
        flex-direction: row;
        gap: 20px;
    }
}


/* ----------------------------------------------------------------- */
/* 3. デスクトップ以上 (Desktop: 1024px - スタイルを上書き)          */
/* ----------------------------------------------------------------- */
@media (min-width: 1024px) {

    /* HEADER */
    header {
        height: 100px;
        padding: 0 100px;
    }

    .logo-img {
        height: 73px;
    }

    .logo {
        font-size: 1.5rem;
    }

    header.scrolled {
        height: 70px;
    }

    nav ul {
        gap: 24px;
    }

    /* HERO */
    .hero {
        height: 750px;
        padding: 0 100px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    /* SECTIONS */
    section {
        padding: 10px 40px;
    }

    /* WORKS Grid */
    .works-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    /* PRODUCT */
    .product-item-image {
        height: 400px;
        /* デスクトップでさらに高さを調整 */
    }

    .products-image-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }

    .products-image {
        width: auto;
        height: 400px;
    }

    video {
        width: 600px;
        margin: 0 auto;
    }

    .profilepics {
        width: auto;
        height: 300px;
    }

    /* FOOTER */
    #footer {
        padding: 40px 100px;
    }

    #modalClose {
        right: 35px;
    }
}