/* ───────────────────────
   全域變數（CSS 變數）
   ─────────────────────── */
   :root {
    --main-bg-color: #a1b7df;           /* 主要背景色 */
    --main-text-color: #000;            /* 主要文字顏色 */
    --light-text-color: #666;           /* 淺色文字顏色 */
    --white: #fff;                      /* 白色 */
    --shadow-color: rgba(0, 0, 0, 0.2); /* 陰影顏色 */
    --hover-shadow-color: rgba(0, 0, 0, 0.3); /* 滑鼠懸停時的陰影 */
    --transition-duration: 0.2s;        /* 動畫過渡時間 */
}

/* ───────────────────────
   Reset 與全域設定
   ─────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}

/* 主要內容容器：置中對齊並限制最大寬度 */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ───────────────────────
   Banner 區塊（大橫幅）
   ─────────────────────── */
.banner {
    position: relative;
    margin-bottom: 20px;
}

/* Banner 圖片 */
.banner_homepage_image {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.ISO{
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 半透明白色遮罩 */
.banner_overlay {
    position: absolute;
    margin-top: 100px;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    background-color: rgba(255, 255, 255, 0.65);
    z-index: 1;
}

/* Banner 內文區塊 */
.banner_contents {
    position: absolute;
    top: 33%;
    margin-top: 300px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    font-size: 25px;
    color: var(--main-text-color);
}
.contents{
    display: flex;
    flex-direction: row;
    align-items: center;
}
/* ───────────────────────
   按鈕樣式（共用按鈕）
   ─────────────────────── */
.contact-button {
    margin-top: 10px;
    display: inline-block;
    padding: 10px 30px;
    font-size: 20px;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    background-color: var(--main-bg-color);
    border-radius: 50px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

/* 按鈕滑鼠懸停效果 */
.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px var(--hover-shadow-color);
}

/* 按鈕點擊效果 */
.contact-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px var(--shadow-color);
}

/* ───────────────────────
   代工類別區塊
   ─────────────────────── */
.category-section {
    text-align: center;
    background-color: var(--white);
    padding: 40px 20px;
    margin-bottom: 20px;
}

/* 標題樣式 */
.category-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.category-subtitle {
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-bottom: 30px;
}

/* ───────────────────────
   代工卡片樣式
   ─────────────────────── */
.category-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
}

/* 單張卡片 */
.category-card , .carousel-slide {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    overflow: hidden;
    width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

/* 滑鼠懸停時的動畫效果 */
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px var(--hover-shadow-color);
}

/* 卡片圖片 */
.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 卡片內文字內容 */
.category-info , .slide-info {
    padding: 15px;
    height: 88px;
    background-color: var(--main-bg-color);
    color: var(--white);
    text-align: left;
}

/* 卡片標題 */
.category-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* 卡片內文字 */
.category-info p {
    font-size: 0.9rem;
}
.carousel-container {
    display: none;
}

/* ───────────────────────
   Map（地圖區塊）
   ─────────────────────── */
.map-section {
    margin-bottom: 20px;
}

/* Google 地圖嵌入樣式 */
.map {
    width: 100%;
    height: 450px;
    border: 0;
}

.category-subtitle_mobile {
  display:none;
}

/* ───────────────────────
   RWD 斷點設定
   ─────────────────────── */

/* ─────────────────────────
   📌 手機版：0px - 767px
   ───────────────────────── */
   @media screen and (max-width: 767px) {
    .container {
     max-width: 100%;
    }
    /* ⚡ 讓所有文字縮小並不換行 */
    body {
        font-size: 14px; /* 整體縮小 */
        white-space: nowrap;
    }
    .banner_contents {
        font-size:20px;
        font-weight: 800;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .category-subtitle {
      display: none;
    }
    .category-subtitle_mobile {
      display: block;
      margin-bottom: 15px;
    }
    .category-container {
        display: none;
      }
      
    .carousel-container {
        display: block;
        width: 100%;
        max-width: 800px;
        margin: auto;
        overflow: hidden;
        position: relative;
      }
      
      .carousel-inner {
        display: flex;
        transition: transform 0.5s ease;
      }
      
      .carousel-slide {
        min-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* 若需要調整卡片間距，可在這裡加 padding 或 margin */
      }
      
      .carousel-slide img {
        width: 100%;
        max-width: 350px;  /* 限制卡片內容寬度 */
        height: 200px;
        display: block;
      }
      .carousel-slide h3 {
        display: flex;
        justify-content: center;
        font-size: 1.2rem;
        width: 400px;
      }
        .carousel-slide p {
            display: flex;
            justify-content: center;
            font-size: 0.9rem;
            width: 400px;
        }

      

      
      /* 左右按鈕 */
      .carousel-button {
        position: absolute;
        top: 47%;
        width: 30%;
        height: 90%;
        transform: translateY(-50%);
        background: rgba(0, 255, 255, 0);
        color: rgba(0, 0, 0, 0);
        border: none;
        font-size: 24px;
        padding: 10px;
        cursor: pointer;
        z-index: 10;
      }
      .carousel-button.prev {
        left: 10px;
      }
      .carousel-button.next {
        right: 10px;
      }
    .contact-button {
        font-size: 16px;
    }
}

/* ─────────────────────────
   📌 小平板：768px - 1023px
   ───────────────────────── */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    
    /* ⚡ 文字稍微放大，但仍不換行 */
    body {
        font-size: 16px;
        white-space: nowrap;
    }
    .banner_contents_h1{
        font-weight: 900;
    }
    .banner_contents {
        font-size: 24px;
        font-weight: 800;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-subtitle {
        font-size: 1.1rem;
    }

    .category-info h3 {
        font-size: 1.35rem;
    }

    .category-info p {
        font-size: 0.9rem;
    }

    .contact-button {
        font-size: 18px;
    }
}

/* ─────────────────────────
   📌 大平板：1024px - 1199px
   ───────────────────────── */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
    
    /* ⚡ 文字適中，不換行 */
    body {
        font-size: 18px;
        white-space: nowrap;
    }

    .banner_contents {
        font-size: 22px;
    }

    .category-title {
        font-size: 2rem;
    }

    .category-subtitle {
        font-size: 1.2rem;
    }

    .category-info h3 {
        font-size: 1.4rem;
    }

    .category-info p {
        font-size: 1rem;
    }

    .contact-button {
        font-size: 20px;
    }
}

/* ─────────────────────────
   📌 小桌機：1200px - 1399px
   ───────────────────────── */
@media screen and (min-width: 1200px) and (max-width: 1399px) {

    /* ⚡ 讓桌機版字體適中，保持不換行 */
    body {
        font-size: 20px;
        white-space: nowrap;
    }

    .banner_contents {
        font-size: 28px;
        font-weight: 800;
    }

    .category-title {
        font-size: 2.2rem;
    }

    .category-subtitle {
        font-size: 1.3rem;
    }

    .category-info h3 {
        font-size: 1.3rem;
    }

    .category-info p {
        font-size: 1.1rem;
    }

    .contact-button {
        font-size: 22px;
    }
}

/* ─────────────────────────
   📌 大桌機：1400px 以上
   ───────────────────────── */
@media screen and (min-width: 1400px) {

    /* ⚡ 大桌機讓字體較大，但仍保持不換行 */
    body {
        font-size: 22px;
        white-space: nowrap;
    }
    .banner_contents {
        font-size: 30px;
        font-weight: 800;
    }

    .category-title {
        font-size: 2rem;
    }

    .category-subtitle {
        font-size: 1.2rem;
    }

    .category-info h3 {
        font-size: 1.3rem;
    }

    .category-info p {
        font-size: 1.1rem;
    }

    .contact-button {
        font-size: 24px;
    }
}
