/*
 * Shared page components used inside Elementor pages (add the class in Elementor:
 * Advanced > CSS Classes). Values from Figma (Revised page).
 */

/* ---------- Buttons ---------- */

/* Outline variant: Elementor Button widget with CSS class "arc-btn-outline". */
body .arc-btn-outline .elementor-button,
body a.elementor-button.arc-btn-outline {
  color: var(--arc-brown);
  background: transparent;
}

/* Hover states aren't in the design; a simple swap until the designer specifies one. */
body .elementor-button:hover,
body .elementor-button:focus-visible {
  color: #fff;
  background: #6f4c33;
  border-color: #6f4c33;
}

body .arc-btn-outline .elementor-button:hover,
body .arc-btn-outline .elementor-button:focus-visible,
body a.elementor-button.arc-btn-outline:hover,
body a.elementor-button.arc-btn-outline:focus-visible {
  color: #fff;
  background: var(--arc-brown);
  border-color: var(--arc-brown);
}

/* ---------- Tag pill ("arc-tag") ---------- */

.arc-tag .elementor-heading-title,
span.arc-tag {
  display: inline-block;
  padding: 5px 10px;
  font-family: var(--arc-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  color: rgba(255, 255, 255, 0.8);
  background: var(--arc-beige);
  border-radius: 50px;
}

/* ---------- Images ---------- */

.arc-img img {
  display: block;
  border-radius: 20px;
}

/* Keep a Thai phrase together when a heading wraps (e.g. องค์ความรู้). */
.arc-nowrap {
  white-space: nowrap;
}

/* ---------- Hero with white dome at the bottom (Figma "Ellipse 2") ---------- */

.arc-hero {
  --arc-dome-rise: 83px;
  --arc-dome-width: 130.2%;
  --arc-dome-height: 363px;
  position: relative;
  overflow: hidden;
}

.arc-hero::after {
  content: "";
  position: absolute;
  top: calc(100% - var(--arc-dome-rise));
  left: 50%;
  width: var(--arc-dome-width);
  height: var(--arc-dome-height);
  background: #fff;
  border-radius: 50%;
  transform: translateX(-50%);
}

.arc-hero__text {
  position: relative;
  z-index: 1;
  max-width: 590px;
}

/* ---------- Stats card overlapping the hero ---------- */

.arc-stats-wrap {
  position: relative;
  z-index: 2;
  margin-top: -133px;
}

body .arc-stats,
body .arc-cta-card {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 0.67px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body .arc-stats {
  max-width: 1069px;
  min-height: 100px;
  margin: 0 auto;
  --padding-left: 50px;
  --padding-right: 50px;
  padding-left: 50px;
  padding-right: 50px;
  align-items: stretch;
}

/* 192px columns as in Figma; a longer label (e.g. EN) widens its column instead of overlapping. */
body .arc-stats > .arc-stat {
  --width: auto;
  flex: 0 0 auto;
  width: auto;
  min-width: 192px;
}

body .arc-stats > .arc-stat:last-child {
  --width: auto;
  flex: 1 1 auto;
  width: auto;
}

body .arc-stats .arc-stat .elementor-widget-text-editor p {
  margin: 0;
  white-space: nowrap;
}

body .arc-stats > .arc-stat + .arc-stat {
  --padding-left: 16px;
  padding-left: 16px;
  border-left: 0.75px solid var(--arc-beige);
}

/* Expertise certificates bar: wider card, items spread out (Figma gap 89px). */
body .arc-stats--spread {
  max-width: 1200px;
  justify-content: space-between;
}

body .arc-stats--spread > .arc-stat:last-child {
  flex: 0 0 auto;
}

/* ---------- Expertise: Quality Policy card ---------- */

body .arc-policy-card {
  background: var(--e-global-color-arccrem, #FBF8F2);
  border-radius: 20px;
}

/* ---------- CTA card ---------- */

body .arc-cta-card {
  min-height: 208px;
  justify-content: center;
}

/* ---------- News cards ([arcadia_latest_news]) ---------- */

.arc-news__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.arc-news-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.arc-news-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20px;
}

.arc-news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.arc-news-card__copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  min-height: 128px;
}

.arc-news-card__title {
  margin: 0;
  overflow: hidden;
  font-family: var(--arc-font-body);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--arc-brown);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.arc-news-card__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: var(--arc-font-body);
  font-size: 14px;
  line-height: 1.4;
  color: var(--arc-brown);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.arc-news__dots {
  display: none;
}

/* ---------- News & Insights list page (template-parts/news-archive.php) ---------- */

.arc-news-page {
  max-width: 1256px;
  margin: 0 auto;
  padding: 119px 30px 70px;
}

.arc-news-page__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-bottom: 24px;
  text-align: center;
}

.arc-news-page__title {
  margin: 0;
  font-family: var(--arc-font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--arc-brown);
}

.arc-news-page__intro,
.arc-news-page__empty {
  margin: 0;
  font-family: var(--arc-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--arc-brown);
}

.arc-news-page__empty {
  text-align: center;
}

.arc-news-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

body .arc-news-filter__pill.is-current {
  color: var(--arc-brown);
  background: transparent;
}

.arc-news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 16px;
}

.arc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 78px;
}

.arc-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  font-family: var(--arc-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--arc-neutral);
  text-decoration: none;
  border-radius: 5px;
}

.arc-pagination .page-numbers.current {
  color: #fff;
  background: var(--arc-neutral);
}

.arc-pagination__flip {
  display: inline-flex;
  transform: scaleX(-1);
}

/* ---------- Contact page ---------- */

body .arc-contact-card {
  background: #fff;
  border-radius: 20px;
}

.arc-contact-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body .arc-contact-form .ff-el-group {
  margin: 0;
}

.arc-contact-form .arc-ff-message,
.arc-contact-form .ff_submit_btn_wrapper {
  grid-column: 1 / -1;
}

body .arc-contact-form .ff-el-form-control {
  height: 48px;
  padding: 13px 16px;
  font-family: var(--arc-font-body);
  font-size: 16px;
  color: var(--arc-neutral);
  background: #fff;
  border: 1px solid var(--arc-beige);
  border-radius: 4px;
  box-shadow: none;
}

body .arc-contact-form textarea.ff-el-form-control {
  height: 100px;
}

body .arc-contact-form .ff-el-form-control:focus {
  border-color: var(--arc-brown);
  outline: none;
}

body .arc-contact-form .ff_submit_btn_wrapper {
  margin: 0;
  text-align: center;
}

body .arc-contact-form .ff-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  font-family: var(--arc-font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--arc-brown);
  background: transparent;
  border: 1px solid var(--arc-brown);
  border-radius: 50px;
}

body .arc-contact-form .ff-btn-submit::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("../icons/arrow-right.svg") center / contain no-repeat;
  mask: url("../icons/arrow-right.svg") center / contain no-repeat;
}

body .arc-contact-form .ff-btn-submit:hover,
body .arc-contact-form .ff-btn-submit:focus-visible {
  color: #fff;
  background: var(--arc-brown);
}

.arc-privacy-notice {
  margin: 0;
  font-family: var(--arc-font-body);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--arc-neutral);
}

.arc-privacy-notice a {
  color: var(--arc-brown);
  text-decoration: underline;
}

.arc-map {
  display: block;
  overflow: hidden;
  border-radius: 20px;
}

.arc-map img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.arc-contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.arc-contact-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.arc-contact-list img {
  width: 28px;
  height: 24px;
  object-fit: contain;
}

.arc-contact-list a {
  font-family: var(--arc-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--arc-neutral);
  text-decoration: none;
}

/* ---------- Cream page with white card (Career list + detail) ---------- */

.arc-cream-page {
  padding: 119px 30px 30px;
  background: var(--e-global-color-arccrem, #FBF8F2);
}

.arc-page-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 590px;
  margin: 0 auto 24px;
  text-align: center;
}

.arc-page-head__title {
  margin: 0;
  font-family: var(--arc-font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--arc-brown);
}

.arc-page-head__intro {
  margin: 0;
  font-family: var(--arc-font-body);
  font-size: 14px;
  line-height: 1.4;
  color: var(--arc-brown);
}

.arc-white-card {
  max-width: 1277px;
  margin: 0 auto;
  padding: 31px 33px 40px;
  font-family: var(--arc-font-body);
  color: var(--arc-brown);
  background: #fff;
  border-radius: 20px;
}

.arc-white-card__head {
  padding-bottom: 12px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--arc-beige);
}

/* body prefix: beats Elementor's global h2 style (.elementor-kit-N h2). */
body .arc-white-card__title {
  margin: 0;
  font-family: var(--arc-font-body);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--arc-brown);
}

.arc-white-card__meta,
.arc-white-card__empty {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.arc-jobs {
  display: grid;
  grid-template-columns: repeat(3, 298px);
  justify-content: center;
  gap: 25px 38px;
  padding-top: 20px;
}

.arc-job-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 20px 0;
}

.arc-job-card__title {
  margin: 0;
  font-family: var(--arc-font-body);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
}

.arc-job-card__title a {
  color: var(--arc-brown);
  text-decoration: none;
}

.arc-job-card__date {
  margin: 0 0 15px;
  font-size: 14px;
}

.arc-job__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.arc-job__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--arc-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--arc-neutral);
  text-decoration: none;
  white-space: nowrap;
}

/* Hello Elementor's reset turns links dark blue (#336) on hover. */
.arc-job__back:hover,
.arc-job__back:focus {
  color: var(--arc-neutral);
}

.arc-job__back img {
  transform: scaleX(-1);
}

.arc-job__content {
  font-size: 14px;
  line-height: 1.4;
}

.arc-job__content p {
  margin: 0 0 19px;
}

.arc-job__content hr,
.arc-job__content .wp-block-separator {
  margin: 15px 0;
  border: 0;
  border-top: 1px solid var(--arc-beige);
  opacity: 1;
}

.arc-job__apply {
  padding-top: 15px;
  border-top: 1px solid var(--arc-beige);
}

.arc-job__apply-title {
  margin: 0 0 15px;
  font-size: 14px;
  font-weight: 700;
}

.arc-contact-list--row {
  flex-direction: row;
  flex-wrap: wrap;
}

.arc-contact-list span {
  font-family: var(--arc-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--arc-neutral);
}

/* ---------- 404 ---------- */

.arc-not-found {
  min-height: 60vh;
  padding-bottom: 80px;
}

.arc-not-found__action {
  margin: 30px 0 0;
  text-align: center;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .arc-news__track,
  .arc-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arc-jobs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .arc-stats {
    --padding-left: 30px;
    --padding-right: 30px;
    padding-left: 30px;
    padding-right: 30px;
  }

  body .arc-stats > .arc-stat {
    --width: auto;
    flex: 1 1 0;
    width: auto;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .arc-hero {
    --arc-dome-rise: 100px;
    --arc-dome-width: 230%;
    --arc-dome-height: 379px;
  }

  body .arc-stats {
    --padding-left: 20px;
    --padding-right: 20px;
    padding: 10px 20px;
  }

  body .arc-stats > .arc-stat,
  body .arc-stats > .arc-stat:last-child {
    --width: 100%;
    flex: none;
    width: 100%;
    padding: 15px 0;
  }

  body .arc-stats .arc-stat .elementor-widget-text-editor p {
    white-space: normal;
  }

  body .arc-stats > .arc-stat + .arc-stat {
    --padding-left: 0px;
    padding-left: 0;
    border-left: 0;
    border-top: 0.75px solid var(--arc-beige);
  }

  .arc-news-page {
    padding: 40px 30px 60px;
  }

  .arc-contact-form fieldset {
    grid-template-columns: minmax(0, 1fr);
  }

  .arc-cream-page {
    padding: 40px 20px 10px;
  }

  .arc-white-card {
    padding: 24px 20px 30px;
  }

  .arc-jobs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 0;
  }

  .arc-job__head {
    flex-direction: column-reverse;
  }

  .arc-news-grid {
    grid-template-columns: minmax(0, 287px);
    justify-content: center;
    gap: 16px;
  }

  /* Swipe carousel */
  .arc-news__track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .arc-news__track::-webkit-scrollbar {
    display: none;
  }

  .arc-news-card {
    flex: 0 0 100%;
    padding: 0 6px;
    scroll-snap-align: center;
  }

  .arc-news__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
  }

}

/* ---------- Slider dots (news carousel, journey) ---------- */

body .arc-dot {
  width: 20px;
  height: 20px;
  padding: 0;
  background: var(--arc-beige);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

body .arc-dot:hover,
body .arc-dot:focus {
  background: var(--arc-beige);
}

body .arc-dot.is-active,
body .arc-dot.is-active:hover,
body .arc-dot.is-active:focus {
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--arc-brown);
}

/* ---------- About: hero text glow (Figma "Rectangle 9") ---------- */

.arc-hero--glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 620px 172px at calc(50% - 455px) 221px, #fff 10%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* ---------- About: ARCADIA value tiles ---------- */

body .arc-values > .arc-value {
  --width: 160px;
  flex: 1 1 0;
  width: auto;
}

body .arc-value__letter .elementor-heading-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  background: var(--arc-brown);
  border-radius: 20px;
}

/* ---------- About: Our Journey ([arcadia_journey]) ---------- */

.arc-journey {
  --arc-step: 280px;
  --arc-start: 159px;
  --arc-active: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arc-journey__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 543px;
  padding: 10px;
  background: var(--arc-beige);
  border-radius: 10px;
}

.arc-journey__card[hidden] {
  display: none;
}

.arc-journey__card p {
  margin: 0;
  color: var(--arc-brown);
}

.arc-journey__title {
  font-family: var(--arc-font-body);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.arc-journey__text {
  font-family: var(--arc-font-body);
  font-size: 14px;
  line-height: 1.4;
}

/* Timeline runs from the column to the right edge of the window. */
.arc-journey__timeline {
  position: relative;
  height: 160px;
  margin-right: min(0px, calc(598px - 50vw));
  overflow: hidden;
}

.arc-journey__track {
  position: absolute;
  inset: 0;
  transform: translateX(calc(-1 * var(--arc-active) * var(--arc-step)));
  transition: transform 0.4s ease;
}

.arc-journey__line {
  position: absolute;
  top: 78px;
  left: 0;
  width: 10000px;
  height: 4px;
  background: var(--arc-beige);
}

.arc-journey__progress {
  display: block;
  width: calc(var(--arc-start) + var(--arc-active) * var(--arc-step) + 15px);
  height: 100%;
  background: var(--arc-brown);
  transition: width 0.4s ease;
}

body .arc-journey__node {
  position: absolute;
  top: 0;
  left: calc(var(--arc-start) + var(--i) * var(--arc-step) - 45px);
  width: 120px;
  height: 160px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

/* Hello Elementor's reset turns every <button> pink (#c36) on hover/focus. */
body .arc-journey__node:hover,
body .arc-journey__node:focus {
  background: none;
}

.arc-journey__dot {
  position: absolute;
  top: 65px;
  left: 45px;
  width: 30px;
  height: 30px;
  background: var(--arc-beige);
  border-radius: 50%;
  transition: background 0.2s;
}

.arc-journey__node.is-active .arc-journey__dot {
  background: var(--arc-brown);
}

.arc-journey__year {
  position: absolute;
  top: 3px;
  left: 0;
  width: 120px;
  font-family: var(--arc-font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 42px;
  text-align: center;
  color: var(--arc-brown);
}

/* Every second year sits below the line. */
.arc-journey__node:nth-of-type(even) .arc-journey__year {
  top: 114px;
}

.arc-journey__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 37px;
}

@media (max-width: 767px) {
  .arc-hero--glow::before {
    background: radial-gradient(ellipse 360px 200px at 30% 150px, #fff 10%, rgba(255, 255, 255, 0) 100%);
  }

  body .arc-values > .arc-value {
    --width: 100%;
    flex: none;
    width: 100%;
  }

  .arc-journey {
    --arc-step: 205px;
    --arc-start: 110px;
  }

  .arc-journey__timeline {
    margin-right: -30px;
  }
}
