
/*
 Theme Name:   Infosec Child
 Template:     twentytwentythree
*/
/* 服務按鈕樣式 */
.service-btn {
  height: 120px;             /* 按鈕高度 */
  font-size: 1.1rem;         /* 文字大小 */
  border-radius: 0.5rem;     /* 圓角 */
  transition: background-color .3s ease;
}
.service-btn:hover {
  background-color: #0056b3; /* 滑鼠移上時深色 */
}

/* 分頁標籤顏色 */
.nav-tabs .nav-link {
  color: #007bff;            /* 未選中時文字色 */
}
.nav-tabs .nav-link.active {
  color: #fff;               /* 選中時文字色 */
  background-color: #007bff; /* 選中時底色 */
  border-color: #007bff;     /* 選中時底線 */
}
/* ===== 全站樣式（高級深色純色風格）===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #343434;
  color: #e2e8f0;
  font-family: 'Inter', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  font-weight: 400;
}

/* ===== 導覽列 ===== */
.navbar {
  background-color: #252525 !important;
  border-bottom: 1px solid #343434;
  box-shadow: 0 1px 3px rgba(101, 102, 133, 0.2);
  padding: 1rem 0;
}

.navbar-brand img {
  transition: opacity 0.2s ease;
  filter: brightness(0) invert(1);
}

.navbar-brand img:hover {
  opacity: 0.8;
}

.nav-link {
  font-weight: 500;
  color: #a1a1aa !important;
  font-size: 15px;
  padding: 0.75rem 1.25rem !important;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #f4f4f5 !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 50%;
  background-color: #64748b;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}

.btn-outline-primary {
  border: 1px solid #505058;
  color: #e4e4e7;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: transparent;
  font-size: 14px;
}

.btn-outline-primary:hover {
  background-color: #64748b;
  border-color:#64748b;
  color: white;
  box-shadow: 0 4px 15px rgba(101, 102, 133, 0.2);
}

.container.fw-bold{
  background-color: #64748b;
  border-color:#64748b;
  color: white;
  box-shadow: 0 4px 15px rgba(101, 102, 133, 0.2);
}

/* ===== 主要內容區 ===== */
.main-content {
  background-color: #252525;
  margin: 2rem 1rem;
  border-radius: 16px;
  box-shadow: 0 8px 32pxrgba(101, 102, 133, 0.2);
  border: 1px solid #343434;
}

.main-content h3 {
  color: #64748b;
  font-weight: 700;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.main-content h3 small {
  color: #a1a1aa;
  font-weight: 400;
  font-size: 0.875rem;
}

/* ===== 服務區塊 ===== */
.service-box {
  background-color: #2b2b2b ;
  color: #d4d4d8;
  border: 1px solid #404040;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: rgba(101, 102, 133, 0.2);
  transition: left 0.5s ease;
}


.service-box:hover {
  background-color: #343434;
  border-color: #404040;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(101, 102, 133, 0.2);
  color: #ffffff;
}



/* ===== 分頁導航 ===== */
.nav-tabs {
  border: none;
  background-color: #2b2b2b;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-tabs .nav-link {
  border: none;
  color: #a1a1aa;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  margin: 0 2px;
  transition: all 0.3s ease;
  background: transparent;
  font-size: 14px;
}

.nav-tabs .nav-link:hover {
  background-color: #404040;
  color: #ffffff;
}

.nav-tabs .nav-link.active {
  background-color: #64748b;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(101, 102, 133, 0.2);
}

/* ===== 分頁內容區 ===== */

.tab-content {
  background-color: #252525;
  color: #64748b;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #343434;
  min-height: 300px;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: inset 0 1px 3px rgba(101, 102, 133, 0.2);
}

/* ===== 新聞列表樣式 ===== */
.news-item {
  background-color: #2b2b2b;
  border: 1px solid #404040;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #64748b;
  border-radius: 10px 10px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}


.news-item:hover {
  border-color: #404040;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.news-item h6 {
  color: #f8fafc;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 16px;
}

.news-item .date {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
}

.news-item p {
  color: #a1a1aa;
  font-size: 14px;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ===== 漏洞預警樣式 ===== */
.warning-item {
  background-color: #2b2b2b;
  border: 1px solid #404040;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.warning-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ef4444;
  border-radius: 10px 10px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.warning-item:hover {
  border-color: #404040;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}

.warning-item h6 {
  color: #f87171;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 16px;
}

.severity-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.severity-high {
  background-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.severity-medium {
  background-color: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.severity-low {
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* ===== 頁尾 ===== */
footer {
  background-color: #343434;
  color: #a1a1aa;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  font-size: 14px;
  border-top: 1px solid #343434;
}

footer h5 {
  color: #64748b;
  font-weight: 700;
  margin-bottom: 1rem;
}

footer h6 {
  color: #e4e4e7;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 16px;
}

footer a {
  color: #a1a1aa;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

footer a:hover {
  color: #64748b;
  text-shadow: 0 0 8pxr gba(101, 102, 133, 0.2);
}

footer ul li {
  margin-bottom: 0.5rem;
  color: #a1a1aa;
}

/* ===== 登入介面（深色高級質感）===== */
.modal-content {
  border-radius: 16px;
  background-color: #2a2c2e;
  color: #f3f4f6;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid #4a4f5c;
}

.modal-header {
  background-color: #64748b;
  color: #ffffff;
  border: none;
  padding: 1.5rem 2rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.modal-body {
  padding: 2rem;
  background-color: #303336;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
}

.form-control {
  border: 1px solid #5a5f68;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 14px;
  transition: all 0.2s ease;
  background-color: #3c3f45;
  color: #e2e8f0;
}

.form-control:focus {
  border-color: #7b8aa2;
  box-shadow: 0 0 0 3px rgba(93, 107, 133, 0.3);
  outline: none;
  background-color: #2f343a;
}

.form-control::placeholder {
  color: #a0aec0;
}

.form-label {
  font-weight: 600;
  color: #cbd5e0;
  margin-bottom: 0.5rem;
  font-size: 14px;
}

.btn-primary {
  background-color: #7b8aa2;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(93, 107, 133, 0.25);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #67778f;
  box-shadow: 0 6px 20px rgba(93, 107, 133, 0.3);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background-color: #505058;
  box-shadow: none;
  transform: none;
  color: #a1a1aa;
}

#loginError {
  font-size: 13px;
  color: #f87171;
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #2a1e20;
  border-radius: 8px;
  border-left: 3px solid #ef4444;
}

.text-success {
  color: #34d399 !important;
  background-color: #13291f !important;
  border-left-color: #10b981 !important;
}

/* ===== 服務資訊彈窗 ===== */
.service-modal .modal-content {
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.service-modal .modal-header {
  background-color: #2b2b2b;
  color: #f8fafc;
  border-bottom: 1px solid #404040;
}

.service-modal .modal-body {
  padding: 2rem;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== 提示訊息 ===== */
.toast {
  background-color: #2b2b2b;
  border: 1px solid #404040;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.toast-header {
  background-color: #404040;
  border-bottom: 1px solid #505058;
  font-weight: 600;
  color: #f8fafc;
}

/* ===== 動畫效果 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-box {
  animation: fadeInUp 0.4s ease forwards;
}

.service-box:nth-child(1) { animation-delay: 0.05s; }
.service-box:nth-child(2) { animation-delay: 0.1s; }
.service-box:nth-child(3) { animation-delay: 0.15s; }
.service-box:nth-child(4) { animation-delay: 0.2s; }
.service-box:nth-child(5) { animation-delay: 0.25s; }
.service-box:nth-child(6) { animation-delay: 0.3s; }

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
  .main-content {
    margin: 1rem 0.5rem;
    padding: 1.5rem !important;
  }
  
  .service-box {
    height: 100px;
    padding: 1rem;
    font-size: 13px;
  }
  
  .tab-content {
    padding: 1.5rem;
  }
  
  footer {
    padding: 2rem 1rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
}

/* --------- 調整服務按鈕置中＆統一色階 --------- */
.service-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;           /* 取消預設 padding，改靠 flex 控制大小 */
}

/* 有連結的主服務按鈕 */
.service-btn.btn-primary {
  background-color: #64748b;  /* 你希望的主色 */
  color: #ffffff;
  border: none;
}
/* hover 的深色效果 */
.service-btn.btn-primary:hover {
  background-color: #505058;
}

/* 尚無服務（灰色按鈕） */
.service-btn.btn-secondary {
  background-color: #404040;  /* 深灰色 */
  color: #e2e8f0;
  border: none;
}
.service-btn.btn-secondary:hover {
  background-color: #343434;
}
/* 框住 5 筆的高度並啟用垂直捲軸 */
.security-news-wrapper {
  max-height: 200px;      /* 假設每筆約 40px 高，5 筆就 200px；你可以調整這個數值 */
  overflow-y: auto;
  padding-right: 0.5em;   /* 避免捲軸擠到文字 */
}

/* 清掉預設 ul/li 間距，並友善設定項目高度 */
.security-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.security-news-item {
  padding: 0.5em 0;       /* 讓每筆上下有空白，約 40px 左右 */
  border-bottom: 1px solid #eee;
}

.security-news-item:last-child {
  border-bottom: none;
}

.security-news-item a {
  text-decoration: none;
  color: #0073aa;
}

.security-news-item time {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25em;
}
/* 漏洞預警區塊滾動框設定 */
.vul-alert-wrapper {
  max-height: 200px;    /* 依照每筆高度調整，這裡示範約 5 筆 */
  overflow-y: auto;
  padding-right: 0.5em; /* 避免捲軸擠到文字 */
}

.vul-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vul-alert-item {
  padding: 0.5em 0;
  border-bottom: 1px solid #eee;
}

.vul-alert-item:last-child {
  border-bottom: none;
}

.vul-alert-item a {
  text-decoration: none;
  color: #0073aa;
}

.vul-alert-item time {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25em;
}

/* 「所有公告」限高＋滑輪 */
.announcements-wrapper {
  max-height: 200px;      /* 約 5 筆高度，依照每筆 .announcement-item padding & line-height 調整 */
  overflow-y: auto;
  padding-right: 0.5em;   /* 滑軸不要擠到文字 */
}

/* 列表樣式 */
.announcements-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.announcement-item {
  padding: 0.5em 0;
  border-bottom: 1px solid #eee;
}

.announcement-item:last-child {
  border-bottom: none;
}

.announcement-item a {
  text-decoration: none;
  color: #0073aa;
}

.announcement-item time {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25em;
}
/* 「所有公告」滾輪呈現 */
.all-announcements .announcements-wrapper {
  max-height: 360px;    /* 顯示約 5 筆高度，依項目實際高度調整 */
  overflow-y: auto;     /* 啟用垂直滾輪 */
  padding-right: 0.5em; /* 避免滾軸擠到文字 */
}

/* 列表重置 */
.all-announcements .announcements-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 卡片式公告項目 */
.all-announcements .announcement-item {
  background-color: #2b2b2b;
  border: 1px solid #404040;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.all-announcements .announcement-item:last-child {
  margin-bottom: 0;
}

.all-announcements .announcement-link {
  display: block;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.all-announcements .announcement-date {
  display: block;
  font-size: 0.85em;
  color: #a1a1aa;
}
.footer-links {
  margin-top: 2rem;
}
.footer-section h3 {
  color: #fff;
  margin-bottom: 1rem;
}
.footer-section ul li {
  margin-bottom: 0.5rem;
}
.footer-section ul li a {
  color: #bbb;
  text-decoration: none;
}
.footer-section ul li a:hover {
  color: #fff;
}
