/* Quán Bia Khô Mực — layout overrides */

html {
  scroll-behavior: auto;
}

/* Vietnamese-friendly typography */
body,
.l-page,
button,
input,
select,
textarea {
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif !important;
  -webkit-font-feature-settings: normal !important;
  font-feature-settings: normal !important;
  letter-spacing: 0.01em;
}

.logo--bkm .logo__brand,
.loading__logo .logo__brand,
.footer--bkm .logo__brand {
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif !important;
}

/* Hero video */
.sec-mv__bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 767px) {
  .sec-mv {
    min-height: max(300px, 58vw);
  }

  .sec-mv__bg,
  .sec-mv__bg video {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Hero: horizontal text */
.sec-mv__typo {
  writing-mode: horizontal-tb;
  -webkit-writing-mode: horizontal-tb;
  -ms-writing-mode: lr-tb;
  text-align: center;
  max-width: 90%;
  font-size: clamp(22px, 4.5vw, 40px);
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-indent: 0;
}

@media (min-width: 768px) {
  .sec-mv__typo {
    font-size: clamp(28px, 3.2vw, 48px);
    max-width: 720px;
  }
}

/* Space between hero and about */
.sec-about {
  margin-top: 3rem;
  padding-top: 2.5rem;
}

@media (min-width: 768px) {
  .sec-about {
    margin-top: 5rem;
    padding-top: 3.5rem;
  }
}

.sec-about__heading {
  writing-mode: horizontal-tb;
  -webkit-writing-mode: horizontal-tb;
}

/* Logo: image + brand name horizontal */
.logo--bkm .logo__typo img {
  display: none;
}

.logo--bkm .logo__brand {
  display: block;
  writing-mode: horizontal-tb;
  -webkit-writing-mode: horizontal-tb;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  color: #1a1a1a;
  white-space: nowrap;
}

.logo--bkm .logo__img img {
  display: block;
  max-height: 52px;
  width: auto;
}

@media (min-width: 768px) {
  .logo--bkm .logo__brand {
    font-size: 15px;
  }
  .logo--bkm .logo__img img {
    max-height: 60px;
  }
}

.loading__logo .img {
  width: auto !important;
  height: auto !important;
}

.loading__logo .img img {
  display: block;
  width: auto;
  height: auto;
  max-width: 96px;
  max-height: 96px;
  margin: 0 auto;
}

.loading__logo .logo__brand {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #333;
  writing-mode: horizontal-tb;
}

.loading__logo .typo svg {
  display: none;
}

/* About: intro image + spacing from title */
.sec-about.is-active .sec-about__image,
.sec-about.is-active .sec-about__body {
  opacity: 1;
}

.sec-about__image {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  background: #ebe6dc;
}

.sec-about__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .sec-about__image {
    margin-bottom: 0;
    right: calc(50% - 80px) !important;
    background: #ebe6dc;
  }

  .sec-about__image img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain !important;
    object-position: center center;
  }

  .sec-about__body {
    padding-left: 48px;
    box-sizing: border-box;
  }

  .sec-about__heading {
    margin-left: 0;
    margin-right: auto;
  }
}

/* About list: equal image sizes */
.sec-about__list .about-list__item .card__image .image {
  aspect-ratio: 4 / 3;
  width: 100%;
  position: relative;
  background: #e8e4dc;
}

.sec-about__list .about-list__item .card__image .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sec-about__list .about-list__item.is-active,
.sec-about__list .about-list__item {
  opacity: 1;
}

@media (min-width: 768px) {
  .sec-about__list .about-list {
    align-items: stretch;
  }

  .sec-about__list .about-list__item {
    display: flex;
  }

  .sec-about__list .about-list__item .card {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .sec-about__list .about-list__item .card__main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .sec-about__list .about-list__item .card__image .image {
    min-height: 200px;
  }
}

.sec-about__list .card__button,
.sec-amimoto__button {
  display: none !important;
}

/* sec-scene: luôn hiển thị — tránh chữ mất khi IntersectionObserver không kích hoạt */
.sec-scene__container .sec-scene__head,
.sec-scene__container .sec-scene__body,
.sec-scene__container.is-active .sec-scene__head,
.sec-scene__container.is-active .sec-scene__body {
  opacity: 1 !important;
}

@media (min-width: 768px) {
  .sec-scene .sec-scene__head {
    overflow: visible;
    align-self: flex-start;
    padding-top: 8px;
  }
}

/* Tin tức + Xem thêm / Xem tất cả: chữ ngang */
.sec-feature .sec-feature__head .section-head__heading,
.sec-scene .sec-scene__head .section-head__heading {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  text-orientation: mixed;
  text-align: left;
  letter-spacing: 0.04em;
  line-height: 1.4;
  font-size: clamp(22px, 3vw, 32px);
  margin: 0 !important;
  overflow: visible;
}

.sec-feature .section-head__button,
.sec-scene .section-head__button {
  margin: 12px 0 0 !important;
  text-align: left;
}

.sec-feature .section-head__button .button,
.sec-scene .section-head__button .button {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px;
}

.sec-feature .section-head__button .button__text,
.sec-feature .section-head__button .button__icon,
.sec-scene .section-head__button .button__text,
.sec-scene .section-head__button .button__icon {
  display: inline-block !important;
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  text-orientation: mixed;
  margin: 0 !important;
  letter-spacing: 0.02em;
}

.sec-feature .section-head__button .button__icon img,
.sec-scene .section-head__button .button__icon img {
  width: 28px;
  height: 28px;
}

.sec-feature__button .button,
.sec-scene__button .button {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  gap: 8px;
}

.sec-feature__button .button__text,
.sec-scene__button .button__text {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  text-orientation: mixed;
  margin: 0 !important;
  letter-spacing: 0.04em;
}

@media (min-width: 768px) {
  .sec-feature .sec-feature__head .section-head__heading,
  .sec-scene .sec-scene__head .section-head__heading {
    font-size: clamp(26px, 2.5vw, 36px);
  }

  .sec-feature .sec-feature__head,
  .sec-scene .sec-scene__head {
    overflow: visible;
  }
}

/* Menu (sec-scene) — mobile căn như layout mẫu */
@media (max-width: 767px) {
  .sec-scene {
    padding: 48px 0 72px;
  }

  .sec-scene__container {
    display: block;
  }

  .sec-scene__head {
    width: 100%;
    padding: 0 20px;
    margin: 0 0 12px;
    box-sizing: border-box;
  }

  .sec-scene__head .section-head__heading {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
  }

  .sec-scene__body {
    margin: 0;
  }

  .sec-scene__content-head {
    padding: 0 20px 16px;
    box-sizing: border-box;
  }

  .sec-scene__sub-heading {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
  }

  .sec-scene__text {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.65;
  }

  .sec-scene__list {
    padding: 0;
  }

  .sec-scene__list .scene-list {
    margin: 0;
  }

  .sec-scene__list .scene-list__item .button {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    height: auto;
    min-height: 150px;
    padding: 20px;
    box-sizing: border-box;
  }

  .sec-scene__list .scene-list__item .button__num {
    flex: 0 0 32px;
    width: 32px;
    margin: 2px 0 0;
    font-size: 12px;
  }

  .sec-scene__list .scene-list__item .button__name {
    flex: 1 1 auto;
    margin: 0 12px 0 0;
    min-width: 0;
    max-width: calc(100% - 32px - 106px);
  }

  .sec-scene__list .scene-list__item .button__name .main {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
  }

  .sec-scene__list .scene-list__item .button__name .sub {
    margin: 8px 0 0;
    font-size: 11px;
  }

  .sec-scene__list .scene-list__item .button__image {
    flex: 0 0 94px;
    width: 94px;
    margin: 0 0 0 auto;
    order: 3;
  }

  .sec-scene__list .scene-list__item .button__image img {
    display: block;
    width: 94px;
    height: 122px;
    object-fit: cover;
    border-radius: 4px;
  }

  .sec-scene__list .scene-list__item .button__icon {
    display: none !important;
  }

  .sec-scene__button {
    margin-top: 28px;
    padding: 0 20px;
    text-align: center;
  }

  .sec-scene__button .button {
    justify-content: center;
  }
}

/* Tin tức: luôn hiển thị (tránh opacity:0 khi scroll observer không chạy) */
.sec-feature__container .sec-feature__head,
.sec-feature__container .sec-feature__body,
.sec-feature__container.is-active .sec-feature__head,
.sec-feature__container.is-active .sec-feature__body {
  opacity: 1 !important;
}

/* Tin tức: nút prev/next (slider_icon_arw.svg đã bị file HTML lỗi) */
.sec-feature__controller .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sec-feature__controller .sec-feature__nav-icon {
  display: block;
  width: 34px;
  height: 34px;
}

.sec-feature__controller .sec-feature__nav-icon--prev {
  transform: rotateY(180deg);
}

@media (min-width: 768px) {
  .sec-feature__controller .sec-feature__nav-icon {
    width: 48px;
    height: 48px;
  }
}

/* Amimoto: giữ CSS/animation gốc — chỉ logo + hiển thị */
.sec-amimoto__container.is-active .sec-amimoto__image,
.sec-amimoto__container.is-active .sec-amimoto__body,
.sec-amimoto__image {
  opacity: 1 !important;
}

.sec-amimoto__logo img {
  width: auto !important;
  height: auto !important;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .sec-amimoto__image .image--1 .image__inner {
    -webkit-animation: loop-vertical-top 40s linear infinite !important;
    animation: loop-vertical-top 40s linear infinite !important;
  }

  .sec-amimoto__image .image--2 .image__inner {
    -webkit-animation: loop-vertical-bottom 40s linear infinite !important;
    animation: loop-vertical-bottom 40s linear infinite !important;
  }

  .sec-amimoto__image .image__inner img {
    width: 100%;
    height: auto;
    display: block;
    flex-shrink: 0;
  }

  .sec-amimoto__logo {
    margin-top: 0 !important;
  }

  .sec-amimoto__logo img {
    max-width: 100px;
    max-height: 100px;
  }
}

@media (max-width: 767px) {
  .sec-amimoto__image .image--mobile .image__inner {
    -webkit-animation: loop-horizontal 60s linear infinite !important;
    animation: loop-horizontal 60s linear infinite !important;
  }

  .sec-amimoto__image .image--mobile .image__inner img {
    width: auto;
    height: 100%;
    flex-shrink: 0;
  }
}

/* Footer: simplified horizontal layout (no banner images) */
.l-footer {
  padding: 48px 0 32px !important;
  margin-top: 0 !important;
}

.l-footer .footer--bkm {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  color: #fff;
}

.footer--bkm__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer--bkm__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    gap: 40px;
  }
}

.footer--bkm__brand a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

@media (min-width: 768px) {
  .footer--bkm__brand a {
    align-items: flex-start;
  }
}

.footer--bkm__logo-img {
  max-height: 72px;
  width: auto;
}

.footer--bkm .logo__brand {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
}

.footer--bkm__nav {
  flex: 1;
  min-width: 0;
}

.footer--bkm__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

@media (min-width: 768px) {
  .footer--bkm__links {
    justify-content: flex-end;
  }
}

.footer--bkm__links--sub {
  margin-top: 12px;
  gap: 6px 16px;
}

.footer--bkm__links--sub a {
  font-size: 13px;
  opacity: 0.92;
}

.footer--bkm__links li {
  margin: 0;
  padding: 0;
}

.footer--bkm__links a {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  text-orientation: mixed;
  transform: none !important;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .footer--bkm__links a {
    white-space: normal;
  }
}

.footer--bkm__links a:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer--bkm__copy {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
}

/* Hide legacy footer blocks if any remain */
.l-footer .menu__bnr,
.l-footer .footer__menu .menu__bnr {
  display: none !important;
}

/* Branch section: horizontal title on top (trang chủ) */
#js-page-search-app {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#js-page-search-app > .sec-search__head {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 20px;
  padding: 0 20px;
  box-sizing: border-box;
  position: static;
  z-index: 2;
}

#js-page-search-app .sec-search__head .section-head__heading,
.search-modal__container #js-search-app .sec-search__head .section-head__heading {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  text-orientation: mixed;
  text-align: center;
  letter-spacing: 0.05em;
  line-height: 1.35;
  font-size: clamp(24px, 4vw, 36px);
}

#js-page-search-app .sec-search__container {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .l-main #js-page-search-app.sec-search {
    position: relative;
    min-height: auto;
    padding: 80px 24px 100px;
    overflow: visible;
  }

  .l-main #js-page-search-app > .sec-search__head {
    max-width: 960px;
    margin-bottom: 32px;
    padding: 0;
  }

  .l-main #js-page-search-app > .sec-search__head .section-head__heading {
    font-size: clamp(28px, 3vw, 40px);
  }

  .l-main #js-page-search-app > .sec-search__map {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
  }

  .l-main #js-page-search-app > .sec-search__map .branch-cards {
    padding: 0;
  }
}

/* Trang chủ: 4 chi nhánh — mobile 1 list, desktop 1 list (không trùng) */
#js-page-search-app > .sec-search__map {
  display: none !important;
}

#js-page-search-app .branch-cards--inline {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0 0 24px;
  width: 100%;
}

#js-page-search-app .branch-cards--inline .branch-card {
  width: 100%;
  box-sizing: border-box;
}

#sec-about,
#sec-menu,
#campaign-app,
#js-page-search-app {
  scroll-margin-top: 64px;
}

@media (min-width: 768px) {
  #sec-about,
  #sec-menu,
  #campaign-app,
  #js-page-search-app {
    scroll-margin-top: 92px;
  }
}

#js-page-search-app .sec-search__body,
#js-page-search-app .sec-search__body.bkm-search-legacy {
  display: none !important;
}

#js-page-search-app .sec-search__container {
  display: block !important;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 40px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #js-page-search-app > .sec-search__map {
    display: block !important;
  }

  #js-page-search-app .branch-cards--inline {
    display: none !important;
  }

  #js-page-search-app .sec-search__container {
    display: none !important;
  }
}

/* Modal tìm chi nhánh */
.search-modal__container #js-search-app.sec-search {
  min-width: 0 !important;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 28px !important;
  box-sizing: border-box;
  background: linear-gradient(#bacfd4 0, #e7e6df 77%, #e1dac9 100%);
  border-radius: 4px;
}

.search-modal__container #js-search-app {
  display: block !important;
}

.search-modal__container #js-search-app > .sec-search__head {
  width: 100%;
  max-width: none;
  margin: 0 0 20px;
  padding: 0;
}

.search-modal__container #js-search-app .sec-search__container--modal {
  display: block !important;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.search-modal .branch-cards--modal {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

#js-page-search-app > .sec-search__map .branch-cards {
  list-style: none;
  margin: 0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  background: #ebe6dc;
}

.branch-card {
  background: #fff;
  border-radius: 4px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.branch-card__num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8b3a3a;
  margin-bottom: 6px;
}

.branch-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.branch-card__addr {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #444;
}

.branch-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #8b3a3a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.branch-card__link:hover {
  opacity: 0.85;
}

.branch-cards--inline {
  padding: 0 0 24px;
  background: transparent;
}

/* Hide legacy Vue map / search UI */
.bkm-search-legacy {
  display: none !important;
}

.search-modal .branch-cards {
  padding: 16px 20px 8px;
  background: #f5f2ec;
}

.search-modal .branch-card {
  margin-bottom: 0;
}

/* Hide news bar + removed seasonal */
#js-important-info,
.campagin-area {
  display: none !important;
}

/* Mobile menu: chỉ 2 icon SNS phía trên, không lặp cạnh ngôn ngữ */
@media (max-width: 767px) {
  .menu__sub .sns-list {
    display: none !important;
  }

  .menu__main .nav > .sub-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 20px 8px;
    margin: 0;
    list-style: none;
  }

  .menu__main .nav-list__item .sub-nav-list {
    display: none !important;
  }
}

/* SNS logo links (sidebar / footer) */
.sns-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sns-logo-link img {
  display: block;
  width: auto;
  height: auto;
}

.menu .sub-nav-list .sns-logo-link,
.menu .sns-list .sns-logo-link {
  color: #1a1a1a;
}

.footer--bkm__links .sns-logo-link {
  color: #fff;
}

.nav-list--sns {
  gap: 12px;
  align-items: center;
}

/* Tin tức: allow longer titles */
#campaign-app .card__text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  white-space: normal;
}
