/* ============================================================
   app.css — HOME LINK INC Global Common Styles
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --navy: #1B2A4A;
  --navy-light: #253A5E;
  --gold: #C9A84C;
  --gold-light: #D4BA6A;
  --gold-pale: #F5EDD6;
  --white: #FFFFFF;
  --bg-light: #F5F7FA;
  --bg-warm: #FAFAF7;
  --text: #1F2937;
  --text-sub: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --surface: #FFFFFF;
}

/* ===== BODY ===== */
body {
  font-family: 'Source Sans Pro', 'Noto Sans SC', sans-serif;
  background: var(--white);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a:hover {
  text-decoration: none;
}

/* ===== HEADING FONT (Playfair Display + Noto Sans SC) ===== */
.nav-logo-text,
.hero-h1, .hero-badge span,
.section-title, .section-tag,
.service-name, .why-title, .project-name, .project-title,
.process-step-title, .scope-step-title, .timeline-step-title,
.cta-title,
.footer-brand-name,
.testi-name, .blog-title, .blog-category,
.btn-primary-custom, .btn-estimate,
.hero-stat-value, .area-tag, .stat-number,
.faq-question,
.project-card-title,
.article-card-title,
.featured-post-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Noto Sans SC', serif;
}

/* ===== WOW.js ANIMATION OVERRIDE ===== */
.wow {
  animation-duration: 1.2s !important;
  animation-timing-function: ease-out !important;
}
.wow.animated {
  animation-duration: 1.2s !important;
  animation-timing-function: ease-out !important;
}

/* ===== NAVBAR ===== */
.navbar-custom {
  background: rgba(27, 42, 74, 0.97);
  backdrop-filter: blur(8px);
  padding: 0 20px;
  min-height: 72px;
  transition: box-shadow 0.3s;
}
.navbar-custom.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo svg { width: 38px; height: 38px; }
.nav-logo-text {
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.navbar-custom .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0.5rem 0.75rem !important;
  transition: color 0.2s;
}
.navbar-custom .nav-link:hover { color: var(--gold) !important; }
.navbar-custom .dropdown-menu {
  background: rgba(27, 42, 74, 0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 8px;
}
.navbar-custom .dropdown-item {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 8px 20px;
  transition: all 0.2s;
}
.navbar-custom .dropdown-item:hover {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8); font-size: 13px; cursor: pointer;
  transition: border-color 0.2s;
}
.lang-toggle:hover { border-color: var(--gold); }
.lang-toggle .active { color: var(--gold); font-weight: 600; }
.btn-estimate {
  background: var(--gold); color: var(--navy);
  padding: 9px 22px; border-radius: 6px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.3px; transition: all 0.2s;
  white-space: nowrap;
}
.btn-estimate:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.3);
}

/* Mobile hamburger */
.navbar-custom .navbar-toggler {
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 10px;
}
.navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile: collapse menu full-width overlay below navbar */
@media (max-width: 991.98px) {
  .navbar-custom .navbar-collapse {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(27,42,74,0.98);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
    z-index: 1030;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 8px 20px 0;
  }
  .navbar-custom .navbar-collapse .navbar-nav {
    width: 100%;
  }
  .navbar-custom .navbar-collapse .nav-link {
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .navbar-custom .navbar-collapse .dropdown-menu {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 8px;
    padding: 4px 0 8px;
    margin: 0 0 8px;
  }
  .navbar-custom .navbar-collapse .dropdown-item {
    padding: 8px 16px;
  }
  .nav-right.d-none { display: none !important; }
  .mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 8px;
  }
}

/* ===== FOOTER ===== */
.footer-custom {
  padding: 60px 0 32px; background: #111827; color: rgba(255,255,255,0.7);
}
.footer-brand-name { color: var(--white); font-size: 18px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
.footer-brand-tagline { font-size: 13px; color: var(--gold); margin-bottom: 16px; }
.footer-contact-item {
  font-size: 13px; line-height: 1.8; display: flex; align-items: flex-start; gap: 8px;
}
.footer-contact-item svg { width: 16px; height: 16px; stroke: var(--gold); flex-shrink: 0; margin-top: 3px; fill: none; stroke-width: 2; }
.footer-col-title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.08); display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.6);
  transition: all 0.2s; cursor: pointer;
}
.footer-social-icon:hover {
  background: var(--gold); color: var(--navy);
}
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.35);
  flex-wrap: wrap; gap: 12px;
}
.footer-legal a { color: rgba(255,255,255,0.35); text-decoration: none; margin-left: 16px; }
.footer-legal a:hover { color: var(--gold); }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; z-index: 99;
  border: 2px solid var(--gold);
  opacity: 0; visibility: hidden;
  transition: all 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover {
  background: var(--gold); color: var(--navy);
  transform: translateY(-3px);
}

/* ===== SECTION COMMON ===== */
.section-padding { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--gold); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px;
}
.section-title {
  font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1.3; margin-bottom: 16px;
}
.section-desc {
  font-size: 16px; color: var(--text-sub); line-height: 1.7; max-width: 680px; margin: 0 auto;
}

/* ===== HERO SERVICE (shared across service pages, process, faq, projects-dir) ===== */
.hero-service {
  position: relative; min-height: 400px; display: flex; align-items: center; overflow: hidden; background: var(--navy);
}
.hero-service-bg {
  position: absolute; inset: 0;
}
.hero-service-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,42,74,0.92) 0%, rgba(37,58,94,0.85) 100%);
}
.hero-service-content { position: relative; z-index: 2; padding: 140px 1rem 80px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px; padding: 6px 16px; margin-bottom: 20px;
}
.hero-badge span { color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.5px; }
.hero-h1 {
  font-size: 42px; font-weight: 800; color: var(--white);
  line-height: 1.25; margin-bottom: 8px; letter-spacing: -0.5px;
}
.hero-en { font-size: 18px; font-weight: 500; color: rgba(255,255,255,0.5); letter-spacing: 1px; margin-bottom: 20px; }
.hero-desc { font-size: 17px; color: rgba(255,255,255,0.75); line-height: 1.8; max-width: 600px; }

/* ===== CTA SECTION ===== */
.cta-section {
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,42,74,0.93) 0%, rgba(37,58,94,0.88) 100%);
}
.cta-content { position: relative; z-index: 1; text-align: center; }
.cta-title { font-size: 36px; font-weight: 800; color: var(--white); margin-bottom: 16px; }
.cta-desc { font-size: 16px; color: rgba(255,255,255,0.65); line-height: 1.7; max-width: 560px; margin: 0 auto 36px; }
.cta-buttons { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn-primary-custom {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--navy); padding: 14px 32px; border-radius: 8px;
  border: none; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary-custom:hover { background: var(--gold-light); color: var(--navy); text-decoration: none; }
.btn-secondary-custom {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--white); padding: 14px 32px; border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.35); font-size: 16px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-secondary-custom:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }

/* ===== RESPONSIVE — Common ===== */
@media (max-width: 991.98px) {
  .hero-h1 { font-size: 34px; }
  .section-title { font-size: 28px; }
  .cta-title { font-size: 28px; }
}
@media (max-width: 767.98px) {
  .hero-service { min-height: auto; }
  .hero-h1 { font-size: 28px; }
  .section-padding { padding: 56px 0; }
  .section-title { font-size: 24px; }
  .cta-title { font-size: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 575.98px) {
  .hero-h1 { font-size: 24px; }
  .section-padding { padding: 40px 0; }
  .section-title { font-size: 22px; }
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.pagination-custom {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pagination-custom::-webkit-scrollbar { display: none; }

.pagination-custom li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 14px;
}

.pagination-custom a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  padding: 0 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.pagination-custom a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.05);
}

.pagination-custom span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  box-sizing: border-box;
}

.pagination-custom li:not(:has(a)):not(:has(span)) {
  color: var(--text-muted);
  letter-spacing: 2px;
  cursor: default;
}

.pagination-custom a svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ===== SERVICE OVERVIEW ===== */
.overview-text { font-size:15px; color:var(--text-sub); line-height:1.9; margin-bottom:16px; }
.overview-image {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  height: 100%;
  min-height: 320px;
}
.overview-image img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

/* ===== SCOPE OF WORK ===== */
.scope-section { background: var(--navy); color: var(--white); }
.scope-section .section-tag { color: var(--gold); }
.scope-section .section-title { color: var(--white); }
.scope-section .section-desc { color: rgba(255,255,255,0.6); }
.scope-step {
  text-align: center; padding: 0 8px;
}
.scope-step-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.scope-step-icon svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.8; }
.scope-step-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.scope-step-en { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.scope-step-desc { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.6; }

/* ===== KEY STATS ===== */
.stat-section { background: var(--bg-light); }
.stats-row { display:flex; justify-content:center; gap:56px; flex-wrap:wrap; }
.stat-item { text-align:center; min-width:140px; }
.stat-number { font-size:42px; font-weight:900; color:var(--gold); line-height:1; }
.stat-label { font-size:14px; color:var(--text-sub); margin-top:8px; }

/* ===== FAQ ACCORDION ===== */
.faq-category { margin-bottom: 8px; }
.faq-category:last-child { margin-bottom: 0; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.faq-item:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border-color: rgba(201,168,76,0.3);
}
.faq-item.active {
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 4px 16px rgba(201,168,76,0.08);
}
.faq-question {
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--gold); }
.faq-question svg {
  width: 18px; height: 18px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
  flex-shrink: 0; transition: transform 0.3s, stroke 0.2s;
  margin-left: 16px;
}
.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  stroke: var(--gold);
}
.faq-item.active .faq-question { color: var(--gold); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.active .faq-answer { max-height: 400px; }
.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.9;
}

/* ===== RESPONSIVE — Pagination & Service Pages ===== */
@media (max-width: 991.98px) {
  .scope-step { margin-bottom: 32px; }
  .stats-row { gap: 32px; }
  .stat-number { font-size: 34px; }
  .overview-image { min-height: 280px; }
}
@media (max-width: 767.98px) {
  .overview-image { min-height: 220px; margin-top: 24px; }
  .stats-row { gap: 24px; }
  .stat-number { font-size: 28px; }
  .faq-question { padding: 16px 18px; font-size: 14px; }
  .faq-answer-inner { padding: 0 18px 16px; font-size: 13px; }
  .pagination-wrapper { margin-top: 40px; }
  .pagination-custom a {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 8px;
  }
  .pagination-custom li:not(:has(a)):not(:has(span)) {
    min-width: 30px;
    height: 34px;
    font-size: 13px;
  }
}
@media (max-width: 575.98px) {
  .stats-row { gap: 16px; }
  .stat-item { min-width: 100px; }
  .stat-number { font-size: 24px; }
}

/* ===== HERO DETAIL (legal/blog-detail pages) ===== */
.hero-detail { position:relative; min-height:380px; display:flex; align-items:center; overflow:hidden; background:var(--navy); }
.hero-detail-bg { position:absolute; inset:0; }
.hero-detail-overlay { position:absolute; inset:0; background:linear-gradient(135deg, rgba(27,42,74,0.93) 0%, rgba(37,58,94,0.86) 100%); }
.hero-detail-content { position:relative; z-index:2; padding:140px 1rem 60px; width:100%; }

/* ===== BREADCRUMB ===== */
.breadcrumb-custom { display:flex; align-items:center; flex-wrap:wrap; gap:0; margin-bottom:20px; font-size:14px; list-style:none; padding:0; }
.breadcrumb-custom li { display:flex; align-items:center; }
.breadcrumb-custom li + li::before { content:'/'; margin:0 10px; color:rgba(255,255,255,0.35); font-size:13px; }
.breadcrumb-custom a { color:rgba(255,255,255,0.55); text-decoration:none; transition:color 0.2s; }
.breadcrumb-custom a:hover { color:var(--gold); }
.breadcrumb-custom .active { color:var(--gold); }
.hero-detail .hero-h1 { font-size:40px; margin-bottom:0; }
.hero-detail .hero-en { margin-top:8px; margin-bottom:0; }

/* ===== ARTICLE META BAR ===== */
.article-meta-bar { padding:20px 0; border-bottom:1px solid var(--border); margin-bottom:40px; }
.article-meta-list { display:flex; align-items:center; flex-wrap:wrap; gap:24px; list-style:none; padding:0; margin:0; }
.article-meta-item { display:flex; align-items:center; gap:6px; font-size:14px; color:var(--text-sub); }
.article-meta-item svg { width:16px; height:16px; stroke:var(--text-muted); fill:none; stroke-width:2; flex-shrink:0; }
.article-meta-item.author-meta { font-weight:600; color:var(--navy); }
.article-meta-item.author-meta svg { stroke:var(--navy); }
.article-meta-divider { width:1px; height:16px; background:var(--border); }

/* ===== ARTICLE BODY ===== */
.article-body { font-size:17px; line-height:1.9; color:var(--text); max-width:820px; margin:0 auto; padding-bottom:80px; }
.article-body h2 { font-size:26px; font-weight:800; color:var(--navy); margin:48px 0 20px; line-height:1.35; padding-bottom:10px; border-bottom:2px solid var(--gold-pale); }
.article-body h3 { font-size:20px; font-weight:700; color:var(--navy); margin:36px 0 16px; line-height:1.4; }
.article-body p { margin-bottom:20px; }
.article-body ul, .article-body ol { padding-left:24px; margin-bottom:20px; }
.article-body li { margin-bottom:8px; line-height:1.8; }
.article-body blockquote { border-left:4px solid var(--gold); padding:16px 24px; margin:28px 0; background:var(--bg-warm); border-radius:0 8px 8px 0; font-style:italic; color:var(--text-sub); font-size:16px; }
.article-body blockquote p:last-child { margin-bottom:0; }
.article-body a { color:var(--navy); text-decoration:underline; text-decoration-color:var(--gold); text-underline-offset:3px; }
.article-body a:hover { color:var(--gold); }
.article-body strong { color:var(--navy); font-weight:700; }
.article-body table { width:100%; border-collapse:collapse; margin:24px 0; font-size:14px; }
.article-body th, .article-body td { padding:12px 16px; text-align:left; border:1px solid var(--border); }
.article-body th { background:var(--bg-warm); font-weight:700; color:var(--navy); }

/* ===== ARTICLE BODY (post.html variant without bottom border on h2) ===== */
.article-body h2 { padding-bottom:10px; border-bottom:2px solid var(--gold-pale); }

/* ===== RESPONSIVE — Article / Hero Detail ===== */
@media (max-width: 991.98px) {
  .hero-detail .hero-h1 { font-size: 32px; }
  .hero-detail { min-height: 320px; }
  .article-body h2 { font-size: 23px; }
  .article-body h3 { font-size: 18px; }
}
@media (max-width: 767.98px) {
  .hero-detail { min-height: auto; }
  .hero-detail .hero-h1 { font-size: 26px; }
  .hero-detail-content { padding: 120px 1rem 48px; }
  .article-meta-list { gap: 16px; }
  .article-meta-divider { display: none; }
  .article-body { font-size: 16px; padding-bottom: 56px; }
  .article-body h2 { font-size: 21px; margin: 36px 0 16px; }
  .article-body h3 { font-size: 17px; }
}
@media (max-width: 575.98px) {
  .hero-detail .hero-h1 { font-size: 22px; }
  .breadcrumb-custom { font-size: 13px; }
  .article-meta-list { gap: 12px; }
  .article-meta-item { font-size: 13px; }
}
