/* RETTWI integration layer for JEvents and the Joomla contact form */

/* ---------- JEvents calendar ---------- */
body.com_jevents .site-grid > .container-component {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding: clamp(38px, 5vw, 64px) 28px 86px !important;
}

body.com_jevents #jevents {
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  color: #17233a !important;
  font-family: inherit !important;
}

body.com_jevents #jevents_header {
  margin: 0 0 24px !important;
  padding: 0 !important;
  border: 0 !important;
}

body.com_jevents #jevents_header .contentheading {
  margin: 0 !important;
  color: #071d42 !important;
  font-size: clamp(38px, 5vw, 58px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.03em !important;
}

body.com_jevents #jevents_header .actions {
  display: none !important;
}

body.com_jevents #jevents_body {
  box-sizing: border-box !important;
  padding: clamp(20px, 3vw, 34px) !important;
  overflow-x: auto !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 14px 38px rgba(7,29,66,.08) !important;
}

body.com_jevents #jevents_body .month_date {
  margin: 0 0 16px !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  color: #071d42 !important;
  font-size: clamp(26px, 3.5vw, 38px) !important;
  font-weight: 780 !important;
  line-height: 1.1 !important;
}

body.com_jevents #jevents_body .new-navigation {
  margin-bottom: 22px !important;
  padding-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  border-bottom: 1px solid #e4e9f1 !important;
}

body.com_jevents #jevents_body .nav-items {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body.com_jevents #jevents_body .nav-items > div a {
  padding: 8px 12px !important;
  display: inline-flex !important;
  border: 1px solid #d8e0eb !important;
  border-radius: 8px !important;
  color: #0b2f62 !important;
  background: #f7f9fc !important;
  font-size: 0 !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}

body.com_jevents #nav-year a::after { content: "Jahr"; font-size: 13px; }
body.com_jevents #nav-month a::after { content: "Monat"; font-size: 13px; }
body.com_jevents #nav-week a::after { content: "Woche"; font-size: 13px; }
body.com_jevents #nav-today a::after { content: "Heute"; font-size: 13px; }
body.com_jevents #nav-jumpto a::after { content: "Monat wählen"; font-size: 13px; }

body.com_jevents #jevents_body .nav-items > div.active a,
body.com_jevents #jevents_body .nav-items > div a:hover {
  border-color: #0b2f62 !important;
  color: #fff !important;
  background: #0b2f62 !important;
}

body.com_jevents #nav-search {
  display: none !important;
}

body.com_jevents #jumpto:not(.jev_none) {
  width: 100% !important;
  margin-top: 12px !important;
}

body.com_jevents #jumpto select,
body.com_jevents #jumpto button {
  min-height: 40px !important;
  margin-right: 6px !important;
  padding: 8px 12px !important;
  border: 1px solid #cad4e1 !important;
  border-radius: 7px !important;
  font: inherit !important;
}

body.com_jevents #jumpto button {
  border-color: #cf242d !important;
  color: #fff !important;
  background: #cf242d !important;
  font-weight: 750 !important;
}

body.com_jevents .jev_toprow {
  margin: 0 0 10px !important;
}

body.com_jevents .jev_header2 {
  padding: 8px 2px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 16px !important;
  color: #53637c !important;
  font-size: 14px !important;
}

body.com_jevents .previousmonth { text-align: left !important; }
body.com_jevents .nextmonth { text-align: right !important; }
body.com_jevents .currentmonth { color: #071d42 !important; font-weight: 750 !important; text-align: center !important; }

body.com_jevents .previousmonth a,
body.com_jevents .nextmonth a {
  color: #cf242d !important;
  font-size: 0 !important;
  font-weight: 750 !important;
}

body.com_jevents .previousmonth a::before { content: "← Vorheriger Monat"; font-size: 13px; }
body.com_jevents .nextmonth a::after { content: "Nächster Monat →"; font-size: 13px; }

body.com_jevents .cal_top_day_names,
body.com_jevents .cal_table {
  width: 100% !important;
  min-width: 700px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 4px !important;
}

body.com_jevents .cal_daysnames {
  padding: 10px 8px !important;
  border: 0 !important;
  color: #667085 !important;
  background: transparent !important;
  font-size: 0 !important;
  font-weight: 750 !important;
  text-align: left !important;
}

body.com_jevents .cal_daysnames .monday::after { content: "Mo"; font-size: 12px; }
body.com_jevents .cal_daysnames .tuesday::after { content: "Di"; font-size: 12px; }
body.com_jevents .cal_daysnames .wednesday::after { content: "Mi"; font-size: 12px; }
body.com_jevents .cal_daysnames .thursday::after { content: "Do"; font-size: 12px; }
body.com_jevents .cal_daysnames .friday::after { content: "Fr"; font-size: 12px; }
body.com_jevents .cal_daysnames .saturday::after { content: "Sa"; font-size: 12px; }
body.com_jevents .cal_daysnames .sunday::after { content: "So"; font-size: 12px; }

body.com_jevents .cal_cell_rows > td {
  box-sizing: border-box !important;
  height: 112px !important;
  padding: 10px !important;
  vertical-align: top !important;
  border: 1px solid #e0e6ef !important;
  border-radius: 9px !important;
  color: #17233a !important;
  background: #fff !important;
}

body.com_jevents .cal_cell_rows > td:hover {
  border-color: #9fb1c8 !important;
  box-shadow: 0 5px 14px rgba(7,29,66,.06) !important;
}

body.com_jevents .cal_cell_rows > td.cal_daysoutofmonth {
  color: #a6afbd !important;
  background: #f5f7fa !important;
}

body.com_jevents .cal_cell_rows > td[class*="today"] {
  border: 2px solid #cf242d !important;
  background: #fff9f9 !important;
}

body.com_jevents .cal_daylink {
  color: #071d42 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.com_jevents .cal_daylink .listview {
  display: none !important;
}

body.com_jevents .eventfull,
body.com_jevents .eventfull a,
body.com_jevents [class*="eventstyle"] a {
  margin-top: 6px !important;
  padding: 5px 7px !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 5px !important;
  color: #fff !important;
  background: #0b2f62 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

/* ---------- Joomla contact form ---------- */
body.com_contact .site-grid > .container-component {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
  padding: clamp(38px, 5vw, 64px) 28px 86px !important;
}

body.com_contact .com-contact.contact {
  width: 100% !important;
  max-width: 920px !important;
  margin-inline: auto !important;
  display: flex !important;
  flex-direction: column !important;
  color: #17233a !important;
}

body.com_contact .com-contact > .page-header { order: 1 !important; }
body.com_contact .com-contact > .com-contact__container { display: none !important; }
body.com_contact .com-contact > h2:nth-of-type(2) { order: 2 !important; }
body.com_contact .com-contact > .com-contact__miscinfo { order: 3 !important; }
body.com_contact .com-contact > h2:nth-of-type(1) { order: 4 !important; }
body.com_contact .com-contact > .com-contact__form { order: 5 !important; }

body.com_contact .com-contact > .page-header h1 {
  margin: 0 0 24px !important;
  color: #071d42 !important;
  font-size: clamp(38px, 5vw, 58px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.03em !important;
}

body.com_contact .com-contact > h2 {
  margin: 34px 0 16px !important;
  color: #071d42 !important;
  font-size: clamp(25px, 3vw, 34px) !important;
}

body.com_contact .contact-miscinfo dl,
body.com_contact .contact-miscinfo dd {
  margin: 0 !important;
}

body.com_contact .contact-miscinfo dt {
  display: none !important;
}

body.com_contact .contact-form form {
  margin: 0 !important;
  padding: clamp(24px, 4vw, 40px) !important;
  border: 1px solid #dfe5ee !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 12px 32px rgba(7,29,66,.07) !important;
}

body.com_contact .contact-form legend {
  margin-bottom: 22px !important;
  color: #0b2f62 !important;
  font-size: 18px !important;
  font-weight: 750 !important;
}

body.com_contact .contact-form .control-group {
  margin-bottom: 20px !important;
}

body.com_contact .contact-form label {
  margin-bottom: 7px !important;
  color: #17233a !important;
  font-weight: 700 !important;
}

body.com_contact .contact-form input[type="text"],
body.com_contact .contact-form input[type="email"],
body.com_contact .contact-form textarea {
  width: 100% !important;
  padding: 11px 13px !important;
  border: 1px solid #b9c5d4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #17233a !important;
  font: inherit !important;
}

body.com_contact .contact-form input:focus,
body.com_contact .contact-form textarea:focus {
  border-color: #0b2f62 !important;
  box-shadow: 0 0 0 3px rgba(11,47,98,.13) !important;
  outline: 0 !important;
}

body.com_contact .contact-form .btn-primary {
  padding: 11px 18px !important;
  border-color: #cf242d !important;
  border-radius: 8px !important;
  background: #cf242d !important;
  font-weight: 750 !important;
}

/* ---------- Shared footer note ---------- */
.rettwi-footer__disclaimer {
  grid-column: 1 / -1 !important;
  margin: 2px 0 0 !important;
  padding-top: 20px !important;
  border-top: 1px solid #dfe5ee !important;
  color: #667085 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

/* ---------- Homepage JEvents latest module ---------- */
.rettwi-next-event .rettwi-jevents-latest {
  height: 100% !important;
}

.rettwi-next-event .mod_events_latest_table,
.rettwi-next-event .mod_events_latest {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.rettwi-next-event .rettwi-event-date,
.rettwi-next-event .rettwi-event-title {
  display: block !important;
}

.rettwi-next-event .rettwi-event-date {
  margin-bottom: 8px !important;
  color: rgba(255,255,255,.78) !important;
  font-size: 13px !important;
}

.rettwi-next-event .rettwi-event-title {
  color: #fff !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
}

@media (max-width: 700px) {
  body.com_jevents .site-grid > .container-component,
  body.com_contact .site-grid > .container-component {
    padding: 34px 18px 64px !important;
  }

  body.com_jevents #jevents_body {
    padding: 18px !important;
  }

  body.com_jevents #jevents_body .new-navigation {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.com_jevents .jev_header2 {
    grid-template-columns: 1fr 1fr !important;
  }

  body.com_jevents .currentmonth {
    display: none !important;
  }
}
/* RETTWI German empty-calendar message */
.rettwi-next-event .mod_events_latest_noevents {
  font-size: 0;
  line-height: 1.5;
}

.rettwi-next-event .mod_events_latest_noevents::after {
  content: "Derzeit sind keine Termine eingetragen.";
  display: block;
  font-size: 1rem;
  line-height: 1.5;
  color: inherit;
}

/* ---------- JEvents calendar polish ---------- */
body.com_jevents #jevents_body {
  padding: clamp(24px, 3vw, 40px) !important;
}

body.com_jevents #jevents_body .jev_pretoolbar {
  display: none !important;
}

body.com_jevents #jevents_body .month_date {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  gap: 9px !important;
}

body.com_jevents #jevents_body .month_date .month_title,
body.com_jevents #jevents_body .month_date .month_title_year {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  color: #071d42 !important;
  font-size: clamp(30px, 3.2vw, 42px) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em !important;
}

body.com_jevents #jevents_body .month_date .month_title_year {
  color: #53637c !important;
  font-weight: 700 !important;
}

body.com_jevents #jevents_body .new-navigation {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 24px !important;
  padding: 0 0 20px !important;
  display: block !important;
  border-bottom: 1px solid #e1e7f0 !important;
}

body.com_jevents #jevents_body .nav-items {
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  text-align: left !important;
}

body.com_jevents #jevents_body .nav-items > div,
body.com_jevents #jevents_body .nav-items > div:first-child,
body.com_jevents #jevents_body .nav-items > div:last-child {
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  line-height: 1 !important;
}

body.com_jevents #jevents_body .nav-items > div a,
body.com_jevents #jevents_body .nav-items > div a:hover {
  box-sizing: border-box !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #d8e0eb !important;
  border-radius: 8px !important;
  background: #f7f9fc !important;
  color: #0b2f62 !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

body.com_jevents #jevents_body .nav-items > div.active a,
body.com_jevents #jevents_body .nav-items > div.active a:hover {
  border-color: #0b2f62 !important;
  background: #0b2f62 !important;
  color: #fff !important;
}

body.com_jevents #jevents_body .jev_toprow {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
}

body.com_jevents #jevents_body .jev_header2 {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: center !important;
  gap: 12px !important;
}

body.com_jevents #jevents_body .jev_header2 .currentmonth {
  display: none !important;
}

body.com_jevents #jevents_body .jev_header2 .previousmonth,
body.com_jevents #jevents_body .jev_header2 .nextmonth {
  box-sizing: border-box !important;
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0b2f62 !important;
  line-height: 1 !important;
}

body.com_jevents #jevents_body .jev_header2 .previousmonth {
  text-align: left !important;
}

body.com_jevents #jevents_body .jev_header2 .nextmonth {
  text-align: right !important;
}

body.com_jevents #jevents_body .jev_header2 .previousmonth a,
body.com_jevents #jevents_body .jev_header2 .nextmonth a {
  box-sizing: border-box !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #d8e0eb !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0b2f62 !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

body.com_jevents #jevents_body .jev_header2 .previousmonth a:hover,
body.com_jevents #jevents_body .jev_header2 .nextmonth a:hover {
  border-color: #0b2f62 !important;
  background: #f3f6fa !important;
}

body.com_jevents #jevents_body .cal_top_day_names,
body.com_jevents #jevents_body .cal_table {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 760px !important;
  margin: 0 !important;
  padding: 0 !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.com_jevents #jevents_body .cal_top_day_names {
  overflow: hidden !important;
  border: 1px solid #0b2f62 !important;
  border-radius: 10px 10px 0 0 !important;
  background: #0b2f62 !important;
}

body.com_jevents #jevents_body .cal_daysnames {
  height: 44px !important;
  padding: 0 12px !important;
  border: 0 !important;
  background: #0b2f62 !important;
  color: #fff !important;
  font-size: 0 !important;
  font-weight: 750 !important;
  line-height: 44px !important;
  text-align: left !important;
}

body.com_jevents #jevents_body .cal_daysnames span,
body.com_jevents #jevents_body .cal_daysnames span::after {
  color: #fff !important;
}

body.com_jevents #jevents_body .cal_table {
  overflow: hidden !important;
  border: 1px solid #dce3ec !important;
  border-top: 0 !important;
  border-radius: 0 0 10px 10px !important;
  background: #dce3ec !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td {
  box-sizing: border-box !important;
  height: 112px !important;
  padding: 12px !important;
  border: 0 !important;
  border-right: 1px solid #dce3ec !important;
  border-bottom: 1px solid #dce3ec !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  vertical-align: top !important;
  transition: background-color .16s ease !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td:last-child {
  border-right: 0 !important;
}

body.com_jevents #jevents_body .cal_cell_rows:last-child > td {
  border-bottom: 0 !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td:nth-child(6),
body.com_jevents #jevents_body .cal_cell_rows > td:nth-child(7) {
  background: #fafbfc !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td.cal_daysoutofmonth {
  background: #f3f5f8 !important;
  color: #9aa5b4 !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td:hover {
  background: #f5f8fc !important;
}

body.com_jevents #jevents_body .cal_cell_rows > td.cal_today {
  position: relative !important;
  background: #fff7f7 !important;
  box-shadow: inset 0 0 0 2px #cf242d !important;
}

body.com_jevents #jevents_body .cal_today .calview {
  width: 30px !important;
  height: 30px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #cf242d !important;
  color: #fff !important;
}

body.com_jevents #jevents_body .cal_daylink {
  display: inline-flex !important;
  color: #071d42 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

@media (max-width: 760px) {
  body.com_jevents #jevents_body {
    padding: 20px !important;
  }

  body.com_jevents #jevents_body .month_date .month_title,
  body.com_jevents #jevents_body .month_date .month_title_year {
    font-size: 30px !important;
  }

  body.com_jevents #jevents_body .nav-items {
    gap: 6px !important;
  }

  body.com_jevents #jevents_body .nav-items > div a,
  body.com_jevents #jevents_body .nav-items > div a:hover {
    min-height: 38px !important;
    padding-inline: 11px !important;
  }

  body.com_jevents #jevents_body .jev_header2 .previousmonth a,
  body.com_jevents #jevents_body .jev_header2 .nextmonth a {
    min-height: 38px !important;
    padding-inline: 11px !important;
  }
}
