/* ==========================================================================
   HỆ THỐNG MÀU SẮC CHUẨN ĐƯỢC PHÉP
   #28351C - Rêu đậm (Màu nền chính Header & Contact)
   #616E3E - Xanh ô liu (Nền menu phụ, card accent)
   #9E9A7E - Xám lục trung tính (Viền và chi tiết)
   #A8AE3C - Vàng chanh lá mạ (Điểm nhấn, hover)
   #D8D1B2 - Kem cát Tây Nam Bộ (Chữ phụ, viền mờ)
   #ffb331 - Vàng hổ phách đặc trưng (Tiêu đề, button highlight)
   #ffffff - Trắng tinh khiết
   ========================================================================== */

:root {
  --color-xanh: #d9786a;
  --color-hong: #e69588;
  --color-lam: #77adcd;
  --color-vang: #eeecec;
  --color-white: #ffffff;

  --max-width: 480px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset & Mobile-First Constraints */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #111111; /* Nền tối sang trọng ngoài khung 9:16 */
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-white);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Vùng chứa toàn bộ website - Tối ưu hiển thị dọc 9:16 trên Mobile */
.page-wrapper {
  width: 100%;
  max-width: var(--max-width);
  background-color: var(--color-xanh);
box-shadow: none !important;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
/* Tinh chỉnh biểu tượng Google Material Symbols */
.material-symbols-outlined {
  font-size: 10px;          /* Chỉnh to/nhỏ tùy ý (mặc định của Google là 24px) */
  vertical-align: middle;   /* Căn giữa đều hàng ngang với chữ đi kèm */
  display: inline-block;
  line-height: 1;
}

/* ==========================================================================
   PHẦN 1: HEADER (Font to đậm, chữ T đan tự nhiên vào avatar)
   ========================================================================== */
.header-section {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(54, 73, 95, 0.65)), 
              url('../images/bg.webp') no-repeat center center;
  background-size: cover;
  position: relative;
  padding: 24px 16px 20px 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.avatar-container {
  flex-shrink: 0;
  position: relative;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  border: 3.5px solid var(--color-white);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-info {
  flex-grow: 1;
  position: relative;
  z-index: 2;
  margin-left: -12px; /* Đẩy tiêu đề sang trái để chữ T đè nhẹ lên rìa viền avatar */
}

.brand-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: -0.5px; /* Giữ chữ liền khối, khắc phục triệt để lỗi khoảng cách chữ T */
  margin-bottom: 4px;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.brand-intro {
  font-family: 'tahoma';
  font-style: italic;
  font-size: 1.00rem;
  line-height: 1.35;
  color: var(--color-white);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  
  /* Căn lề phải và canh chỉnh lề */
  text-align: right;
  padding-left: 0;
  padding-right: 4px;
}

/* ==========================================================================
   PHẦN 2: MENU BUTTON (Giữ đúng màu nhận diện thương hiệu nền tảng)
   ========================================================================== */

/* Chuẩn hóa lề đệm trên/dưới đồng đều 10px cho tất cả các phần */
.quick-nav-section,
.slider-section,
.portfolio-section {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.quick-nav-section {
  background-color: var(--color-white);
  padding: 10px 12px;
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-quick-nav {
  height: 40px !important; /* Cố định đúng 1 chiều cao 40px */
  padding: 0 4px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
  text-align: center;
}

.nav-fb   { background-color: #3b5998; } /* Facebook Blue */
.nav-zalo { background-color: #0068ff; } /* Zalo Blue */
.nav-yt   { background-color: #cc181e; } /* Youtube Red */
.nav-tt   { background-color: #000000; } /* Tiktok Black */

.btn-quick-nav:hover,
.btn-quick-nav:active {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   PHẦN 3: GIỚI THIỆU / GHI CHÚ (TỰ ĐỘNG CO GIÃN THEO NỘI DUNG, KHÔNG MẤT CHỮ)
   ========================================================================== */
.about-tabs-section {
  background-color: var(--color-white);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* 1. Bỏ min-height cứng, cho container tự giãn chiều cao theo nội dung */
.tab-panels-container {
  position: relative;
  width: 100%;
  height: auto;
  min-height: auto;
  background-color: var(--color-white);
  overflow: visible; /* Không cắt chữ khi tràn */
  z-index: 1;

  border: 1.5px solid var(--color-lam); /* Tạo đường viền màu #616e3e */
  border-radius: 18px;          /* Bo tròn các góc */
  margin: 10px auto !important;           /* Tạo khoảng cách trên dưới và căn giữa */
  width: calc(100% - 24px);    /* Cách 2 mép màn hình mỗi bên 12px để lộ viền đẹp */
  box-sizing: border-box;
}

/* 2. Dùng display: none thay cho absolute để chiều cao tự động tính đúng */
.tab-panel {
  display: none;
  width: 100%;
  padding: 14px 14px; /* Tạo khoảng thở trên/dưới và 2 bên */
  box-sizing: border-box;
}

/* Khi tab được kích hoạt */
.tab-panel.active {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  animation: tabFadeIn 0.35s ease-out forwards;
}

/* Khối bọc chữ */
.tab-text-box {
  width: 100%;
  max-width: 100%;
}

.tab-text-box p {
  color: #444444;
  font-size: 14pt;
  line-height: 1.6;
  font-weight: 500;
  text-align: left;
  letter-spacing: -0.2px;
  word-break: break-word; /* Chống tràn chữ ngang */
  margin: 0;
}

/* 3. Thanh 3 nút bấm */
.tab-buttons-bar {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  background-color: var(--color-xanh);
  border-top: 1px solid var(--color-lam);
}

.tab-btn {
  height: 40px !important; /* Bằng đúng chiều cao hàng nút MXH ở trên */
  padding: 0 4px !important;
  flex: 1;
  padding: 11px 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  border: none;
  outline: none;
  cursor: pointer;
  background-color: var(--color-lam);
  color: var(--color-white);
  transition: background-color 0.25s ease, color 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.active {
  background-color: var(--color-white) !important;
  color: var(--color-lam) !important;
}

/* Hiệu ứng trượt nhẹ vào */
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ==========================================================================
   PHẦN 4: SLIDER HÌNH ẢNH (3 Ảnh, Auto 5s)
   ========================================================================== */
.slider-section {
  background-color: var(--color-white);
  padding: 10px 12px !important; /* Cố định trên 10px - dưới 10px */
}

.slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(40, 53, 28, 0.15);
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.slide-item.active {
  opacity: 1;
  visibility: visible;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(216, 209, 178, 0.7);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dot-btn.active {
  background-color: var(--color-white);
  transform: scale(1.3);
}

/* ==========================================================================
   PHẦN 5: CONTENT (5 Banner 1 Cột - Chuẩn tỷ lệ 21:6)
   ========================================================================== */
.portfolio-section {
  background-color: var(--color-white);
  padding: 6px 12px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(40, 53, 28, 0.12);
  transition: var(--transition-smooth);
}

.portfolio-link {
  display: block;
  text-decoration: none;
}

.portfolio-card .image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 6; /* Tỷ lệ 21:6 chuẩn xác theo yêu cầu */
  overflow: hidden;
  background-color: var(--color-xanh);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 53, 28, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: background 0.3s ease;
}

.card-title {
  color: var(--color-white);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  transition: var(--transition-smooth);
}

.portfolio-card:hover img,
.portfolio-card:active img {
  transform: scale(1.04);
}

.portfolio-card:hover .card-overlay,
.portfolio-card:active .card-overlay {
  background: rgba(40, 53, 28, 0.4);
}

.portfolio-card:hover .card-title,
.portfolio-card:active .card-title {
  color: var(--color-vang);
  transform: translateY(-2px);
}

/* ==========================================================================
   PHẦN 6: CONTACT / LIÊN HỆ
   ========================================================================== */
.contact-section {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(54, 73, 95, 0.65)), url('../images/bg.webp') no-repeat center center; 
  background-size: cover; 
  position: relative;
  padding: 16px 12px;
  text-align: center;
}

.contact-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.contact-btn-group {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-action {
  min-width: 110px;
  padding: 8px 18px;
  border: 1.5px solid var(--color-white);
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  background-color: transparent;
  transition: var(--transition-smooth);
}

.btn-action:hover,
.btn-action:active {
  background-color: var(--color-vang);
  border-color: var(--color-vang);
  color: var(--color-xanh);
  transform: scale(1.03);
}

/* ==========================================================================
   PHẦN 7: MENU CUỐI TRANG
   ========================================================================== */
.bottom-menu-section {
  background-color: var(--color-white);
  padding: 10px;
}

.bottom-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-bottom-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 2px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  background-color: var(--color-lam);
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.btn-bottom-menu.btn-accent {
  background-color: var(--color-vang);
  color: var(--color-xanh);
}

.btn-bottom-menu:hover,
.btn-bottom-menu:active {
  background-color: var(--color-vang);
  color: var(--color-xanh);
}

/* ==========================================================================
   PHẦN 8: FOOTER
   ========================================================================== */
.footer-section {
  background-color: var(--color-xanh);
  padding: 16px 14px;
  border-top: 1px solid var(--color-xanh);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-info {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-white);
  font-weight: 500;
}

.footer-info .copyright {
  font-weight: 700;
  color: var(--color-white);
}

.footer-badge {
  flex-shrink: 0;
}

/* ==========================================================================
   SCROLL REVEAL & ACCESSIBILITY
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ==========================================================================
   TỐI ƯU HIỂN THỊ MÀN HÌNH NGANG / MÁY TÍNH
   ========================================================================== */
@media screen and (min-width: 768px) {
  /* 1. Mở rộng khung website gấp đôi */
  :root {
    --max-width: 960px;
  }

  .page-wrapper {
    max-width: 960px !important;
    border-radius: 12px;
    margin: 20px auto;
  }

  /* 2. Phần 5: 2 card mỗi hàng & GIỮ NGUYÊN CHIỀU CAO KHÔNG BỊ TĂNG */
  .portfolio-section {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Mỗi hàng 2 card */
    gap: 12px !important;
    padding: 10px 12px !important;
  }

  .portfolio-card .image-wrapper {
    /* Khóa cố định chiều cao bằng đúng chiều cao lúc xem điện thoại */
    height: 130px !important; 
    aspect-ratio: auto !important; /* Hủy tự động giãn theo tỷ lệ */
  }

  /* Cân chỉnh lại font chữ tiêu đề trên card cho gọn gàng, thanh thoát */
  .portfolio-card .card-title {
    font-size: 1rem !important;
  }

  /* 3. Tinh chỉnh các phần khác cân đối trên màn hình ngang */
  .header-section {
    padding: 24px 20px !important;
  }

  .quick-nav-grid,
  .bottom-menu-grid {
    gap: 10px !important;
  }

  .contact-btn-group {
    gap: 16px !important;
  }
}