/*
 * HIBO ADLER MASTER CSS
 * Single highest-priority HIBO front-office stylesheet for Adler.
 *
 * Rules:
 * - This is the ONLY front-office CSS file owned by HIBO modules.
 * - Loaded from displayHeader, after Hummingbird registered stylesheets.
 * - No @import. No inline <style>. No duplicated HIBO module CSS.
 * - Component selectors are namespaced to HIBO blocks.
 */

/* ==========================================================
   01. GLOBAL FONT
   Runtime variables are defined in runtime-font.css.
   ========================================================== */
/*
 * HIBO Global Font
 * Loaded from a standalone module so theme/module updates do not overwrite it.
 */

html,
body {
    font-family: var(--hibo-global-font) !important;
    font-size: var(--hibo-base-font-size);
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.nav-link,
.dropdown-item,
.pagination,
.breadcrumb {
    font-family: var(--hibo-global-font) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.page-title,
.product-title,
.card-title {
    font-family: var(--hibo-heading-font) !important;
}

/*
 * Không dùng selector "*" để tránh phá icon font hoặc các icon của module.
 */

/* ==========================================================
   02. PRODUCT SUBCATEGORY CARDS
   ========================================================== */
/*
 * HIBO - Subcategory cards
 * Scope is intentionally limited to #center-column category links transformed
 * by the module, so the left category tree and other theme components remain intact.
 */

#center-column .hibo-subcategory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 18px 0 28px;
  padding: 0;
  list-style: none;
}

#center-column .hibo-subcategory-grid > .hibo-subcategory-card-item {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

#center-column .hibo-subcategory-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

#center-column .hibo-subcategory-card:hover,
#center-column .hibo-subcategory-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.08);
}

#center-column .hibo-subcategory-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}

#center-column .hibo-subcategory-card__image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

#center-column .hibo-subcategory-card__media--placeholder {
  background: #f5f6f7;
}

#center-column .hibo-subcategory-card__media--placeholder svg {
  opacity: 0.30;
  fill: currentColor;
}

#center-column .hibo-subcategory-card__name {
  display: block;
  padding: 11px 12px 12px;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
  #center-column .hibo-subcategory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 575.98px) {
  #center-column .hibo-subcategory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 22px;
  }

  #center-column .hibo-subcategory-card {
    border-radius: 9px;
  }

  #center-column .hibo-subcategory-card__name {
    padding: 9px 8px 10px;
    font-size: 0.92rem;
  }
}

/* ==========================================================
   03. COMPANY TIMELINE
   ========================================================== */
.hibo-company-timeline-page {
  --hibo-timeline-line: #d7dce2;
  --hibo-timeline-accent: #d86b22;
  --hibo-timeline-text: #23272f;
  --hibo-timeline-muted: #6b7280;
  --hibo-timeline-card: #fff;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 56px;
}

.hibo-company-timeline-intro {
  max-width: 820px;
  margin: 0 auto 42px;
  text-align: center;
  color: var(--hibo-timeline-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hibo-company-timeline {
  position: relative;
  padding: 10px 0 20px;
}

.hibo-company-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--hibo-timeline-line) 3%, var(--hibo-timeline-line) 97%, transparent);
}

.hibo-company-timeline-year {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  margin: 16px 0 22px;
}

.hibo-company-timeline-year span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #202833;
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .12);
}

.hibo-company-timeline-item {
  position: relative;
  width: 50%;
  margin: 0 0 36px;
}

.hibo-company-timeline-item.is-left {
  padding-right: 44px;
  text-align: right;
}

.hibo-company-timeline-item.is-right {
  margin-left: 50%;
  padding-left: 44px;
  text-align: left;
}

.hibo-company-timeline-dot {
  position: absolute;
  top: 32px;
  z-index: 4;
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--hibo-timeline-accent);
  box-shadow: 0 0 0 2px var(--hibo-timeline-accent), 0 4px 12px rgba(0, 0, 0, .15);
}

.hibo-company-timeline-item.is-left .hibo-company-timeline-dot {
  right: -9px;
}

.hibo-company-timeline-item.is-right .hibo-company-timeline-dot {
  left: -9px;
}

.hibo-company-timeline-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #e8ebef;
  border-radius: 18px;
  background: var(--hibo-timeline-card);
  color: inherit;
  text-decoration: none !important;
  box-shadow: 0 10px 35px rgba(28, 37, 49, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hibo-company-timeline-card::after {
  content: "";
  position: absolute;
  top: 31px;
  width: 30px;
  height: 2px;
  background: var(--hibo-timeline-line);
}

.hibo-company-timeline-item.is-left .hibo-company-timeline-card::after {
  right: -31px;
}

.hibo-company-timeline-item.is-right .hibo-company-timeline-card::after {
  left: -31px;
}

.hibo-company-timeline-card:hover {
  transform: translateY(-3px);
  border-color: #d8dde4;
  box-shadow: 0 16px 42px rgba(28, 37, 49, .13);
}

.hibo-company-timeline-cover {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f4f5f7;
}

.hibo-company-timeline-cover img,
.hibo-company-timeline-detail-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hibo-company-timeline-card:hover .hibo-company-timeline-cover img {
  transform: scale(1.025);
}

.hibo-company-timeline-cover img {
  transition: transform .35s ease;
}

.hibo-company-timeline-card-body {
  display: flex;
  gap: 20px;
  padding: 22px 24px 24px;
}

.hibo-company-timeline-item.is-left .hibo-company-timeline-card-body {
  flex-direction: row-reverse;
}

.hibo-company-timeline-date {
  flex: 0 0 74px;
  padding-top: 2px;
  text-align: center;
  color: var(--hibo-timeline-accent);
}

.hibo-company-timeline-day {
  display: block;
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.hibo-company-timeline-month,
.hibo-company-timeline-date-year {
  display: block;
  margin-top: 4px;
  font-size: .72rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .04em;
}

.hibo-company-timeline-content {
  flex: 1 1 auto;
  min-width: 0;
}

.hibo-company-timeline-content h2 {
  margin: 0 0 10px;
  color: var(--hibo-timeline-text);
  font-size: 1.28rem;
  line-height: 1.35;
  font-weight: 800;
}

.hibo-company-timeline-excerpt {
  color: var(--hibo-timeline-muted);
  font-size: .96rem;
  line-height: 1.65;
}

.hibo-company-timeline-excerpt p:last-child {
  margin-bottom: 0;
}

.hibo-company-timeline-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--hibo-timeline-accent);
  font-weight: 700;
}

.hibo-company-timeline-detail {
  max-width: 940px;
  margin: 0 auto;
  padding-bottom: 50px;
}

.hibo-company-timeline-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7eaee;
}

.hibo-company-timeline-detail-date {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff2e8;
  color: #b75213;
  font-weight: 800;
}

.hibo-company-timeline-back,
.hibo-company-timeline-detail-footer a {
  font-weight: 700;
}

.hibo-company-timeline-detail-cover {
  overflow: hidden;
  margin: 0 0 28px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #f4f5f7;
}

.hibo-company-timeline-detail-lead {
  margin: 0 0 28px;
  padding: 20px 24px;
  border-left: 4px solid var(--hibo-timeline-accent);
  background: #faf7f4;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hibo-company-timeline-detail-content {
  font-size: 1rem;
  line-height: 1.8;
}

.hibo-company-timeline-detail-content img {
  max-width: 100%;
  height: auto;
}

.hibo-company-timeline-detail-footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid #e7eaee;
}

@media (max-width: 767.98px) {
  .hibo-company-timeline-page {
    padding-bottom: 34px;
  }

  .hibo-company-timeline-intro {
    margin-bottom: 28px;
    text-align: left;
  }

  .hibo-company-timeline::before {
    left: 12px;
    transform: none;
  }

  .hibo-company-timeline-year {
    justify-content: flex-start;
    margin-left: 36px;
  }

  .hibo-company-timeline-item,
  .hibo-company-timeline-item.is-right {
    width: auto;
    margin-left: 0;
    padding-right: 0;
    padding-left: 38px;
    text-align: left;
  }

  .hibo-company-timeline-item.is-left {
    padding-right: 0;
    padding-left: 38px;
    text-align: left;
  }

  .hibo-company-timeline-item.is-left .hibo-company-timeline-dot,
  .hibo-company-timeline-item.is-right .hibo-company-timeline-dot {
    top: 28px;
    right: auto;
    left: 3px;
  }

  .hibo-company-timeline-card::after,
  .hibo-company-timeline-item.is-left .hibo-company-timeline-card::after,
  .hibo-company-timeline-item.is-right .hibo-company-timeline-card::after {
    top: 27px;
    right: auto;
    left: -27px;
    width: 26px;
  }

  .hibo-company-timeline-item.is-left .hibo-company-timeline-card-body,
  .hibo-company-timeline-card-body {
    flex-direction: row;
  }

  .hibo-company-timeline-card-body {
    gap: 14px;
    padding: 18px;
  }

  .hibo-company-timeline-date {
    flex-basis: 62px;
  }

  .hibo-company-timeline-day {
    font-size: 1.7rem;
  }

  .hibo-company-timeline-content h2 {
    font-size: 1.12rem;
  }

  .hibo-company-timeline-detail-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

