/* =====================================================
   AN PHÁT Construction
   Stylesheet chung cho toàn bộ site (6 trang)
   ===================================================== */

/* ===== Biến hệ thống ===== */
:root {
  --navy: #16263f;
  --navy-dark: #0f1b2e;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: #fcd34d;
  --paper: #f8fafc;
  --white: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #16a34a;
  --danger: #dc2626;
  --danger-soft: #fca5a5;

  /* Kênh màu rời để dùng với alpha: rgb(var(--x-rgb) / .5) */
  --navy-rgb: 22 38 63;
  --amber-rgb: 245 158 11;
  --white-rgb: 255 255 255;

  --font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-quote: "Playfair Display", Georgia, serif;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 10px 30px rgb(var(--navy-rgb) / 0.1);
  --shadow-lg: 0 20px 50px rgb(var(--navy-rgb) / 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 78px;
}

/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  background: var(--white);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4 {
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ===== Layout dùng chung ===== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-alt {
  background: var(--paper);
}

.section-navy {
  background: var(--navy);
  color: rgb(var(--white-rgb) / 0.72);
}

.section-navy h2 {
  color: var(--white);
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
}

.section-desc {
  margin: 0;
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.section-cta {
  margin-top: 52px;
}

/* Ảnh phủ kín khung chứa — dùng chung cho mọi khối media của site */
.hero-bg img,
.page-hero-strip img,
.project-media img,
.gallery-main img,
.thumb img,
.split-media img,
.map-box img,
.journal-media img,
.team-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lưới dùng chung: 3 cột cho card lớn, 4 cột cho khối ngắn */
.project-grid,
.journal-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

/* Vỏ card dùng chung — dự án, tin tức, đội ngũ */
.project-card,
.journal-card,
.team-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.project-card:hover,
.journal-card:hover,
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* Ảnh trong card phóng nhẹ khi hover */
.project-media img,
.journal-media img {
  transition: transform 0.8s var(--ease);
}

.project-card:hover .project-media img,
.journal-card:hover .journal-media img {
  transform: scale(1.06);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn .arrow,
.link-more .arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}

.btn:hover .arrow,
.link-more:hover .arrow {
  transform: translateX(6px);
}

.btn-primary {
  background: var(--amber);
  color: var(--navy-dark);
}

.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-outline {
  border-color: rgb(var(--white-rgb) / 0.5);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.btn-light {
  background: var(--navy);
  color: var(--white);
}

.btn-light:hover {
  background: var(--navy-dark);
  box-shadow: var(--shadow);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--amber-dark);
  transition: color 0.3s var(--ease);
}

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

/* ===== Preloader ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--navy);
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--white);
  animation: preloadIn 0.9s var(--ease) both;
}

.preloader-logo span {
  color: var(--amber);
}

.preloader-line {
  width: 180px;
  height: 2px;
  background: rgb(var(--white-rgb) / 0.18);
  overflow: hidden;
}

.preloader-line::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--amber);
  animation: preloadBar 1.1s var(--ease) infinite;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

@keyframes preloadIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes preloadBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Phải cao hơn .mobile-menu (300) để nút đóng menu luôn bấm được */
  z-index: 310;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}

.logo-mark {
  color: var(--amber);
  font-size: 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav a.active {
  color: var(--amber-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nút gọi nhanh — chỉ hiện ở mobile khi .phone-cta bị ẩn */
.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.icon-btn:hover {
  background: rgb(var(--amber-rgb) / 0.14);
  color: var(--amber-dark);
}

.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--navy-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.phone-cta:hover {
  background: var(--amber-dark);
  color: var(--white);
}

/* Header trên hero tối → chữ sáng */
.header-light .logo,
.header-light .nav a,
.header-light .icon-btn {
  color: var(--white);
}

.header-light .nav-toggle span {
  background: var(--white);
}

.site-header.scrolled .logo,
.site-header.scrolled .nav a,
.site-header.scrolled .icon-btn {
  color: var(--ink);
}

.site-header.scrolled .nav-toggle span {
  background: var(--ink);
}

/* Menu overlay đang mở → header nằm trên nền navy nên chuyển sang tông sáng.
   Selector scope qua .site-header để thắng cả .site-header.scrolled ở trên. */
body.menu-open .site-header .logo,
body.menu-open .site-header .icon-btn {
  color: var(--paper);
}

body.menu-open .site-header .nav-toggle span {
  background: var(--paper);
}

/* Overlay đang mở: header phải trong suốt, nếu không nền trắng khi đã scroll
   sẽ đè lên overlay navy và làm logo tông sáng gần như biến mất */
body.menu-open .site-header {
  background: transparent;
  box-shadow: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease),
    background 0.3s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Mobile menu overlay ===== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--navy);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  padding: 10px 0;
  font-size: clamp(24px, 7vw, 36px);
  font-weight: 800;
  color: var(--white);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    color 0.3s var(--ease);
}

.mobile-menu.open a {
  opacity: 1;
  transform: none;
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.10s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.17s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.24s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.31s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.38s; }

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--amber);
}

.mobile-menu-meta {
  margin-top: 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgb(var(--white-rgb) / 0.6);
}

/* ===== Hero (trang chủ) ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgb(var(--navy-rgb) / 0.94) 0%,
    rgb(var(--navy-rgb) / 0.78) 45%,
    rgb(var(--navy-rgb) / 0.42) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 150px 0 120px;
}

.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: var(--white);
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  max-width: 560px;
  margin-bottom: 34px;
  font-size: 17px;
  color: rgb(var(--white-rgb) / 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Dải số liệu ngay dưới hero */
.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 34px 0;
  margin-top: 60px;
  border-top: 1px solid rgb(var(--white-rgb) / 0.16);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--amber);
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgb(var(--white-rgb) / 0.66);
}

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  padding: 16px 0;
  white-space: nowrap;
  background: var(--amber);
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  padding: 0 22px;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy-dark);
}

.marquee-track span i {
  font-style: normal;
  color: var(--white);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Page hero (trang phụ) ===== */
.page-hero {
  padding: 150px 0 70px;
  background: var(--navy);
  color: rgb(var(--white-rgb) / 0.75);
}

.page-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 52px);
  color: var(--white);
}

.page-hero p {
  max-width: 640px;
  margin: 0;
}

.page-hero-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.page-hero-strip img {
  height: 120px;
  border-radius: var(--radius);
  transition: transform 0.5s var(--ease);
}

.page-hero-strip img:hover {
  transform: translateY(-5px);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgb(var(--white-rgb) / 0.6);
}

.breadcrumb a:hover {
  color: var(--amber);
}

.breadcrumb .sep {
  padding: 0 8px;
}

/* ===== Dịch vụ ===== */
.service-card {
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.service-ico {
  display: block;
  margin-bottom: 16px;
  font-size: 34px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.service-card p {
  margin: 0;
  font-size: 15px;
}

/* ===== Khối 2 cột (about teaser / story) ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.split-body h2 {
  font-size: clamp(28px, 3.8vw, 42px);
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 30px;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
}

.check-list .ico {
  flex: none;
  font-weight: 800;
  color: var(--green);
}

.pull-quote {
  margin: 26px 0;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--amber);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
}

/* ===== Project card ===== */
.project-card {
  position: relative;
}

/* Dự án nổi hơn các card khác khi hover */
.project-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Link phủ toàn card (stretched link) — nằm dưới nút xem nhanh */
.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
}

.project-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.project-badge.done {
  background: var(--green);
}

.project-badge.progress {
  background: var(--amber);
  color: var(--navy-dark);
}

.project-info {
  padding: 24px 24px 26px;
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
  transition: color 0.3s var(--ease);
}

.project-card:hover .project-info h3 {
  color: var(--amber-dark);
}

.project-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.quick-view {
  position: relative;
  z-index: 2;
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    background 0.3s var(--ease), color 0.3s var(--ease);
}

.project-card:hover .quick-view,
.project-card:focus-within .quick-view {
  opacity: 1;
  transform: none;
}

.quick-view:hover {
  background: var(--amber);
  color: var(--navy-dark);
}

/* Thiết bị cảm ứng không có hover: nút luôn ẩn nhưng vẫn nằm trên link phủ card
   → chạm vào dải đáy card sẽ bấm nhầm nút. Gỡ hẳn nút khỏi layout. */
@media (hover: none) {
  .quick-view {
    display: none;
  }
}

/* Trạng thái bộ lọc: animation nên luôn thắng cascade của .reveal */
.project-card.filter-pop {
  animation: filterPop 0.35s var(--ease) both;
}

.project-card.filter-out {
  animation: filterOut 0.3s var(--ease) both;
  pointer-events: none;
}

.project-card.hide {
  display: none;
}

@keyframes filterPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes filterOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: scale(0.94); }
}

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  margin-bottom: 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.filter-btn:hover {
  border-color: var(--navy);
}

.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.filter-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.sort-select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.empty-note {
  padding: 56px 0;
  text-align: center;
  color: var(--muted);
}

/* ===== Quy trình 4 bước ===== */
.process-step {
  position: relative;
  padding: 32px 26px;
  border-radius: var(--radius-lg);
  background: rgb(var(--white-rgb) / 0.05);
  border: 1px solid rgb(var(--white-rgb) / 0.12);
}

.step-num {
  display: block;
  margin-bottom: 12px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--amber);
}

.process-step h3 {
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--white);
}

.process-step p {
  margin: 0;
  font-size: 15px;
}

/* ===== Quote ===== */
.quote-block {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.quote-block blockquote {
  margin: 0 0 22px;
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.45;
  color: var(--ink);
}

.quote-sign {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-dark);
}

/* ===== Tin tức ===== */
.journal-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.journal-body {
  padding: 24px 24px 28px;
}

.journal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.journal-meta .cat {
  color: var(--amber-dark);
}

.journal-card h3 {
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.3s var(--ease);
}

.journal-card:hover h3 {
  color: var(--amber-dark);
}

.journal-card p {
  margin-bottom: 16px;
  font-size: 15px;
}

/* ===== Chi tiết dự án ===== */
.project-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  padding: 70px 0 20px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.gallery-main img {
  transition: opacity 0.4s var(--ease);
}

.gallery-main img.fading {
  opacity: 0;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgb(var(--white-rgb) / 0.92);
  color: var(--navy);
  font-size: 18px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.gallery-nav:hover {
  background: var(--navy);
  color: var(--white);
}

.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  opacity: 0.7;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}

.thumb:hover {
  opacity: 1;
}

.thumb.active {
  opacity: 1;
  border-color: var(--amber);
}

.detail-info h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 18px;
}

.spec-list {
  display: grid;
  gap: 12px;
  margin: 0 0 26px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}

.spec-list b {
  font-weight: 700;
  color: var(--ink);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.mini-stat {
  padding: 18px 14px;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}

.mini-stat b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.mini-stat span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  position: relative;
  padding: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

/* Panel ẩn dùng thuộc tính [hidden] (JS bật/tắt) — trợ năng đọc đúng trạng thái */
.tab-panel {
  max-width: 820px;
  animation: fadeUp 0.45s var(--ease) both;
}

.tab-panel li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ===== Về chúng tôi: timeline, đội ngũ, stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 38px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgb(var(--amber-rgb) / 0.18);
}

.timeline-year {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 900;
  color: var(--amber-dark);
}

.timeline-item h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.timeline-item p {
  margin: 0;
  font-size: 15px;
}

.team-card {
  text-align: center;
}

.team-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.team-body {
  padding: 24px 20px 28px;
}

.team-body h3 {
  font-size: 19px;
  margin-bottom: 4px;
}

.team-role {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--amber-dark);
}

/* ===== Liên hệ ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.info-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.info-block:last-of-type {
  border-bottom: none;
}

.info-block h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.info-block p {
  margin: 0 0 4px;
  font-size: 15px;
}

.info-block a:hover {
  color: var(--amber-dark);
}

.contact-form {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-form h2 {
  font-size: 26px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--white);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.map-box {
  position: relative;
  aspect-ratio: 21 / 8;
  overflow: hidden;
  margin-top: 64px;
  border-radius: var(--radius-lg);
}

.map-box img {
  filter: grayscale(1) brightness(0.5);
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--white);
  background: rgb(var(--navy-rgb) / 0.45);
}

.map-overlay strong {
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 800;
}

/* ===== CTA band ===== */
.cta-band {
  padding: 90px 0;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(26px, 4vw, 42px);
  margin-bottom: 18px;
}

.cta-band p {
  max-width: 580px;
  margin: 0 auto 28px;
}

/* ===== Newsletter ===== */
.newsletter {
  padding: 80px 0;
  background: var(--navy-dark);
  color: rgb(var(--white-rgb) / 0.72);
}

.newsletter-inner {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3.6vw, 38px);
  color: var(--white);
}

.newsletter p {
  margin-bottom: 26px;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.newsletter-form input {
  flex: 1 1 300px;
  max-width: 380px;
  padding: 14px 16px;
  border: 1px solid rgb(var(--white-rgb) / 0.25);
  border-radius: var(--radius);
  background: transparent;
  color: var(--white);
}

.newsletter-form input::placeholder {
  color: rgb(var(--white-rgb) / 0.45);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--amber);
}

.form-note {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--amber-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.form-note.show {
  opacity: 1;
  transform: none;
}

/* Báo lỗi: đỏ nhạt trên nền tối, đỏ đậm trên nền sáng của form báo giá */
.form-note.error {
  color: var(--danger-soft);
}

.contact-form .form-note.error {
  color: var(--danger);
}

.contact-form .form-note {
  color: var(--amber-dark);
}

/* ===== Footer ===== */
.site-footer {
  padding: 74px 0 28px;
  background: var(--navy-dark);
  color: rgb(var(--white-rgb) / 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 44px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  color: var(--white);
}

.footer-brand p {
  max-width: 320px;
  font-size: 15px;
}

.footer-col h4 {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 15px;
}

.footer-col a {
  transition: color 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--amber);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid rgb(var(--white-rgb) / 0.14);
  font-size: 13px;
}

/* ===== To-top & Toast ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s var(--ease), background 0.3s var(--ease);
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--amber);
  color: var(--navy-dark);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 400;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s var(--ease);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal[data-reveal="up"] { transform: translateY(28px); }
/* Lệch ngang phải nhỏ hơn padding 24px của .container, nếu không khối reveal
   sẽ thò khỏi viewport trong lúc chờ hiện và bị cắt mép phải. */
.reveal[data-reveal="left"] { transform: translateX(-20px); }
.reveal[data-reveal="right"] { transform: translateX(20px); }
.reveal[data-reveal="zoom"] { transform: scale(0.95); }

/* Từ 1024px trở xuống layout xếp 1 cột và nhiều khối reveal chạy full-bleed (nằm
   ngoài padding .container) nên mọi lệch ngang đều thò ra — đổi sang trượt dọc. */
@media (max-width: 1024px) {
  .reveal[data-reveal="left"],
  .reveal[data-reveal="right"] { transform: translateY(24px); }
}

.reveal[data-reveal="zoom"] img {
  transform: scale(1.14);
  transition: transform 1.3s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal.visible[data-reveal="zoom"] img {
  transform: scale(1);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .section { padding: 76px 0; }
  .service-grid,
  .process-grid,
  .project-grid,
  .journal-grid,
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .split,
  .project-detail,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-inner { padding: 130px 0 90px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .phone-cta { display: none; }
  .icon-btn { display: inline-flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; margin-top: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 124px 0 56px; }
  .page-hero-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-form { padding: 26px 20px; }
  .filter-meta { width: 100%; margin-left: 0; justify-content: space-between; }
  .map-box { aspect-ratio: 4 / 3; margin-top: 44px; }
  .project-detail { padding-top: 46px; }
}

@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .service-grid,
  .process-grid,
  .project-grid,
  .journal-grid,
  .team-grid { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .newsletter-form input { flex-basis: 100%; max-width: none; }
  .tabs { gap: 18px; }
  .btn { padding: 14px 24px; }
}

/* ===== Giảm chuyển động theo thiết lập hệ thống ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .reveal[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal[data-reveal="zoom"] img { transform: none !important; }
  .marquee-track { animation: none; }
  .hero-bg { transform: none !important; }
}

/* ===== Dropdown dùng chung: bỏ giao diện native, vẽ chevron theo theme =====
   Đặt cuối file để padding-right thắng padding khai báo ở các block phía trên.
   Vẫn là <select> gốc: dropdown của hệ điều hành và a11y giữ nguyên. */
select,
.sort-select,
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.75 4.75 3.25 3.25 3.25-3.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

select:hover,
.sort-select:hover,
.field select:hover {
  border-color: var(--amber);
}

select:focus,
.sort-select:focus,
.field select:focus {
  border-color: var(--amber);
  outline: 2px solid rgb(var(--amber-rgb) / 0.35);
  outline-offset: 1px;
}
