/* Global */
body {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  color: #333;
  background: linear-gradient(135deg, rgb(99, 99, 99), white);
}
h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #1f1f1f;
  text-align: center;
}
section {
  padding: 4rem 2rem;
  text-align: center;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.navbar nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.navbar nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  justify-content: center; /* 居中 */
}
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f5f5f5;
}
.navbar ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.navbar ul li {
  margin: 0 15px;
}
.navbar nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  background: none;
  border: none;
}
.navbar a {
  text-decoration: none;
  color: #ccc;
  font-weight: 600;
  transition: color 0.3s;
}
.navbar a:hover,
.navbar a.active {
  color: #fff;
}
.btn-quote {
  background: #e63946;
  color: #fff;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
}
.btn-quote:hover {
  background: #c92d3f;
}

/* Hero */
.hero {
  height: 80vh;
  background: url('images/background.png') no-repeat 20% 50%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  position: relative;
  color: #fff;
  padding-right: 15%;
  padding-bottom: 10%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 500px;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.btn-primary {
  background: #e63946;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}
.btn-primary:hover {
  background: #c92d3f;
}

/* Tabs section */
.services-tabs {
    padding: 60px 10%;
    background: rgba(255, 255, 255, 0.05); /* 半透明背景，能透出整体背景 design */
    border-radius: 12px;
    backdrop-filter: blur(8px);
    margin-bottom: 60px;
    overflow: hidden;
    position: relative;
}

/* Tab buttons */
.tab-buttons {
    text-align: center;
    margin-bottom: 30px;
}
.tab-btn {
    background: transparent;
    border: 2px solid black;
    color: black;
    padding: 12px 20px;
    margin: 0 8px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, transform 0.2s;
}
.tab-btn:hover {
    background: #fff;
    border: 2px solid #fff;
    color: #111;
    transform: translateY(-2px);
}
.tab-btn.active {
    background: linear-gradient(135deg, #e63946, #ff3300);
    border: none;
    color: #fff;
    transform: scale(0.95);
}
.tab-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63946, #ff6600);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.tab-btn.active::after {
  width: 60%;
}

/* Tab content */
.tab-content {
    display: none;
    animation: fadeIn 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.tab-content img {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}
.tab-content.active img {
  opacity: 1;
  transform: scale(1);
}

/* Card layout */
.tab-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tab-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.tab-card img {
    width: 45%;
    border-radius: 12px;
    transition: transform 0.3s ease;
}
.tab-card img:hover {
    transform: scale(1.05);
}
.tab-card .text {
    flex: 1;
}
.tab-card h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #111;
}
.tab-card ul {
    list-style: none;
    padding: 0;
}
.tab-card ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: #111;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s forwards;
}
.tab-card ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #e63946;
}
.tab-content.active .tab-card ul li:nth-child(1) { animation-delay: 0.2s; }
.tab-content.active .tab-card ul li:nth-child(2) { animation-delay: 0.4s; }
.tab-content.active .tab-card ul li:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* products */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}
.product-card img {
  width: 100%;
  height: 200px;      /* 固定高度 */
  object-fit: cover;  /* 保持比例，超出裁剪 */
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.product-card:hover img {
  transform: scale(1.1);
  filter: brightness(70%);
} 
.product-card:hover {
  transform: scale(1.03);
}
.product-card h3 {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.product-card:hover h3 {
  opacity: 1;
}
.product-card .short-desc {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.5rem;
  font-size: 0.9rem;
  opacity: 0; 
  transition: opacity 0.3s ease;
}
.product-card:hover .short-desc {
  opacity: 1;
}
/* 详情 Modal */
.product-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 200;
  animation: fadeIn 0.4s ease;
}
/* 大尺寸 Modal */
.product-modal .modal-inner {
  background: #fff;
  display: flex;
  gap: 2rem;
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 1200px;
  max-height: 85vh;
  width: 90%;
  height: 80%;
  transform: scale(0.8);
  opacity: 0;
  animation: zoomIn 0.4s forwards;
  overflow: hidden;
}

/* 左图右文 */
.modal-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-left img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.modal-right {
  flex: 1.2;
  text-align: left;
  overflow-y: auto;
  padding-right: 1.5rem;
}
.modal-right h2 {
  margin-top: 0;
  font-size: 2rem;
  color: #e63946;
}
.modal-right h3 {
  margin-top: 1.5rem;
  color: #333;
  border-left: 4px solid #e63946;
  padding-left: 0.5rem;
}
.modal-right ul, .modal-right p {
  line-height: 1.6;
}
.modal-right ul {
  margin-left: 1.2rem;
  list-style: disc;
}
.modal-right::-webkit-scrollbar {
  width: 10px; 
  right: 30px;
}

.modal-right::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 10px;
}

.modal-right::-webkit-scrollbar-thumb {
  background: #e63946; 
  border-radius: 10px;
}

.modal-right::-webkit-scrollbar-thumb:hover {
  background: #b71c1c;  
}

/* 下载按钮 */
.view-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background: #111;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}
.view-btn:hover {
  background: #e63946;
}

.close-detail {
  position: absolute;
  top: -12px;
  right: 15px;
  font-size: 60px;
  cursor: pointer;
  color: black;
}
@keyframes fadeIn {
  from {opacity:0;} to {opacity:1;}
}
@keyframes zoomIn {
  to {transform: scale(1); opacity: 1;}
}
@keyframes zoomOut {
  from {transform: scale(1); opacity: 1;}
  to {transform: scale(0.8); opacity: 0;}
}


/* Contact */
.contact p {
  margin: 0.5rem 0;
  text-align: center;
}

.btn-whatsapp {
  display: inline-block;
  margin-top: 1rem;
  background: #25d366;
  color: #fff;
  padding: 0.8rem 1.8rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.3s;
}
.btn-whatsapp:hover {
  background: #1ebd5c;
}

/* Footer */
footer {
  background: #111;
  color: #aaa;
  text-align: center;
  padding: 1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 20;
}
.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal input, .modal textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}

/* About Us Grid (像 products 一样) */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
}

.about-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  padding-bottom: 1rem;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.about-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.about-card h3 {
  margin: 1rem 0 0.5rem;
  color: #e63946;
}

.about-card p {
  padding: 0 1rem;
  color: #333;
  font-size: 0.95rem;
}

.about-detail{
  margin-top: -100px;
  margin-bottom: -100px;
}

/* 平板（小于等于 1024px 宽） */
@media (max-width: 1024px) {
  .hero {
    height: 60vh;
    padding-right: 5%;
    padding-bottom: 5%;
    text-align: center;
    justify-content: center;
  }

  .tab-card {
    flex-direction: column;  /* 平板上图片和文字上下堆叠 */
    text-align: center;
  }

  .tab-card img {
    width: 80%;
  }
}

/* 手机（小于等于 768px 宽） */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin-top: 10px;
  }
  .navbar {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .navbar nav {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    top: 60px;  /* 在导航条下方 */
    width: 100%;
    background: #111;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
  }
  .navbar nav.active {
    display: block; /* 点击汉堡后显示 */
  }
  .navbar nav ul {
    display: flex;
    flex-wrap: wrap;        /* 自动换行 */
    justify-content: center;/* 居中 */
    gap: 10px;
  }
  .btn-quote {
    margin-top: 10px;
    width: 100%;
  }
  .navbar ul {
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
  }
  .navbar ul li {
    margin: 10px 0;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text p {
    font-size: 1rem;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    margin: 5px 4px;
  }

  .product-grid {
    grid-template-columns: 1fr; /* 手机上一行一张卡片 */
  }

  .modal-inner {
    flex-direction: column;
    height: auto;
  }
  .modal-left img {
    max-height: 40vh;
  }
}

/* 超小手机（小于等于 480px 宽） */
@media (max-width: 480px) {
  h2 {
    font-size: 1.5rem;
  }
  .tab-card h2 {
    font-size: 1.2rem;
  }
  .btn-primary,
  .btn-quote,
  .btn-whatsapp {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}



