/* ==========================================================================

   TA HOUSE — Motion & Transition Layer (GSAP Bold Mode)

   Extracted & Adapted from tahouse-website-manh-me

   ========================================================================== */



:root {

  --th-ease: cubic-bezier(.3, 0, 0, 1);

  --th-ease-io: cubic-bezier(.76, 0, .24, 1);

  --th-curtain: #0d0d0d;

}



html.th-bold {

  --th-ease: cubic-bezier(.3, 0, 0, 1);

  --th-ease-io: cubic-bezier(.76, 0, .24, 1);

  --th-curtain: #0d0d0d;

}



/* ---------- 1. Page Curtain / Intro Transition (G1, G9) ---------- */

.th-curtain {

  position: fixed;

  inset: 0;

  z-index: 99999;

  background: var(--th-curtain, #0d0d0d);

  pointer-events: none;

  transform: translateY(0);

  display: flex;

  align-items: center;

  justify-content: center;

}



.th-curtain__logo {

  width: min(220px, 46vw);

  max-width: 220px;

  opacity: 0;

  display: block;

  height: auto;

  filter: none !important;

}



html:not(.th-js) .th-curtain {

  display: none !important;

}



html.th-js .th-curtain {

  animation: th-curtain-failsafe 0s 3.5s forwards;

}



@keyframes th-curtain-failsafe {

  to { transform: translateY(-100%); }

}



.th-curtain.is-done {

  animation: none !important;

  transform: translateY(-100%) !important;

  opacity: 0 !important;

  pointer-events: none !important;

}



/* ---------- 2. SplitText Line Masking (G4) ---------- */

html.th-js .th-split-line {

  overflow: hidden;

  display: block;

  padding-bottom: .08em;

  margin-bottom: -.08em;

  will-change: transform;

}



/* ---------- 3. Scroll Cue on Hero ---------- */

.th-scroll-cue {

  position: absolute;

  left: 50%;

  bottom: 28px;

  z-index: 6;

  width: 1px;

  height: 44px;

  background: rgba(255, 255, 255, .35);

  overflow: hidden;

  transform: translateX(-50%);

  pointer-events: none;

}



.th-scroll-cue::after {

  content: "";

  position: absolute;

  left: 0;

  top: -50%;

  width: 1px;

  height: 50%;

  background: #fff;

  animation: th-cue 1.3s var(--th-ease-io) infinite;

}



@keyframes th-cue {

  0% { top: -50%; }

  100% { top: 100%; }

}



/* ---------- 4. Card Hover & Center "Xem dự án" Tag (G7) ---------- */

.box-image, .image-cover, .image-zoom, .ctda-fig, .ctda-index__link {

  overflow: hidden;

  position: relative;

}



.th-view-tag {

  position: absolute;

  left: 50%;

  top: 50%;

  bottom: auto;

  transform: translate(-50%, -40%);

  background: #fff;

  color: #111;

  padding: 10px 18px;

  font: 500 11px/1 'Manrope', var(--th-sans, sans-serif);

  letter-spacing: 2.2px;

  text-transform: uppercase;

  z-index: 5;

  display: inline-flex;

  align-items: center;

  gap: 10px;

  opacity: 0;

  pointer-events: none;

  border-radius: 999px;

  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);

  transition: opacity .35s var(--th-ease), transform .35s var(--th-ease);

}



.th-view-tag i {

  display: none !important;

}



/* Card Hover: specific item hover ONLY - never broad .col:hover */

.post-item:hover .th-view-tag,

.th-card:hover .th-view-tag,

.box:hover .th-view-tag,

.box-image:hover .th-view-tag {

  opacity: 1;

  transform: translate(-50%, -50%);

}



html.th-bold .th-projects-grid .box-image img,

html.th-bold .post-item .box-image img,

html.th-bold .th-card .box-image img,

html.th-bold .ctda-index__link img {

  transition: transform .6s var(--th-ease), filter .35s var(--th-ease) !important;

}



html.th-bold .post-item:hover .box-image img,

html.th-bold .th-card:hover .box-image img,

html.th-bold .box:hover .box-image img,

html.th-bold .ctda-index__link:hover img {

  transform: scale(1.04);

  filter: brightness(.72);

}



/* Post title underline slide: single item hover ONLY (NO double line on h5) */

.post-item .post-title a,

.th-card__title {

  background-image: linear-gradient(currentColor, currentColor);

  background-size: 0 1px;

  background-repeat: no-repeat;

  background-position: 0 100%;

  transition: background-size .7s var(--th-ease);

  padding-bottom: 2px;

}



.post-item:hover .post-title a,

.th-card:hover .th-card__title {

  background-size: 100% 1px;

}



html.th-bold .post-item .post-title a,

html.th-bold .th-card__title {

  transition: background-size .3s var(--th-ease);

}



/* ---------- 5. Header Hide / Reveal on Scroll (G2) ---------- */

html.th-bold #header {

  transition: transform .35s var(--th-ease), background-color .25s ease, box-shadow .25s ease;

}



/* ---------- 6. Showcase Section Pinned Expand ClipPath ---------- */

.th-showcase {

  overflow: hidden;

}



.th-showcase .banner {

  will-change: clip-path;

}



.th-tb--play .button.open-video {

  transition: transform .25s var(--th-ease), background .2s !important;

}



.th-tb--play .button.open-video:hover {

  transform: scale(1.08);

  background: rgba(255, 255, 255, .45) !important;

}



/* ---------- 7. Reading Progress Bar (Single Article) ---------- */

.th-read-progress {

  position: fixed;

  left: 0;

  top: 0;

  height: 2px;

  width: 100%;

  background: var(--th-accent, #c5a880);

  transform: scaleX(0);

  transform-origin: left;

  z-index: 9999;

  pointer-events: none;

}



/* ---------- 8. Archive Filter Tab Bar with Morphing Ink Underline ---------- */

.th-filter {

  position: relative;

  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 4px 34px;

  max-width: 1744px;

  margin: -30px auto 48px;

  padding: 0 24px;

}



.th-filter__btn {

  position: relative;

  margin: 0;

  padding: 10px 0;

  min-height: 0;

  border: 0;

  background: none;

  cursor: pointer;

  font: 400 13px/1.2 'Manrope', var(--th-sans, sans-serif);

  letter-spacing: 2.5px;

  text-transform: uppercase;

  color: #8d8b86;

  transition: color .2s ease;

}



.th-filter__btn sup { display: none !important; 

  font-size: 9px;

  margin-left: 4px;

  letter-spacing: 0;

  opacity: .7;

}



.th-filter__btn:hover,

.th-filter__btn.is-active {

  color: #111;

}



html.dark-mode .th-filter__btn:hover,
html.dark-mode .th-filter__btn.is-active,
html.th-dark .th-filter__btn:hover,
html.th-dark .th-filter__btn.is-active {
  color: #efece6;
}



.th-filter__ink {

  position: absolute;

  left: 0;

  bottom: 2px;

  height: 1px;

  width: 0;

  background: var(--th-accent, #c5a880);

  pointer-events: none;

}



@media (max-width: 849px) {

  .th-filter {

    margin: -16px auto 32px;

    gap: 2px 20px;

  }

  .th-filter__btn {

    font-size: 11px;

    letter-spacing: 1.5px;

  }

  .th-filter__ink {

    display: none;

  }

  .th-filter__btn.is-active {

    color: var(--th-accent, #c5a880);

  }

}



/* ---------- 9. Twenty20 Before/After Drag Knob ---------- */

.tahouse-twenty20-wrap {

  touch-action: pan-y;

}



.tahouse-twenty20-wrap .twenty20-knob {

  transition: transform .2s var(--th-ease);

}



.tahouse-twenty20-wrap.is-dragging .twenty20-knob {

  transform: translate(-50%, -50%) scale(1.12) !important;

}



.tahouse-twenty20-wrap .twenty20-caption {

  transition: opacity .8s var(--th-ease);

}



.tahouse-twenty20-wrap.has-dragged .twenty20-caption {

  opacity: 0;

}



/* ---------- 10. Styles (home): dim siblings ---------- */

@media (hover: hover) and (min-width: 850px) {

  .th-styles .row.th-grid:not(.th-head):hover .col .th-card,

  .th-styles .row:not(.th-head):hover .col .th-card,

  .th-styles .th-grid:not(.th-head):hover .col .th-card {

    opacity: .45 !important;

    transition: opacity .6s var(--th-ease);

  }

  .th-styles .row.th-grid:not(.th-head) .col .th-card,

  .th-styles .row:not(.th-head) .col .th-card,

  .th-styles .th-grid:not(.th-head) .col .th-card {

    transition: opacity .6s var(--th-ease);

  }

  .th-styles .row.th-grid:not(.th-head) .col:hover .th-card,

  .th-styles .row:not(.th-head) .col:hover .th-card,

  .th-styles .col:hover .th-card,

  .th-styles .box:hover.th-card {

    opacity: 1 !important;

  }

}

html.th-bold .th-styles .row:not(.th-head):hover .col .th-card,

html.th-bold .th-styles .th-grid:not(.th-head):hover .col .th-card {

  transition: opacity .3s ease !important;

}

html.th-bold .th-styles .row:not(.th-head) .col .th-card,

html.th-bold .th-styles .th-grid:not(.th-head) .col .th-card {

  transition: opacity .3s ease !important;

}



/* ---------- 11. FLOATING ACTION BUTTONS (FAB v3) ---------- */

.th-fab {

  position: fixed;

  right: 24px;

  bottom: 24px;

  z-index: 95;

  display: flex;

  flex-direction: column;

  align-items: flex-end;

  gap: 14px;

  pointer-events: none;

}

.th-fab__btn {

  position: relative;

  pointer-events: auto;

  display: flex;

  align-items: center;

  justify-content: center;

  width: 60px;

  height: 60px;

  border-radius: 50%;

  border: 0;

  padding: 0;

  margin: 0;

  min-height: 0;

  cursor: pointer;

  background: #fff !important;

  color: var(--th-accent, #e0742a) !important;

  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);

  transition: transform .25s cubic-bezier(.3, 0, 0, 1), box-shadow .25s ease, color .2s ease;

}

.th-fab__btn:hover {

  transform: scale(1.06);

  color: #c9611c !important;

  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);

}

.th-fab__zalo {

  flex-direction: row;

}

.th-fab__word {

  font: 700 17px/1 var(--th-sans, "Archivo", Arial, sans-serif);

  letter-spacing: -.2px;

  color: var(--th-accent, #e0742a);

}

.th-fab__btn:hover .th-fab__word {

  color: #c9611c;

}

.th-fab__call svg {

  width: 30px;

  height: 30px;

}

.th-fab__call::after {

  content: "";

  position: absolute;

  inset: 0;

  border-radius: 50%;

  border: 2px solid rgba(224, 116, 42, .6);

  animation: th-ring-wave 3s cubic-bezier(.3, 0, 0, 1) infinite;

  pointer-events: none;

}

@keyframes th-ring-wave {

  0%, 60% { transform: scale(1); opacity: 0; }

  64% { opacity: .7; }

  100% { transform: scale(1.6); opacity: 0; }

}

.th-fab__top {

  opacity: 0;

  visibility: hidden;

  transform: translateY(12px);

  pointer-events: none;

  transition: opacity .3s ease, transform .3s cubic-bezier(.3, 0, 0, 1), visibility 0s .3s;

}

.th-fab.is-scrolled .th-fab__top {

  opacity: 1 !important;

  visibility: visible !important;

  transform: none !important;

  pointer-events: auto !important;

  transition: opacity .3s ease, transform .3s cubic-bezier(.3, 0, 0, 1), visibility 0s;

}

.th-fab.is-scrolled .th-fab__top {

  opacity: 1;

  visibility: visible;

  transform: none;

  transition: opacity .3s ease, transform .3s cubic-bezier(.3, 0, 0, 1), visibility 0s;

}

.th-fab.is-scrolled .th-fab__top:hover {

  transform: translateY(-3px) scale(1.04);

}

.th-fab__ring {

  position: absolute;

  inset: 2px;

  width: calc(100% - 4px);

  height: calc(100% - 4px);

  transform: rotate(-90deg);

}

.th-fab__ring circle {

  fill: none;

  stroke: var(--th-accent, #e0742a);

  stroke-width: 2;

}

.th-fab__tip {

  position: absolute;

  right: calc(100% + 12px);

  top: 50%;

  transform: translate(6px, -50%);

  white-space: nowrap;

  background: #1a1a1a;

  color: #fff;

  font: 500 12px/1 var(--th-sans);

  letter-spacing: .3px;

  padding: 9px 12px;

  opacity: 0;

  visibility: hidden;

  transition: opacity .2s ease, transform .25s cubic-bezier(.3, 0, 0, 1), visibility 0s .2s;

  pointer-events: none;

}

@media (hover: hover) {

  .th-fab__btn:hover .th-fab__tip {

    opacity: 1;

    visibility: visible;

    transform: translate(0, -50%);

    transition: opacity .2s ease, transform .25s cubic-bezier(.3, 0, 0, 1), visibility 0s;

  }

}

@media (max-width: 849px) {

  .th-fab { right: 16px; bottom: 16px; gap: 10px; }

  .th-fab__btn { width: 52px; height: 52px; }

  .th-fab__call svg { width: 26px; height: 26px; }

  .th-fab__word { font-size: 15px; }

}



/* ---------- 11. Accessibility / Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {

  *, *::before, *::after {

    animation-duration: .01ms !important;

    transition-duration: .01ms !important;

  }

  .th-curtain, .th-cursor, .th-scroll-cue {

    display: none !important;

  }

}


/* Disable Flatsome default Back to Top */
#top-link, .back-to-top, #back-to-top {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
