/*
 * jQuery FlexSlider v2.7.2 - Accessible Version CSS
 * Accessibility improvements included
 */

/* ====================================================================================================================
 * RESETS
 * ====================================================================================================================*/
.flex-container a:hover,
.flex-slider a:hover {
  outline: none;
}
.slides,
.slides > li,
.flex-control-nav,
.flex-direction-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}
.flex-pauseplay span {
  text-transform: capitalize;
}

/* ====================================================================================================================
 * BASE STYLES
 * ====================================================================================================================*/
.flexslider {
  margin: 0;
  padding: 0;
  position: relative;
}
.flexslider .slides > li {
  display: none;
  -webkit-backface-visibility: hidden;
}
.flexslider .slides img {
  width: 100%;
  display: block;
}
.flexslider .slides:after {
  content: "\0020";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}
html[xmlns] .flexslider .slides {
  display: block;
}
* html .flexslider .slides {
  height: 1%;
}
.no-js .flexslider .slides > li:first-child {
  display: block;
}

/* ====================================================================================================================
 * DEFAULT THEME
 * ====================================================================================================================*/
.flexslider {
  margin: 0 0 60px;
  background: #ffffff;
  border: 4px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  -o-border-radius: 4px;
}
.flexslider .slides {
  zoom: 1;
}
.flexslider .slides img {
  height: auto;
  -moz-user-select: none;
}
.flex-viewport {
  max-height: 2000px;
  transition: all 1s ease;
}
.loading .flex-viewport {
  max-height: 300px;
}
.carousel li {
  margin-right: 5px;
}
.flex-direction-nav {
  *height: 0;
}
.flex-direction-nav a,
.flex-direction-nav button {
  text-decoration: none;
  display: block;
  width: 40px;
  height: 40px;
  margin: -20px 0 0;
  position: absolute;
  top: 50%;
  z-index: 10;
  overflow: hidden;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.8);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease-in-out;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: 50%;
  font-size: 0;
  line-height: 40px;
  text-align: center;
}

/* A11y: Button styles */
.flex-direction-nav button {
  padding: 0;
  font-family: inherit;
}

.flex-direction-nav button span {
  font-size: 14px;
  font-weight: bold;
}

.flex-direction-nav a:before,
.flex-direction-nav button:before {
  font-family: inherit;
  font-size: 20px;
  display: inline-block;
  content: '\2039';
  line-height: 36px;
}
.flex-direction-nav a.flex-next:before,
.flex-direction-nav button.flex-next:before {
  content: '\203A';
}
.flex-direction-nav .flex-prev {
  left: -50px;
}
.flex-direction-nav .flex-next {
  right: -50px;
  text-align: center;
}
.flexslider:hover .flex-direction-nav .flex-prev {
  left: 10px;
}
.flexslider:hover .flex-direction-nav .flex-next {
  right: 10px;
}

/* A11y: Focus styles for direction nav */
.flex-direction-nav a:focus,
.flex-direction-nav button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc;
  left: 10px;
}
.flex-direction-nav .flex-next:focus {
  left: auto;
  right: 10px;
}

.flex-direction-nav .flex-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* A11y: Better disabled state */
.flex-direction-nav button:disabled,
.flex-direction-nav button[aria-disabled="true"] {
  opacity: 0.3;
  cursor: not-allowed;
}

.flex-pauseplay a,
.flex-pauseplay button {
  display: block;
  width: 20px;
  height: 20px;
  position: absolute;
  bottom: 5px;
  left: 10px;
  z-index: 10;
  overflow: hidden;
  cursor: pointer;
  color: #000;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
  height: auto;
}

/* A11y: Focus styles for pause/play */
.flex-pauseplay a:focus,
.flex-pauseplay button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc;
}

.flex-pauseplay a:hover,
.flex-pauseplay button:hover {
  background: #ffffff;
}

/* Control Nav */
.flex-control-nav {
  width: 100%;
  position: absolute;
  bottom: -40px;
  text-align: center;
}
.flex-control-nav li {
  margin: 0 6px;
  display: inline-block;
  zoom: 1;
  *display: inline;
}

/* A11y: Changed from anchor to button */
.flex-control-paging li button {
  width: 11px;
  height: 11px;
  display: block;
  background: #666;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  text-indent: -9999px;
  border-radius: 20px;
  border: 2px solid transparent;
  padding: 0;
  transition: all 0.2s ease-in-out;
}
.flex-control-paging li button:hover {
  background: #333;
  background: rgba(0, 0, 0, 0.7);
}
.flex-control-paging li button.flex-active {
  background: #000;
  background: rgba(0, 0, 0, 0.9);
  cursor: default;
}

/* A11y: Focus styles for control nav */
.flex-control-paging li button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc;
}

/* A11y: Active + focus state */
.flex-control-paging li button.flex-active:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

.flex-control-thumbs {
  margin: 5px 0 0;
  position: static;
  overflow: hidden;
}
.flex-control-thumbs li {
  width: 25%;
  float: left;
  margin: 0;
}

/* A11y: Thumbnail buttons */
.flex-control-thumbs button {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  background: transparent;
  border: 3px solid transparent;
  padding: 0;
  transition: all 0.2s ease-in-out;
}
.flex-control-thumbs button img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.7;
  transition: all 0.2s ease-in-out;
}
.flex-control-thumbs button:hover img,
.flex-control-thumbs button:focus img {
  opacity: 1;
}
.flex-control-thumbs button.flex-active {
  cursor: default;
}
.flex-control-thumbs button.flex-active img {
  opacity: 1;
}

/* A11y: Focus styles for thumbnails */
.flex-control-thumbs button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc;
}

/* ====================================================================================================================
 * A11Y: ACCESSIBILITY ENHANCEMENTS
 * ====================================================================================================================*/

/* Screen reader only class */
.sr-only,
.flex-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link styles */
.flex-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: bold;
}
.flex-skip-link:focus {
  left: 0;
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Ensure focus is visible on all interactive elements */
.flexslider *:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Better touch targets - minimum 44x44px */
@media (pointer: coarse) {
  .flex-direction-nav button,
  .flex-direction-nav a {
    width: 48px;
    height: 48px;
    margin: -24px 0 0;
  }
  
  .flex-control-paging li button {
    width: 16px;
    height: 16px;
    padding: 8px;
    box-sizing: content-box;
  }
  
  .flex-pauseplay button {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 16px;
  }
}

/* ====================================================================================================================
 * A11Y: REDUCED MOTION
 * ====================================================================================================================*/
@media (prefers-reduced-motion: reduce) {
  .flexslider .slides,
  .flex-viewport,
  .flex-direction-nav a,
  .flex-direction-nav button,
  .flex-control-paging li button,
  .flex-control-thumbs button,
  .flex-control-thumbs button img,
  .flex-pauseplay button {
    transition: none !important;
    animation: none !important;
  }
  
  /* For fade animation, ensure instant transitions */
  .flexslider .slides > li {
    transition: opacity 0s !important;
  }
}

/* ====================================================================================================================
 * A11Y: HIGH CONTRAST MODE
 * ====================================================================================================================*/
@media (forced-colors: active) {
  .flex-direction-nav button,
  .flex-control-paging li button,
  .flex-pauseplay button {
    border: 2px solid currentColor;
  }
  
  .flex-control-paging li button.flex-active {
    background: Highlight;
  }
  
  .flex-direction-nav button:disabled,
  .flex-direction-nav button[aria-disabled="true"] {
    border-color: GrayText;
    color: GrayText;
  }
}

/* ====================================================================================================================
 * RESPONSIVE
 * ====================================================================================================================*/
@media screen and (max-width: 860px) {
  .flex-direction-nav .flex-prev {
    left: 10px;
  }
  .flex-direction-nav .flex-next {
    right: 10px;
  }
}

/* ====================================================================================================================
 * CAPTION STYLES
 * ====================================================================================================================*/
.flex-caption {
  display: block;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}