/* ページ全体のベーススタイル（お好みで調整してください） */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f5f5;
}



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

.flex {
    display: block;
}

body,
html {
    height: 100%;
}

.slideshow {
    position: relative;
    /* width: 100vw; */
    height: 60vh;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
}

/*
.hero-text {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 1.9rem;
    font-weight: bold;
    text-align: left;
    margin-left: 150px;
    top: 50%;
    transform: translateY(-160%);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
*/

.hero-wrapper {
    position: relative; /* 子要素（テキスト）の基準位置にする */
    width: 100%;
    max-width: 1100px;  /* 画像の最大幅に合わせて調整してください */
    margin: 0 auto;     /* 中央揃え */
    overflow: hidden;   /* はみ出し防止 */
}

/* 画像を画面幅に合わせて縮小させる（レスポンシブ化） */
.hero-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* 画像の上に載るテキストの設定 */
.hero-text {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%); /* ど真ん中に配置 */
    width: 90%;         /* テキストが画面端にくっつかないようにする */
    text-align: center;
    font-size: 24px;    /* PCでのフォントサイズ */
    color: #fff;        /* 文字色（背景画像に合わせて変更してください） */
    font-weight: bold;
    /* 必要に応じて背景に薄い色を敷くと文字が読みやすくなります */
    /* background: rgba(255, 255, 255, 0.7); */
    /* padding: 20px; */
}

.topic {
    align-items: center;
    text-align: center;
    padding: 50px 0px;
    background-color: #e1dfdf;
    color: #121212;
}

.topic h1 {
    font-size: 17px;
    line-height: 2.2rem;
    max-width: 65%;
    margin: auto;
    color: #121212;
    font-weight: normal;
}

.company-section {
    text-align: center;
    padding: 40px 0;
    background-color: #e1dfdf;
}

.company-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #1100ff;
    color: #f9f9f9;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.company-button:hover {
    background-color: #1100ff;
    transform: scale(1.05);
}

.product-section {
    background-color: #aca9a9;
    color: #121212;
    padding: 60px 5%;
    text-align: left;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.product-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-contents {
    max-width: 85%;
    margin: 30px 0px;
}

.news-section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
    color: #333;
}

.news-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    border-left: 6px solid #1100ff;
    padding-left: 15px;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 1rem;
}

.news-list .date {
    display: inline-block;
    width: 120px;
    color: #666;
    font-weight: bold;
}

/* アニメーション */
/* 初期状態：非表示＆少し下にずらす */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* 表示状態 */
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}


/* 画像 */
/* レイアウト全体 */
.product-layout {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

/* 左側テキスト */
.product-text {
    flex: 1;
    min-width: 0;
}

/* 右側画像エリア */
.product-images {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 200px);
    grid-template-rows: repeat(2, 150px);
    gap: 40px;
    position: relative;
}

/* 画像共通スタイル（ダイヤ型） */
.product-images .img {
    width: 230px;
    height: 180px;
    object-fit: cover;
    transform: rotate(0deg);
    transition: transform 0.4s ease;
}

/* ホバーで少し浮く */
.product-images .img:hover {
    transform: rotate(10deg) scale(1.08);
}

/* 不規則な配置（左右上下にズラす） */
.img1 {
    transform: rotate(60deg) translate(-20px, -10px);
}

.img2 {
    transform: rotate(60deg) translate(20px, -30px);
}

.img3 {
    transform: rotate(60deg) translate(-10px, 20px);
}

.img4 {
    transform: rotate(60deg) translate(30px, 10px);
}

.slideshow {
    position: relative;
    width: 620px;   /* 表示サイズを調整 */
    height: 465px;
    overflow: hidden;
}

.slideshow img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を枠に合わせて切り取り */
    opacity: 0;
    transition: opacity 1s ease; /* フェード切替 */
}

.slideshow img.active {
    opacity: 1;
}

/* =========================================
   Flexboxの基本設定（PC向け：横並び）
========================================= */
.flex-container {
    display: flex;
    align-items: center; /* 縦方向の中央揃え */
    justify-content: space-between;
    gap: 20px; /* テキストと画像の間の余白 */
    margin-bottom: 30px; /* 各セクションの下の余白 */
}

.flex-item {
    flex: 1; /* テキストと画像の領域を柔軟に調整 */
}

/* 画像が画面幅をはみ出さないようにする（レスポンシブ化） */
.flex-item img,
.news-section img {
    max-width: 100%; /* 親要素より大きくならない */
    height: auto;    /* 縦横比をキープ */
    display: block;
}
  
/* ▼ モバイル向け（画面幅600px以下） ▼ */
@media (max-width: 600px) {
    .slideshow {
      width: 100%;      /* 画面幅いっぱい */
      height: 72vw;     /* 高さを自動調整 */
    }
}

@media screen and (max-width: 768px) {
    .hero-text {
        font-size: 16px; /* ★ スマホ用に文字を小さくする ★ */
        line-height: 1.6;
    }

    /* スマホ画面ではPC用の改行を無効化し、自然に折り返させる */
    .pc-only {
        display: none;
    }

    .flex-container {
        flex-direction: column; /* ★ ここが重要！横並びを「縦並び」に変更 ★ */
    }

    .flex-item {
        width: 100%; /* スマホでは横幅いっぱい（100%）に広げる */
        margin-bottom: 15px; /* 縦積みになった際の、テキストと画像の間の余白 */
    }
}

@media (max-width: 800px){
    .topic h1 {
        text-align: left;
        max-width: 80%;
    }

    .product-section {
        display: block;
    }

    .product-section h2 {
        text-align: center;
    }

    .product-contents {
        max-width: 80%;
        margin: auto;
        text-align: left;
    }

    .flex {
        text-align: center;
    }

    .fancy-link {
        margin: 50px;
    }

    .product-images {
        display: block;
    }
}



