:root {
  --brand-900: #0f4f47;
  --brand-700: #1a6b62;
  --brand-600: #24897d;
  --brand-500: #2ea293;
  --brand-200: #d8f0ed;
  --ink-900: #173531;
  --ink-700: #355f59;
  --ink-500: #648883;
  --surface: #f3f8f7;
  --white: #ffffff;
  --radius-md: 12px;
  --radius-lg: 18px;
}

.events-widget,
.events-widget *,
.events-widget *::before,
.events-widget *::after {
  box-sizing: border-box;
}

.events-widget {
  font-family: "Manrope", sans-serif;
  color: var(--ink-900);
  background: linear-gradient(180deg, #f8fcfb 0%, #f2f7f6 65%, #eff6f5 100%);
  padding: clamp(10px, 1.8vw, 18px);
  border-radius: 14px;
  border: 1px solid #dcebe8;
}

.events-widget a {
  color: var(--brand-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

.events-widget a:hover {
  color: var(--brand-600);
}

.events-widget {
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d5e8e4;
  border-radius: 12px;
}

.icon-btn,
.export-btn,
.tab-btn {
  border: none;
  background: var(--brand-600);
  color: var(--white);
  border-radius: 8px;
  height: 38px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.icon-btn:hover,
.export-btn:hover,
.tab-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(24, 97, 89, 0.2);
}

.icon-btn:active,
.export-btn:active,
.tab-btn:active {
  transform: translateY(1px);
}

.icon-btn {
  width: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.date-input,
.search-input {
  border: 1px solid #a7cfc8;
  border-radius: 8px;
  height: 38px;
  padding: 0 10px;
  color: var(--ink-900);
  font: inherit;
  background: #fbfffe;
}

.date-input {
  width: 165px;
}

.search-input {
  min-width: 200px;
  flex: 1 1 260px;
}

.view-tabs {
  display: flex;
  margin-left: auto;
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  border-radius: 0;
  background: #8e9498;
}

.tab-btn.is-active {
  background: var(--brand-600);
}

.export-btn {
  background: var(--ink-700);
}

.lang-switch {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  margin-left: 4px;
}

.lang-btn {
  border: none;
  min-width: 48px;
  height: 38px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #b7c2c1;
  color: #173531;
  transition: filter 0.15s ease;
}

.lang-btn.is-active {
  background: var(--brand-700);
  color: var(--white);
}

.lang-btn:hover {
  filter: brightness(1.04);
}

.status-row {
  padding: 12px 8px 0;
}

.status-row h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.7vw, 2rem);
}

.status-row p {
  margin: 6px 0 0;
  color: var(--ink-700);
}

.category-row {
  padding: 10px clamp(4px, 1.8vw, 12px) 0;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-filter-btn {
  border: 1px solid #9ec7c0;
  background: #f4fbfa;
  color: var(--ink-900);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.category-filter-btn.is-active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--white);
}

.results {
  padding: 12px 2px 0;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 10px;
}

.event-card {
  background: #f9fcfb;
  border: 1px solid #dce3e2;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  box-shadow: 0 10px 28px rgba(16, 44, 41, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(16, 44, 41, 0.12);
}

.event-cover {
  position: relative;
  height: 148px;
  background: linear-gradient(140deg, var(--brand-900), var(--brand-500));
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-date-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 46px;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.date-day {
  display: block;
  background: linear-gradient(180deg, #1f8b7d, #176d62);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  padding-top: 5px;
}

.date-month {
  display: block;
  background: #d9eeeb;
  color: #1a5c54;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 1px 0 4px;
  text-transform: uppercase;
}

.event-body {
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.event-time {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.96rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-category-chip,
.event-format-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.event-category-chip {
  background: #d8eeea;
  color: #105950;
}

.event-format-badge {
  color: var(--white);
}

.format-in-person {
  background: #24897d;
}

.format-online {
  background: #1f6e9d;
}

.format-hybrid {
  background: #7b5f26;
}

.event-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.75vw, 1.95rem);
  line-height: 1.14;
  letter-spacing: -0.018em;
}

.event-location,
.event-description {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.45;
}

.event-description {
  color: #577571;
  min-height: 48px;
}

.event-organizer {
  margin: 0;
  color: #4c716c;
}

.event-link {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(145deg, #2e9f91, #1f7f73);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(20, 95, 87, 0.24);
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.events-widget a.event-link,
.events-widget a.event-link:visited {
  color: var(--white);
}

.events-widget a.event-link:hover {
  color: var(--white);
  filter: brightness(1.06);
  box-shadow: 0 12px 20px rgba(20, 95, 87, 0.28);
}

.events-widget a.event-link:active {
  transform: translateY(1px);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-list-item {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #d9ece9;
  background: #fafdfe;
  box-shadow: 0 8px 16px rgba(20, 66, 60, 0.05);
}

.event-list-date {
  margin: 0;
  min-width: 110px;
  color: var(--ink-700);
  font-weight: 700;
}

.event-list-content h3,
.event-list-content p {
  margin: 0;
}

.event-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.event-list-category,
.event-list-format {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.event-list-category {
  background: #e1f1ef;
  color: #105950;
}

.event-list-format {
  color: var(--white);
}

.event-link-inline {
  display: inline-flex;
  margin-top: 7px;
  font-weight: 700;
}

.events-widget a.event-link-inline,
.events-widget a.event-link-inline:visited {
  color: var(--brand-700);
}

.events-widget a.event-link-inline:hover {
  color: var(--brand-600);
  text-decoration: underline;
}

.month-view {
  border: 1px solid #d6eae7;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--brand-700);
  color: var(--white);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.month-header span {
  padding: 10px 4px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #d6ece8;
}

.month-cell {
  min-height: 92px;
  background: #f9fdfd;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border: none;
  text-align: left;
  font: inherit;
}

.month-cell:hover {
  background: #edf9f6;
}

.month-cell:disabled {
  cursor: default;
}

.month-cell.is-other-month {
  background: #f0f5f4;
  color: #95aaa7;
}

.month-cell-day {
  font-size: 0.86rem;
  font-weight: 700;
}

.month-cell-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.month-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-600);
}

.month-more {
  font-size: 0.74rem;
  color: var(--ink-500);
}

.empty-state {
  border: 1px dashed #b9dcd7;
  background: #f8fdfc;
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--ink-700);
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .view-tabs {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .toolbar {
    padding-bottom: 12px;
  }

  .date-input,
  .search-input {
    width: 100%;
    flex-basis: 100%;
  }

  .view-tabs,
  .export-btn,
  .lang-switch {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
  }

  .lang-btn {
    flex: 1;
  }

  .event-title {
    font-size: 1.4rem;
  }

  .month-cell {
    min-height: 72px;
  }
}
