/*
  hero.css — homepage hero (video bg) + smaller page-header hero used on
  inner pages (shop/cart/checkout/contact/about).
*/

/* ── Homepage hero ── */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; background: var(--charcoal); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }

/* Shared section background layers (hero + "Cam kết chất lượng"), driven by the
   Customizer bg-type = màu/ảnh/video. vt_section_bg_media() prints these. */
.vt-sec-bg { position: absolute; inset: 0; z-index: 0; }
.vt-sec-bg-video { width: 100%; height: 100%; object-fit: cover; }
.vt-sec-bg-image { background-size: cover; background-position: center; }
.vt-sec-bg-overlay { position: absolute; inset: 0; z-index: 1; background: rgba(20,26,22,.6); }
/* In the hero, the media layer sits under the existing overlay/grid; dim it a bit. */
.hero .vt-sec-bg { opacity: .55; z-index: 0; }
.hero .vt-sec-bg-overlay { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(107,117,110,.92) 0%, rgba(107,117,110,.78) 40%, rgba(107,117,110,.5) 75%, rgba(107,117,110,.7) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(46,125,50,.3) 0%, transparent 60%);
}
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; }
/* The grid texture is a placeholder pattern for the plain-color hero background
   only. Once the client uploads a real photo/video, it should not sit on top
   of it as a leftover frame — hide it for the image/video variants. */
.hero-bg-image .hero-grid, .hero-bg-video .hero-grid { display: none; }
.hero-inner { position: relative; z-index: 2; max-width: var(--container); margin: 0 auto; padding: 80px 24px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: center; }

.hero-label {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(46,125,50,.18); border: 1px solid rgba(46,125,50,.45);
  color: var(--green-light); font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 4px; margin-bottom: 24px;
}
.hero-label::before { content: ''; width: 6px; height: 6px; background: var(--green-light); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

.hero h1 { font-family: var(--font-head); font-size: clamp(44px, 6vw, 78px); font-weight: 900; line-height: 1.08; letter-spacing: -1px; text-transform: uppercase; margin-bottom: 24px; color: var(--white); }
.hero h1 span { color: var(--green-light); }
.hero p { color: var(--on-dark-muted); font-size: 17px; line-height: 1.7; margin-bottom: 40px; max-width: 480px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 32px; margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--border-dark); flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 36px; font-weight: 800; color: var(--green-light); line-height: 1; }
.stat-label { font-size: 12px; color: var(--on-dark-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-machine { width: 100%; max-width: 440px; aspect-ratio: 4/3; background: rgba(255,255,255,.06); border-radius: 12px; border: 1px solid var(--border-dark); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; backdrop-filter: blur(4px); }
.machine-svg { width: 80%; height: 80%; }
.hero-badge { position: absolute; bottom: -16px; right: -16px; background: var(--green); color: var(--white); padding: 16px 20px; border-radius: 10px; text-align: center; font-family: var(--font-head); font-weight: 800; box-shadow: 0 8px 32px rgba(46,125,50,.4); }
.hero-badge .big { font-size: 28px; line-height: 1; }
.hero-badge .small { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }

/* ── Inner-page header (shop/cart/checkout/contact/about) ── */
.page-header {
  position: relative; background: var(--charcoal);
  /* "cao ra thêm xíu để chèn banner giống home": banner giờ đủ cao để nhét ảnh
     nền (Customizer > Banner trang Giới thiệu) mà không bị bóp/cắt xấu, thay
     vì chỉ là 1 dải màu mỏng như trước. */
  /* align-items: flex-start — chữ "GIỚI THIỆU" thụt lên trên banner (trước
     canh giữa) theo yêu cầu, chỉ áp desktop; mobile có align riêng bên dưới. */
  min-height: 420px; display: flex; align-items: flex-start;
  padding: 64px 0 48px; overflow: hidden;
}
.page-header::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse at 80% 0%, rgba(46,125,50,.2) 0%, transparent 60%); }
.page-header-inner { position: relative; z-index: 2; max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
.page-header h1 { font-family: var(--font-head); font-size: clamp(32px, 4vw, 48px); font-weight: 800; text-transform: uppercase; color: var(--white); margin: 10px 0; letter-spacing: -.5px; }
/* Riêng banner trang Giới thiệu giữ màu xanh cả desktop lẫn mobile (mục 46) —
   các trang khác dùng .page-header dùng mặc định trắng ở trên. */
.page-header--about h1 { color: var(--green-light); }
.page-header .breadcrumb { color: var(--on-dark-muted); }
.page-header .breadcrumb a { color: var(--on-dark-muted); }
.page-header .breadcrumb a:hover { color: var(--green-light); }
.page-header .breadcrumb .current { color: var(--white); }

@media (max-width: 768px) {
  .page-header { min-height: 280px; padding: 48px 0 40px; }
  /* Chỉ banner trang Giới thiệu (page-header--about) mới xuống dưới + xanh —
     đây là style riêng theo đúng góc ảnh của trang đó (mục 44-46), lỡ áp
     nhầm sang mọi trang dùng chung .page-header (Liên hệ, trang thường...).
     Banner các trang khác giữ mặc định: chữ trên đỉnh, màu trắng. */
  .page-header--about { align-items: flex-end; }
}

@media (max-width: 768px) {
  /* BUGFIX (hero ảnh nền không co lại trên mobile): min-height:88vh áp cho mọi
     màn hình. Trên điện thoại (viewport hẹp mà cao), 88% chiều cao màn hình vẫn
     ra một khối rất cao so với bề ngang, nên ảnh nền (background-size:cover)
     buộc phải phóng to/cắt sâu hơn nhiều so với desktop để lấp đầy khối đó —
     nhìn như ảnh "không co lại". Giảm min-height và để nội dung quyết định
     chiều cao thật trên mobile. */
  .hero { min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 56px 24px; }
  .hero-visual { display: none; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
}
