.robotics-section {
  margin-top: 60px;
  margin-bottom: 80px;
}

.section-title {
  color: var(--Blue-400, #00243d);
  font-family: "Playfair Display";
  font-size: 32px;
  font-style: normal;
  font-weight: 500;
  margin-bottom: 40px;
  line-height: 140%;
  text-align: left !important;
}

/* Year filter */
.robotics-year-filter {
  margin-bottom: 40px;
}

.robotics-year-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.robotics-year-tabs-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.robotics-year-tab--mobile {
  display: none;
}

.robotics-archive-wrapper {
  flex-shrink: 0;
  position: relative;
  width: auto;
  min-width: 140px;
  max-width: 200px;
}

.annual-archive-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #023f6a;
  background: #fff;
  color: #023f6a;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
  transition: background 0.2s ease;
  outline: none;
  box-shadow: none;
}

.annual-archive-trigger:hover {
  background: #f8fafc;
}

.annual-archive-wrapper.open .annual-archive-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.annual-archive-arrow {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.annual-archive-wrapper.open .annual-archive-arrow {
  transform: rotate(180deg);
}

.annual-archive-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0;
  background: #fff;
  border: 1px solid #023f6a;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 36, 61, 0.12);
  z-index: 20;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 280px;
}

.annual-archive-label {
  margin: 0;
  padding: 10px 16px 6px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #9ca3af;
  cursor: default;
}

.annual-archive-option {
  margin: 0;
  padding: 10px 16px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #374151;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.annual-archive-option:hover,
.annual-archive-option.active {
  background: #f3f4f6;
  color: #023f6a;
}

.annual-archive-option:last-child {
  padding-bottom: 12px;
}

.robotics-year-tab {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  padding: 8px 24px;
  border-radius: 10px;
  border: 1px solid #023f6a;
  background: transparent;
  color: #023f6a;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.robotics-year-tab--active {
  background: #03489f;
  border-color: #03489f;
  color: #fff;
}

.robotics-year-tab:hover:not(.robotics-year-tab--active) {
  background: #e6f0f8;
}

.robotics-year-mobile-dropdown {
  display: none;
}

/* Year panels */
.robotics-year-panel {
  display: none;
}

.robotics-year-panel--active {
  display: block;
}

.robotics-year-layout {
  display: flex;
  gap: 78px;
  align-items: flex-start;
}

/* Sidebar */
.robotics-sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.robotics-sidebar-item {
  color: rgba(0, 36, 61, 0.3);
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 160%;
  cursor: pointer;
  display: flex;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
}

.robotics-sidebar-item.active {
  color: #03489f;
}

.robotics-sidebar-item .dot {
  background-color: rgba(0, 36, 61, 0.3);
  border-radius: 50px;
  margin-top: 8px;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.robotics-sidebar-item.active .dot {
  background-color: #03489f;
}

/* Mobile competition picker — shown ≤820px when sidebar is hidden */
.robotics-mobile-nav {
  display: none;
  position: relative;
  width: 100%;
}

.robotics-mobile-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #023f6a;
  border-radius: 14px;
  background: transparent;
  color: #023f6a;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
}

.robotics-mobile-trigger svg {
  flex-shrink: 0;
}

.robotics-mobile-trigger svg path {
  stroke: #023f6a;
}

.robotics-mobile-options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 36, 61, 0.12);
  z-index: 50;
  overflow: hidden;
}

.robotics-mobile-nav.open .robotics-mobile-options {
  display: block;
}

.robotics-mobile-option {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  color: #00243d;
  cursor: pointer;
}

.robotics-mobile-option:hover,
.robotics-mobile-option.active {
  background: #e6f0f8;
  color: #03489f;
}

/* Main content */
.robotics-main {
  flex: 1;
  min-width: 0;
}

.robotics-competition-panel {
  display: none;
  animation: roboticsFadeIn 0.4s ease;
}

.robotics-competition-panel.active {
  display: block;
}

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

/* Card layout — PATTERN A (data-layout="card")
   Desktop: text + image side by side. Mobile ≤820px: stacks vertically. */
.robotics-content--card {
  display: flex;
  gap: 40px;
  align-items: start;
}

.robotics-text {
  flex: 1;
}

.robotics-text h2,
.robotics-head {
  color: var(--Blue-300, #03489f);
  font-family: "Playfair Display";
  font-size: 32px;
  font-style: normal;
  font-weight: 500;
  margin: 0 0 16px;
  line-height: 140%;
}

.robotics-text p {
  color: var(--Blue-400, #00243d);
  font-family: "Open Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  margin: 0 0 12px;
  line-height: 160%;
}

.robotics-text p:last-child {
  margin-bottom: 0;
}

.robotics-image {
  width: 100%;
  height: 495px;
  flex: 1;
}

.robotics-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Accordion layout — PATTERN B (data-layout="accordion")
   Tap .accordion-qtn to expand; one section open at a time.
   Mobile: same accordion; .ftc-content inside .accordion-ans stacks image above text. */
.accordion-wrapper {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.accordion-subwrapper {
  width: 100%;
  background-color: transparent;
  text-align: left;
  border-bottom: 1px solid var(--Green-200, #1fb53b);
  border-radius: 20px;
}

.accordion-subwrapper:last-child {
  width: 100%;
  background-color: transparent;
  text-align: left;
  border-bottom: 1px solid var(--Green-200, #1fb53b);
  border-radius: 20px;
}

.accordion-qtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 25px;
  cursor: pointer;
  border-radius: 20px;
  background: var(--White, #fff);
}

.accordion-qtn h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--Blue-400, #00243d);
  font-family: "Open Sans";
  margin: 0;
}

.accordion-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.accordion-subwrapper.active .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-ans {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.4s ease;
}

.accordion-subwrapper.active .accordion-ans {
  max-height: 3000px;
  padding: 20px 25px 30px;
}

.accordion-subwrapper.active .accordion-qtn {
  background: var(--Green-100, #def4e2);
  border-radius: 20px;
}

.accordion-subwrapper.active {
  border-radius: 20px;
  border-bottom: 1px solid var(--Green-200, #1fb53b);
  background: var(--Green-100, #def4e2);
  margin: 20px 0;
}

.accordion-ans > p {
  color: var(--Blue-400, #00243d);
  font-family: "Open Sans";
  font-size: 16px;
  line-height: 160%;
  margin: 0 0 12px;
}

.accordion-ans > p:last-child {
  margin-bottom: 0;
}

.ftc-content {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.ftc-text {
  flex: 1;
  min-width: 0;
}

.ftc-image {
  flex: 0 0 45%;
  height: 320px;
  align-self: flex-start;
}

@media screen and (min-width: 821px) {
  .accordion-wrapper {
    overflow: visible;
  }

  .accordion-subwrapper.active .accordion-ans {
    overflow: visible;
  }

  .ftc-image {
    position: sticky;
    top: 207px;
  }
}

.ftc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.ftc-text p {
  color: var(--Blue-400, #00243d);
  font-family: "Open Sans";
  font-size: 16px;
  line-height: 160%;
  margin-bottom: 12px;
  width: 100% !important;
}

.ftc-text p:last-child {
  margin-bottom: 0;
}

.ftc-text-heading {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 160%;
  color: var(--Blue-400, #00243d);
  margin: 16px 0 10px;
}

.ftc-awards-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--Blue-400, #00243d);
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 160%;
}

.ftc-awards-list li + li {
  margin-top: 8px;
}

@media screen and (max-width: 1024px) {
  .robotics-year-layout {
    gap: 40px;
  }

  .robotics-sidebar {
    width: 220px;
  }

  .robotics-year-tabs {
    overflow-x: clip;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .robotics-archive-wrapper {
    display: none;
  }

  .robotics-year-tab--mobile {
    display: inline-flex;
  }

  .robotics-year-tabs-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .robotics-year-tabs-wrapper::-webkit-scrollbar {
    display: none;
  }

  .robotics-year-tab {
    flex-shrink: 0;
    padding: 8px 20px;
    white-space: nowrap;
  }

  .robotics-year-mobile-dropdown {
    display: none;
  }
}

@media screen and (max-width: 820px) {
  .robotics-section {
    margin-top: 40px;
    margin-bottom: 60px;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 28px;
  }

  .robotics-year-filter {
    margin-bottom: 28px;
    max-width: 100%;
    overflow-x: clip;
  }

  .robotics-year-layout {
    flex-direction: column;
    gap: 24px;
  }

  .robotics-sidebar {
    display: none;
  }

  .robotics-mobile-nav {
    display: block;
  }

  .robotics-content--card {
    flex-direction: column;
    gap: 24px;
  }

  .robotics-image {
    height: 280px;
    flex: unset;
    width: 100%;
  }

  .robotics-text h2,
  .robotics-head {
    font-size: 24px;
  }

  .accordion-qtn {
    padding: 20px;
  }

  .accordion-qtn h3 {
    font-size: 17px;
  }

  .ftc-content {
    flex-direction: column;
  }

  .ftc-image {
    flex: unset;
    width: 100%;
    height: 240px;
    position: static;
  }

  .accordion-subwrapper.active .accordion-ans {
    max-height: 4000px;
  }
}

@media screen and (max-width: 640px) {
  .robotics-section {
    margin-top: 30px;
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .robotics-year-tab {
    font-size: 15px;
    padding: 8px 18px;
  }

  .robotics-year-tabs-wrapper {
    gap: 10px;
  }

  .robotics-content--card {
    gap: 16px;
  }

  .robotics-text h2,
  .robotics-head {
    font-size: 20px;
  }

  .robotics-text p {
    font-size: 14px;
  }

  .robotics-image {
    height: 220px;
  }

  .accordion-qtn {
    padding: 16px;
  }

  .accordion-qtn h3 {
    font-size: 15px;
  }

  .accordion-subwrapper.active .accordion-ans {
    padding: 16px 16px 20px;
  }

  .ftc-image {
    height: 190px;
  }

  .ftc-text p,
  .ftc-text-heading,
  .ftc-awards-list,
  .accordion-ans > p {
    font-size: 14px;
  }
}