/* ============================================================
   SKILLTUBE Base Styles — 全站共用樣式
   修改此檔案即可更新全站色彩／按鈕／元件，不需動個別 HTML
   ============================================================ */

/* ── 色彩變數 ───────────────────────────────── */
:root {
  /* 主色金 */
  --gold: #F0C555;
  --gold-hover: #F8E558;
  --gold-bg: #FFF9E6;

  /* 輔助銀 */
  --silver: #DFDFD8;
  --silver-hover: #FFFFFF;

  /* 連結 */
  --link: #D1A63A;
  --link-hover: #D5BF5D;
  --link-border: #FFD932;

  /* 文字 */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* 背景 */
  --bg-body: #F8F8F5;
  --bg-card: #ffffff;

  /* 邊框 */
  --border: #e2e8f0;
}

/* ── 全域 ───────────────────────────────────── */
* {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg-body);
}

/* ── 按鈕：Gold（主要） ─────────────────────── */
.btn-gold {
  background-color: var(--gold) !important;
  color: #000000 !important;
  text-decoration: none !important;
}

.btn-gold:hover,
.btn-gold:active {
  background-color: var(--gold-hover) !important;
}

/* ── 按鈕：Silver（次要） ───────────────────── */
.btn-silver {
  background-color: var(--silver) !important;
  color: #000000 !important;
  text-decoration: none !important;
  border-radius: 9999px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.625rem 0 !important;
  width: 100% !important;
  border: none !important;
  transition: all 0.2s !important;
  cursor: pointer !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.25 !important;
}

.btn-silver:hover,
.btn-silver:active {
  background-color: var(--silver-hover) !important;
}

.btn-silver-bordered {
  border: 0.5px solid var(--border) !important;
}

/* ── 按鈕：Primary ──────────────────────────── */
.btn-primary {
  background-color: var(--gold);
  color: #000;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--gold-hover);
}

.btn-primary:active {
  background-color: var(--gold-bg) !important;
}

.btn-sm-primary {
  text-decoration: none;
  background-color: var(--gold);
  color: #000;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-radius: 9999px;
  transition: all 0.2s;
}

.btn-sm-primary:hover {
  background-color: var(--gold-hover);
}

.btn-sm-primary:active {
  background-color: var(--gold-bg) !important;
}

/* ── 按鈕：Outline ──────────────────────────── */
.btn-outline {
  text-decoration: none;
  border: 1px solid var(--link-border);
  color: #000;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.2s;
}

.btn-outline:hover {
  background-color: var(--gold-bg);
}

.btn-sm-outline {
  text-decoration: none;
  border: 1px solid var(--link-border);
  color: #000;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-radius: 9999px;
  transition: all 0.2s;
}

.btn-sm-outline:hover {
  background-color: var(--gold-bg);
}

/* Tailwind bg active 覆寫（保留給 bg-[#FFD932] 使用） */
.bg-\[#FFD932\]:active {
  background-color: var(--gold-bg) !important;
}

/* ── 文章（blog-action 共用） ────────────────── */
.act-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.act-side {
  width: 33.333%;
  flex-shrink: 0;
}

.act-side img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.act-main {
  width: 66.667%;
}

.act-article h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.act-article h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  margin-top: 32px;
  margin-bottom: 12px;
}

.act-article h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-top: 24px;
  margin-bottom: 8px;
}

.act-article p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.act-article ul,
.act-article ol {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}

.act-article li {
  margin-bottom: 6px;
}

.act-article strong {
  font-weight: 700;
  color: var(--text-primary);
}

.act-article hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.act-article em {
  font-style: italic;
}

.act-article a {
  color: var(--link);
  text-decoration: underline;
  font-weight: 500;
}

.act-article a:hover {
  color: var(--link-hover);
}

/* 按鈕：Hero 輪播標準樣式（供全站使用） */
.hero-btn {
  display: inline-block !important;
  padding: 10px 28px !important;
  border-radius: 9999px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center !important;
  white-space: nowrap !important;
  transition: all .2s !important;
}

.hero-btn-silver {
  background: var(--silver) !important;
  color: #000 !important;
}

.hero-btn-silver:hover {
  background: var(--silver-hover) !important;
}

.hero-btn-gold {
  background: var(--gold) !important;
  color: #000 !important;
}

.hero-btn-gold:hover {
  background: var(--gold-hover) !important;
}

.hero-btn-black {
  background: #585858 !important;
  color: #FFF !important;
}

.hero-btn-black:hover {
  background: #000 !important;
}

.act-btns {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* ── 卡片元件 ────────────────────────────────── */
.video-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all .3s;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

.video-card-body {
  padding: 12px;
  min-height: 88px;
}

/* ── 品牌索引卡片（brands-index / home 共用） ─── */
.brand-card {
  text-decoration: none;
  display: block;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5ea;
  padding: 12px;
  height: 155px;
  overflow: hidden;
  transition: box-shadow .15s;
  cursor: pointer;
}
.brand-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.brand-card.golden {
  border-color: #fbbf24;
}
.brand-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.brand-card-img {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}
.brand-card-img.init-gray {
  background: #e5e5ea;
  color: #666;
}
.brand-card-img.init-golden {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.brand-card-img.init-blue {
  background: linear-gradient(135deg, #60A5FA, #6366F1);
  color: #fff;
}
.brand-card-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.brand-card-body {
  flex: 1;
  min-width: 0;
}
.brand-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}
.brand-card-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.brand-card-bio {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brand-card-tags {
  font-size: 12px;
  color: #999;
}
.brand-card-tag {
  display: inline-block;
  background: #f0f0f5;
  padding: 2px 8px;
  border-radius: 8px;
  margin: 2px;
}

/* ── Provider 卡片（category-listing 專用） ───── */
.provider-card {
  text-decoration: none;
  display: block;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px;
  height: 155px;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
  cursor: pointer;
}
.provider-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .1);
  transform: translateY(-4px);
}
.provider-card.golden {
  border-color: #fde68a;
}
.provider-card-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.provider-card-img {
  width: 85px;
  min-width: 85px;
  max-width: 85px;
  vertical-align: top;
  overflow: hidden;
}
.provider-card-img div {
  width: 85px;
  height: 85px;
}
.provider-card-info {
  vertical-align: top;
  padding-left: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── 商品/服務卡片（home 商品服務區） ──────────── */
.item-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px;
  height: 158px;
  transition: box-shadow .3s, transform .3s;
  cursor: pointer;
}
.item-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .1);
  transform: translateY(-2px);
}
.item-card-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.item-card-img {
  width: 85px;
  height: 85px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.item-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ── 橫式影片卡片（watch 頁推薦影片） ─────────── */
.video-card-h {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: box-shadow .3s;
}
.video-card-h:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

/* ── 簡單卡片（watch 頁技能分類等） ───────────── */
.simple-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  transition: box-shadow .3s;
}
.simple-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── 工具類 ──────────────────────────────────── */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gradient-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
}

.animate-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 連結文字 ────────────────────────────────── */
.link-gold {
  color: var(--link);
}

.link-gold:hover {
  color: var(--link-hover);
}