/* Additive rhythm for portfolio themes. Palette and type families stay theirs. */
[data-portfolio-section] {
  scroll-margin-top: 76px;
}

h1,
h2 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

img {
  max-width: 100%;
}

@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Shared portfolio components (gz-portfolio.js): floating call/Zalo/booking, CV button, dialogs,
   VI/EN switch, testimonials. Class-scoped, so a theme that uses none of them is untouched. ---- */
:root {
  --gz-accent: #1f2937;
}
.gz-fab {
  position: fixed;
  left: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gz-fab a,
.gz-fab button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  font:
    700 12px/1 system-ui,
    sans-serif;
  transition: transform 0.2s;
}
.gz-fab a:hover,
.gz-fab button:hover {
  transform: translateY(-2px) scale(1.04);
}
.gz-fab .gz-call {
  background: #16a34a;
  animation: gzPulse 2.4s infinite;
}
.gz-fab .gz-zalo {
  background: #0068ff;
}
.gz-fab .gz-book {
  background: var(--gz-accent);
}
@keyframes gzPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}
.gz-lang {
  display: inline-flex;
  border: 1px solid currentColor;
  border-radius: 999px;
  overflow: hidden;
  font:
    600 12px/1 system-ui,
    sans-serif;
  margin-left: 10px;
  vertical-align: middle;
}
.gz-lang {
  flex: none;
  white-space: nowrap;
}
.gz-lang button {
  all: unset;
  box-sizing: border-box;
  display: inline-block;
  width: auto;
  height: auto;
  background: transparent;
  color: inherit;
  padding: 7px 10px;
  cursor: pointer;
  min-height: 0;
  font:
    600 12px/1 system-ui,
    sans-serif;
}
.gz-lang button[aria-pressed="true"] {
  background: var(--gz-accent);
  color: #fff;
}
.gz-lang.gz-float {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9991;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  margin: 0;
}
.gz-ov {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.55);
  z-index: 9995;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gz-ov.open {
  display: flex;
}
.gz-modal {
  background: #fff;
  color: #1d1d1f;
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  font-family: inherit;
}
.gz-modal h3 {
  margin: 0 0 4px;
  font-size: 22px;
}
.gz-modal p.gz-sub {
  margin: 0 0 16px;
  color: #666;
  font-size: 14px;
}
.gz-modal label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0 4px;
}
.gz-modal input,
.gz-modal select,
.gz-modal textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8d8de;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  background: #fafafa;
  color: #111;
}
.gz-modal textarea {
  min-height: 84px;
  resize: vertical;
}
.gz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 460px) {
  .gz-row {
    grid-template-columns: 1fr;
  }
}
.gz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  background: var(--gz-accent);
  color: #fff;
  font: 700 15px/1 inherit;
  cursor: pointer;
  text-decoration: none;
}
.gz-btn.gz-ghost {
  background: transparent;
  color: inherit;
  border: 1.5px solid currentColor;
}
.gz-modal .gz-btn {
  width: 100%;
  margin-top: 16px;
}
.gz-x {
  float: right;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.gz-note {
  font-size: 14px;
  margin-top: 10px;
  min-height: 1em;
}
.gz-note.ok {
  color: #15803d;
}
.gz-note.err {
  color: #b91c1c;
}
.gz-tsec {
  padding: 72px 0;
}
.gz-tsec .gz-wrap {
  width: min(1120px, 92%);
  margin: 0 auto;
}
.gz-tsec .gz-eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--gz-accent);
  margin: 0 0 8px;
}
.gz-tsec h2 {
  margin: 0 0 12px;
}
.gz-tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.gz-tcard {
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.04);
}
.gz-tcard q {
  display: block;
  font-style: italic;
  line-height: 1.6;
}
.gz-tcard b {
  display: block;
  margin-top: 12px;
}
.gz-tcard small {
  opacity: 0.7;
}
.gz-tcta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.gz-kit {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 9989;
}
.gz-kit.gz-up {
  bottom: calc(84px + env(safe-area-inset-bottom));
}
.gz-kit a,
.gz-kit button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: #111;
  color: #fff;
  font:
    600 13px/1 system-ui,
    sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  min-height: 0;
}
@media (max-width: 760px) {
  .gz-fab {
    left: 10px;
    gap: 8px;
  }
  .gz-fab a,
  .gz-fab button {
    width: 44px;
    height: 44px;
    min-height: 0;
  }
  .gz-kit button span {
    display: none;
  }
  .gz-kit a,
  .gz-kit button {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
  }
}
.gz-print-head {
  display: none;
  border-bottom: 2px solid #000;
  padding: 8px 0 10px;
  margin-bottom: 12px;
  font:
    13px/1.5 system-ui,
    sans-serif;
}

/* ---- Polish for themes that ship a #gz-cfg (set as html[data-gz-cfg] by gz-portfolio.js) ---- */
html[data-gz-cfg],
html[data-gz-cfg] body {
  overflow-x: hidden;
}
html[data-gz-cfg] img,
html[data-gz-cfg] video,
html[data-gz-cfg] iframe {
  max-width: 100%;
  height: auto;
}
@media (max-width: 760px) {
  html[data-gz-cfg] input,
  html[data-gz-cfg] select,
  html[data-gz-cfg] textarea {
    font-size: 16px !important;
  }
  html[data-gz-cfg] a.btn,
  html[data-gz-cfg] button,
  html[data-gz-cfg] .button {
    min-height: 44px;
  }
  html[data-gz-cfg] h1 {
    overflow-wrap: anywhere;
  }
  html[data-gz-cfg] section {
    scroll-margin-top: 72px;
  }
}
@media print {
  .gz-fab,
  .gz-kit,
  .gz-lang,
  .gz-ov,
  .gz-tcta,
  html[data-gz-cfg] header,
  html[data-gz-cfg] nav,
  html[data-gz-cfg] .site-header,
  html[data-gz-cfg] .floating-book,
  html[data-gz-cfg] .topbar,
  html[data-gz-cfg] form,
  html[data-gz-cfg] .menu-toggle,
  html[data-gz-cfg] #scrollProgress {
    display: none !important;
  }
  html[data-gz-cfg] * {
    animation: none !important;
    transition: none !important;
  }
  html[data-gz-cfg] .reveal,
  html[data-gz-cfg] [class*="reveal"] {
    opacity: 1 !important;
    transform: none !important;
  }
  html[data-gz-cfg] body {
    background: #fff !important;
    color: #000 !important;
  }
  html[data-gz-cfg] section {
    break-inside: avoid-page;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
  .gz-print-head {
    display: block !important;
  }
}
/* craft: editorial typography polish (additive, no layout change) */
html[data-gz-cfg] h1,
html[data-gz-cfg] h2,
html[data-gz-cfg] h3 {
  text-wrap: balance;
  font-kerning: normal;
  font-optical-sizing: auto;
}
html[data-gz-cfg] p,
html[data-gz-cfg] li,
html[data-gz-cfg] blockquote {
  text-wrap: pretty;
}
html[data-gz-cfg] ::selection {
  background: var(--gz-accent, #111);
  color: #fff;
}
.gz-prog {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  width: 100%;
  background: var(--gz-accent, #111);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  z-index: 2147483000;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .gz-prog {
    display: none;
  }
}

/* optional blocks (gz-portfolio.js revealOptional): hidden until filled; outlined while empty in the editor */
[data-gz-optional][hidden] {
  display: none !important;
}
[data-gz-optional][data-gz-empty]:not([hidden]) {
  outline: 2px dashed rgba(59, 130, 246, 0.45);
  outline-offset: 4px;
}
