/* --- 1.RESET & VARIABLES --- */
:root {
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f2f0eb; /* 画像のベージュ背景に近い色 */
    --white: #ffffff;
    --accent: #9a8c7c; /* 落ち着いたブラウン */
    --border-radius: 12px;
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Jost', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-jp);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    letter-spacing: 0.05em;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

img {
    width: 100%;
    display: block;
}

ul {
    list-style: none;
}


/* --- 2.UTILITY --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 769px) {
    .container {
        /* コンテナの左側にサイドバー分のスペースを確保 */
        padding-left: 80px; 
        /* 右側もバランスをとるなら追加（任意） */
        padding-right: 80px;
        /* 最大幅を維持しつつ、パディングを含める設定 */
        max-width: 1360px; /* 1200px + 80px + 80px */
    }
}


.section {
    padding: 100px 0;
}

.section-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
}

.section-title-sub {
    font-family: var(--font-en);
    font-size: 14px;
    color: #999;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- 3.DOT ANIMATION --- */
.dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(-40px, -20px); 
    transition: opacity 1.5s ease-out, transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.dot.is-visible {
    opacity: 1;
    transform: translate(-20px, 20px); 
}


/* --- 4.HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0 40px;
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-en);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #333;
    line-height: 1.2;
    display: block;
}

.global-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.global-nav ul {
    display: flex;
    gap: 30px;
}

.global-nav ul li a {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.btn-contact {
    background-color: #a59b8f;
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 12px;
    font-family: var(--font-en);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-contact:hover {
    background-color: #8c7b6d;
    opacity: 1;
}

.hamburger {
    display: none;
    cursor: pointer;
}


/* --- 5.SIDEBAR SNS --- */
.sidebar-sns {
    position: fixed;
    left: 40px;
    bottom: 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.sidebar-sns::before {
    content: '';
    width: 1px;
    height: 60px;
    background-color: #ccc;
    margin-bottom: 10px;
}

.follow-text {
    writing-mode: vertical-rl;
    font-family: var(--font-en);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 10px;
}

.sns-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sns-icons a {
    color: #999;
    font-size: 14px;
}


/* --- 6.HERO (90% Scale Version) --- */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: visible; 
    background-color: var(--bg-color);
}

.hero-bg {
    position: absolute;
    top: 100px;  
    bottom: 40px; 
    left: 8vw;   
    right: 5vw;  
    z-index: 0;
    overflow: hidden;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* 画像本体 */
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    animation: 
        imageFadeIn 0.1s forwards,
        zoomEffect 20s linear infinite;
    animation-delay: 0.2s;
}

/* カーテンアニメーション */
.reveal-curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); 
    z-index: 3; 
    transform-origin: right; 
    animation: revealSlide 1.4s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 0.2s;
}

/* コンテンツ（文字・ボタン）の位置も画像に合わせて調整 */
.hero-content {
    position: absolute;
    top: 50%;
    left: calc(8vw + 80px); 
    transform: translateY(-50%);
    z-index: 10;
    color: #ffffff;
    opacity: 0;
    animation: textFadeIn 1s ease-out forwards;
    animation-delay: 1.0s;
}


.hero-title {
    font-family: var(--font-en);
    font-size: clamp(24px, 3.5vw, 50px); 
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* スクロールボタン */
.scroll-btn {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 30px;
    font-family: var(--font-en);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    background: transparent;
    backdrop-filter: blur(4px);
}

.scroll-btn:hover {
    background: #ffffff;
    color: var(--text-color);
}

/* --- Keyframes --- */
@keyframes revealSlide {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

@keyframes zoomEffect {
    0% { transform: scale(1.0); }
    100% { transform: scale(1.15); }
}

@keyframes imageFadeIn {
    to { opacity: 1; }
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(calc(-50% + 30px));
    }
    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}


/* --- 7.ABOUT --- */
.about-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 上下中央揃え */
    gap: 60px;
}

.about-text {
    flex: 1;
    max-width: 500px;
}

.about-text .text-body {
    font-size: 14px;
    margin-bottom: 40px;
    text-align: justify;
}

.about-images {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
}

.btn-round {
    display: inline-flex;
    align-items: center;
    gap: 10px; 
    background-color: var(--accent); 
    color: #fff !important; 
    padding: 10px 30px; 
    border-radius: 50px; 
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(154, 140, 124, 0.3); 
}

.btn-round:hover {
    background-color: #8c7b6d; /* ホバー時は少し濃く */
    transform: translateY(-3px); /* 少し上に浮き上がる */
    box-shadow: 0 6px 20px rgba(154, 140, 124, 0.4); /* 影を強くして浮遊感を出す */
    opacity: 1; /* 親要素のa:hoverの透明度を打ち消す */
}

.btn-round i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-round:hover i {
    transform: translateY(3px); /* ホバー時に矢印が下に動く */
}

.img-box.img-2 {
    position: relative; 
    width: 100%;
    max-width: 400px; 
    height: 500px;    
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 4px solid var(--white);
    margin-left: auto; 
}

.img-box.img-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 上寄り 20% で「中央寄りすぎ」を回避 */
    object-position: 50% 20%; 
}

/* --- 8.SERVICE --- */
.service {
    background-color: #e8e6e0;
}

.section-header {
    text-align: left;
    margin-bottom: 60px;
}

.section-desc {
    font-size: 14px;
    color: var(--text-light);
}


/* --- 5.SERVICE (2カラム交互レイアウト) --- */
.service-layout {
    display: flex;
    flex-direction: column;
    gap: 100px; /* 段ごとの間隔 */
    margin-top: 60px;
}

.service-row {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

/* 2段目の左右反転 */
.service-row.reverse {
    flex-direction: row-reverse;
}

.service-visual {
    flex: 1;
    height: 400px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-text {
    flex: 1;
    padding: 20px 30px 0;
}

.service-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.service-text p {
    font-size: 13px;
    color: var(--text-light);
    text-align: left;
    line-height: 1.6;
}
/* アイコン横並びの設定 */
.service-icons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.icons-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.icons-section img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.icons-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.icons-section ul li {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.icons-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
}

/* スライドショーの仕組み */
.service-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.service-slideshow img.active {
    opacity: 1;
}



/* --- 10.MACHINERY (調整) --- */
#machinery {
    /* background-color: #e8e6e0;  */
    margin-top: 0;
    /* 20pxから「あと50px」足して 70px に調整 */
    padding-top: 70px; 
    position: relative;
    z-index: 1;
}

.machinery {
    /* background-color: #e8e6e0; */
    overflow: hidden;
}

.carousel-container {
    overflow: hidden; /* JavaScriptで制御するためスクロールバーは隠す */
    position: relative;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 40px auto 0;
    /* ボタンを表示するため、左右に少しスペースを空ける */
    padding: 0 40px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* 滑らかな動き */
    will-change: transform;
}

.carousel-card {
    flex: 0 0 300px !important; /* 幅を300pxに固定 */
    width: 300px !important;
    padding-bottom: 20px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}


.carousel-card .machine-img {
    height: 200px;
    overflow: hidden;
}

.carousel-card .machine-img img {
    transition: transform 0.5s;
}

.carousel-card:hover .machine-img img {
    transform: scale(1.1);
}

.machine-info {
    padding: 20px;
}

.machine-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--accent);
    text-align: center; 
}

.machine-info p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 35px;
    height: 35px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 18px;
    color: #666;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: var(--accent);
    color: var(--white);
}


.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

.carousel-indicator-container {
    display: none; /* 初期状態を非表示に */
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background-color: #d1d1d1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background-color: var(--accent);
    transform: scale(1.3);
}



/* --- 11.COMPANY --- */
.company {
    padding-top: 0;
    position: relative;
}

.company-bg-image {
    height: 400px;
    width: 100%;
}

.company-bg-image img {
    height: 100%;
    object-fit: cover;
}

.company-card {
    background: #fff;
    border-radius: 20px;
    padding: 60px;
    margin-top: -100px; /* Overlap */
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.company-header {
    text-align: center;
    margin-bottom: 40px;
}

.company-header h2 {
    font-size: 24px;
}

.company-header span {
    font-family: var(--font-en);
    color: #ccc;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.company-content {
    display: flex;
    gap: 50px;
}

.map-area {
    flex: 1;
    height: 550px;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #999;
}

/* 地図を囲むコンテナの調整 */
.map {
    width: 100%;
    height: 100%;
}

/* iframe自体を親要素（.map-area）いっぱいに広げる */
.map iframe {
    width: 100% !important;
    height: 100% !important;
    vertical-align: bottom;
    filter: grayscale(20%); /* サイトの雰囲気に合わせて少しだけ色を抑えるとオシャレになります */
}

.company-info {
    flex: 1;
}

.company-info dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px 0;
    font-size: 14px;
}

.company-info dt {
    font-weight: 700;
}

.company-info dd {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* --- 12.BOTTOM LINKS --- */
.bottom-links {
    display: flex;
    height: 300px;
}

.link-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.link-box .bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.link-box .bg-img img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.link-box:hover .bg-img img {
    transform: scale(1.1);
}

.link-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 2;
    transition: background 0.3s;
}

.link-box:hover::after {
    background: rgba(0,0,0,0.2);
}

.link-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.link-content h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.link-content span {
    display: block;
    font-family: var(--font-en);
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

/* --- 13.FOOTER --- */
.footer {
    background-color: #e6e3dd; /* Darker beige */
    padding: 60px 0 30px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-en);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: 40px;
}

.footer-nav a {
    font-size: 12px;
    font-family: var(--font-en);
    color: #666;
}

.footer-sns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-sns a {
    color: #999;
}

.copyright {
    font-size: 10px;
    color: #aaa;
    font-family: var(--font-en);
}



/* --- 14.RESPONSIVE (Tablet) --- */
@media (max-width: 960px) {
    /* サービスセクション：写真とテキストを縦並びに */
    .service-row,
    .service-row.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .service-visual {
        flex: none;
        width: 100%;
        height: 350px;
    }

    .service-text {
        padding: 0 0 0;
    }

    /* アイコンのテキストは改行しない */
    .icons-section ul li {
        white-space: nowrap;
    }
}

/* 2カラム状態でアイコンが改行するサイズ：2個＋1個の折り返し配置 */
@media (min-width: 961px) and (max-width: 1350px) {
    .service-icons {
        flex-wrap: wrap;
    }

    .icons-section {
        flex: 0 0 calc(50% - 10px); /* 2列に */
    }

    .icons-section ul li {
        white-space: nowrap;
    }
}

/* --- 15.RESPONSIVE (Mobile) --- */
@media (max-width: 768px) {
    /* 1. ヘッダー周りの調整 */
    .header { 
        padding: 0 20px; 
        height: 60px; 
    }

    /* 2. ハンバーガーメニュー */
    .hamburger {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        width: 30px;
        height: 24px;
        cursor: pointer;
    }

    .hamburger span {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #8d857d;
        transition: all 0.4s;
    }

    .hamburger span:nth-child(1) { top: 0; }
    .hamburger span:nth-child(2) { top: 11px; }
    .hamburger span:nth-child(3) { top: 22px; }

    .hamburger.is-active span:nth-child(1) {
        top: 11px;
        transform: rotate(45deg);
        background-color: #fff;
    }
    .hamburger.is-active span:nth-child(2) { opacity: 0; }
    .hamburger.is-active span:nth-child(3) {
        top: 11px;
        transform: rotate(-45deg);
        background-color: #fff;
    }

    .global-nav {
        position: fixed;
        top: 0;
        right: -80%;
        width: 80%;
        height: 100vh;
        background-color: #e8e3dc;
        z-index: 1000;
        transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        visibility: hidden;
    }

    .global-nav.is-active {
        right: 0;
        visibility: visible;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    }

    .global-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    /* 3. レイアウト調整 */
    .recruit-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
    .about-container { flex-direction: column; }
    .company-content { flex-direction: column; gap: 30px !important; }
    .sidebar-sns { display: none; } 
    .map-area { height: 500px !important; width: 100%; margin-bottom: 30px; }

    .service-row .service-visual,
    .service-row.reverse .service-visual {
        order: -1;
    }

    .service-icons {
        flex-direction: column;
        gap: 20px;
    }

    .service-visual {
        flex: none;
        width: 100%;
        height: 250px;
    }
    .service-layout {
        gap: 60px;
    }

    /* 4. カルーセル */
    .carousel-wrapper { padding: 0 !important; overflow: hidden; width: 100%; }
    .carousel-track { padding: 0 !important; gap: 0 !important; }
    .carousel-card { flex: 0 0 100% !important; scroll-snap-align: none; }
    .carousel-btn { display: none; }
    
    .carousel-indicator-container {
        display: flex; /* スマホで表示 */
        justify-content: center;
        gap: 12px;
        margin-top: 25px;
    }

    .machine-info p {
        padding: 0 15px !important;
        width: auto !important;
    }

    /* 5. Heroセクション */
    .hero-bg {
        left: 30px;
        right: 30px;
        border-radius: 20px;
    }
    
    .hero-content {
        left: calc(30px + 24px); 
    }
} /* ← メディアクエリを閉じる。ここより下には何も書かない */