/* 共用樣式 */
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.75;
  height: 100vh;
}

main {
  flex-grow: 1;
  max-width: 900px;
  line-height: 1.8;
  margin: auto;
  padding: 2rem 1rem;
}
header {
  background-color: #fff;
}
h1,
h2,
h3 {
  color: #002f6c;
}
h1 {
  text-align: center;
}
h1,
h2 {
  font-family: "Playfair Display", "Noto Serif TC", serif;
}
p {
  margin-bottom: 1.25rem;
}
section {
  margin-bottom: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
section h2 {
  border-left: 5px solid #383b3a;
  padding-left: 0.5rem;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
img {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
quick-nav {
  text-align: center;
  margin: 4rem auto;
  max-width: 1000px;
}
a {
  color: #76b332;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #5e8e27;
  text-decoration: underline;
}
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  display: none;
  background-color: #76b332;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 999;
}

#backToTop:hover {
  background-color: #004b9a;
}
.page-wrapper {
  display: flex;
  flex-direction: column;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  color: white;
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}
.navbar .logo {
  font-size: 1.2rem;
  font-weight: bold;
}
.navbar .nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #2e2f2f;
  font-size: 1.5rem;
  cursor: pointer;
}
.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}
.navbar .nav-links li a {
  color: #2e2f2f;
  text-decoration: none;
  font-size: 0.95rem;
}
.navbar .nav-links li a:hover {
  text-decoration: underline;
}
.navbar .nav-links li a.active {
  font-weight: bold !important;
  color: #002f6c !important;
  border-bottom: 2px solid #002f6c;
}
.cta-block {
  background-color: #f0f0f0;
  padding: 2rem;
  text-align: center;
}
.custom-footer {
  background-color: #1c3170;
  color: white;
  padding: 3rem 1.5rem 2rem;
  font-size: 0.95rem;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto 2rem;
  gap: 2rem;
}
.footer-col {
  flex: 1 1 160px;
  max-width: 200px;
}
.footer-col img {
  object-fit: contain;
}
.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #a4d96c;
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col ul li {
  margin-bottom: 0.5rem;
}
.footer-col ul li a {
  color: #eee;
  text-decoration: none;
}
.footer-col ul li a:hover {
  text-decoration: underline;
  color: white;
}
.footer-bottom {
  text-align: center;
  color: #76b332;
  font-size: 0.8rem;
  border-top: 1px solid #444;
  padding-top: 1rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.product {
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}
.product img {
  object-fit: cover;
}
.product h3 {
  text-align: center;
}
.label {
  color: #76b332;
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0.3rem 0 0.8rem;
}
.logo-img {
  height: 60px;
  object-fit: contain;
}
.has-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 160px;
  z-index: 99;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  list-style: none;
  margin: 0;
  padding: 0;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.75rem 1rem;
  color: #2e2f2f;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: 1px solid #e0e0e0;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}
.has-dropdown > a::after {
  content: " ▼";
  font-size: 0.8rem;
  margin-left: 0.25rem;
  color: inherit;
}
.cta-button {
  display: inline-block;
  background-color: #76b332;
  color: #ffffff;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #5e8e27;
  transform: translateY(-2px);
  color: #ffffff;
}
/*  ------------共用樣式 ----------- */

/* 首頁 */
.service-block h3 {
  color: #fff;
}
.home-page main {
  max-width: 1200px;
}
.home-page h2 {
  border-left: none;
  padding-left: 0;
}
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  background: url("image/index_hero.webp") center center / cover no-repeat;
  overflow: hidden;
  animation: heroFadeZoom 1.2s ease-out forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 15vh;
  z-index: 1;
}

.hero-text {
  letter-spacing: 2px;
  color: white;
  text-align: center;
  max-width: 800px;
  padding: 2rem 1rem;
  font-size: 1.15rem;
  border-radius: 10px;
  animation: fadeInText 1.2s ease-out 0.2s forwards;
  opacity: 0;
  z-index: 2;
}
.hero-text h2 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  letter-spacing: 1px;
  color: #fff;
}
.hero-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #a4d96c;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
  animation: overlayFadeIn 1.2s ease-out forwards;
  opacity: 0;
}
.highlight-cases h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 2rem;
}
.highlight-cases strong {
  color: #002f6c;
}
.highlight-cases .product {
  justify-content: end;
}
.highlight-cases .product p {
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #555;
}
.about-commitment {
  margin: 2rem auto;
  max-width: 900px;
}
.about-commitment p {
  font-size: 1.05rem;
  color: #444;
}
.about-commitment strong {
  color: #76b332;
  font-weight: 500;
}
.center-button-wrapper {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.intro-brief {
  margin-top: -100px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 5;
}

.intro-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-image img {
  max-width: 480px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.intro-text {
  max-width: 520px;
  text-align: left;
}
.intro-text h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.intro-text p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.has-dropdown {
  position: relative;
}
.kaiser-vision {
  background: #f9f9f9;
  padding: 40px 20px 0px;
  text-align: center;
}

.kaiser-vision h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.kaiser-vision p {
  font-size: 1.125rem;
  color: #555;
  max-width: 760px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.kaiser-vision .btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.kaiser-vision .btn:hover {
  background-color: #555;
}
.service-block {
  width: 100%;
  position: relative;
  margin-bottom: 60px;
}
section.services-alt {
  margin-bottom: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.service-bg {
  background-size: cover;
  background-position: center;
  height: 400px;
  position: relative;
}
.bg-product {
  background-image: url("image/index_product.webp");
}
.bg-process {
  background-image: url("image/index_custom.webp");
}
.bg-case {
  background-image: url("image/index_case.webp");
}

.bg-certificate {
  background-image: url("image/index_iso.webp");
}
.service-overlay {
  background: rgba(0, 0, 0, 0.45);
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
}

.service-text {
  color: #fff;
  padding: 2rem;
}

.service-text.left {
  margin-left: 10%;
  text-align: left;
}

.service-text.right {
  margin-left: auto;
  margin-right: 10%;
  text-align: right;
}

.service-text h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.service-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #eee;
}
.service-btn {
  background: #76b332;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
  margin-top: 1rem;
}

.service-btn:hover {
  background: #5e8e27;
  color: #ffffff;
}
/* 關於 */
.factory-history {
  padding: 3rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.factory-history h2 {
  font-size: 1.75rem;
  border-left: 5px solid #002f6c;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
}

.factory-history p {
  color: #555;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.history-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.history-photo {
  text-align: center;
}

.history-photo img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-photo p {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}
.team-section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  justify-items: center;
}
.team-card p {
  text-align: left;
}
.team-card {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  text-align: center;
}

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

.team-card img {
  width: 200px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.team-card h3 {
  font-size: 1.1rem;
  margin: 0.2rem 0;
  color: #222;
}

.team-card .role {
  font-size: 0.9rem;
  color: #666;
}
.about strong {
  color: #002f6c;
}
/* 製造 */
.production-line {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid #ccc;
}
.production-line h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}
.line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step img {
  width: 100%;
  max-width: 160px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.step img:hover {
  transform: scale(1.05);
}

.line-grid .step {
  width: 160px;
  text-align: center;
}

.line-grid .step img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}
.manufacturing-page {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.equipment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.equipment-item {
  flex: 1 1 25%;
}
.equipment-item img {
  width: 100%;
  border-radius: 8px;
}
.manufacturing-steps {
  list-style-type: decimal;
  padding-left: 20px;
}
.quality-section ul {
  list-style-type: disc;
  padding-left: 20px;
}
/* 專利認證 */
.cert-section {
  padding: 2rem 1rem;
}

.cert-section .section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cert-card {
  width: 180px;
  text-align: center;
}

.cert-card img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

.cert-card p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
/* 合作流程 */
.timeline {
  position: relative;
  margin: 2rem auto;
  padding: 2rem 0;
  border-left: 4px solid #002f6c;
  max-width: 960px;
}
.timeline-item {
  position: relative;
  width: 47%;
  margin-bottom: 3rem;
}
.timeline-item .content {
  position: relative;
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.timeline-item.left {
  left: 0;
  transform: translateX(-20px);
}
.timeline-item h3 {
  letter-spacing: 0.05em;
  text-align: center;
}
.timeline-item.right {
  left: 50%;
  text-align: left;
  transform: translateX(20px);
}
.timeline-item.left .content {
  margin-left: auto;
}
.timeline-item.right .content {
  margin-right: auto;
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -12px;
  width: 16px;
  height: 16px;
  background: #002f6c;
  border-radius: 50%;
  border: 2px solid white;
}
.icon-small {
  margin: 0 20px;
  width: 40px;
  height: 40px;
  font-size: 16px;
  vertical-align: middle;
}
/* 產品展示 */
.dm-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.dm-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  padding: 1rem;
  transition: transform 0.3s ease;
}

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

.dm-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.dm-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.dm-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}
/* popup 視窗樣式 */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 1000;
}
.hotel-showcase {
  padding: 2rem 1rem;
}

.hotel-showcase .section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.hotel-showcase p {
  margin-bottom: 1.5rem;
  color: #555;
}

.hotel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
}

.hotel-card {
  width: 260px;
  text-align: center;
}

.hotel-thumb {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.hotel-card h3 {
  font-size: 0.95rem;
  margin-top: 0.5rem;
}
/* 聯絡 */
.map {
  width: 60vw;
  height: 25vw;
  border: 0;
}

@keyframes overlayFadeIn {
  to {
    opacity: 1;
  }
}
@keyframes heroFadeZoom {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 響應式*/
@media screen and (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }
  /* nav 導覽列 */
  .navbar {
    flex-wrap: wrap;
  }
  .navbar .nav-toggle {
    display: block;
  }
  .navbar .nav-links {
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }
  .navbar .nav-links.active {
    padding-top: 1rem;
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }

  /* hero 首頁Hero */
  .hero {
    height: auto;
    min-height: 50vh;
  }

  .hero-text {
    max-width: 700px;
    line-height: 1.8;
    font-size: 1.1rem;
  }

  .hero-text h1 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }

  .hero-text p {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }
  /* timeline 合作流程*/
  .timeline {
    border-left: none;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    transform: none;
    text-align: left;
  }
  .timeline-item.right {
    margin-left: 0;
  }
  .timeline-item::before {
    left: 0;
  }
  /* service-text 首頁服務區塊*/
  .service-text.left,
  .service-text.right {
    margin: 0 auto;
    text-align: center;
  }

  .service-text {
    padding: 1.5rem;
  }
  .service-text {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }

  .service-text h3 {
    font-size: 1.4rem;
  }

  .service-text p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .service-btn {
    margin-top: 1rem;
  }

  /* has-dropdown nav 導覽列*/
  .has-dropdown .dropdown-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 1rem;
    background: none;
    border: none;
  }

  .has-dropdown.open .dropdown-menu {
    display: block;
  }

  .has-dropdown > a::after {
    content: " ▼";
    font-size: 0.8rem;
    margin-left: 0.25rem;
    color: inherit;
  }

  .dropdown-menu li a {
    border-bottom: none;
    padding-left: 1rem;
  }

  /* intro-brief 首頁intro*/
  .intro-wrapper {
    flex-direction: column;
    padding: 1rem;
  }

  .intro-image img {
    max-width: 100%;
    height: auto;
  }

  .intro-text {
    text-align: center;
    padding: 0 1rem;
  }

  section,
  .hero,
  .intro-brief {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
  /* 首頁-凱撒理念區塊 */
  .kaiser-vision {
    padding: 2rem 1rem;
    text-align: center;
  }

  .kaiser-vision h2 {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .kaiser-vision p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  /* 製造-倉儲備料 */
  .line-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .dm-showcase {
    grid-template-columns: 1fr; /* 單欄 */
  }

  .dm-card {
    padding: 0.5rem;
  }

  .dm-card h3 {
    font-size: 0.95rem;
  }
}
@media screen and (max-width: 900px) {
  /* 產品 */
  .dm-showcase {
    grid-template-columns: repeat(2, 1fr); /* 兩欄 */
  }

  .dm-card img {
    object-fit: cover;
  }

  .dm-card {
    padding: 0.8rem;
  }

  .dm-card h3 {
    font-size: 1rem;
  }
}
