/* ============================================================
   KAVOTEC 最新消息 - 自訂樣式
   說明：這支 CSS 是搭配 Bootstrap 使用的「額外」樣式。
   只要在你的頁面 <head> 裡，於 bootstrap 的 css 之後，
   再加一行： <link rel="stylesheet" href="css/news.css">
   ============================================================ */

:root {
  --kavotec-green: #2e7d32;        /* 主綠色，可依你 LOGO 實際色微調 */
  --kavotec-green-dark: #245c28;   /* 深綠，滑鼠移上去用 */
  --kavotec-gray: #6b7280;         /* 次要文字灰 */
  --kavotec-line: #e5e7eb;         /* 分隔線淺灰 */
}

/* ---------- 頁面標題橫幅（綠色區塊 + 右側圖片） ---------- */
.news-hero {
  display: flex;
  align-items: stretch;
  min-height: 240px;
  overflow: hidden;
}
.news-hero__title {
  background-color: var(--kavotec-green);
  color: #fff;
  flex: 0 0 33%;
  display: flex;
  align-items: center;
  padding: 2rem 2.5rem;
}
.news-hero__title h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}
.news-hero__image {
  flex: 1 1 auto;
  background-size: cover;
  background-position: center;
  background-color: #111;
}
@media (max-width: 767.98px) {
  .news-hero__title { flex-basis: 55%; }
  .news-hero__title h1 { font-size: 1.5rem; }
}

/* ---------- 列表卡片 ---------- */
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--kavotec-line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s ease, transform .2s ease;
}
.news-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
  color: inherit;
}
.news-card__imgwrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
}
.news-card__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.news-card:hover .news-card__imgwrap img {
  transform: scale(1.05);
}
.news-card__tag {
  position: absolute;
  left: 0;
  top: 1rem;
  background: var(--kavotec-green);
  color: #fff;
  font-size: .75rem;
  padding: .25rem .75rem;
}
.news-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.news-card__date {
  font-size: .85rem;
  color: var(--kavotec-gray);
}
.news-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: .5rem 0 0;
}
.news-card:hover .news-card__title {
  color: var(--kavotec-green);
}
.news-card__summary {
  font-size: .9rem;
  color: var(--kavotec-gray);
  line-height: 1.6;
  margin: .75rem 0 0;
  /* 最多顯示三行 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__more {
  margin-top: 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--kavotec-green);
}

/* ---------- 內文頁 ---------- */
.news-breadcrumb {
  background: #f8f9fa;
  border-bottom: 1px solid var(--kavotec-line);
  font-size: .9rem;
}
.news-breadcrumb a {
  color: var(--kavotec-gray);
  text-decoration: none;
}
.news-breadcrumb a:hover {
  color: var(--kavotec-green);
}
.news-tag {
  display: inline-block;
  background: var(--kavotec-green);
  color: #fff;
  font-size: .75rem;
  padding: .25rem .75rem;
}
.news-article__title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1rem;
}
.news-article__date {
  color: var(--kavotec-gray);
  font-size: .9rem;
  margin-top: 1rem;
}
.news-poster {
  width: 100%;
  border: 1px solid var(--kavotec-line);
  border-radius: 8px;
  overflow: hidden;
}
.news-poster img {
  width: 100%;
  display: block;
}
.news-body p {
  line-height: 1.8;
  color: #374151;
}
.news-contact-box {
  background: #f8f9fa;
  border: 1px solid var(--kavotec-line);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: .9rem;
  color: var(--kavotec-gray);
}
.btn-kavotec {
  background: var(--kavotec-green);
  color: #fff;
  border: none;
}
.btn-kavotec:hover {
  background: var(--kavotec-green-dark);
  color: #fff;
}
.link-kavotec {
  color: var(--kavotec-green);
  text-decoration: none;
  font-weight: 600;
}
.link-kavotec:hover {
  color: var(--kavotec-green-dark);
}
.news-gallery {
  overflow: hidden;
  background: #f4f5f3;
}

.news-gallery .carousel-item img {
  width: 100%;
  height: 520px;
  object-fit: contain;
}

.news-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.news-thumbnails button {
  flex: 0 0 90px;
  padding: 3px;
  border: 1px solid #d8ddd8;
  background: #fff;
  opacity: .65;
}

.news-thumbnails button.active {
  border: 3px solid #198754;
  opacity: 1;
}

.news-thumbnails img {
  display: block;
  width: 82px;
  height: 65px;
  object-fit: cover;
}

@media (max-width: 767px) {
  .news-gallery .carousel-item img {
    height: 360px;
  }
}

.news-gallery-image {
  cursor: zoom-in;
}

.zoomed-news-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

 .contact-info {
  height: 100%;
  padding: 32px;
  background: #fff;
  border: 1px solid #e1e5e2;
  border-top: 4px solid #168342;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.contact-info h2 {
  margin-bottom: 18px;
  color: #168342;
  font-size: 24px;
  font-weight: 700;
}

.contact-info p {
  margin-bottom: 10px;
  color: #555;
  line-height: 1.7;
}

.contact-info a {
  color: #168342;
  text-decoration: none;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
}

.contact-heading {
  margin-bottom: 35px;
}

.contact-heading span {
  color: #168342;
  font-size: 13px;
  letter-spacing: 3px;
}

.contact-heading h2 {
  margin: 8px 0;
  font-size: 30px;
  color: #333;
}

.contact-heading p {
  color: #777;
}