/* =========================================== */
/* === DIVI TABS MODULE FINAL LAYOUT FIXES ==== */
/* =========================================== */

/* Tabs container */
.et_pb_tabs_controls {
  display: flex;
  justify-content: space-between;
  padding: 0;
  margin: 0;
  list-style: none;
  border-bottom: none;
}

/* Equal-width tab container */
.et_pb_tabs_controls li {
  flex: 1;
  margin-bottom: -1px;
  height: auto !important; /* override inline height */
  border: none !important;
}

/* Tab anchor styling */
.et_pb_tabs_controls li a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  color: #444;
  background-color: #f5f3ef;
  border-bottom: none;
  transition: all 0.2s ease;
  height: 100% !important; /* match container height */
  box-sizing: border-box;
}

/* Hover state */
.et_pb_tabs_controls li a:hover {
  background-color: #d8cfbe;
}

/* Active tab */
.et_pb_tabs_controls li.et_pb_tab_active a {
  color: #006c60;
  font-weight: bold;
  background-color: #ffffff !important;

  border-bottom: none !important;
  position: relative;
  z-index: 2;
}

/* Remove padding gap from content container */
.et_pb_all_tabs {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* Active tab content panel */
.et_pb_tab.et_pb_tab_active {
  background-color: #ffffff !important;
  border: 1px solid #ddd;
  border-top: none;
  padding: 2rem;
}

ul.et_pb_tabs_controls {
  background-color: #fff;
}

/* ---------- CARD DESIGN ---------- */

/* === Base list and spacing === */
.publications-wrapper ul.publications-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.publications-list > li.publication-item {
  margin-bottom: 2rem;
}

.publications-list > li.publication-item:last-child {
  margin-bottom: 0;
}

.et_pb_section .publications-wrapper {
  padding-top: 0;
  padding-bottom: 0;
}

/* === Card styling === */
.publication-card {
  background-color: #f5f3ef;
  padding: 1rem 2rem 0;
  border-left: 6px solid #9f8552;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.publication-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* === Title block === */
.publication-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.publication-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* === Footer row (button left, date right, aligned bottom) === */
.publication-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* ⬅️ aligns button + date along the bottom */
  gap: 2rem;
  flex-wrap: nowrap;
  padding-bottom: 0 !important;
}

.button-pill-default {
  margin: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex; /* ensures button height wraps tightly */
  align-items: baseline;
  line-height: 1; /* prevents vertical spacing from inline text */
}

.button-pill-default span {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block;
  line-height: 1;
}

/* Date right-aligned and baseline aligned */
.publication-date {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #333;
  white-space: nowrap;
}

/* Tighten margin around tabls */

@media (max-width: 767px) {
  /* ========== Tabs ========== */
  .et_pb_tabs_controls {
    flex-wrap: wrap;
  }

  .et_pb_tabs_controls li {
    flex: 1 1 33.33%;
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.15rem;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .et_pb_tabs_controls li a {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .et_pb_tabs_controls li.et_pb_tab_active a {
    border-bottom: 2px solid var(--color-gold) !important;
  }

  .et_pb_all_tabs,
  .et_pb_tab,
  .et_pb_tab.et_pb_tab_active {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ========== Publications Layout ========== */
  .publications-wrapper {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .publication-card {
    width: 100%;
  }

  .publication-main {
    text-align: center;
    align-items: center;
  }

  .publication-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
  }

  .publication-date {
    font-size: 0.95rem;
    color: #333;
    white-space: nowrap;
  }

  /* ========== Pill Button ========== */
  .button-pill-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    line-height: 1;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    border: 2px solid #231f20;
    border-radius: 999px;
    background: transparent;
    color: #231f20;
    box-sizing: border-box;
  }

  .button-label {
    line-height: 1;
    padding: 0;
    margin: 0;
  }

  /* Hide desktop label, show mobile label */
  .button-label.download-label {
    display: none !important;
  }

  .button-label.view-label {
    display: inline-block !important;
  }
}

/* ========== Default/Desktop styles ========== */
.button-label.view-label {
  display: none;
}

.button-label.download-label {
  display: inline-block;
}

/* Divider between inactive tabs */
.et_pb_tabs_controls li:not(:last-child):not(.et_pb_tab_active) a {
  border-right: 1px solid #d9d9d9;
  box-sizing: border-box;
}