:root {
  --tb-ink: #121b20;
  --tb-deep: #071117;
  --tb-paper: #fff8ed;
  --tb-cream: #f4ead8;
  --tb-gold: #c99a43;
  --tb-red: #a63725;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #fff8ed;
  color: #121b20;
  border: 2px solid #c99a43;
  text-decoration: none;
}
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.thai-clean-template {
  margin: 0;
  background: var(--tb-paper);
  color: var(--tb-ink);
  font-family: Georgia, "Times New Roman", serif;
}

/* HEADER */

.tb-header {
  background: var(--tb-paper);
  border-bottom: 1px solid rgba(18, 27, 32, .16);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tb-header-inner {
  width: min(1240px, calc(100% - 38px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.tb-logo-fallback {
  text-decoration: none;
  display: grid;
  color: var(--tb-ink);
}

.tb-logo-fallback span {
  font-size: 22px;
  font-weight: 500;
}

.tb-logo-fallback small {
  font: 700 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--tb-red);
}

.tb-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.tb-menu a {
  color: var(--tb-ink);
  text-decoration: none;
  font: 800 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.tb-menu a:hover,
.tb-menu .current > a {
  color: var(--tb-red);
}

.tb-menu .tb-book-link,
.tb-menu a.book-link {
  border-bottom: 2px solid var(--tb-gold);
  padding-bottom: 8px;
}

.tb-menu-toggle {
  display: none;
}

/* SHARED */

.tb-eyebrow,
.eyebrow {
  margin: 0 0 24px;
  color: var(--tb-gold);
  font: 800 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.tb-text-link,
.text-link {
  display: inline-block;
  width: max-content;
  margin-top: 30px;
  color: var(--tb-gold) !important;
  text-decoration: none;
  font: 800 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-bottom: 2px solid currentColor;
  padding-bottom: 9px;
}

/* HERO VIDEO */

.tb-hero {
  padding: 0;
  margin: 0;
  background: var(--tb-deep);
}

.tb-hero-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 92px);
  background: var(--tb-deep);
  color: var(--tb-cream);
}

.tb-hero-video {
  position: relative;
  min-height: calc(100vh - 92px);
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 17, 23, .25), rgba(7, 17, 23, .45)),
    url('/images/wok-poster.jpg') center / cover no-repeat,
    #071117;
  border-right: 1px solid rgba(201, 154, 67, .28);
}

.tb-hero-video video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .62;
  filter: brightness(.78) contrast(1.1) saturate(.95);
}

.tb-hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(7, 17, 23, .12), rgba(7, 17, 23, .36)),
    radial-gradient(circle at center, transparent 20%, rgba(7, 17, 23, .32) 100%);
  pointer-events: none;
}

.tb-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(50px, 6vw, 100px);
  background: var(--tb-deep);
}

.tb-hero-copy h1 {
  margin: 0 0 30px;
  max-width: 760px;
  font-size: clamp(56px, 5.5vw, 104px);
  line-height: .92;
  font-weight: 400;
  letter-spacing: -2.5px;
}

.tb-hero-lead {
  margin: 0;
  max-width: 620px;
  font-size: clamp(22px, 1.7vw, 30px) !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
}

/* INTRO */

.tb-intro {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 95px 0;
  text-align: center;
}

.tb-saying {
  margin: 0 0 20px;
  color: var(--tb-red);
  font-size: 24px;
  font-style: italic;
}

.tb-intro h2 {
  margin: 0 0 28px;
  font-size: clamp(42px, 5vw, 82px);
  line-height: 1.05;
  font-weight: 400;
}

.tb-intro p {
  font-size: 22px;
  line-height: 1.7;
}

/* GALLERY */

.tb-gallery-section {
  padding: 8px;
  background: var(--tb-deep);
}

.tb-gallery,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  perspective: 1200px;
}

.tb-gallery figure,
.gallery-grid figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--tb-deep);
}

.tb-gallery img,
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: saturate(.95) contrast(1.05) brightness(.82);
  transition: transform .65s ease, filter .65s ease;
}

.tb-gallery figure:hover img,
.gallery-grid figure:hover img {
  transform: rotateY(8deg) scale(1.05);
  filter: saturate(1.08) contrast(1.08) brightness(.72);
}

.tb-gallery figure::after,
.gallery-grid figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 17, 23, .84), rgba(7, 17, 23, .2), transparent);
  pointer-events: none;
}

.tb-gallery figcaption,
.gallery-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  z-index: 2;
  color: #fff3df;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

/* FEATURE */

.tb-feature {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}

.tb-feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 760px;
  background: var(--tb-deep);
  color: var(--tb-cream);
}

.tb-feature-image {
  min-height: 760px;
  background:
    linear-gradient(rgba(7, 17, 23, .08), rgba(7, 17, 23, .32)),
    url('/templates/thaiatbeaches/images/gallery-06.jpg') center / cover no-repeat;
}

.tb-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(55px, 7vw, 120px);
  background: var(--tb-deep);
}

.tb-feature-copy h2 {
  margin: 0 0 30px;
  font-size: clamp(56px, 5.8vw, 108px);
  line-height: .92;
  font-weight: 400;
  letter-spacing: -2.5px;
}

.tb-feature-copy p:not(.tb-eyebrow) {
  max-width: 640px;
  margin: 0;
  font-size: clamp(21px, 1.55vw, 28px);
  line-height: 1.5;
}

/* BOOKING / LOCATION */

.tb-booking-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(18, 27, 32, .16);
  border-bottom: 1px solid rgba(18, 27, 32, .16);
}

.tb-booking-location > div {
  padding: clamp(42px, 6vw, 90px);
}

.tb-booking-location > div + div {
  border-left: 1px solid rgba(18, 27, 32, .16);
}

.tb-booking-location h2 {
  margin: 0 0 26px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.05;
  font-weight: 400;
}

.tb-booking-location p {
  font-size: 21px;
  line-height: 1.7;
}

/* FOOTER */

.tb-footer {
  background: var(--tb-deep);
  color: var(--tb-cream);
  padding: 48px clamp(22px, 5vw, 70px);
}

.tb-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.tb-footer a {
  color: var(--tb-gold);
}

/* HIDE JOOMLA ARTICLE TITLE */

.page-header,
.com-content-article__title {
  display: none;
}

/* MOBILE */

@media (max-width: 900px) {
  .tb-header-inner {
    min-height: 78px;
  }

  .tb-menu-toggle {
    display: block;
    background: transparent;
    border: 0;
    color: var(--tb-ink);
    font: 800 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
  }

  .tb-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    background: var(--tb-paper);
    border-bottom: 1px solid rgba(18, 27, 32, .16);
    padding: 24px;
  }

  .tb-menu.is-open {
    display: block;
  }

  .tb-menu ul {
    display: grid;
    gap: 18px;
  }

  .tb-hero-wrap,
  .tb-feature-split,
  .tb-booking-location,
  .tb-footer-grid {
    grid-template-columns: 1fr;
  }

  .tb-hero-video,
  .tb-feature-image {
    min-height: 420px;
    border-right: 0;
    border-bottom: 1px solid rgba(201, 154, 67, .28);
  }

  .tb-hero-copy,
  .tb-feature-copy {
    padding: 45px 28px 60px;
  }

  .tb-hero-copy h1,
  .tb-feature-copy h2 {
    font-size: clamp(50px, 12vw, 78px);
  }

  .tb-gallery,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tb-booking-location > div + div {
    border-left: 0;
    border-top: 1px solid rgba(18, 27, 32, .16);
  }
}

@media (max-width: 560px) {
  .tb-logo-fallback span {
    font-size: 25px;
  }

  .tb-gallery,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .tb-intro {
    padding: 60px 20px;
  }
}
/* Gallery reveal - safe version */

.tb-gallery figure,
.gallery-grid figure {
  opacity: 1;
  transform: none;
}

/* Only hide/animate if JS is active */
body.tb-js .tb-gallery figure,
body.tb-js .gallery-grid figure {
  opacity: 0;
  transform: rotateY(18deg) translateY(35px);
  transform-origin: center;
  transition:
    opacity .8s ease,
    transform .8s ease;
}

body.tb-js .tb-gallery figure.tb-visible,
body.tb-js .gallery-grid figure.tb-visible {
  opacity: 1;
  transform: rotateY(0deg) translateY(0);
}