/* TEDx layout */

.content-wrapper.tedx-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 5%;
  margin-top: 80px;
  margin-bottom: 0;
}

.tedx-layout .tedx-sidebar {
  width: 25%;
  flex-shrink: 0;
}

.tedx-layout .tedx-sidebar .view,
.tedx-layout .tedx-sidebar .view-content,
.tedx-layout .tedx-sidebar .views-element-container {
  width: 100%;
}

.tedx-layout .desktop-navigation,
.tedx-layout .tedx-desktop-nav {
  width: 100% !important;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 220px;
  height: fit-content;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.tedx-layout .nav-active-item {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  justify-content: space-between;
  align-items: center;
  background-color: #03489f;
  margin-bottom: 4px;
}

.tedx-layout .nav-active-item p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
}

.tedx-layout .desktop-navigation .nav-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  color: #00243d;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 4px;
  background: transparent;
}

.tedx-layout .desktop-navigation .nav-item:hover {
  background-color: rgba(3, 72, 159, 0.08);
}

.tedx-layout .tedx-nav-arrow {
  width: 9px;
  height: 11px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Archive — reuse annual-day classes, scoped under tedx */
.tedx-layout .tedx-archive-wrapper {
  position: relative;
  width: 100%;
  max-width: 235px;
  margin-top: 12px;
  margin-bottom: 0;
  overflow: visible;
}

.tedx-layout .tedx-archive-wrapper .annual-archive-trigger {
  width: 100%;
}

.tedx-layout .tedx-archive-wrapper.tedx-archive-active .annual-archive-trigger {
  background-color: #03489f;
  border-color: #03489f;
  color: #fff;
}

.tedx-layout .tedx-archive-wrapper.tedx-archive-active .annual-archive-trigger-label {
  color: #fff;
}

.tedx-layout .tedx-archive-wrapper.tedx-archive-active .annual-archive-arrow path {
  stroke: #fff;
}

.tedx-layout .tedx-archive-wrapper .annual-archive-option {
  display: block;
  text-decoration: none;
  color: #023f6a;
}

.tedx-layout .tedx-archive-wrapper .annual-archive-option.active,
.tedx-layout .tedx-archive-wrapper .annual-archive-option:hover {
  background: rgba(3, 72, 159, 0.08);
}

.tedx-layout .mobile-navigation {
  display: none;
  margin-bottom: 60px;
  width: 100%;
}

.tedx-layout .tedx-mobile-details,
.tedx-layout .mobile-navigation .mobile-select-container {
  position: relative;
  display: block;
  width: 100%;
}

.tedx-layout .tedx-mobile-details > summary.mobile-select-button {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.tedx-layout .tedx-mobile-details > summary::-webkit-details-marker {
  display: none;
}

/* Override global .mobile-select-options { width: 120px } and broken stacking */
.tedx-layout .mobile-navigation .mobile-select-options,
.tedx-layout .tedx-mobile-details .mobile-select-options {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100% !important;
  max-width: 100%;
  margin-top: 4px;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 20;
  box-sizing: border-box;
}

.tedx-layout .tedx-mobile-details:not([open]) .mobile-select-options {
  display: none !important;
}

.tedx-layout .mobile-navigation .mobile-option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  text-decoration: none;
  color: #00243d;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  border: none;
  background: transparent;
  text-align: left;
}

.tedx-layout .mobile-navigation .mobile-option + .mobile-option {
  border-top: 1px solid #e5e7eb;
}

.tedx-layout .mobile-navigation .mobile-option.active {
  background-color: rgba(3, 72, 159, 0.08);
  color: #03489f;
  font-weight: 600;
}

.tedx-layout .main-content {
  width: 70%;
  flex: 1;
  min-width: 0;
}

.tedx-layout .learning-section {
  width: 100%;
  display: block;
  margin-bottom: 60px;
}

.tedx-layout .learning-content.youth-para {
  width: 100%;
}

.tedx-layout .learning-content.youth-para p {
  font-size: 16px;
  line-height: 1.6;
  color: #00243d;
  margin: 0 0 1em;
}

/* Speakers are moved into .main-content by event_tedx.js */
.tedx-layout .main-content .tedx-speakers-block {
  width: 100%;
  margin-top: 0;
}

.tedx-layout .main-content .team-grid {
  margin-bottom: 40px;
}

.tedx-layout .main-content .social-media-link {
  width: 100%;
}

.tedx-layout .main-content .social-media-link a {
  color: #03489f;
  word-break: break-word;
}

.tedx-layout .main-content > .block {
  display: contents;
}

@media screen and (max-width: 820px) {
  .content-wrapper.tedx-layout {
    flex-direction: column;
    gap: 0;
  }

  .tedx-layout .tedx-sidebar {
    width: 100%;
  }

  .tedx-layout .desktop-navigation,
  .tedx-layout .tedx-desktop-nav {
    display: none;
  }

  .tedx-layout .mobile-navigation {
    display: block;
    width: 100%;
  }

  .tedx-layout .mobile-navigation .mobile-select-options,
  .tedx-layout .tedx-mobile-details .mobile-select-options {
    width: 100% !important;
    max-width: 100%;
  }

  .tedx-layout .main-content {
    width: 100%;
  }
}
