/* RETTWI publication pass — loaded after all existing template styles */

/* Pages should begin with their real heading, without the Joomla breadcrumb bar. */
.mod-breadcrumbs__wrapper {
  display: none !important;
}

body.itemid-102 .com-content-article > .article-info,
body.itemid-103 .com-content-article > .article-info,
body.itemid-104 .com-content-article > .article-info,
body.itemid-106 .com-content-article > .article-info,
body.itemid-108 .com-content-article > .article-info,
body.itemid-109 .com-content-article > .article-info {
  display: none !important;
}

/* Equal-height homepage cards, including future articles. */
.rettwi-home .mod-articles-items {
  align-items: stretch;
}

.rettwi-home .mod-articles-items > li {
  min-width: 0;
  display: flex;
}

.rettwi-home .mod-articles-item {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rettwi-line);
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(7, 29, 66, .055);
}

.rettwi-home .mod-articles-item::before {
  flex: 0 0 178px;
}

.rettwi-home .mod-articles-item-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.rettwi-home .mod-articles-title {
  min-height: 2.6em;
}

.rettwi-home .rettwi-article-lead {
  margin-bottom: 22px !important;
}

/* Safety net: a missing Joomla read-more break must never expose full research text in a card. */
.rettwi-section--research .mod-articles-item-content > .rettwi-research-meta,
.rettwi-section--research .mod-articles-item-content > h2,
.rettwi-section--research .mod-articles-item-content > h2 ~ * {
  display: none !important;
}

/* Homepage: next event becomes a real design component. */
.rettwi-next-event {
  height: 100%;
}

.rettwi-next-event .rettwi-jevents-latest {
  position: relative;
  height: 100%;
  min-height: 100%;
  padding: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(145deg, #071d42, #0c3267);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(7, 29, 66, .14);
}

.rettwi-next-event .rettwi-jevents-latest::before {
  content: "\f073";
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  font-family: "Font Awesome 6 Free";
  font-size: 18px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}

.rettwi-next-event .rettwi-jevents-latest::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border: 32px solid rgba(255, 255, 255, .045);
  border-radius: 50%;
  pointer-events: none;
}

.rettwi-next-event h3 {
  margin: 0 0 24px;
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 800;
}

.rettwi-next-event .mod_events_latest_table,
.rettwi-next-event .mod_events_latest_table tbody,
.rettwi-next-event .mod_events_latest_table tr,
.rettwi-next-event .mod_events_latest_table td {
  width: 100% !important;
  display: block;
  border: 0 !important;
  background: transparent !important;
}

.rettwi-next-event .mod_events_latest_first {
  position: relative;
  z-index: 1;
  padding: 0 !important;
}

.rettwi-next-event .rettwi-event-date {
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 650;
}

.rettwi-next-event .rettwi-event-title {
  display: block;
}

.rettwi-next-event .rettwi-event-title a {
  color: #fff !important;
  font-size: clamp(23px, 2.2vw, 31px);
  line-height: 1.18;
  font-weight: 800;
  text-decoration: none;
}

.rettwi-next-event .rettwi-event-title a:hover {
  color: #ffb4b7 !important;
}

.rettwi-next-event__cta {
  position: relative;
  z-index: 1;
  width: max-content;
  margin-top: auto;
  padding-top: 26px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

/* Community icons: use Joomla's bundled Font Awesome instead of baseline-sensitive glyphs. */
.rettwi-join__symbol,
.rettwi-join__benefit > span {
  align-self: flex-start;
  font-size: 0 !important;
  line-height: 1;
}

.rettwi-join__symbol::before,
.rettwi-join__benefit > span::before {
  font-family: "Font Awesome 6 Free";
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.rettwi-join__symbol::before { content: "\f0c0"; }
.rettwi-join__benefit:nth-of-type(2) > span::before { content: "\f086"; }
.rettwi-join__benefit:nth-of-type(3) > span::before { content: "\f0eb"; }
.rettwi-join__benefit:nth-of-type(4) > span::before { content: "\f201"; }

/* Ensure native JEvents labels stay visible once and receive one colon. */
#jevents_body .jev_evdt .contact,
#jevents_body .jev_evdt .location {
  font-size: 1rem !important;
}

#jevents_body .jev_evdt .contact::after,
#jevents_body .jev_evdt .location::after {
  content: ":" !important;
}

/* Permanent information pages do not show blog-style metadata. */
body.itemid-102 .article-info,
body.itemid-103 .article-info,
body.itemid-104 .article-info,
body.itemid-106 .article-info,
body.itemid-108 .article-info,
body.itemid-109 .article-info,
.com-content-article.item-page > .fields-container {
  display: none !important;
}

/* Reusable people cards for the prepared council page. */
.rettwi-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 18px 0 36px;
}

.rettwi-team-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--rettwi-line);
  border-top: 4px solid var(--rettwi-navy);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(7, 29, 66, .05);
}

.rettwi-team-card h3 {
  margin: 0 0 8px;
  color: var(--rettwi-navy);
}

.rettwi-team-role {
  color: var(--rettwi-red);
  font-weight: 800;
}

/* Contact form follows the card language of the rest of the site. */
#contact-form {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--rettwi-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(7, 29, 66, .06);
}

#contact-form legend {
  margin-bottom: 24px;
  color: var(--rettwi-navy);
  font-size: 22px;
  font-weight: 800;
}

#contact-form .control-group {
  margin-bottom: 18px;
}

#contact-form label {
  margin-bottom: 6px;
  color: var(--rettwi-navy);
  font-weight: 700;
}

#contact-form .form-control {
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: none;
}

#contact-form textarea.form-control {
  min-height: 190px;
}

#contact-form .btn-primary {
  min-height: 46px;
  padding-inline: 24px;
  border: 0;
  border-radius: 6px;
  background: var(--rettwi-red);
  font-weight: 750;
}

@media (max-width: 760px) {
  .rettwi-home .mod-articles-title { min-height: 0; }
  .rettwi-next-event .rettwi-jevents-latest { min-height: 320px; }
}
