/* ===========================================================
   人生行銷 官網 共用樣式表
   深色系、手機優先 Responsive CSS
   =========================================================== */

:root {
  --bg: #0b0f17;
  --bg-alt: #121926;
  --bg-card: #161e2c;
  --border: #233047;
  --text: #e8ebf0;
  --text-dim: #9aa4b2;
  --text-faint: #6b7482;
  --accent: #d4af37;
  --accent-dim: #a9872a;
  --line-green: #06c755;
  --line-green-dark: #05a647;
  --max-width: 1080px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* 預留底部浮動按鈕空間 */
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.brand span {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.4rem;
  padding: 4px 10px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

.nav-links .nav-contact a {
  color: var(--line-green);
  font-weight: 600;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 20px;
  }
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 14px;
  line-height: 1.4;
}

.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 24px;
}

.hero .accent {
  color: var(--accent);
}

/* ---------------- Section ---------------- */

section {
  padding: 40px 0;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.section-sub {
  color: var(--text-dim);
  margin: 0 0 28px;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-line {
  background: var(--line-green);
  color: #0b0f17;
}

.btn-line:hover {
  background: var(--line-green-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #0b0f17;
  text-decoration: none;
}

.cta-block {
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.cta-block h2 {
  margin: 0 0 10px;
}

.cta-block p {
  color: var(--text-dim);
  margin: 0 0 20px;
}

/* ---------------- Service Grid ---------------- */

.service-group {
  margin-bottom: 44px;
}

.service-group h2 {
  font-size: 1.3rem;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--accent);
}

.service-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------------- Video Works Grid ---------------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.video-card .thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #0b0f17;
  overflow: hidden;
}

.video-card .thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
}

.video-card .play-badge::after {
  content: "▶";
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.9);
  color: #0b0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.video-card .card-info {
  padding: 10px 12px;
}

.video-card .card-info .name {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .card-info .category {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.empty-state {
  color: var(--text-faint);
  text-align: center;
  padding: 40px 0;
}

/* ---------------- Video Modal Player ---------------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 7, 11, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal.open {
  display: flex;
}

.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.video-modal-inner video {
  width: 100%;
  max-height: 85vh;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--radius);
  display: block;
}

.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.video-modal-caption {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------------- Social Cases ---------------- */

.notice-box {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 24px 0 36px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.case-card .tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

/* ---------------- Featured Works (Home) ---------------- */

.home-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text-dim);
}

/* ---------------- Floating LINE Button ---------------- */

.line-float-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--line-green);
  color: #0b0f17;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 6px 18px rgba(6, 199, 85, 0.35);
}

.line-float-btn:hover {
  background: var(--line-green-dark);
  text-decoration: none;
}

/* ---------------- 404 Page ---------------- */

.error-page {
  text-align: center;
  padding: 90px 0;
}

.error-page .code {
  font-size: 4rem;
  color: var(--accent);
  font-weight: 800;
  margin: 0;
}

.error-page h1 {
  font-size: 1.4rem;
  margin: 10px 0 16px;
}

.error-page p {
  color: var(--text-dim);
  margin-bottom: 28px;
}
