/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Layout utilities */
.section {
  padding: 2rem 0;
}
.has-padding-top-large {
  padding-top: 4rem;
}
.has-padding-bottom-large {
  padding-bottom: 4rem;
}
.has-padding-top-none {
  padding-top: 0;
}
.has-padding-bottom-none {
  padding-bottom: 0;
}
.has-no-sidepadding {
  padding-left: 0;
  padding-right: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.columns {
  display: flex;
  gap: 2rem;
  position: relative;
}

/* Vertical line (desktop/tablet) */
.columns::after {
  content: "";
  position: absolute;
  left: calc(25% + 20px);
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #1b365d;
  z-index: 5;
}

/* Traveling notch mask behind arrow (animated to follow arrow) */
.columns::before {
  content: "";
  position: absolute;
  left: calc(25% + 20px);
  top: var(--gap-top, -9999px);
  height: calc(var(--gap-bottom, 0px) - var(--gap-top, 0px));
  width: 18px;
  background: transparent;
  z-index: 6;
  pointer-events: none;
  transition: top 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.column {
  flex: 1;
}
.is-5 {
  flex: 0 0 25%;
}
.is-7 {
  flex: 0 0 70%;
}

/* Header styles */
.tagged-header {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1;
  white-space: nowrap;
  font-size: 60px;
  font-style: normal;
  font-weight: 900;
  line-height: 100%; /* 60px */
}
.tagged-header--blue {
  color: #0033a0;
}

/* Arrow indicator (desktop/tablet) */
.arrow {
  position: absolute;
  left: calc(25% + 20px);
  top: 0;
  width: 18px;
  height: 30px;
  background: transparent;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: left center;
  background-image: url("https://gist.githubusercontent.com/uxchar/c8b9d7b4ca2535f004a6d3bf8af60ed9/raw/ukcosw-co-arrow.svg");
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
  margin-left: 0;
  will-change: transform;
  transform: translateY(0);
  image-rendering: pixelated;
  background-color: #c7e2ff !important;
}

/* Tab headers */
.tab-headers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tab-header {
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  position: relative;
}
.tab-header:hover {
  background-color: transparent;
}

.tab-header.active {
  background-color: transparent;
  border-left-color: transparent;
  position: relative;
}
.tab-header.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 4px;
  background-color: #FFA360;
}
.tab-header-text {
  font-size: 1.625rem;
  font-weight: 700;
  color: #1b365d !important;
  margin: 0;
  line-height: 125%; /* 32.5px */
  text-transform: none;
}
.tab-header.active .tab-header-text {
  color: #0033a0;
}

/* Mobile tab headers */
.tab-header-mobile {
  display: none;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  width: 100%;
  margin-bottom: 0.75rem;
}
.tab-header-mobile:hover {
  background-color: transparent;
}
.tab-header-mobile.active {
  background-color: transparent;
  border-left-color: transparent;
  position: relative;
}
.tab-header-mobile.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background-color: #0033a0;
}
.tab-header-mobile.active .tab-header-text {
  color: #0033a0;
}

/* Tab panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
  margin-top: 0.5rem;
}
.tab-panel.active {
  display: block;
}

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

/* Constrain content width in the right column without changing column width */
.column.is-7 .tab-panel .container {
  max-width: 675px;
  margin-left: auto;
  margin-right: 0;
}
@media (max-width: 1024px) and (min-width: 769px) {
  .column.is-7 .tab-panel .container {
    max-width: 560px;
  }
}
@media (max-width: 768px) {
  .column.is-7 .tab-panel .container {
    max-width: none;
  }
}

/* Image slider (optional) */
.uk-image-slider {
  background-color: #000;
  margin-bottom: 1rem;
}
.slider {
  position: relative;
  overflow: hidden;
  margin-left: 30px;
  margin-right: 180px;
}
.slider__track {
  position: relative;
}
.slider__slides {
  display: flex;
  transition: transform 0.3s ease;
}
.slider__slide {
  flex: 0 0 100%;
  display: none;
}
.slider__slide.active {
  display: block;
}
.image.is-16by9 {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}
.image.is-16by9 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slider controls (optional) */
.slider-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}
.slider__arrow {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}
.slider__arrow:hover {
  background: rgba(255, 255, 255, 1);
}
.slider__bullets {
  display: flex;
  gap: 0.5rem;
}
.slider__bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.slider__bullet.active {
  background: rgba(255, 255, 255, 1);
}

/* Responsive design */
@media (max-width: 768px) {
  .columns {
    flex-direction: column;
    gap: 1rem;
  }

  .is-5,
  .is-7 {
    flex: 1;
  }

  /* Hide the vertical slider line and notch on mobile */
  .columns::after,
  .columns::before {
    display: none;
  }

  /* Hide the arrow on mobile */
  .arrow {
    display: none;
  }

  .tagged-header {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .tagged-header {
    font-size: 1.75rem;
  }
}

/* Tablet slider spacing */
@media (max-width: 1024px) and (min-width: 769px) {
  .slider {
    margin-left: 24px;
    margin-right: 100px;
  }
}

/* Accessibility improvements */
.uk-tabs__header:focus,
.uk-tabs__header-mobile:focus,
.slider__arrow:focus,
.slider__bullet:focus {
  outline-offset: 2px;
}

/* Color boxes */
.color-box {
  /*height: 300px;*/
  width: 100%;
  padding: 2rem;
  display: block;
  align-items: center;
  justify-content: center;
  color: #1b365d;
  font-size: 1.25rem;
  line-height: 125%; /* 25px */
  text-align: center;
  font-weight: 700;
}
.color-box--yellow {
  background-color: #FFDC00;
}
.color-box--teal {
  background-color: #4cbcc0;
}
.color-box--peach {
  background-color: #ffa360;
}
.color-box--light-blue {
  background-color: #1e8aff;
}
.color-box--dark-blue {
  background-color: #1b365d;
  color: #fff;
}
/* Ensure all text content is white for dark-blue background */
.color-box--dark-blue .tab-text-content,
.color-box--dark-blue .tab-text-content p,
.color-box--dark-blue .tab-text-content h1,
.color-box--dark-blue .tab-text-content h2,
.color-box--dark-blue .tab-text-content h3,
.color-box--dark-blue .tab-text-content h4,
.color-box--dark-blue .tab-text-content h5,
.color-box--dark-blue .tab-text-content h6,
.color-box--dark-blue .tab-text-content ul,
.color-box--dark-blue .tab-text-content ol,
.color-box--dark-blue .tab-text-content li,
.color-box--dark-blue .tab-text-content a {
  color: #fff;
}
.color-box--dark-blue .tab-text-content a:hover {
  color: rgba(255, 255, 255, 0.8);
}
/* Additional color classes to match ACF JSON values */
.color-box--green {
  background-color: #4cbcc0;
}
.color-box--sunset {
  background-color: #ffa360;
}
.color-box--blue {
  background-color: #1b365d;
  color: #fff;
}
/* Ensure all text content is white for blue background */
.color-box--blue .tab-text-content,
.color-box--blue .tab-text-content p,
.color-box--blue .tab-text-content h1,
.color-box--blue .tab-text-content h2,
.color-box--blue .tab-text-content h3,
.color-box--blue .tab-text-content h4,
.color-box--blue .tab-text-content h5,
.color-box--blue .tab-text-content h6,
.color-box--blue .tab-text-content ul,
.color-box--blue .tab-text-content ol,
.color-box--blue .tab-text-content li,
.color-box--blue .tab-text-content a {
  color: #fff;
}
.color-box--blue .tab-text-content a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Tab content wrapper */
.tab-content {
  width: 100%;
}

/* Tab image styles */
.tab-image {
  margin-bottom: 1.5rem;
  text-align: center;
}

.tab-image-content {
  max-width: 100%;
  height: auto;

}

/* Tab text styles */
.tab-text {
  margin-bottom: 1.5rem;
  text-align: left;
}

.tab-text h1,
.tab-text h2,
.tab-text h3,
.tab-text h4,
.tab-text h5,
.tab-text h6 {
  color: white;
  margin-bottom: 1rem;
}

.tab-text p {
  color: white;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tab-text ul,
.tab-text ol {
  color: white;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.tab-text li {
  color: white;
  margin-bottom: 0.5rem;
}

.tab-text a {
  color: white;
  text-decoration: underline;
}

.tab-text a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Tab button styles - Using 8-bit button system from eightbit-buttons.css */
.tab-button-wrapper {
  margin-top: 1rem;
  text-align: center;
}

/* All button styling handled by eightbit-buttons.css */

/* Tab text content styling */
.tab-text-content {
  margin-bottom: 1rem;
}
.tab-text-content p{
	/* Body/Large */
	font-size: 20px;
	font-style: normal;
	font-weight: 700;
	line-height: 125%; /* 25px */
}
.tab-text-content p:last-child {
  margin-bottom: 0;
}

/* Image frame styles for UK tabs */
.uk-tabs-image-frame {
  margin: 1rem 0;
}

.uk-tabs-image-frame img {
  max-width: 100%;
  height: auto;
}

/* Accessibility: Focus states for interactive elements */
.tab-header:focus-visible,
.tab-header-mobile:focus-visible,
.tab-panel a:focus-visible,
.tab-panel button:focus-visible {
  outline: 3px solid #FFDC00; /* High contrast yellow */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255, 220, 0, 0.5), 0 0 0 5px rgba(0, 51, 160, 0.3); /* Blue shadow for depth */
}
.tab-header:focus:not(:focus-visible),
.tab-header-mobile:focus:not(:focus-visible),
.tab-panel a:focus:not(:focus-visible),
.tab-panel button:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Accessibility: Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
  clip-path: inset(50%);
}

/* Accessibility: Reduced motion support (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  .tab-header,
  .tab-header-mobile,
  .tab-panel,
  .arrow,
  .columns::before,
  .columns::after {
    transition: none !important;
    animation: none !important;
  }
  .tab-panel.active {
    animation: none !important;
  }
  .arrow {
    transform: translateY(var(--arrow-position, 0)) !important; /* Keep position but remove animation */
  }
}

/* Accessibility: High contrast mode support (WCAG 1.4.11) */
@media (prefers-contrast: high) {
  .section {
    border: 2px solid currentColor;
  }
  .tab-header-text,
  .tab-text-content,
  .tab-text-content p,
  .tab-text-content h1,
  .tab-text-content h2,
  .tab-text-content h3,
  .tab-text-content h4,
  .tab-text-content h5,
  .tab-text-content h6 {
    color: CanvasText !important;
  }
  .tab-header,
  .tab-header-mobile {
    border: 2px solid CanvasText;
  }
  .tab-header.active,
  .tab-header-mobile.active {
    border-left-color: Highlight;
  }
  .columns::after {
    background-color: CanvasText !important;
  }
  .arrow {
    background-color: Highlight !important;
  }
  .color-box {
    border: 2px solid CanvasText !important;
  }
  .tab-header:focus-visible,
  .tab-header-mobile:focus-visible {
    outline: 3px solid Highlight;
    box-shadow: none;
  }
}
