/* Doing Business in Thailand — ThailandLover */

:root {
  --db-navy: #0d2e4d;
  --db-blue: #1a6aa8;
  --db-lime: #c9e43b;
  --db-ink: #142433;
  --db-muted: #5a6b7c;
  --db-sand: #f0f4f8;
  --db-paper: #fafbfc;
  --db-line: rgba(13, 46, 77, 0.1);
  --db-white: #ffffff;
}

/* ---- Hero ---- */
.tl-db-hero.tl-hero--photo {
  --tl-cover-min-height: 460px;
  position: relative;
}

.tl-db-hero__lead {
  margin: 14px 0 0;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 300;
  line-height: 1.55;
}

.tl-db-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tl-db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--db-lime);
  color: var(--db-navy) !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-db-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 228, 59, 0.35);
}

.tl-db-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff !important;
}

.tl-db-btn--ghost:hover {
  border-color: #fff;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.08);
}

.tl-db-btn--solid {
  background: var(--db-navy);
  color: #fff !important;
}

.tl-db-btn--solid:hover {
  box-shadow: 0 8px 24px rgba(13, 46, 77, 0.25);
}

/* ---- Shell ---- */
.tl-main--db {
  background:
    linear-gradient(180deg, #e8eef4 0%, var(--db-paper) 140px, #fff 360px);
}

.tl-db {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

/* ---- Sticky jump nav ---- */
.tl-db-jump {
  position: sticky;
  top: 64px;
  z-index: 40;
  margin: 0 -20px;
  padding: 0 20px;
  background: rgba(250, 251, 252, 0.92);
  border-bottom: 1px solid var(--db-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tl-db-jump__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tl-db-jump__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--db-muted) !important;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color 0.2s ease, background 0.2s ease;
}

.tl-db-jump__list a:hover {
  color: var(--db-navy) !important;
  background: rgba(13, 46, 77, 0.05);
}

.tl-db-jump__list a.is-active {
  color: var(--db-navy) !important;
  background: rgba(201, 228, 59, 0.28);
}

.tl-db-jump__num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(13, 46, 77, 0.08);
  color: var(--db-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.tl-db-jump__list a.is-active .tl-db-jump__num {
  background: var(--db-navy);
  color: var(--db-lime);
}

/* ---- Intro ---- */
.tl-db-intro {
  padding: 48px 0 16px;
  max-width: 42rem;
}

.tl-db-intro h2 {
  margin: 0 0 14px;
  color: var(--db-navy);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.2;
}

.tl-db-intro p {
  margin: 0 0 14px;
  color: var(--db-muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
}

.tl-db-notice {
  margin: 8px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--db-lime);
  background: var(--db-sand);
  color: var(--db-navy);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

/* ---- Sections ---- */
.tl-db-section {
  padding: clamp(40px, 6vw, 72px) 0 8px;
  scroll-margin-top: 120px;
}

.tl-db-section.is-revealed,
.tl-db-section {
  opacity: 1;
  transform: none;
}

.tl-db-section[data-db-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.tl-db-section[data-db-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

.tl-db-section__head {
  margin-bottom: 28px;
  max-width: 40rem;
}

.tl-db-section__kicker {
  margin: 0 0 8px;
  color: var(--db-blue);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tl-db-section__head h2 {
  margin: 0 0 10px;
  color: var(--db-navy);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 500;
  line-height: 1.2;
}

.tl-db-section__head p {
  margin: 0;
  color: var(--db-muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
}

/* ---- Structure type cards ---- */
.tl-db-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tl-db-type {
  padding: 22px 22px 20px;
  border: 1px solid var(--db-line);
  border-radius: 12px;
  background: var(--db-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-db-type:hover {
  border-color: rgba(26, 106, 168, 0.35);
  box-shadow: 0 10px 28px rgba(13, 46, 77, 0.06);
}

.tl-db-type__label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--db-blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tl-db-type h3 {
  margin: 0 0 10px;
  color: var(--db-navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.tl-db-type p {
  margin: 0;
  color: var(--db-muted);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.tl-db-type--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, #fff 0%, #f4f8fb 100%);
}

.tl-db-type--featured .tl-db-type__media {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--db-sand);
}

.tl-db-type--featured .tl-db-type__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Treaty callouts ---- */
.tl-db-treaties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.tl-db-treaty {
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--db-navy);
  color: #fff;
}

.tl-db-treaty h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.tl-db-treaty p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.tl-db-treaty__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(201, 228, 59, 0.2);
  color: var(--db-lime);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Setup steps ---- */
.tl-db-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: db-step;
}

.tl-db-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 0 0 28px;
  counter-increment: db-step;
}

.tl-db-steps li:last-child {
  padding-bottom: 0;
}

.tl-db-steps li::before {
  content: counter(db-step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--db-navy);
  color: var(--db-lime);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.tl-db-steps li::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: 4px;
  width: 2px;
  background: var(--db-line);
}

.tl-db-steps li:last-child::after {
  display: none;
}

.tl-db-steps h3 {
  margin: 4px 0 6px;
  color: var(--db-navy);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.tl-db-steps p {
  margin: 0;
  color: var(--db-muted);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.tl-db-steps__optional {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(201, 228, 59, 0.25);
  color: var(--db-navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- Visa / ratio strip ---- */
.tl-db-visa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tl-db-visa {
  padding: 22px;
  border: 1px solid var(--db-line);
  border-radius: 12px;
  background: var(--db-white);
}

.tl-db-visa h3 {
  margin: 0 0 8px;
  color: var(--db-navy);
  font-size: 17px;
  font-weight: 500;
}

.tl-db-visa p {
  margin: 0;
  color: var(--db-muted);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.tl-db-ratios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 28px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--db-navy) 0%, #164a73 100%);
  color: #fff;
}

.tl-db-ratio__value {
  display: block;
  margin-bottom: 6px;
  color: var(--db-lime);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tl-db-ratio__label {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
}

.tl-db-ratios__note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}

/* ---- Tax cards ---- */
.tl-db-tax {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tl-db-tax__item {
  padding: 24px 22px;
  border-radius: 12px;
  background: var(--db-sand);
  border: 1px solid transparent;
}

.tl-db-tax__item h3 {
  margin: 0 0 8px;
  color: var(--db-navy);
  font-size: 16px;
  font-weight: 500;
}

.tl-db-tax__rate {
  display: block;
  margin-bottom: 10px;
  color: var(--db-blue);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tl-db-tax__item p {
  margin: 0;
  color: var(--db-muted);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
}

/* ---- Risk list ---- */
.tl-db-risks {
  display: grid;
  gap: 14px;
}

.tl-db-risk {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--db-line);
  border-radius: 12px;
  background: var(--db-white);
}

.tl-db-risk__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(26, 106, 168, 0.1);
  color: var(--db-blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.tl-db-risk h3 {
  margin: 0 0 6px;
  color: var(--db-navy);
  font-size: 16px;
  font-weight: 500;
}

.tl-db-risk p {
  margin: 0;
  color: var(--db-muted);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

/* ---- Counsel band ---- */
.tl-db-counsel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: 36px;
  border-radius: 16px;
  background:
    linear-gradient(120deg, var(--db-sand) 0%, #e4ecf4 100%);
  border: 1px solid var(--db-line);
}

.tl-db-counsel__copy h3 {
  margin: 0 0 12px;
  color: var(--db-navy);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 500;
  line-height: 1.25;
}

.tl-db-counsel__copy p {
  margin: 0 0 12px;
  color: var(--db-muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
}

.tl-db-counsel__copy p:last-of-type {
  margin-bottom: 22px;
}

.tl-db-counsel__media {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--db-navy);
}

.tl-db-counsel__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- FAQ accordion ---- */
.tl-db-faq {
  display: grid;
  gap: 10px;
}

.tl-db-acc {
  border: 1px solid var(--db-line);
  border-radius: 12px;
  background: var(--db-white);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-db-acc.is-open {
  border-color: rgba(26, 106, 168, 0.35);
  box-shadow: 0 8px 24px rgba(13, 46, 77, 0.06);
}

.tl-db-acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--db-navy);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
}

.tl-db-acc__btn::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--db-blue);
  border-bottom: 2px solid var(--db-blue);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.tl-db-acc.is-open .tl-db-acc__btn::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.tl-db-acc__panel {
  padding: 0 20px 18px;
}

.tl-db-acc__panel[hidden] {
  display: none;
}

.tl-db-acc__panel p {
  margin: 0;
  color: var(--db-muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
}

/* ---- Close ---- */
.tl-db-close {
  margin-top: 56px;
  padding: 32px 0 8px;
  border-top: 1px solid var(--db-line);
  text-align: center;
}

.tl-db-close p {
  margin: 0 0 18px;
  color: var(--db-muted);
  font-size: 15px;
  font-weight: 300;
}

.tl-db-close__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tl-db-close__hub {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  color: var(--db-navy) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}

.tl-db-close__hub:hover {
  color: var(--db-blue) !important;
}

/* ---- Section media strip (optional) ---- */
.tl-db-media {
  margin: 0 0 28px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  background: var(--db-sand);
}

.tl-db-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .tl-db-types,
  .tl-db-treaties,
  .tl-db-visa-grid,
  .tl-db-tax,
  .tl-db-ratios {
    grid-template-columns: 1fr;
  }

  .tl-db-type--featured {
    grid-template-columns: 1fr;
  }

  .tl-db-counsel {
    grid-template-columns: 1fr;
  }

  .tl-db-counsel__media {
    order: -1;
    max-height: 220px;
  }

  .tl-db-media {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .tl-db-hero.tl-hero--photo {
    --tl-cover-min-height: 380px;
  }

  .tl-db-jump {
    top: 56px;
  }

  .tl-db-section {
    scroll-margin-top: 108px;
  }

  .tl-db-counsel {
    padding: 24px;
  }

  .tl-db-ratios {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-db-section[data-db-reveal],
  .tl-db-btn,
  .tl-db-acc__btn::after,
  .tl-db-type,
  .tl-db-acc {
    transition: none !important;
  }

  .tl-db-section[data-db-reveal] {
    opacity: 1;
    transform: none;
  }
}
