:root {
  --cdc-blue: #1d5bc0;
  --cdc-blue-dark: #004f98;
  --cdc-orange: #e87722;
  --cdc-bg: #f5f5f5;
  --cdc-text: #333;
  --cdc-nav-text: #687074;
}

body.cdc-body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  background: var(--cdc-bg);
  color: var(--cdc-text);
  margin: 0;
}

/* =====================
   Header (white, logo)
   ===================== */

.cdc-header-v5 {
  background: #fff;
  border-bottom: 2px solid #eee;
  position: relative;
  z-index: 99;
}

.cdc-navbar {
  padding: 0;
}

.cdc-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.cdc-logoh1 {
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
}

.cdc-logo-img {
  height: 60px;
  width: auto;
  display: block;
}

.cdc-utility-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  align-items: center;
  position: relative;
  top: 8px;
}

.cdc-utility-links li {
  float: left;
  padding-right: 10px;
}

.cdc-utility-links li:last-child {
  padding-right: 0;
}

.cdc-utility-links li a {
  color: var(--cdc-nav-text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s;
}

.cdc-utility-links li a:hover {
  color: var(--cdc-blue);
}

/* =====================
   Navigation bar (blue)
   ===================== */

.cdc-bar {
  width: 100%;
  background-color: #14723e;
  z-index: 50;
}

.cdc-bar-inner {
  width: 100%;
}

.cdc-bar-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.cdc-bar-inner ul li {
  display: inline-block;
  padding: 0;
}

.cdc-bar-inner ul li a {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: background 0.15s, opacity 0.15s;
}

.cdc-bar-inner ul li a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cdc-bar-inner ul li.active a {
  opacity: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* =====================
   Hero search area
   ===================== */

.cdc-hero {
  background: #fff;
  padding: 48px 0 40px;
  color: #14723e;
  text-align: center;
  border-bottom: 1px solid #e8e8e8;
}

.cdc-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #14723e;
}

.cdc-hero p {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 28px;
  color: #14723e;
}

.cdc-search-group {
  max-width: 640px;
  margin: 0 auto;
}

.cdc-search-input {
  height: 48px;
  font-size: 1rem;
  border: 2px solid #14723e;
  border-right: none;
  border-radius: 4px 0 0 4px !important;
  padding: 8px 16px;
  box-shadow: none !important;
  color: #333;
}

.cdc-search-input:focus {
  outline: none;
  box-shadow: none !important;
  border-color: #0f5530;
}

.cdc-search-btn {
  height: 48px;
  background: #14723e;
  color: #fff;
  border: 2px solid #14723e;
  border-radius: 0 4px 4px 0 !important;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cdc-search-btn:hover {
  background: #0f5530;
  border-color: #0f5530;
  color: #fff;
}

.cdc-search-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* =====================
   Results area
   ===================== */

.cdc-result-area {
  padding: 32px 0 48px;
}

.cdc-ai-box {
  background: #fff;
  border-left: 4px solid #14723e;
  border-radius: 0 4px 4px 0;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  min-height: 80px;
}

.cdc-ai-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #14723e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cdc-ai-label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #14723e;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.cdc-ai-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
  white-space: pre-wrap;
}

.cdc-cursor {
  display: inline-block;
  color: #14723e;
  font-weight: 700;
  animation: cdc-blink 0.8s step-end infinite;
}

.cdc-cursor.hidden {
  display: none;
}

@keyframes cdc-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cdc-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cdc-results-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #555;
}

.cdc-result-count {
  font-size: 0.85rem;
  color: #888;
}

.cdc-result-item {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 16px 20px;
  transition: background 0.1s;
}

.cdc-result-item:first-child {
  border-radius: 4px 4px 0 0;
}

.cdc-result-item:last-child {
  border-bottom: none;
  border-radius: 0 0 4px 4px;
}

.cdc-result-item:only-child {
  border-radius: 4px;
}

.cdc-result-item:hover {
  background: #f0f7f3;
}

.cdc-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cdc-category-badge {
  display: inline-block;
  background: var(--cdc-blue);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cdc-category-badge.news {
  background: #5a9e3c;
}

.cdc-result-date {
  font-size: 0.8rem;
  color: #999;
}

.cdc-result-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1d5bc0;
  margin-bottom: 6px;
  line-height: 1.4;
}

.cdc-result-summary {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cdc-no-results {
  background: #fff;
  border-radius: 4px;
  padding: 32px;
  text-align: center;
  color: #888;
  font-size: 0.95rem;
}

.cdc-loading-dots::after {
  content: "";
  animation: cdc-dots 1.2s step-end infinite;
}

@keyframes cdc-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
}

/* =====================
   Footer (two sections)
   ===================== */

.cdc-footer-v4 {
  margin-top: 0;
}

.cdc-copyright {
  background: #14723e;
  padding: 40px 0 0;
}

.cdc-statements {
  margin-bottom: 24px;
}

.cdc-statements-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  text-align: center;
}

.cdc-statements-list li {
  display: inline-block;
}

.cdc-statements-list li a {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1em;
  padding: 0 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: opacity 0.15s;
}

.cdc-statements-list li:first-child a {
  border-left: none;
}

.cdc-statements-list li a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.cdc-contact-info p {
  color: #fff;
  margin: 0 0 4px;
  font-size: 0.85rem;
  line-height: 1.7;
  letter-spacing: 0.05rem;
}

.cdc-contact-info a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.cdc-contact-info a:hover {
  color: #fff;
  text-decoration: underline;
}

.cdc-footer-note {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.cdc-footer-bottom {
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}
