/**
* Theme Name:        avanam-acrepair
* Theme URI:         https://templatemela.com/
* Template:          avanam
* Author:            TemplateMela
* Author URI:        #
* Description:       This is a child theme of Avanam, generated by TemplateMela.
* Version:           1.1.1
* License:           GNU General Public License v3.0 (or later)
* License URI:       https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain:       avanam-acrepair
* Requires at least: 6.2
* Tested up to:      6.6
* Requires PHP:      7.4
* Tags: translation-ready, two-columns, right-sidebar, left-sidebar, footer-widgets, blog, custom-logo, custom-background, custom-menu, rtl-language-support, editor-style, threaded-comments, custom-colors, featured-images, wide-blocks, full-width-template, theme-options, e-commerce

*/


/* =========================================================
   HERO BANNER
   ========================================================= */
.tpcb-banner {
  --tpcb-blue-primary:  #1565C0;
  --tpcb-blue-bright:   #1E88E5;
  --tpcb-blue-glow:     #42A5F5;
  --tpcb-white:         #ffffff;
  --tpcb-text-soft:     rgba(255, 255, 255, 0.88);
  --tpcb-shadow-video:  0 8px 40px rgba(0, 0, 0, 0.70),
                        0 2px 12px rgba(30, 136, 229, 0.25);
  --tpcb-radius:        6px;

  position: relative;
  width: 100%;
  min-height: clamp(280px, 45vw, 520px);
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: 'Barlow', 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.tpcb-banner *,
.tpcb-banner *::before,
.tpcb-banner *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Background image layer --- */
.tpcb-banner__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/wp-content/uploads/2026/03/hero-background.webp');
  background-size: cover;
  background-position: center;
  animation: tpcbBgZoom 18s ease-out forwards;
}

@keyframes tpcbBgZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.00); }
}

/* --- Overlay (currently off; set a background here to darken the image) --- */
.tpcb-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: none;
  pointer-events: none;
}

/* --- Inner layout --- */
.tpcb-banner__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(30px, 4vw, 60px) clamp(16px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}

/* --- Text block --- */
.tpcb-banner__text {
  flex: 1 1 42%;
  min-width: 0;
  animation: tpcbFadeLeft 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tpcbFadeLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tpcb-banner__text::before {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--tpcb-blue-bright);
  box-shadow: 0 0 10px var(--tpcb-blue-glow);
}

/* H1 – scoped with .tpcb-banner so theme / Elementor Kit h1 styles can't override it */
.tpcb-banner .tpcb-banner__headline {
  margin: 0 0 clamp(14px, 1.6vw, 20px);
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--tpcb-white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.tpcb-banner__headline-accent,
.tpcb-banner__headline-line {
  display: block;
}

.tpcb-banner__headline-accent {
  color: var(--tpcb-blue-glow);
}

/* Lead paragraph under H1 */
.tpcb-banner .tpcb-banner__lead {
  max-width: 520px;
  margin: 0 0 clamp(24px, 2.8vw, 34px);
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.125rem);
  line-height: 1.6;
  color: var(--tpcb-text-soft);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  text-wrap: pretty;
}

/* --- Buttons --- */
.tpcb-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tpcb-banner .tpcb-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 30px;
  border-radius: 3px;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              transform 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.tpcb-banner .tpcb-banner__btn--primary {
  background: var(--tpcb-blue-primary);
  color: var(--tpcb-white);
  border: 2px solid var(--tpcb-blue-primary);
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.48);
}

.tpcb-banner .tpcb-banner__btn--secondary {
  background: transparent;
  color: var(--tpcb-white);
  border: 2px solid rgba(255, 255, 255, 0.72);
}

/* Keyboard focus: visible ring (mouse clicks don't show it) */
.tpcb-banner .tpcb-banner__btn:focus:not(:focus-visible) {
  outline: none;
}

.tpcb-banner .tpcb-banner__btn:focus-visible {
  outline: 2px solid var(--tpcb-white);
  outline-offset: 3px;
}

.tpcb-banner .tpcb-banner__btn--primary:focus-visible {
  background: var(--tpcb-blue-bright);
  border-color: var(--tpcb-blue-bright);
  color: var(--tpcb-white);
  text-decoration: none;
}

.tpcb-banner .tpcb-banner__btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--tpcb-white);
  color: var(--tpcb-white);
  text-decoration: none;
}

/* --- Video block --- */
.tpcb-banner__video-wrap {
  flex: 0 0 clamp(280px, 46%, 580px);
  animation: tpcbFadeRight 0.85s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tpcbFadeRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tpcb-banner__video-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--tpcb-radius);
  overflow: hidden;
  background: #080e1e;
  box-shadow: var(--tpcb-shadow-video);
  border: 1px solid rgba(66, 165, 245, 0.18);
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.tpcb-banner__video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* --- Hover effects: mouse / trackpad only (no sticky hover on touch screens) --- */
@media (hover: hover) and (pointer: fine) {
  .tpcb-banner .tpcb-banner__btn--primary:hover {
    background: var(--tpcb-blue-bright);
    border-color: var(--tpcb-blue-bright);
    box-shadow: 0 6px 24px rgba(30, 136, 229, 0.62);
    color: var(--tpcb-white);
    transform: translateY(-2px);
    text-decoration: none;
  }

  .tpcb-banner .tpcb-banner__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--tpcb-white);
    color: var(--tpcb-white);
    transform: translateY(-2px);
    text-decoration: none;
  }

  .tpcb-banner .tpcb-banner__btn:active {
    transform: translateY(0);
  }

  .tpcb-banner__video-card:hover {
    box-shadow:
      0 14px 54px rgba(0, 0, 0, 0.82),
      0 4px 22px rgba(30, 136, 229, 0.32);
    transform: translateY(-4px);
  }
}

/* --- Tablet: stack text above video --- */
@media screen and (max-width: 900px) {
  .tpcb-banner__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }

  .tpcb-banner__text {
    width: 100%;
    max-width: 600px;
  }

  .tpcb-banner .tpcb-banner__headline {
    font-size: clamp(2rem, 4.6vw, 2.6rem);
  }

  /* Center the blue accent bar and the lead */
  .tpcb-banner__text::before,
  .tpcb-banner .tpcb-banner__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .tpcb-banner__buttons {
    justify-content: center;
  }

  .tpcb-banner__video-wrap {
    flex: none;
    width: 100%;
    max-width: 580px;
  }
}

/* --- Mobile --- */
@media screen and (max-width: 540px) {
  /* Full-bleed: break out of the Elementor container's mobile side padding */
  .tpcb-banner {
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
  }

  .tpcb-banner__inner {
    padding: 36px 20px 40px;
    gap: 28px;
  }

  .tpcb-banner__text {
    max-width: 100%;
  }

  .tpcb-banner__text::before {
    margin-bottom: 16px;
  }

  .tpcb-banner .tpcb-banner__headline {
    /* sized so "Manufacturing & Assembly" stays on one line down to 360px */
    font-size: clamp(1.45rem, 8vw - 3px, 2rem);
    line-height: 1.18;
    margin-bottom: 14px;
  }

  .tpcb-banner .tpcb-banner__lead {
    max-width: 30em;
    margin-bottom: 24px;
    font-size: 1rem;
    line-height: 1.55;
  }

  /* Two equal buttons side by side; they wrap to two rows below ~310px */
  .tpcb-banner__buttons {
    gap: 12px;
  }

  .tpcb-banner .tpcb-banner__btn {
    flex: 1 1 130px;
    max-width: 200px;
    min-height: 46px;
    padding: 12px 16px;
    font-size: 0.82rem;
  }

  .tpcb-banner__video-wrap {
    max-width: 100%;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .tpcb-banner__bg,
  .tpcb-banner__text,
  .tpcb-banner__video-wrap {
    animation: none;
  }

  .tpcb-banner .tpcb-banner__btn,
  .tpcb-banner__video-card {
    transition: none;
  }

  .tpcb-banner .tpcb-banner__btn:hover,
  .tpcb-banner__video-card:hover {
    transform: none;
  }
}


/* =========================================================
   STATS BAR
   ========================================================= */
.tpcb-statsbar {
  width: 100%;
  background: #ffffff;
  font-size: 16px;
}

.tpcb-statsbar *,
.tpcb-statsbar *::before,
.tpcb-statsbar *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tpcb-statsbar__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 clamp(16px, 4vw, 72px);
  display: flex;
  align-items: stretch;
}

/* --- Each stat item --- */
.tpcb-statsbar__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(20px, 3vw, 32px) clamp(16px, 2.4vw, 36px);
  text-align: left;
  transition: background 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tpcb-statsbar__item:hover {
    background: #f4f8ff;
  }
}

/* Explicit divider element between items */
.tpcb-statsbar__divider {
  width: 1px;
  background: #dce4ef;
  align-self: stretch;
  margin: 18px 0;
  flex-shrink: 0;
}

/* --- Icon --- */
.tpcb-statsbar__icon {
  flex-shrink: 0;
  width: clamp(22px, 2vw, 28px);
  height: clamp(22px, 2vw, 28px);
  color: #1565C0;
}

.tpcb-statsbar__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Text block --- */
.tpcb-statsbar__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.tpcb-statsbar__value {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #0d2a52;
}

/* Labels may run to two lines (e.g. "Any-layer HDI up to 14L · Multilayer up to 60L") */
.tpcb-statsbar__label {
  font-size: clamp(0.8rem, 1vw, 0.88rem);
  font-weight: 400;
  line-height: 1.35;
  color: #5a6f8a;
  white-space: normal;
  text-wrap: balance;
}

/* --- Tablet: icon above text, centered --- */
@media screen and (max-width: 860px) {
  .tpcb-statsbar__item {
    flex-direction: column;
    gap: 8px;
    padding: 22px 12px;
    text-align: center;
  }

  .tpcb-statsbar__text {
    align-items: center;
  }
}

/* --- Mobile: one row per item --- */
@media screen and (max-width: 540px) {
  .tpcb-statsbar__inner {
    flex-direction: column;
    align-items: center;
    padding: 4px 20px;
  }

  .tpcb-statsbar__divider {
    display: none;
  }

  .tpcb-statsbar__item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 380px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    padding: 16px 4px;
    text-align: left;
  }

  /* "~" works whether or not divider elements sit between the items */
  .tpcb-statsbar__item ~ .tpcb-statsbar__item {
    border-top: 1px solid #dce4ef;
  }

  .tpcb-statsbar__icon {
    width: 24px;
    height: 24px;
  }

  .tpcb-statsbar__text {
    align-items: flex-start;
  }

  .tpcb-statsbar__label {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpcb-statsbar__item {
    transition: none;
  }
}

/* =============================================================
   TotalPCB About Section - tpcb-about
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */
 
.tpcb-about *,
.tpcb-about *::before,
.tpcb-about *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
 
/* --- Section wrapper --- */
.tpcb-about {
  width: 100%;
  background: #f2f4f7;
  padding: clamp(32px, 4vw, 60px) clamp(24px, 5vw, 72px);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
 
/* --- Inner: two-column flex --- */
.tpcb-about__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
 
/* --- Left: image --- */
.tpcb-about__image-wrap {
  flex: 0 0 clamp(280px, 46%, 580px);
}
 
.tpcb-about__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
 
/* --- Right: text block --- */
.tpcb-about__content {
  flex: 1 1 0;
  min-width: 0;
}
 
/* --- Heading --- */
.tpcb-about__heading {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: clamp(20px, 2.5vw, 32px);
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
}
 
/* --- Body paragraphs --- */
.tpcb-about__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(19px, calc(3vw - 9px), 33px);
}
 
.tpcb-about__body p {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.75;
  margin: 0;
  padding: 0;
}
 
/* --- CTA button --- */
.tpcb-about__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #1565C0;
  border: 2px solid #1565C0;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              transform 0.22s ease, border-color 0.22s ease;
}
 
.tpcb-about__btn:hover,
.tpcb-about__btn:focus-visible {
  background: #1E88E5;
  border-color: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  text-decoration: none;
}
 
.tpcb-about__btn:active {
  transform: translateY(0);
}
 
/* --- Tablet: tighten gap, allow image to shrink --- */
@media screen and (max-width: 900px) {
  .tpcb-about__inner {
    gap: 32px;
  }
 
  .tpcb-about__image-wrap {
    flex: 0 0 44%;
  }
}
 
/* --- Mobile: stack vertically --- */
@media screen and (max-width: 640px) {
  .tpcb-about__inner {
    flex-direction: column;
  }
 
  .tpcb-about__image-wrap {
    flex: none;
    width: 100%;
  }
	
  .tpcb-about__body {
    margin-bottom: 23px;
  }
 
  .tpcb-about__btn {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================
   TotalPCB Services Flip Cards - tpcb-services v4
   Paste CSS into: Appearance > Customize > Additional CSS
   Replaces the whole "tpcb-services v3" block. HTML unchanged.
   v4 changes:
   - Side padding matches the other homepage sections, so the title
     and the cards line up with them at every width
   - Card height follows its content (min-height keeps the desktop
     look), so text no longer runs into the arrow or out of the card
   - 2 x 2 from 1100px down (four columns get too narrow for the text)
   - Hover flip on mouse devices only; touch screens flip on tap
     through the existing script, and a second tap flips back
   ============================================================= */

.tpcb-services *,
.tpcb-services *::before,
.tpcb-services *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper: same side padding as .tpcb-feature / .tpcb-caps --- */
.tpcb-services {
  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
  padding: clamp(32px, 4vw, 56px) clamp(24px, 5vw, 72px);
}

.tpcb-services__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section header: no extra indent, flush with the cards --- */
.tpcb-services__header {
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.tpcb-services__title {
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

/* Subtitle: wider max-width to allow one more word per line */
.tpcb-services__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.75;
  max-width: 860px;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* --- Cards grid --- */
.tpcb-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

/* --- Single flip card ---
   Front and back are stacked in one grid cell instead of being
   absolutely positioned, so the card is as tall as its taller face.
   Cards in a row stretch to the same height. */
.tpcb-card {
  display: grid;
  min-height: clamp(340px, 34vw, 420px);
  perspective: 1000px;
  cursor: pointer;
}

.tpcb-card__inner {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 12px;
}

/* Tap (touch, via script) or Enter/Space (keyboard) */
.tpcb-card.is-flipped .tpcb-card__inner {
  transform: rotateY(180deg);
}

/* --- Shared face styles --- */
.tpcb-card__front,
.tpcb-card__back {
  grid-area: 1 / 1;
  position: relative;
  min-width: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(24px, 2.5vw, 34px) clamp(16px, 2vw, 22px) clamp(16px, 2vw, 22px);
  text-align: center;
}

/* --- FRONT face --- */
.tpcb-card__front {
  /* Bottom padding keeps the text clear of the hint arrow */
  padding-bottom: 46px;
  background: #f4f6f9;
  border: 1px solid #e4e9f0;
  box-shadow: 0 2px 12px rgba(13, 42, 82, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  gap: 0;
}

/* --- Icon circle --- */
.tpcb-card__icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d2a52 0%, #1565C0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.28);
  margin-bottom: 20px;
}

.tpcb-card__icon-wrap svg {
  width: 32px;
  height: 32px;
  color: #ffffff;
  display: block;
  flex-shrink: 0;
}

/* Front title */
.tpcb-card__front-title {
  font-weight: 700;
  font-size: clamp(1.12rem, 1.45vw, 1.28rem);
  color: #0d2a52;
  line-height: 1.25;
  margin: 0 0 14px 0;
  padding: 0;
  border: none;
  background: none;
}

/* Front description */
.tpcb-card__front-desc {
  font-size: clamp(0.88rem, 1vw, 0.95rem);
  color: #5a6e88;
  line-height: 1.72;
  margin: 0;
}

/* Flip hint arrow */
.tpcb-card__hint {
  position: absolute;
  bottom: 16px;
  right: 18px;
  width: 20px;
  height: 20px;
  color: #1565C0;
  opacity: 0.38;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --- BACK face --- */
.tpcb-card__back {
  background: linear-gradient(150deg, #0b2246 0%, #1155a8 55%, #1976D2 100%);
  transform: rotateY(180deg);
  justify-content: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(13, 42, 82, 0.28);
}

/* Glowing top accent line only — no grid */
.tpcb-card__back::after {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, #42A5F5, transparent);
}

.tpcb-card__back-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #42A5F5;
  margin: 0;
}

/* Back title */
.tpcb-card__back-title {
  font-weight: 700;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* Back description */
.tpcb-card__back-desc {
  font-size: clamp(0.86rem, 0.95vw, 0.92rem);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.72;
  margin: 0;
}

/* CTA button on back */
.tpcb-card__back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  margin-top: 4px;
  position: relative;
  z-index: 1;
  transition: background 0.22s ease, border-color 0.22s ease,
              transform 0.22s ease, box-shadow 0.22s ease;
}

.tpcb-card__back-btn:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.80);
  color: #ffffff;
  text-decoration: none;
}

.tpcb-card__back-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* --- Hover: mouse / trackpad only. On touch screens a tap would also
   trigger :hover, and the card could not be flipped back. --- */
@media (hover: hover) and (pointer: fine) {
  .tpcb-card:hover .tpcb-card__inner {
    transform: rotateY(180deg);
  }

  .tpcb-card:hover .tpcb-card__front {
    box-shadow: 0 8px 32px rgba(13, 42, 82, 0.13);
    border-color: #c8d6e8;
  }

  .tpcb-card:hover .tpcb-card__hint {
    opacity: 0.75;
    transform: translateX(3px);
  }

  .tpcb-card__back-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.80);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

/* --- 1100px and below: 2 x 2 grid --- */
@media screen and (max-width: 1100px) {
  .tpcb-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tpcb-card {
    min-height: 300px;
  }
}

/* --- Mobile: single column --- */
@media screen and (max-width: 540px) {
  .tpcb-services__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .tpcb-card {
    min-height: 280px;
  }
}

/* --- Reduced motion: flip without the 3D animation --- */
@media (prefers-reduced-motion: reduce) {
  .tpcb-card__inner,
  .tpcb-card__front,
  .tpcb-card__hint,
  .tpcb-card__back-btn {
    transition: none;
  }
}

/* =============================================================
   TotalPCB Feature Block - tpcb-feature
   ============================================================= */

.tpcb-feature *,
.tpcb-feature *::before,
.tpcb-feature *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-feature {
  width: 100%;
  background: #ffffff;
  padding: clamp(32px, 4vw, 56px) clamp(24px, 5vw, 72px);
}

.tpcb-feature__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}

/* --- Left: text block --- */
.tpcb-feature__content {
  flex: 0 0 46%;
  min-width: 0;
}

.tpcb-feature__heading {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: clamp(18px, 2.5vw, 28px);
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
}

.tpcb-feature__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(10px, 2vw, 24px);
}

.tpcb-feature__body p {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  margin: 0;
  padding: 0;
}

/* --- CTA button --- */
.tpcb-feature__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #1565C0;
  border: 2px solid #1565C0;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              transform 0.22s ease, border-color 0.22s ease;
}

.tpcb-feature__btn:hover,
.tpcb-feature__btn:focus-visible {
  background: #1E88E5;
  border-color: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.42);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.tpcb-feature__btn:active {
  transform: translateY(0);
}

/* --- Right: image --- */
.tpcb-feature__image-wrap {
  flex: 0 0 48%;
}

.tpcb-feature__image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* --- Tablet --- */
@media screen and (max-width: 900px) {
  .tpcb-feature__inner {
    gap: 32px;
  }

  .tpcb-feature__content {
    flex: 0 0 46%;
  }

  .tpcb-feature__image-wrap {
    flex: 0 0 48%;
  }
}

/* --- Mobile: stack, image below text --- */
@media screen and (max-width: 640px) {
  .tpcb-feature__inner {
    flex-direction: column;
  }

  .tpcb-feature__image-wrap {
    flex: none;
    width: 100%;
  }

  .tpcb-feature__btn {
    width: 100%;
    justify-content: center;
  }
	
  .tpcb-feature__body {
    margin-bottom: 28px;
  }
}

/* --- Full-width divider --- */
.tpcb-divider {
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 0;
  line-height: 0;
}

.tpcb-divider__line {
  display: block;
  width: 100%;
  height: 1px;
  background-color: #e4e9f0;
  border: none;
  outline: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =============================================================
   TotalPCB Advanced Solutions Block - tpcb-advanced v3
   Paste CSS into: Appearance > Customize > Additional CSS
   Replaces the whole "tpcb-advanced" block. HTML unchanged.
   - Desktop (1251px and up): as before. 400px photo, icons in the
     text column
   - Tablet (641-1250px): photo at its natural ratio beside the heading
     and text, centered like the About and Procurement sections; the six
     icons move to one full-width row below both columns
   - Mobile (640px and below): as before. Photo, text, icons 3 x 2
   - Icon card hover on mouse devices only (no stuck lift after a tap)
   ============================================================= */

.tpcb-advanced *,
.tpcb-advanced *::before,
.tpcb-advanced *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-advanced {
  box-sizing: border-box;
  width: 100%;
  background: #f2f4f7;
  padding: clamp(40px, 4.5vw, 80px) clamp(24px, 5vw, 72px);
}

.tpcb-advanced__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: flex-end;
  gap: clamp(32px, 5vw, 72px);
}

/* --- Left: image, fixed height 400px --- */
.tpcb-advanced__image-wrap {
  flex: 0 0 clamp(260px, 46%, 564px);
  align-self: flex-start;
}

/* Two classes deep so Elementor's ".elementor img { height: auto }" can't win */
.tpcb-advanced .tpcb-advanced__image-wrap img {
  display: block;
  width: 100%;
  max-width: none;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

/* --- Right: content --- */
.tpcb-advanced__content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding-left: 5px;
}

/* --- Heading --- */
.tpcb-advanced__heading {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: clamp(16px, 2vw, 24px);
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
}

/* --- Body paragraphs --- */
.tpcb-advanced__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(16px, 2vw, 24px);
}

.tpcb-advanced__body p {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  margin: 0;
  padding: 0;
}

/* --- Industry icons grid --- */
.tpcb-advanced__industries {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 14px);
  margin-top: auto;
}

/* Single industry card */
.tpcb-advanced__industry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: clamp(10px, 1.2vw, 12px) clamp(4px, 0.8vw, 8px);
  background: #ffffff;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  cursor: default;
}

/* Icon wrapper */
.tpcb-advanced__industry-icon {
  width: clamp(36px, 4vw, 48px);
  height: clamp(36px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1565C0;
}

.tpcb-advanced__industry-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Industry label */
.tpcb-advanced__industry-label {
  font-size: clamp(0.68rem, 0.82vw, 0.76rem);
  font-weight: 600;
  color: #3a4e68;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

/* --- Hover: mouse / trackpad only --- */
@media (hover: hover) and (pointer: fine) {
  .tpcb-advanced__industry:hover {
    border-color: #1565C0;
    box-shadow: 0 4px 18px rgba(21, 101, 192, 0.12);
    transform: translateY(-2px);
  }
}

/* --- Tablet (641-1250px): icons in one row below photo and text ---
   Below 1251px the text column gets too narrow for six icons. The
   content wrapper steps aside (display: contents), so heading, text and
   icons are placed straight on the section grid:
     photo | heading
     photo | text
     icons   icons
   When the photo is taller, the two rows beside it share the extra
   space equally; the heading sits at the bottom of its row and the
   text at the top of its row, so the pair stays centered on the photo.
   When the text is taller, the photo is centered on the text. */
@media screen and (min-width: 641px) and (max-width: 1250px) {
  .tpcb-advanced__inner {
    display: grid;
    grid-template-columns: clamp(260px, 46%, 564px) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "img  head"
      "img  body"
      "ind  ind";
    column-gap: clamp(32px, 5vw, 72px);
    row-gap: 0;
  }

  .tpcb-advanced__image-wrap {
    grid-area: img;
    align-self: center;
  }

  /* Natural photo ratio (540 x 400), like the photos in the other sections */
  .tpcb-advanced .tpcb-advanced__image-wrap img {
    height: auto;
    aspect-ratio: 540 / 400;
  }

  .tpcb-advanced__content {
    display: contents;
  }

  .tpcb-advanced__heading {
    grid-area: head;
    align-self: end;
  }

  .tpcb-advanced__body {
    grid-area: body;
    align-self: start;
    margin-bottom: 0;
  }

  .tpcb-advanced__industries {
    grid-area: ind;
    margin-top: clamp(28px, 3.5vw, 40px);
  }
}

/* --- Narrow tablet (641-900px): slightly narrower photo, tighter gap --- */
@media screen and (min-width: 641px) and (max-width: 900px) {
  .tpcb-advanced__inner {
    grid-template-columns: clamp(240px, 44%, 564px) minmax(0, 1fr);
    column-gap: 28px;
  }
}

/* --- Mobile: stack vertically --- */
@media screen and (max-width: 640px) {
  .tpcb-advanced__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .tpcb-advanced__content {
    padding-left: 0;
  }

  .tpcb-advanced__image-wrap {
    flex: none;
    width: 100%;
  }

  .tpcb-advanced .tpcb-advanced__image-wrap img {
    height: 240px;
  }

  .tpcb-advanced__industries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .tpcb-advanced__industry {
    transition: none;
  }
}

/* =============================================================
   TotalPCB Capabilities Grid - tpcb-caps
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-caps *,
.tpcb-caps *::before,
.tpcb-caps *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-caps {
  width: 100%;
  background: #ffffff;
  padding: clamp(40px, 4.0vw, 80px) clamp(24px, 5vw, 72px);
}

.tpcb-caps__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section header --- */
.tpcb-caps__header {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.tpcb-caps__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-caps__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 860px;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* --- 3x2 grid --- */
.tpcb-caps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

/* --- Single card --- */
.tpcb-caps__card {
  background: #ffffff;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  padding: clamp(28px, 3vw, 40px) clamp(24px, 2.5vw, 32px);
  box-shadow: 0 2px 16px rgba(13, 42, 82, 0.07),
              0 1px 4px  rgba(13, 42, 82, 0.04);
  transition: box-shadow 0.25s ease, border-color 0.25s ease,
              transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tpcb-caps__card:hover {
  box-shadow: 0 8px 32px rgba(13, 42, 82, 0.12),
              0 2px 8px  rgba(13, 42, 82, 0.06);
  border-color: #c8d6e8;
  transform: translateY(-3px);
}

/* Accent bar at top of card */
.tpcb-caps__card::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, #1565C0, #42A5F5);
  border-radius: 2px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

/* --- Card title --- */
.tpcb-caps__card-title {
  font-weight: 700;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.25;
  color: #0d2a52;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* --- Card description --- */
.tpcb-caps__card-desc {
  font-size: clamp(0.86rem, 1vw, 0.95rem);
  color: #4a5a70;
  line-height: 1.76;
  margin: 0;
  padding: 0;
  flex: 1;
}

/* --- Tablet: 2 columns --- */
@media screen and (max-width: 900px) {
  .tpcb-caps__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Mobile: 1 column --- */
@media screen and (max-width: 540px) {
  .tpcb-caps__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* =============================================================
   TotalPCB Equipment Slider - tpcb-equip
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-equip *,
.tpcb-equip *::before,
.tpcb-equip *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-equip {
  width: 100%;
  background: #f2f4f7;
  padding: clamp(40px, 4.5vw, 80px) clamp(24px, 5vw, 72px);
}

.tpcb-equip__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Header --- */
.tpcb-equip__header {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.tpcb-equip__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-equip__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 720px;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* --- Slider stage --- */
.tpcb-equip__stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  /* Enough height for the track */
  user-select: none;
}

/* --- Track: holds all slides side by side --- */
.tpcb-equip__track {
  display: flex;
  transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  gap: clamp(14px, 2vw, 22px);
}

/* --- Single slide --- */
.tpcb-equip__slide {
  flex: 0 0 calc(50% - clamp(7px, 1vw, 11px));
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #dce4ef;
  /* Fixed height */
  height: clamp(240px, 32vw, 420px);
}

.tpcb-equip__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  pointer-events: none;
}

/* --- Caption overlay at bottom of each slide --- */
.tpcb-equip__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(10px, 1.5vw, 16px) clamp(14px, 2vw, 22px);
  background: linear-gradient(to top, rgba(5, 18, 40, 0.75) 0%, transparent 100%);
  border-radius: 0 0 10px 10px;
}

.tpcb-equip__caption-text {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Nav buttons: float over the stage, vertically centered --- */
.tpcb-equip__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: clamp(38px, 4vw, 48px);
  height: clamp(38px, 4vw, 48px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              opacity 0.22s ease, transform 0.22s ease;
  outline: none;
}

.tpcb-equip__nav svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

/* Active state */
.tpcb-equip__nav--active {
  background: #1565C0;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.38);
  color: #ffffff;
}

.tpcb-equip__nav--active:hover {
  background: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.50);
  transform: translateY(calc(-50% - 2px));
}

/* Disabled / grayed state */
.tpcb-equip__nav--disabled {
  background: rgba(200, 214, 232, 0.82);
  box-shadow: none;
  color: #9aaec4;
  cursor: default;
  pointer-events: none;
}

.tpcb-equip__nav--prev {
  left: clamp(10px, 1.5vw, 18px);
  transform: translateY(-50%);
}

.tpcb-equip__nav--next {
  right: clamp(10px, 1.5vw, 18px);
  transform: translateY(-50%);
}

.tpcb-equip__nav--prev:hover,
.tpcb-equip__nav--next:hover {
  transform: translateY(calc(-50% - 2px));
}

/* --- Dots indicator --- */
.tpcb-equip__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(16px, 2vw, 24px);
}

.tpcb-equip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8d6e8;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
  outline: none;
}

.tpcb-equip__dot.is-active {
  background: #1565C0;
  transform: scale(1.3);
}

/* --- Footer: CTA button --- */
.tpcb-equip__footer {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, 3vw, 38px);
}

.tpcb-equip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 34px;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #1565C0;
  border: 2px solid #1565C0;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              transform 0.22s ease, border-color 0.22s ease;
}

.tpcb-equip__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.tpcb-equip__btn:hover,
.tpcb-equip__btn:focus-visible {
  background: #1E88E5;
  border-color: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.42);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.tpcb-equip__btn:active {
  transform: translateY(0);
}

/* --- Tablet: still 2 slides per view --- */
@media screen and (max-width: 900px) {
  .tpcb-equip__slide {
    height: clamp(200px, 36vw, 340px);
  }
}

/* --- Mobile: 1 slide per view --- */
@media screen and (max-width: 600px) {
  .tpcb-equip__slide {
    flex: 0 0 100%;
    height: clamp(200px, 60vw, 300px);
  }

  .tpcb-equip__track {
    gap: 0;
  }
}

/* =============================================================
   TotalPCB Certifications Block - tpcb-certs v4
   Paste CSS into: Appearance > Customize > Additional CSS
   Replaces the whole "tpcb-certs v3" block (from this header down to
   the line before "News section header"). Needs the v4 HTML.
   v4 changes:
   - Certification cells hold an uploaded image instead of a drawn icon;
     the image box is 56px on wide screens and 44px on narrow ones
   - Certification names: weight 600 (was 700), 18px (was 20px)
   - Cell content is centered. For left-aligned cells, change
     "align-items: center" to "flex-start" and remove "text-align: center"
     in .tpcb-certs__cert
   Layout as in v3:
   - Desktop (901px and up): the panel is as tall as the left column;
     its three rows share the height equally
   - 900px and below: heading, certifications panel (3 x 2), intro,
     standards list
   - Standards rows: line above each row, none under the last row
   ============================================================= */

.tpcb-certs *,
.tpcb-certs *::before,
.tpcb-certs *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-certs {
  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
  padding: clamp(40px, 4.5vw, 80px) clamp(24px, 5vw, 72px);
}

/* --- Inner: text column + panel column ---
   Left column rows: heading, intro, standards list. The panel spans all
   rows. The last row (1fr) is empty: it takes up the extra height if the
   panel ever gets taller than the text, so the text rows stay together. */
.tpcb-certs__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 40%, 480px);
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(36px, 5vw, 72px);
}

.tpcb-certs__inner > * {
  grid-column: 1;
}

/* --- Heading (unchanged) --- */
.tpcb-certs__heading {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: clamp(14px, 2vw, 20px);
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
}

/* --- Intro paragraph --- */
.tpcb-certs__intro {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  margin-bottom: clamp(16px, 2vw, 24px);
}

/* =====================================================
   CERTIFICATIONS PANEL
   ===================================================== */
.tpcb-certs .tpcb-certs__panel {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(13, 42, 82, 0.07),
              0 1px 4px  rgba(13, 42, 82, 0.04);
}

/* Cells: each draws its right and bottom line. The grid is pulled 1px
   past the panel's right and bottom edge, so the outer lines are clipped
   by the panel. Works with any number of cells; an empty cell stays white.
   Rows share the panel height equally. */
.tpcb-certs .tpcb-certs__grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin: 0 -1px -1px 0;
  padding: 0;
  list-style: none;
}

.tpcb-certs .tpcb-certs__cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.1vw, 14px);
  text-align: center;
  margin: 0;
  padding: clamp(16px, 1.6vw, 22px) clamp(16px, 1.8vw, 24px);
  border-right: 1px solid #e4e9f0;
  border-bottom: 1px solid #e4e9f0;
  list-style: none;
  background: #ffffff;
}

/* Image box: 56px on wide screens, down to 44px on narrow ones */
.tpcb-certs__cert-icon {
  display: block;
  flex-shrink: 0;
  width: clamp(44px, 4.2vw, 56px);
  height: clamp(44px, 4.2vw, 56px);
}

/* Two classes deep so Elementor's ".elementor img { height: auto }" can't win */
.tpcb-certs .tpcb-certs__cert-icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.tpcb-certs__cert-name {
  font-size: clamp(0.94rem, 1.1vw, 1rem);
  font-weight: 600;
  line-height: 1.3;
  color: #0d2a52;
}

/* =====================================================
   STANDARDS LIST
   ===================================================== */
.tpcb-certs .tpcb-certs__specs {
  margin: 0;
}

/* Line above each row; the last row has no line under it */
.tpcb-certs .tpcb-certs__spec {
  display: grid;
  grid-template-columns: clamp(132px, 13vw, 168px) minmax(0, 1fr);
  column-gap: clamp(16px, 2vw, 28px);
  padding: 13px 0;
  border-top: 1px solid #e4e9f0;
}

.tpcb-certs .tpcb-certs__spec:last-child {
  padding-bottom: 0;
}

.tpcb-certs .tpcb-certs__spec dt,
.tpcb-certs .tpcb-certs__spec dd {
  margin: 0;
  font-size: clamp(0.84rem, 1vw, 0.94rem);
  line-height: 1.6;
}

.tpcb-certs .tpcb-certs__spec dt {
  font-weight: 600;
  color: #0d2a52;
}

.tpcb-certs .tpcb-certs__spec dd {
  color: #4a5a70;
}

/* Standard numbers stay on one line */
.tpcb-certs__std {
  white-space: nowrap;
}

/* --- 900px and below: one column in page order --- */
@media screen and (max-width: 900px) {
  .tpcb-certs__inner {
    display: block;
  }

  .tpcb-certs .tpcb-certs__panel {
    margin-bottom: clamp(24px, 4vw, 32px);
  }

  .tpcb-certs .tpcb-certs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Mobile: panel 2 x 3, rows stack label over text --- */
@media screen and (max-width: 540px) {
  .tpcb-certs .tpcb-certs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tpcb-certs .tpcb-certs__cert {
    padding: 16px 14px;
  }

  .tpcb-certs .tpcb-certs__spec {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
    padding: 12px 0;
  }

  .tpcb-certs .tpcb-certs__spec:last-child {
    padding-bottom: 0;
  }
}

/* --- News section header --- */
.tpcb-news-header {
  width: 100%;
  background: #ffffff;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 5vw, 72px) clamp(28px, 3.5vw, 44px);
}

.tpcb-news-header__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

.tpcb-news-header__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-news-header__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 720px;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* =============================================================
   TotalPCB About Hero Banner - tpcb-about-hero
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-about-hero *,
.tpcb-about-hero *::before,
.tpcb-about-hero *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-about-hero {
  position: relative;
  width: 100%;
  min-height: clamp(240px, 30.5vw, 440px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate; /* add this line */
}

/* --- Background image --- */
.tpcb-about-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Replace with your actual image path */
  background-image: url('/wp-content/uploads/2026/04/smt-machine-pcb-assembly.webp');
  background-size: cover;
  background-position: center;
}

@keyframes tpcbAboutBgZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.00); }
}

/* --- Dark overlay --- */
.tpcb-about-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(5, 14, 30, 0.52) 0%,
    rgba(8, 20, 42, 0.62) 100%
  );
  pointer-events: none;
}

/* --- Content: centered vertically and horizontally --- */
.tpcb-about-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px);
  gap: clamp(14px, 2.5vw, 24px);
  animation: tpcbAboutFadeIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tpcbAboutFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Play button --- */
.tpcb-about-hero__play {
  width: clamp(56px, 6vw, 72px);
  height: clamp(56px, 6vw, 72px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  outline: none;
  will-change: transform;        /* add this line */
  transform: translateZ(0);      /* add this line — forces GPU layer */
}

.tpcb-about-hero__play:focus,
.tpcb-about-hero__play:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  color: #0d2a52;
  outline: none;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

.tpcb-about-hero__play:focus svg,
.tpcb-about-hero__play:focus-visible svg {
  color: #0d2a52;
}

.tpcb-about-hero__play svg {
  width: clamp(22px, 2.5vw, 28px);
  height: clamp(22px, 2.5vw, 28px);
  color: #0d2a52;
  margin-left: 3px; /* optical center for play triangle */
  display: block;
  flex-shrink: 0;
}

.tpcb-about-hero__play:hover {
  background: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45);
}

.tpcb-about-hero__play:active {
  transform: scale(1.02);
}

/* Pulse ring animation */
.tpcb-about-hero__play::before {
  content: '';
  position: absolute;
  width: clamp(56px, 6vw, 72px);
  height: clamp(56px, 6vw, 72px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  animation: tpcbPlayPulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes tpcbPlayPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.85); opacity: 0; }
}

/* --- Heading --- */
.tpcb-about-hero__title {
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  letter-spacing: 0.01em;
}

/* --- Subtitle --- */
.tpcb-about-hero__subtitle {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin: 0;
}

/* =====================================================
   VIDEO MODAL OVERLAY
   ===================================================== */
.tpcb-video-modal {
  display: flex;                        /* always flex, never toggled */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 12, 28, 0.90);
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;                           /* hidden by default */
  pointer-events: none;                 /* not clickable when hidden */
  transition: opacity 0.28s ease;
}

/* JS adds .is-open to show the modal */
.tpcb-video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

@keyframes tpcbModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal inner container */
.tpcb-video-modal__box {
  position: relative;
  width: 100%;
  max-width: 900px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.70);
  animation: tpcbModalScale 0.30s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes tpcbModalScale {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* 16:9 ratio wrapper */
.tpcb-video-modal__ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.tpcb-video-modal__ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Close button */
.tpcb-video-modal__close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.40);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
  outline: none;
  flex-shrink: 0;
}

.tpcb-video-modal__close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tpcb-video-modal__close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
}

/* --- Responsive --- */
@media screen and (max-width: 540px) {
  .tpcb-about-hero__content {
    gap: 16px;
  }

  .tpcb-video-modal__close {
    top: -40px;
  }
}

/* About page - white background override */
.tpcb-about--white {
  background: #ffffff;
}

/* Align content to top on about page */
.tpcb-about--white .tpcb-about__inner {
  align-items: flex-start;
}

/* =============================================================
   TotalPCB Working With Us Tabs - tpcb-tabs
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-tabs *,
.tpcb-tabs *::before,
.tpcb-tabs *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-tabs {
  width: 100%;
  background: #f2f4f7;
  padding: clamp(40px, 4.0vw, 80px) clamp(24px, 5vw, 72px);
}

.tpcb-tabs__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section header --- */
.tpcb-tabs__header {
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.tpcb-tabs__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-tabs__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 860px;
  margin: 0;
  padding: 0;
}

/* --- Tab component wrapper --- */
.tpcb-tabs__widget {
  border: 1px solid #dce4ef;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(13, 42, 82, 0.08),
              0 1px 4px  rgba(13, 42, 82, 0.04);
  overflow: hidden;
  background: #ffffff;
}

/* --- Tab nav bar --- */
.tpcb-tabs__nav {
  display: flex;
  border-bottom: 1px solid #dce4ef;
  background: #f8fafc;
  list-style: none;
}

/* Single tab button */
.tpcb-tabs__nav-btn {
  flex: 1 1 0;
  padding: clamp(14px, 1.8vw, 20px) clamp(12px, 1.5vw, 20px);
  font-size: clamp(0.84rem, 1.1vw, 0.96rem);
  font-weight: 600;
  color: #6b7f99;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.3;
  transition: color 0.22s ease, background 0.22s ease,
              border-color 0.22s ease;
  outline: none;
  /* Push border-bottom flush to nav bottom */
  margin-bottom: -1px;
}

.tpcb-tabs__nav-btn:hover {
  color: #1565C0;
  background: rgba(21, 101, 192, 0.04);
}

.tpcb-tabs__nav-btn.is-active {
  color: #0d2a52;
  background: #ffffff;
  border-bottom-color: #1565C0;
}

/* --- Tab panels container --- */
.tpcb-tabs__panels {
  position: relative;
  overflow: hidden;
}

/* Single panel */
.tpcb-tabs__panel {
  display: none;
  padding: clamp(25px, 3.7vw, 49px) clamp(24px, 3.5vw, 48px);
  animation: tpcbTabFadeIn 0.38s ease both;
}

.tpcb-tabs__panel.is-active {
  display: block;
}

@keyframes tpcbTabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Panel inner: two-column flex --- */
.tpcb-tabs__panel-inner {
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 60px);
}

/* Reverse layout for even tabs (2nd and 4th) */
.tpcb-tabs__panel-inner--reverse {
  flex-direction: row-reverse;
}

/* --- Text side --- */
.tpcb-tabs__panel-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tpcb-tabs__panel-heading {
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.25;
  color: #0d2a52;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.tpcb-tabs__panel-text p {
  font-size: clamp(0.86rem, 1.05vw, 0.96rem);
  color: #4a5a70;
  line-height: 1.78;
  margin: 0;
  padding: 0;
}

/* Optional CTA link inside panel */
.tpcb-tabs__panel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1565C0;
  margin-top: 4px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.tpcb-tabs__panel-link:hover {
  color: #1E88E5;
  gap: 10px;
  text-decoration: none;
}

.tpcb-tabs__panel-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* --- Image side --- */
.tpcb-tabs__panel-image {
  flex: 0 0 clamp(240px, 46%, 540px);
}

.tpcb-tabs__panel-image img {
  display: block;
  width: 100%;
  height: clamp(220px, 28vw, 380px);
  object-fit: cover;
  border-radius: 8px;
}

/* --- Tablet: keep side-by-side, tighten --- */
@media screen and (max-width: 900px) {
  .tpcb-tabs__panel-inner {
    gap: 24px;
  }

  .tpcb-tabs__panel-image {
    flex: 0 0 42%;
  }

  .tpcb-tabs__panel-image img {
    height: clamp(180px, 34vw, 300px);
  }
}

/* --- Mobile: stack nav + content vertically --- */
@media screen and (max-width: 640px) {
  /* Nav: 2x2 grid */
  .tpcb-tabs__nav {
    flex-wrap: wrap;
  }

  .tpcb-tabs__nav-btn {
    flex: 0 0 50%;
    border-bottom: none;
    border-right: 1px solid #dce4ef;
    margin-bottom: 0;
  }

  /* Remove right border on 2nd and 4th buttons */
  .tpcb-tabs__nav-btn:nth-child(2n) {
    border-right: none;
  }

  /* Bottom border on first row */
  .tpcb-tabs__nav-btn:nth-child(-n+2) {
    border-bottom: 1px solid #dce4ef;
  }

  .tpcb-tabs__nav-btn.is-active {
    background: #ffffff;
    border-bottom-color: #dce4ef;
    color: #1565C0;
    position: relative;
  }

  /* Active indicator dot on mobile */
  .tpcb-tabs__nav-btn.is-active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1565C0;
  }

  /* Panel: stack image below text */
  .tpcb-tabs__panel {
    padding: 24px 20px;
  }

  .tpcb-tabs__panel-inner,
  .tpcb-tabs__panel-inner--reverse {
    flex-direction: column;
  }

  .tpcb-tabs__panel-image {
    flex: none;
    width: 100%;
  }

  .tpcb-tabs__panel-image img {
    height: clamp(180px, 55vw, 260px);
  }
}

/* =============================================================
   TotalPCB Dual Equipment Sliders - tpcb-dual-slider
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-dual-slider *,
.tpcb-dual-slider *::before,
.tpcb-dual-slider *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-dual-slider {
  width: 100%;
  background: #ffffff;
  padding: clamp(28px, 3.0vw, 52px) clamp(24px, 5vw, 72px);
}

.tpcb-dual-slider__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section header --- */
.tpcb-dual-slider__header {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.tpcb-dual-slider__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-dual-slider__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 860px;
  margin: 0;
  padding: 0;
}

/* --- Two sliders side by side --- */
.tpcb-dual-slider__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
}

/* =====================================================
   SINGLE SLIDER UNIT
   ===================================================== */
.tpcb-slider-unit {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Slide stage --- */
.tpcb-slider-unit__stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #e8edf4;
  user-select: none;
}

/* --- Track --- */
.tpcb-slider-unit__track {
  display: flex;
  transition: transform 0.50s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* --- Single slide --- */
.tpcb-slider-unit__slide {
  flex: 0 0 100%;
  position: relative;
}

.tpcb-slider-unit__slide img {
  display: block;
  width: 100%;
  height: clamp(220px, 28vw, 390px);
  object-fit: cover;
  border-radius: 10px;
  pointer-events: none;
}

/* --- Caption on image --- */
.tpcb-slider-unit__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(10px, 1.5vw, 16px) clamp(14px, 2vw, 22px);
  background: linear-gradient(to top, rgba(5, 18, 40, 0.75) 0%, transparent 100%);
  border-radius: 0 0 10px 10px;
  pointer-events: none;
  transform: none;
  white-space: normal;
}

.tpcb-slider-unit__caption-text {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Nav buttons floating on stage --- */
.tpcb-slider-unit__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: clamp(32px, 3.5vw, 42px);
  height: clamp(32px, 3.5vw, 42px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: background 0.22s ease, box-shadow 0.22s ease,
              opacity 0.22s ease, transform 0.22s ease;
}

.tpcb-slider-unit__nav svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

/* Active state */
.tpcb-slider-unit__nav--active {
  background: #1565C0;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.38);
  color: #ffffff;
}

.tpcb-slider-unit__nav--active:hover {
  background: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.50);
  transform: translateY(calc(-50% - 2px));
  color: #ffffff;
}

/* Disabled / grayed state */
.tpcb-slider-unit__nav--disabled {
  background: rgba(200, 214, 232, 0.82);
  box-shadow: none;
  color: #9aaec4;
  cursor: default;
  pointer-events: none;
}

.tpcb-slider-unit__nav--prev {
  left: clamp(8px, 1.2vw, 14px);
}

.tpcb-slider-unit__nav--next {
  right: clamp(8px, 1.2vw, 14px);
}

/* --- Category label below image --- */
.tpcb-slider-unit__label {
  text-align: center;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  font-weight: 600;
  color: #3a4e68;
  letter-spacing: 0.02em;
  padding-top: 2px;
}

/* --- Dot indicators --- */
.tpcb-slider-unit__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.tpcb-slider-unit__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #c8d6e8;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
  outline: none;
}

.tpcb-slider-unit__dot.is-active {
  background: #1565C0;
  transform: scale(1.3);
}

/* --- Tablet: keep side by side, reduce image height --- */
@media screen and (max-width: 860px) {
  .tpcb-dual-slider__grid {
    gap: 16px;
  }

  .tpcb-slider-unit__slide img {
    height: clamp(180px, 28vw, 300px);
  }
}

/* --- Mobile: stack vertically --- */
@media screen and (max-width: 580px) {
  .tpcb-dual-slider__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tpcb-slider-unit__slide img {
    height: clamp(200px, 58vw, 300px);
  }

  .tpcb-slider-unit__caption {
    white-space: normal;
    text-align: center;
    max-width: 80%;
  }
}

/* =============================================================
   TotalPCB Certifications Grid - tpcb-cert-grid v5
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-cert-grid *,
.tpcb-cert-grid *::before,
.tpcb-cert-grid *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-cert-grid {
  width: 100%;
  background: #ffffff;
  padding: clamp(40px, 3.0vw, 80px) clamp(24px, 5vw, 72px);
}

.tpcb-cert-grid__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section header --- */
.tpcb-cert-grid__header {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.tpcb-cert-grid__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: 14px;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

.tpcb-cert-grid__subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: #4a5a70;
  line-height: 1.78;
  max-width: 680px;
  margin: 0;
  padding: 0;
}

/* --- 4-column grid --- */
.tpcb-cert-grid__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

/* =====================================================
   SINGLE CERT CARD
   ===================================================== */
.tpcb-cert-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(13, 42, 82, 0.07),
              0 1px 4px  rgba(13, 42, 82, 0.04);
  transition: box-shadow 0.28s ease, transform 0.28s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.tpcb-cert-card:hover {
  box-shadow: 0 10px 36px rgba(13, 42, 82, 0.14),
              0 2px 8px  rgba(13, 42, 82, 0.07);
  transform: translateY(-3px);
}

/* --- Card top: sage header band --- */
.tpcb-cert-card__header {
  background: #c8d0c0;
  padding: clamp(10px, 1.4vw, 16px) clamp(12px, 1.6vw, 18px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(44px, 5vw, 64px);
}

.tpcb-cert-card__cert-name {
  font-size: clamp(0.76rem, 0.95vw, 0.9rem);
  font-weight: 700;
  color: #3a4a36;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.25;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* --- Card body --- */
.tpcb-cert-card__body {
  position: relative;
  aspect-ratio: 3 / 4.28;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
  width: 100%;
}

/* White mask sits above reveal layer, below image.
   Fades out as image slides away to reveal sage background.
   Note: the global reset above sets box-sizing on ::before/::after,
   but does NOT reset position/opacity, so this works correctly. */
.tpcb-cert-card__body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade out white mask when card is hovered or toggled */
.tpcb-cert-card:hover .tpcb-cert-card__body::before,
.tpcb-cert-card.is-revealed .tpcb-cert-card__body::before {
  opacity: 0;
}

/* --- Reveal text: sage tint, z-index 0 (below mask and image) --- */
.tpcb-cert-card__reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2vw, 26px);
  text-align: center;
  background: #f5f6f0;
  pointer-events: none;
}

.tpcb-cert-card__reveal-title {
  display: none;
}

.tpcb-cert-card__reveal-desc {
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  color: #4a5a70;
  line-height: 1.65;
  margin: 0;
}

/* --- Certificate image: z-index 2 (above mask) --- */
.tpcb-cert-card__image {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: calc(100% - 20px);
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #ffffff;
  z-index: 2;
  transform: translateY(0);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Hover: slide image down */
.tpcb-cert-card:hover .tpcb-cert-card__image,
.tpcb-cert-card.is-revealed .tpcb-cert-card__image {
  transform: translateY(105%);
}

/* --- Tablet: 2 columns --- */
@media screen and (max-width: 900px) {
  .tpcb-cert-grid__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Mobile: 2 columns, smaller gap --- */
@media screen and (max-width: 480px) {
  .tpcb-cert-grid__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tpcb-cert-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tpcb-cert-card__header {
    min-height: 36px;
    padding: 7px 8px;
  }

  .tpcb-cert-card__cert-name {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .tpcb-cert-card__reveal-desc {
    font-size: 0.7rem;
    line-height: 1.55;
  }
}

/* =============================================================
   TotalPCB Team Block - tpcb-team
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-team *,
.tpcb-team *::before,
.tpcb-team *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-team {
  width: 100%;
  background: #ffffff;
  padding: clamp(20px, 1.5vw, 36px) clamp(24px, 5vw, 72px) clamp(32px, 4vw, 56px);
}

.tpcb-team__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Section title above the two-column row --- */
.tpcb-team__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.2;
  color: #0d2a52;
  margin-bottom: clamp(20px, 3vw, 36px);
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
}

/* --- Two-column row --- */
.tpcb-team__row {
  display: flex;
  align-items: stretch;
  gap: clamp(20px, 3vw, 36px);
}

/* --- Left: text card --- */
.tpcb-team__text-card {
  flex: 0 0 clamp(220px, 26%, 320px);
  background: #f4f6f9;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  padding: clamp(24px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
}

.tpcb-team__text-heading {
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.25;
  color: #0d2a52;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.tpcb-team__text-body {
  font-size: clamp(0.84rem, 1vw, 0.94rem);
  color: #4a5a70;
  line-height: 1.78;
  margin: 0;
}

/* --- Right: image --- */
.tpcb-team__image-wrap {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
}

.tpcb-team__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  min-height: clamp(260px, 28vw, 440px);
  border-radius: 10px;
}

/* --- Tablet: keep side by side, text card narrower --- */
@media screen and (max-width: 860px) {
  .tpcb-team__row {
    gap: 18px;
  }

  .tpcb-team__text-card {
    flex: 0 0 38%;
  }
}

/* --- Mobile: stack vertically, image below text --- */
@media screen and (max-width: 580px) {
  .tpcb-team__row {
    flex-direction: column;
  }

  .tpcb-team__text-card {
    flex: none;
    width: 100%;
  }

  /* Fix: give image wrap an explicit height on mobile */
  .tpcb-team__image-wrap {
    flex: none;
    width: 100%;
    height: clamp(220px, 60vw, 320px);
  }

  .tpcb-team__image-wrap img {
    min-height: unset;
    height: 100%;
  }
}

/* =============================================================
   TotalPCB CTA Banner - tpcb-cta
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-cta *,
.tpcb-cta *::before,
.tpcb-cta *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Section wrapper --- */
.tpcb-cta {
  width: 100%;
  background: #0d2a52;
  position: relative;
}

/* --- Inverted chevron at top center --- */
.tpcb-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: clamp(18px, 2.5vw, 28px) solid transparent;
  border-right: clamp(18px, 2.5vw, 28px) solid transparent;
  border-top: clamp(13px, 1.8vw, 20px) solid #ffffff;
  z-index: 2;
}

/* --- Inner layout: text left, button right --- */
.tpcb-cta__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(22px, 3vw, 36px) clamp(24px, 5vw, 72px) clamp(22px, 3vw, 36px) clamp(12px, 2vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 48px);
}

/* --- CTA text --- */
.tpcb-cta__text {
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 0;
  padding-left: 0;
}

.tpcb-cta__text strong {
  font-weight: 700;
  color: #42A5F5;
}

/* --- CTA button --- */
.tpcb-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #1565C0;
  border: 2px solid #1565C0;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.22s ease, border-color 0.22s ease,
              box-shadow 0.22s ease, transform 0.22s ease;
  cursor: pointer;
}

.tpcb-cta__btn:hover,
.tpcb-cta__btn:focus-visible {
  background: #1E88E5;
  border-color: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.45);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.tpcb-cta__btn:active {
  transform: translateY(0);
}

.tpcb-cta__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* --- Tablet: slightly tighter --- */
@media screen and (max-width: 860px) {
  .tpcb-cta__inner {
    gap: 20px;
  }
}

/* --- Mobile: stack text and button --- */
@media screen and (max-width: 580px) {
  .tpcb-cta__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .tpcb-cta__btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ==================================================== */
/* Pure CSS: Advanced Multi-level Menu & Auto-column    */
/* Applies only to Desktop and Large Tablets            */
/* ==================================================== */

@media (min-width: 992px) {

    /* ========================================================= */
    /* PART 1: Global Menu Aesthetics (Applies to ALL sub-menus) */
    /* ========================================================= */
    
    /* Optimize sub-menu panel: border radius, shadow, and spacing */
    .main-navigation ul.sub-menu {
        border-radius: 8px !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid #f0f0f0 !important;
        padding: 10px 0 !important;
        background-color: #ffffff !important;
    }

    /* Default text styling and padding for menu items */
    .main-navigation ul.sub-menu li a {
        padding: 12px 24px !important;
        color: #444444 !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
        border-bottom: none !important;
    }

    /* Hover effects: background color, text color, and slightly push right */
    .main-navigation ul.sub-menu li:hover > a {
        background-color: #f4f7f9 !important;
        color: #0056b3 !important; 
        padding-left: 30px !important; 
    }

    /* Ensure deeper sub-menus (level 3, 4) pop out correctly on top */
    .main-navigation ul.sub-menu li {
        position: relative !important;
    }
    .main-navigation ul.sub-menu li ul.sub-menu {
        z-index: 9999 !important;
        top: 0 !important; 
        left: 100% !important; 
    }

    /* ========================================================= */
    /* PART 2: Auto-column Layout (Applies ONLY to 'auto-column')*/
    /* ========================================================= */
    
    /* Convert list to grid layout when hovering over the targeted item */
    li.auto-column:hover > ul.sub-menu,
    li.auto-column.focus > ul.sub-menu {
        display: grid !important; 
        grid-template-rows: repeat(8, auto); /* Max items per column: 8 */
        grid-auto-flow: column; 
        width: max-content !important; 
        column-gap: 20px; 
        padding: 15px !important; 
    }

    /* Set a minimum width for each column to prevent text overlapping */
    li.auto-column > ul.sub-menu > li > a {
        min-width: 200px !important; 
    }
    
    /* Adjust spacing if a sub-menu flies out from the multi-column panel */
    li.auto-column > ul.sub-menu > li > ul.sub-menu {
        margin-left: 5px; 
    }
}

/* =============================================================
   TotalPCB Service Sub-Banner - tpcb-subbanner v2
   No outer padding / background / border-radius.
   Just a clean 1170 x 390 image banner with content.
   Paste CSS into: Appearance > Customize > Additional CSS
   ============================================================= */

.tpcb-subbanner *,
.tpcb-subbanner *::before,
.tpcb-subbanner *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Banner wrapper: no wrapper padding, no background --- */
.tpcb-subbanner {
  position: relative;
  width: 100%;
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  /* Exact 1170 x 390 ratio = 3:1 */
  aspect-ratio: 1170 / 390;
  min-height: 260px;
  overflow: hidden;
}

/* --- Background image layer --- */
.tpcb-subbanner__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

/* --- Gradient overlay: dark left -> transparent right --- */
.tpcb-subbanner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(5, 18, 40, 0.85) 0%,
    rgba(8, 24, 50, 0.55) 45%,
    rgba(12, 30, 60, 0.20) 85%,
    rgba(12, 30, 60, 0.10) 100%
  );
  pointer-events: none;
}

/* --- Content: left aligned, vertically centered --- */
.tpcb-subbanner__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 22px);
  padding: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 64px);
  padding-top: clamp(24px, 4vw, 56px);
  padding-right: clamp(24px, 5vw, 64px);
  padding-bottom: clamp(24px, 4vw, 56px);
  padding-left: clamp(39px, calc(5vw + 15px), 79px);
  max-width: 72%;
}

/* --- H1 title --- */
.tpcb-subbanner__title {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* --- Description --- */
.tpcb-subbanner__desc {
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  max-width: 580px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* --- CTA button --- */
.tpcb-subbanner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #1565C0;
  border: 2px solid #1565C0;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  margin-top: clamp(2px, 1vw, 8px);
  transition: background 0.22s ease, border-color 0.22s ease,
              box-shadow 0.22s ease, transform 0.22s ease;
}

.tpcb-subbanner__btn:hover,
.tpcb-subbanner__btn:focus-visible {
  background: #1E88E5;
  border-color: #1E88E5;
  box-shadow: 0 6px 22px rgba(30, 136, 229, 0.50);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.tpcb-subbanner__btn:active {
  transform: translateY(0);
}

/* --- Tablet --- */
@media screen and (max-width: 900px) {
  .tpcb-subbanner__content {
    max-width: 72%;
  }
}

/* --- Mobile --- */
@media screen and (max-width: 580px) {
  .tpcb-subbanner {
    aspect-ratio: auto;
    min-height: 280px;
  }

  .tpcb-subbanner__overlay {
    background: linear-gradient(
      to right,
      rgba(5, 18, 40, 0.80) 0%,
      rgba(8, 24, 50, 0.65) 100%
    );
  }

  .tpcb-subbanner__content {
    max-width: 100%;
    padding: 28px 22px;
  }

  .tpcb-subbanner__btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* =============================================================
   TotalPCB Latest News Cards - tpcb-news
   Sits directly below .tpcb-news-header (H2 + intro, separate widget).
   Paste CSS into: Appearance > Customize > Additional CSS
   - Whole card is clickable through the title link (::after overlay)
   - No "Read the Guide" line: the footer row (date + arrow) closes the card
   - Hover follows the landing-page guide cards: light-blue border,
     soft shadow, blue title, arrow shifts 3px. No lift, no image zoom.
   - No font-family: inherits the global theme, like the news header
   ============================================================= */

.tpcb-news {
  --tpcb-news-heading: #0d2a52;
  --tpcb-news-text: #4a5a70;
  --tpcb-news-muted: #6b7f99;
  --tpcb-news-primary: #1565C0;
  --tpcb-news-primary-hover: #1E88E5;
  --tpcb-news-line: #e4e9f0;
  --tpcb-news-line-soft: #edf1f6;
  --tpcb-news-line-hover: #b8cfea;
  --tpcb-news-focus: #42A5F5;
  --tpcb-news-img-bg: #e8edf4;
  --tpcb-news-radius: 10px;
  /* Thumbnail ratio on desktop: change here to match the blog featured images */
  --tpcb-news-ratio: 16 / 9;

  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
  /* Top is 0: .tpcb-news-header already carries the gap below the intro.
     Sides match .tpcb-news-header so the cards line up with the H2. */
  padding: 0 clamp(24px, 5vw, 72px) clamp(40px, 4.5vw, 80px);
}

.tpcb-news *,
.tpcb-news *::before,
.tpcb-news *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tpcb-news__inner {
  max-width: 1230px;
  margin-left: auto;
  margin-right: auto;
}

/* --- 3-column grid --- */
.tpcb-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

/* --- Card --- */
.tpcb-news .tpcb-news__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--tpcb-news-line);
  border-radius: var(--tpcb-news-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* --- Thumbnail --- */
.tpcb-news__media {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--tpcb-news-img-bg);
}

/* Two classes deep so Elementor's ".elementor img { height: auto }" can't win */
.tpcb-news .tpcb-news__media img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: var(--tpcb-news-ratio);
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* --- Text block --- */
.tpcb-news__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: clamp(20px, 2vw, 26px) clamp(20px, 2vw, 26px) clamp(18px, 1.8vw, 22px);
}

/* H3 title: theme / Elementor Kit h3 styles are reset here */
.tpcb-news .tpcb-news__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--tpcb-news-heading);
}

/* Title link: every state set, so Kit link colors and underlines can't leak in */
.tpcb-news .tpcb-news__link,
.tpcb-news .tpcb-news__link:visited,
.tpcb-news .tpcb-news__link:hover,
.tpcb-news .tpcb-news__link:focus,
.tpcb-news .tpcb-news__link:active {
  color: var(--tpcb-news-heading);
  text-decoration: none;
  border: 0;
  background: none;
  box-shadow: none;
}

.tpcb-news .tpcb-news__link {
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

/* Whole card is clickable through the title link */
.tpcb-news .tpcb-news__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Focus ring moves to the card (below) */
.tpcb-news .tpcb-news__link:focus-visible {
  outline: none;
}

/* Excerpt */
.tpcb-news .tpcb-news__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0 0 8px;
  font-size: clamp(0.86rem, 1vw, 0.95rem);
  line-height: 1.7;
  color: var(--tpcb-news-text);
}

/* Footer row: pinned to the card bottom, so all three cards end on one line */
.tpcb-news__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--tpcb-news-line-soft);
}

.tpcb-news .tpcb-news__date {
  margin: 0;
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.4;
  color: var(--tpcb-news-muted);
}

/* Arrow: full strength on touch screens; softened on mouse devices below */
.tpcb-news__arrow {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--tpcb-news-primary);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --- Keyboard focus: ring on the whole card, keyboard only --- */
.tpcb-news .tpcb-news__card:has(.tpcb-news__link:focus-visible) {
  outline: 3px solid var(--tpcb-news-focus);
  outline-offset: 2px;
}

@supports not selector(:has(*)) {
  .tpcb-news .tpcb-news__card:focus-within {
    outline: 3px solid var(--tpcb-news-focus);
    outline-offset: 2px;
  }
}

/* --- Hover: mouse / trackpad only (no sticky hover after a tap) --- */
@media (hover: hover) and (pointer: fine) {
  .tpcb-news__arrow {
    opacity: 0.45;
  }

  .tpcb-news .tpcb-news__card:hover {
    border-color: var(--tpcb-news-line-hover);
    box-shadow: 0 6px 18px rgba(13, 42, 82, 0.06);
  }

  .tpcb-news .tpcb-news__card:hover .tpcb-news__link {
    color: var(--tpcb-news-primary);
  }

  .tpcb-news .tpcb-news__card:hover .tpcb-news__arrow {
    opacity: 1;
    transform: translateX(3px);
  }
}

/* --- Touch screens: brief tap feedback instead of hover --- */
@media (hover: none) {
  .tpcb-news .tpcb-news__card:active {
    border-color: var(--tpcb-news-line-hover);
  }
}

/* --- Tablet (900px and below): one column of horizontal cards --- */
@media screen and (max-width: 900px) {
  .tpcb-news__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .tpcb-news .tpcb-news__card {
    flex-direction: row;
  }

  /* Thumbnail fills the card height, whatever the text length */
  .tpcb-news__media {
    flex: 0 0 36%;
    min-height: 180px;
  }

  .tpcb-news .tpcb-news__media img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .tpcb-news__body {
    padding: 22px 26px 20px;
  }

  .tpcb-news .tpcb-news__title,
  .tpcb-news .tpcb-news__excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* --- Phones (640px and below): compact list, thumbnail + title + date --- */
@media screen and (max-width: 640px) {
  .tpcb-news__grid {
    gap: 14px;
  }

  .tpcb-news__media {
    flex-basis: 34%;
    min-height: 112px;
  }

  .tpcb-news__body {
    gap: 6px;
    padding: 14px 16px 12px;
  }

  /* Titles are the main content here: allow 4 lines so they are rarely cut */
  .tpcb-news .tpcb-news__title {
    font-size: 1rem;
    line-height: 1.38;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }

  .tpcb-news .tpcb-news__excerpt {
    display: none;
  }

  .tpcb-news__foot {
    padding-top: 6px;
    border-top: 0;
  }

  .tpcb-news .tpcb-news__date {
    font-size: 0.8rem;
  }
}

/* --- Small phones (400px and below): narrower thumbnail, more room for the title --- */
@media screen and (max-width: 400px) {
  .tpcb-news__media {
    flex-basis: 30%;
  }

  .tpcb-news__body {
    padding: 13px 14px 11px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .tpcb-news .tpcb-news__card,
  .tpcb-news .tpcb-news__link,
  .tpcb-news__arrow {
    transition: none;
  }

  .tpcb-news .tpcb-news__card:hover .tpcb-news__arrow {
    transform: none;
  }
}