/* ==========================================================================
   DESIGN SYSTEM - TRANG THÔNG TIN ĐIỆN TỬ XÂY DỰNG VÀ PHÁT TRIỂN THƯƠNG HIỆU SẢN PHẨM (EPRODUCT)
   Phiên bản nâng cấp: Chuẩn hóa Typography tiếng Việt (Lora + Be Vietnam Pro)
   ========================================================================== */

/* Import Google Fonts hỗ trợ tiếng Việt toàn diện */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Lora:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  /* Bảng màu nhận diện thương hiệu Nông nghiệp Số & OCOP */
  --color-primary-dark: #143527;
  --color-primary: #1E5638;
  --color-primary-hover: #16402a;
  --color-primary-light: #388E5E;
  --color-primary-subtle: #e8f5ee;
  --color-primary-rgb: 30, 86, 56;
  
  --color-accent: #D48B17;
  --color-accent-hover: #b8750f;
  --color-accent-light: #fff3db;
  --color-accent-rgb: 212, 139, 23;
  
  --color-dark: #0f1d16;
  --color-dark-surface: #182a20;
  --color-dark-border: #233c2e;
  
  --color-light: #F6F8F6;
  --color-light-gray: #edf2ee;
  --color-surface: #ffffff;
  
  --color-text-main: #1f2937;
  --color-text-heading: #0e291d;
  --color-text-muted: #5a6a60;
  --color-border: #e2e9e4;
  
  /* Typography Tokens - Tối ưu 100% tiếng Việt không bao giờ bị lỗi dấu */
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  
  /* Spacing & Bo góc */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Hệ thống Đổ bóng mềm chuẩn UX hiện đại */
  --shadow-sm: 0 2px 6px rgba(15, 29, 22, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 29, 22, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 29, 22, 0.12);
  --shadow-hover: 0 18px 38px rgba(30, 86, 56, 0.16);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.04);

  --transition-fast: all 0.18s ease;
  --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Tokens */
[data-theme="dark"] {
  --color-dark: #0b140f;
  --color-dark-surface: #122118;
  --color-surface: #15271d;
  --color-light: #101c15;
  --color-light-gray: #172a1f;
  
  --color-text-main: #e2e8e4;
  --color-text-heading: #f0f7f2;
  --color-text-muted: #95a89d;
  --color-border: #233b2d;
  
  --color-primary-subtle: rgba(56, 142, 94, 0.15);
  --color-accent-light: rgba(212, 139, 23, 0.15);
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.3);
}

/* Base Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: #ffffff;
  line-height: 1.7;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background-color: var(--color-dark);
}

/* PHÒNG VỆ CHỐNG MÀN HÌNH TRẮNG:
   Nếu thư viện AOS bị trễ CDN hoặc offline, nội dung vẫn hiển thị rõ ràng 100% không bao giờ bị trắng màn hình */
body:not(.aos-animate-ready) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Typography Scale */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  color: var(--color-text-heading);
  letter-spacing: -0.015em;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] .font-serif {
  color: var(--color-text-heading);
}

h1 { font-size: 2.35rem; font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.95rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.4rem; font-weight: 600; line-height: 1.38; }
h4 { font-size: 1.18rem; font-weight: 600; line-height: 1.45; }
h5 { font-size: 1.05rem; font-weight: 600; }
h6 { font-size: 0.9rem; font-weight: 600; line-height: 1.38; }

p {
  margin-bottom: 1rem;
}

/* Utilities */
.text-primary-custom { color: var(--color-primary) !important; }
.text-accent-custom { color: var(--color-accent) !important; }
.text-muted-custom { color: var(--color-text-muted) !important; }
.bg-primary-custom { background-color: var(--color-primary) !important; }
.bg-accent-custom { background-color: var(--color-accent) !important; }
.bg-light-custom { background-color: var(--color-light) !important; }
.bg-surface-custom { background-color: var(--color-surface) !important; }

/* Nút bấm tiêu chuẩn UI/UX đồng bộ */
.btn-agri {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-primary);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}

.btn-agri:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.32);
}

.btn-agri-outline {
  background-color: transparent;
  color: var(--color-primary) !important;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-primary);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-agri-outline:hover {
  background-color: var(--color-primary);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--color-primary-rgb), 0.25);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-accent);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.25);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(var(--color-accent-rgb), 0.38);
}

/* Section Header đồng bộ toàn hệ thống */
.section-header-block {
  margin-bottom: 2.25rem;
  position: relative;
}

.section-header-block .section-subtitle {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-header-block .section-subtitle::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2.5px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

.section-header-block .section-title {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

[data-theme="dark"] .section-header-block .section-title {
  color: #a4e5c3;
}

.section-header-block .title-underline {
  width: 56px;
  height: 3.5px;
  background: linear-gradient(90deg, var(--color-accent), #f3c36c);
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

/* Glassmorphism & Card nâng cấp */
.card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .card-glass {
  background: rgba(24, 42, 32, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Page Banner / Breadcrumb Header dùng chung cho các trang con */
.page-hero-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 65%, #2a6f4a 100%);
  color: #ffffff;
  padding: 3.5rem 0 3rem 0;
  position: relative;
  overflow: hidden;
}

.page-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}

.page-hero-banner .breadcrumb {
  margin-bottom: 0.75rem;
}

.page-hero-banner .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.page-hero-banner .breadcrumb-item a:hover {
  color: var(--color-accent);
}

.page-hero-banner .breadcrumb-item.active {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
}

.page-hero-banner .page-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.page-hero-banner .page-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  margin-bottom: 0;
}

/* Responsive Helpers */
@media (max-width: 991.98px) {
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.65rem; }
  .section-header-block .section-title { font-size: 1.75rem; }
  .page-hero-banner { padding: 2.5rem 0 2rem 0; }
  .page-hero-banner .page-title { font-size: 1.9rem; }
}

@media (max-width: 575.98px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
  .section-header-block { margin-bottom: 1.5rem; }
}

.glightbox-clean .gslide-description {
    display: none;
}
