.ctc-public {
  --ctc-brand: #151515;
  --ctc-accent: #ffd400;
  --ctc-ink: #151918;
  --ctc-muted: #69716e;
  --ctc-line: #dfe3e1;
  --ctc-soft: #f4f5f4;
  --ctc-soft-2: #eceeed;
  --ctc-white: #fff;
  color: var(--ctc-ink);
  font-family: inherit;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 0 52px;
}

.ctc-public * { box-sizing: border-box; }
.ctc-public button,
.ctc-public input { font: inherit; }
.ctc-public svg,
.ctc-home-upcoming svg { width: 1em; height: 1em; fill: none !important; stroke: currentColor !important; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctc-public svg path, .ctc-public svg circle, .ctc-public svg rect, .ctc-public svg line, .ctc-public svg polyline,
.ctc-home-upcoming svg path, .ctc-home-upcoming svg circle, .ctc-home-upcoming svg rect, .ctc-home-upcoming svg line, .ctc-home-upcoming svg polyline {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.ctc-public-head { max-width: 820px; margin-bottom: 24px; }
.ctc-public-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ctc-ink);
  margin-bottom: 8px;
}
.ctc-public-kicker::before { content: ""; width: 22px; height: 4px; border-radius: 99px; background: var(--ctc-accent); }
.ctc-public-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-transform: none;
  margin: 0 0 10px;
  color: var(--ctc-ink);
}
.ctc-public-head p { font-size: 16px; line-height: 1.55; color: var(--ctc-muted); margin: 0; }

.ctc-public-shell {
  background: #fff;
  border: 1px solid var(--ctc-line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .07);
}

.ctc-public-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.ctc-view-tabs { display: inline-flex; padding: 4px; border-radius: 11px; background: var(--ctc-soft); }
.ctc-public .ctc-view-tabs button {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: #59605d !important;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none !important;
  transition: background .18s ease, color .18s ease;
}
.ctc-public .ctc-view-tabs button:hover { background: #e9ebea !important; color: var(--ctc-ink) !important; }
.ctc-public .ctc-view-tabs button.is-active,
.ctc-public .ctc-view-tabs button.is-active:hover { background: var(--ctc-brand) !important; color: #fff !important; }

.ctc-public-search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 235px;
  min-height: 42px;
  border: 1px solid var(--ctc-line);
  border-radius: 11px;
  padding: 0 11px;
  background: #fff;
}
.ctc-public-search:focus-within { border-color: #b8bdba; box-shadow: 0 0 0 3px rgba(255, 212, 0, .18); }
.ctc-public-search input { border: 0 !important; outline: 0 !important; box-shadow: none !important; width: 100%; min-height: 38px; padding: 0 !important; background: transparent !important; color: var(--ctc-ink) !important; }
.ctc-public-search span { font-size: 22px; line-height: 1; color: #777f7b; }

.ctc-discipline-filter { padding: 2px 0 13px; }
.ctc-public-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; }
.ctc-discipline-select { display: none; align-items: center; gap: 10px; max-width: 340px; }
.ctc-discipline-select span { flex: 0 0 auto; color: var(--ctc-muted); font-size: 11px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.ctc-discipline-select select { width: 100%; min-height: 42px; margin: 0; padding: 0 38px 0 12px; border: 1px solid var(--ctc-line); border-radius: 11px; background-color: #fff; color: var(--ctc-ink); font: inherit; font-size: 13px; font-weight: 700; box-shadow: none; cursor: pointer; }
.ctc-discipline-select select:focus { outline: 0; border-color: #b8bdba; box-shadow: 0 0 0 3px rgba(255, 212, 0, .18); }
.ctc-many-disciplines .ctc-public-filters { display: none; }
.ctc-many-disciplines .ctc-discipline-select { display: flex; }
.ctc-no-disciplines .ctc-discipline-filter { display: none; }
.ctc-public .ctc-filter-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid var(--ctc-line) !important;
  border-radius: 999px;
  background: #fff !important;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
  color: #515956 !important;
  cursor: pointer;
  box-shadow: none !important;
}
.ctc-filter-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--chip, #666); }
.ctc-public .ctc-filter-chip:hover { background: var(--ctc-soft) !important; color: var(--ctc-ink) !important; }
.ctc-public .ctc-filter-chip.is-active,
.ctc-public .ctc-filter-chip.is-active:hover { color: #fff !important; background: var(--ctc-brand) !important; border-color: var(--ctc-brand) !important; }
.ctc-filter-chip.is-active i { background: var(--ctc-accent); }

.ctc-loading { padding: 60px; text-align: center; color: var(--ctc-muted); }
.ctc-loading.is-error { color: #a32f26; }

/* FullCalendar */
.ctc-public .fc {
  --fc-border-color: #e3e6e5;
  --fc-button-bg-color: var(--ctc-brand);
  --fc-button-border-color: var(--ctc-brand);
  --fc-button-hover-bg-color: #303030;
  --fc-button-hover-border-color: #303030;
  --fc-button-active-bg-color: #303030;
  --fc-button-active-border-color: #303030;
  --fc-today-bg-color: #f4f5f4;
  font-size: 13px;
}
.ctc-public .fc .fc-toolbar { gap: 8px; }
.ctc-public .fc .fc-toolbar-title { font-size: 19px; text-transform: capitalize; letter-spacing: -.02em; color: var(--ctc-ink); }
.ctc-public .fc .fc-button { border-radius: 9px; font-weight: 700; box-shadow: none !important; padding: .55em .75em; text-transform: none; }
.ctc-public .fc .fc-today-button { background: var(--ctc-accent) !important; border-color: var(--ctc-accent) !important; color: #111 !important; opacity: 1; }
.ctc-public .fc .fc-today-button:disabled { opacity: .55; }
.ctc-public .fc .fc-col-header-cell-cushion,
.ctc-public .fc .fc-daygrid-day-number { color: #424946; text-decoration: none; font-weight: 650; }
.ctc-public .fc .fc-daygrid-event { border-radius: 6px; padding: 3px 5px; overflow: hidden; transition: filter .15s ease, transform .15s ease; }
.ctc-public .fc .fc-daygrid-event:hover { filter: brightness(.94); transform: translateY(-1px); }
.ctc-fc-event { display: grid; gap: 1px; line-height: 1.15; color: #fff; }
.ctc-fc-event strong { font-size: 11px; white-space: normal; text-transform: none; }
.ctc-fc-time { font-size: 9px; font-weight: 850; opacity: .9; }
.ctc-fc-result { display: inline-flex; gap: 4px; align-items: center; white-space: normal; font-size: 9px; font-weight: 700; opacity: .98; margin-top: 3px; }
.ctc-fc-result svg { width: 10px; height: 10px; }
.ctc-public .fc-list-event:hover td { background: #f3f4f4; }
.ctc-public .fc-list-event-title a { text-decoration: none; color: var(--ctc-ink); }

/* Agenda */
.ctc-agenda { display: grid; gap: 10px; }
.ctc-public button.ctc-agenda-card {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 30px;
  gap: 16px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--ctc-line) !important;
  border-radius: 15px;
  padding: 10px;
  background: #fff !important;
  color: var(--ctc-ink) !important;
  cursor: pointer;
  box-shadow: none !important;
  text-transform: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ctc-public button.ctc-agenda-card:hover,
.ctc-public button.ctc-agenda-card:focus-visible {
  background: #f1f2f2 !important;
  color: var(--ctc-ink) !important;
  border-color: #cfd3d1 !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .06) !important;
  transform: translateY(-1px);
}
.ctc-public button.ctc-agenda-card:focus-visible { outline: 3px solid rgba(255, 212, 0, .48); outline-offset: 2px; }
.ctc-agenda-media img,
.ctc-agenda-date { width: 126px; height: 105px; border-radius: 11px; }
.ctc-agenda-media img { display: block; object-fit: cover; }
.ctc-agenda-date {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #e8ecee;
  color: var(--ctc-ink);
  overflow: hidden;
}
.ctc-agenda-date::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--event); }
.ctc-agenda-date span { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #68706d; }
.ctc-agenda-date strong { font-size: 34px; line-height: .95; margin: 3px 0; letter-spacing: -.04em; }
.ctc-agenda-date b { font-size: 11px; letter-spacing: .09em; }
.ctc-agenda-body { align-self: center; min-width: 0; }
.ctc-agenda-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 6px; }
.ctc-agenda-tags span { font-size: 10px; font-weight: 850; text-transform: uppercase; color: var(--event); letter-spacing: .04em; }
.ctc-agenda-tags i { font-style: normal; font-size: 10px; color: #717875; font-weight: 700; }
.ctc-agenda-tags i.ctc-status-cancelado { color: #b02722; }
.ctc-agenda-tags i.ctc-status-postergado { color: #8a6900; }
.ctc-agenda-body h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.2; color: var(--ctc-ink); text-transform: none; letter-spacing: -.01em; }
.ctc-agenda-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 0; color: var(--ctc-muted); font-size: 12.5px; }
.ctc-agenda-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ctc-agenda-meta svg { width: 14px; height: 14px; flex: 0 0 auto; }
.ctc-agenda-result { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: #303633; font-size: 13px; }
.ctc-agenda-result svg { width: 14px; height: 14px; color: #9b7c00; }
.ctc-agenda-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f1f2f2; color: #676e6b; }
.ctc-agenda-card:hover .ctc-agenda-arrow { background: #fff; color: #111; }

/* Empty states */
.ctc-public-empty { text-align: center; padding: 52px 20px; color: var(--ctc-muted); border: 1px dashed #d7dad8; border-radius: 15px; background: #fafafa; }
.ctc-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 13px; border-radius: 50%; background: #eceeed; color: #555d59; }
.ctc-empty-icon svg { width: 24px; height: 24px; }
.ctc-public-empty strong { display: block; color: var(--ctc-ink); font-size: 18px; margin-bottom: 6px; }
.ctc-public-empty p { max-width: 480px; margin: 0 auto 18px; font-size: 13px; line-height: 1.55; }
.ctc-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.ctc-public button.ctc-empty-button {
  appearance: none;
  border: 1px solid var(--ctc-brand) !important;
  border-radius: 9px;
  background: var(--ctc-brand) !important;
  color: #fff !important;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none !important;
}
.ctc-public button.ctc-empty-button:hover { background: #333 !important; color: #fff !important; }
.ctc-public button.ctc-empty-button-secondary { background: #fff !important; color: var(--ctc-ink) !important; border-color: #cfd3d1 !important; }
.ctc-public button.ctc-empty-button-secondary:hover { background: #f1f2f2 !important; color: var(--ctc-ink) !important; }

/* Event modal */
.ctc-dialog {
  width: min(820px, calc(100% - 28px));
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 35px 90px rgba(0, 0, 0, .34);
  overflow: hidden;
}
.ctc-dialog::backdrop { background: rgba(10, 14, 12, .68); backdrop-filter: blur(4px); }
.ctc-dialog-panel { position: relative; max-height: 92vh; overflow: auto; overscroll-behavior: contain; }
.ctc-public .ctc-dialog-close,
.ctc-home-upcoming .ctc-dialog-close {
  appearance: none;
  position: absolute;
  z-index: 5;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 0 !important;
  background: var(--ctc-accent) !important;
  color: #111 !important;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .13) !important;
}
.ctc-public .ctc-dialog-close:hover,
.ctc-home-upcoming .ctc-dialog-close:hover { background: #e9c300 !important; color: #111 !important; }
.ctc-dialog-hero { height: 300px; background: var(--ctc-soft); }
.ctc-dialog-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctc-dialog-inner { padding: 27px 28px 28px; }
.ctc-dialog-heading { padding-right: 42px; }
.ctc-dialog-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 9px; }
.ctc-dialog-tags span {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--event) 13%, white);
  color: var(--event);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.ctc-dialog-tags em,
.ctc-dialog-tags i { font-size: 10px; color: #717875; font-style: normal; font-weight: 750; }
.ctc-dialog-tags em::after { content: "·"; margin-left: 7px; color: #b3b7b5; }
.ctc-dialog-tags i.ctc-status-cancelado { color: #b02722; }
.ctc-dialog-tags i.ctc-status-postergado { color: #8a6900; }
.ctc-dialog-inner h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.08; letter-spacing: -.032em; text-transform: none; margin: 0 0 21px; color: var(--ctc-ink); }
.ctc-dialog-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 24px; }
.ctc-meta-card { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--ctc-line); background: #fbfbfb; border-radius: 12px; padding: 12px; min-height: 78px; }
.ctc-meta-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: #eceeed; color: #4e5552; }
.ctc-meta-icon svg { width: 17px; height: 17px; }
.ctc-meta-card p { display: grid; align-content: center; margin: 0; font-size: 12.5px; line-height: 1.4; color: #333a37; }
.ctc-meta-card b { font-size: 9px; text-transform: uppercase; color: #7a817e; letter-spacing: .07em; margin-bottom: 3px; }
.ctc-meta-card small { display: block; color: #7a817e; font-size: 11px; margin-top: 2px; }
.ctc-meta-card-cost { border-color: #ead36c; background: #fff9dc; }
.ctc-meta-icon-cost { background: var(--ctc-accent); color: #111; }
.ctc-cost-value { display: block; margin-top: 1px; color: #151515; font-size: 16px; line-height: 1.25; font-weight: 900; letter-spacing: -.015em; }

.ctc-contact-card {
  /* Ocupa una celda cuando puede completar la fila (por ejemplo junto al costo). */
  grid-column: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e0c300;
  border-radius: 12px;
  background: #fff7c9;
  color: #171917 !important;
  text-decoration: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .035);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ctc-contact-card:hover { background: #ffef9b; border-color: #cfb200; color: #111 !important; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .07); }
/* Si queda sola en una fila impar, aprovecha todo el ancho. */
.ctc-dialog-meta > .ctc-contact-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ctc-contact-card:focus-visible { outline: 3px solid rgba(255, 212, 0, .5); outline-offset: 2px; }
.ctc-contact-card-static { cursor: default; background: #f7f7f5; border-color: var(--ctc-line); box-shadow: none; }
.ctc-contact-card-static:hover { background: #f7f7f5; border-color: var(--ctc-line); transform: none; box-shadow: none; }
.ctc-meta-icon-whatsapp { background: #151515; color: var(--ctc-accent); }
.ctc-contact-copy { display: grid; min-width: 0; line-height: 1.3; }
.ctc-contact-copy b { margin-bottom: 3px; color: #6d6650; font-size: 9px; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.ctc-contact-copy strong { overflow-wrap: anywhere; color: #151515; font-size: 15px; font-weight: 900; }
.ctc-contact-copy small { margin-top: 3px; color: #6d6650; font-size: 11px; }
.ctc-contact-action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 9px 11px; border-radius: 999px; background: #151515; color: #fff; font-size: 10.5px; font-weight: 850; white-space: nowrap; }
.ctc-contact-action i { color: var(--ctc-accent); font-style: normal; font-size: 16px; line-height: 1; }

.ctc-dialog-section { margin-top: 23px; }
.ctc-dialog-section > h3 { font-size: 15px; margin: 0 0 10px; color: var(--ctc-ink); text-transform: none; }
.ctc-dialog-description { font-size: 14px; line-height: 1.72; color: #343b38; }
.ctc-dialog-description p { margin: 0 0 12px; }
.ctc-dialog-description p:last-child { margin-bottom: 0; }

.ctc-result-box { margin: 23px 0 0; padding: 18px; border-radius: 14px; background: #f3f3ef; border: 1px solid #dfded5; }
.ctc-section-label { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .1em; font-weight: 900; color: #6d5b0a; text-transform: uppercase; }
.ctc-section-label svg { width: 15px; height: 15px; }
.ctc-result-box h3 { font-size: 20px; margin: 7px 0 9px; color: var(--ctc-ink); text-transform: none; }
.ctc-result-box p:last-child { margin-bottom: 0; }

.ctc-dialog-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 8px; }
.ctc-dialog-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; }

/* Reminder / calendar notification */
.ctc-reminder-box { margin-top: 24px; padding: 16px; border: 1px solid #ead36c; border-radius: 14px; background: #fff9d8; }
.ctc-reminder-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ctc-reminder-head > div { display: flex; align-items: center; gap: 9px; }
.ctc-reminder-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ctc-accent); color: #111; }
.ctc-reminder-icon svg { width: 17px; height: 17px; }
.ctc-reminder-head strong { font-size: 14px; color: var(--ctc-ink); }
.ctc-public button.ctc-reminder-close,
.ctc-home-upcoming button.ctc-reminder-close {
  appearance: none;
  width: 30px;
  height: 30px;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  color: #444 !important;
  font-size: 21px;
  cursor: pointer;
  box-shadow: none !important;
}
.ctc-public button.ctc-reminder-close:hover,
.ctc-home-upcoming button.ctc-reminder-close:hover { background: rgba(0, 0, 0, .06) !important; color: #111 !important; }
.ctc-reminder-box > p { margin: 10px 0 13px; font-size: 12.5px; line-height: 1.5; color: #605927; }
.ctc-reminder-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.ctc-reminder-options a {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #dfc94f;
  color: #25230f !important;
  text-decoration: none !important;
  font-size: 11.5px;
  font-weight: 800;
}
.ctc-reminder-options a:hover { background: #f3f0dc; color: #111 !important; }
.ctc-reminder-links { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 12px; }
.ctc-reminder-links a { color: #4f481e !important; font-size: 11.5px; font-weight: 750; text-decoration: underline !important; text-underline-offset: 2px; }

.ctc-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ctc-line); }
.ctc-public .ctc-public-button,
.ctc-home-upcoming .ctc-public-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  border: 1px solid #cdd1cf !important;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff !important;
  color: #29302d !important;
  text-decoration: none !important;
  text-transform: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none !important;
}
.ctc-public .ctc-public-button svg,
.ctc-home-upcoming .ctc-public-button svg { width: 16px; height: 16px; }
.ctc-public .ctc-public-button:hover,
.ctc-home-upcoming .ctc-public-button:hover { background: #f1f2f2 !important; color: #111 !important; }
.ctc-public .ctc-reminder-toggle,
.ctc-home-upcoming .ctc-reminder-toggle,
.ctc-public .ctc-reminder-toggle:hover,
.ctc-home-upcoming .ctc-reminder-toggle:hover,
.ctc-public .ctc-reminder-toggle.is-open,
.ctc-home-upcoming .ctc-reminder-toggle.is-open { background: var(--ctc-accent) !important; border-color: var(--ctc-accent) !important; color: #111 !important; }
.ctc-public .ctc-reminder-toggle:hover,
.ctc-home-upcoming .ctc-reminder-toggle:hover { filter: brightness(.95); }
.ctc-public .ctc-public-button-dark,
.ctc-home-upcoming .ctc-public-button-dark { background: var(--ctc-brand) !important; border-color: var(--ctc-brand) !important; color: #fff !important; }
.ctc-public .ctc-public-button-dark:hover,
.ctc-home-upcoming .ctc-public-button-dark:hover { background: #333 !important; color: #fff !important; }
.ctc-contact-note { font-size: 12px; color: var(--ctc-muted); margin-top: 13px; }
.ctc-modal-open { overflow: hidden; }

@media (max-width: 720px) {
  .ctc-public-filters { display: none; }
  .ctc-discipline-select { display: flex; max-width: none; }
  .ctc-discipline-select span { display: none; }

  .ctc-public { padding: 15px 0 35px; }
  .ctc-public-head { padding: 0 3px; }
  .ctc-public-head h2 { font-size: 34px; }
  .ctc-public-shell { border-radius: 15px; padding: 10px; }
  .ctc-public-toolbar { align-items: stretch; flex-direction: column; }
  .ctc-view-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .ctc-public .ctc-view-tabs button { padding: 11px 6px; }
  .ctc-public-search { width: 100%; min-width: 0; }
  .ctc-public .fc .fc-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .ctc-public .fc .fc-toolbar-title { font-size: 15px; text-align: center; }
  .ctc-public .fc .fc-button { font-size: 11px; padding: .52em .58em; }
  .ctc-public .fc-list-day-cushion { padding: 7px 9px; }

  .ctc-public button.ctc-agenda-card { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 9px; }
  .ctc-agenda-media img,
  .ctc-agenda-date { width: 82px; height: 88px; }
  .ctc-agenda-date strong { font-size: 28px; }
  .ctc-agenda-body h3 { font-size: 15px; margin-bottom: 6px; }
  .ctc-agenda-meta { font-size: 11px; display: grid; gap: 4px; }
  .ctc-agenda-arrow { display: none; }

  /* En mobile el detalle funciona como modal centrado, no como bottom-sheet.
     dvh evita que las barras dinámicas de Safari desplacen el cuadro. */
  .ctc-dialog {
    width: calc(100% - 24px);
    max-width: 620px;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    margin: auto;
    border-radius: 20px;
  }
  .ctc-dialog-panel {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ctc-dialog-hero { height: clamp(185px, 27dvh, 230px); }
  .ctc-dialog-inner { padding: 20px 16px 24px; }
  .ctc-dialog-heading { padding-right: 35px; }
  .ctc-dialog-inner h2 { font-size: 27px; }
  .ctc-dialog-meta { grid-template-columns: 1fr; }
  .ctc-meta-card { min-height: 0; }
  .ctc-dialog-gallery { grid-template-columns: repeat(3, 1fr); }
  .ctc-reminder-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctc-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ctc-public .ctc-public-button,
.ctc-home-upcoming .ctc-public-button { width: 100%; }
  .ctc-public .ctc-reminder-toggle, .ctc-home-upcoming .ctc-reminder-toggle { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .ctc-dialog {
    width: calc(100% - 18px);
    max-height: calc(100vh - 22px);
    max-height: calc(100dvh - 22px);
    border-radius: 18px;
  }
  .ctc-dialog-panel {
    max-height: calc(100vh - 22px);
    max-height: calc(100dvh - 22px);
  }
  .ctc-dialog-hero { height: clamp(175px, 25dvh, 215px); }
  .ctc-public-head h2 { font-size: 31px; }
  .ctc-agenda-tags { gap: 5px; }
  .ctc-agenda-tags span,
  .ctc-agenda-tags i { font-size: 9px; }
  .ctc-public button.ctc-agenda-card { grid-template-columns: 72px minmax(0, 1fr); }
  .ctc-agenda-media img,
  .ctc-agenda-date { width: 72px; height: 82px; }
  .ctc-agenda-date strong { font-size: 25px; }
  .ctc-dialog-actions { grid-template-columns: 1fr; }
  .ctc-public .ctc-reminder-toggle, .ctc-home-upcoming .ctc-reminder-toggle { grid-column: auto; }
  .ctc-contact-card { align-items: flex-start; flex-wrap: wrap; }
  .ctc-contact-action { width: calc(100% - 46px); justify-content: center; margin: 2px 0 0 46px; }
}

/* Home: próximos eventos */
.ctc-home-upcoming {
  --ctc-brand: #151515;
  --ctc-accent: #ffd400;
  --ctc-ink: #161a18;
  --ctc-muted: #68706d;
  --ctc-line: #dfe3e1;
  --ctc-soft: #f4f5f4;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 0;
  color: var(--ctc-ink);
  font-family: inherit;
}
.ctc-home-upcoming * { box-sizing: border-box; }
.ctc-home-upcoming-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.ctc-home-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 11px; line-height: 1.2; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; color: var(--ctc-ink); }
.ctc-home-kicker span { width: 24px; height: 4px; border-radius: 99px; background: var(--ctc-accent); }
.ctc-home-upcoming h2 { margin: 0; color: var(--ctc-ink); font-size: clamp(30px, 3.6vw, 45px); line-height: 1.04; letter-spacing: -.035em; text-transform: none; }
.ctc-home-upcoming-head p { margin: 8px 0 0; color: var(--ctc-muted); font-size: 15px; line-height: 1.5; }
.ctc-home-all-link { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 15px; border: 1px solid var(--ctc-accent); border-radius: 999px; background: var(--ctc-accent); color: #111 !important; text-decoration: none !important; font-size: 11.5px; font-weight: 900; letter-spacing: .01em; box-shadow: 0 5px 14px rgba(0,0,0,.07); transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.ctc-home-all-link span { font-size: 18px; line-height: 1; }
.ctc-home-all-link:hover { background: #e9c300; border-color: #e9c300; color: #111 !important; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.10); }
.ctc-home-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ctc-home-event-card { --event: #151515; min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--ctc-line); border-radius: 17px; background: #fff; color: var(--ctc-ink) !important; text-decoration: none !important; box-shadow: 0 9px 26px rgba(0,0,0,.055); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.ctc-home-event-card:hover { transform: translateY(-3px); border-color: #ccd0ce; background: #f7f8f7; color: var(--ctc-ink) !important; box-shadow: 0 16px 34px rgba(0,0,0,.09); }
.ctc-home-event-card:focus-visible { outline: 3px solid rgba(255,212,0,.55); outline-offset: 3px; }
.ctc-home-event-media { position: relative; height: 190px; overflow: hidden; background: #e9eceb; }
.ctc-home-event-media::after { content: ""; position: absolute; inset: auto 0 0; height: 5px; background: var(--event); }
.ctc-home-event-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.ctc-home-event-card:hover .ctc-home-event-media img { transform: scale(1.025); }
.ctc-home-event-media.is-placeholder { display: grid; place-items: center; background: #e7eaeb; }
.ctc-home-placeholder-letter { font-size: 80px; line-height: 1; font-weight: 900; color: #c8cecb; letter-spacing: -.08em; }
.ctc-home-discipline { position: absolute; top: 12px; left: 12px; z-index: 2; max-width: calc(100% - 92px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--event); box-shadow: 0 2px 9px rgba(0,0,0,.08); font-size: 9.5px; line-height: 1; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.ctc-home-date { position: absolute; z-index: 2; right: 12px; bottom: 12px; width: 58px; height: 61px; display: grid; place-content: center; justify-items: center; border-radius: 11px; background: var(--ctc-accent); color: #101010; box-shadow: 0 5px 14px rgba(0,0,0,.14); }
.ctc-home-date strong { font-size: 25px; line-height: .9; letter-spacing: -.04em; }
.ctc-home-date span { margin-top: 4px; font-size: 9px; line-height: 1; font-weight: 900; letter-spacing: .08em; }
.ctc-home-event-body { flex: 1; display: flex; flex-direction: column; padding: 17px 17px 14px; }
.ctc-home-event-eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 9.5px; line-height: 1.2; font-weight: 850; text-transform: uppercase; letter-spacing: .045em; }
.ctc-home-event-eyebrow span { color: var(--event); }
.ctc-home-event-eyebrow i { display: inline-flex; align-items: center; gap: 6px; color: #777e7b; font-style: normal; }
.ctc-home-event-eyebrow i::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #b8bdbb; }
.ctc-home-event-body h3 { margin: 0 0 12px; color: var(--ctc-ink); font-size: 18px; line-height: 1.18; letter-spacing: -.018em; text-transform: none; }
.ctc-home-event-meta { display: grid; gap: 7px; margin-top: auto; color: #606865; font-size: 11.5px; line-height: 1.35; }
.ctc-home-event-meta span { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.ctc-home-event-meta svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctc-home-event-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 11px; border-top: 1px solid #e7e9e8; color: #333936; font-size: 11px; font-weight: 850; }
.ctc-home-event-footer b { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #eceeed; color: #282c2a; font-size: 15px; transition: transform .18s ease, background .18s ease; }
.ctc-home-event-card:hover .ctc-home-event-footer b { transform: translateX(2px); background: var(--ctc-accent); }
.ctc-home-event-card[aria-busy="true"] { cursor: progress; opacity: .82; }
.ctc-home-modal-agenda { margin-top: 14px; text-align: right; }
.ctc-home-modal-agenda a { color: #303633 !important; font-size: 11.5px; font-weight: 800; text-decoration: underline !important; text-underline-offset: 3px; }
.ctc-home-modal-agenda a:hover { color: #111 !important; }
.ctc-home-empty { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; padding: 20px; border: 1px solid var(--ctc-line); border-radius: 15px; background: #f6f7f6; }
.ctc-home-empty-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: var(--ctc-accent); color: #111; font-weight: 900; }
.ctc-home-empty strong { display: block; margin-bottom: 3px; font-size: 15px; color: var(--ctc-ink); }
.ctc-home-empty p { margin: 0; color: var(--ctc-muted); font-size: 12.5px; }
.ctc-home-empty a { display: inline-flex; justify-content: center; min-height: 40px; align-items: center; padding: 9px 13px; border-radius: 9px; background: var(--ctc-brand); color: #fff !important; text-decoration: none !important; font-size: 11px; font-weight: 850; }
.ctc-home-empty a:hover { background: #333; color: #fff !important; }

@media (max-width: 900px) {
  .ctc-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .ctc-home-upcoming { padding: 25px 0; }
  .ctc-home-upcoming-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 17px; }
  .ctc-home-upcoming h2 { font-size: 32px; }
  .ctc-home-upcoming-head p { font-size: 14px; }
  .ctc-home-all-link { min-height: 40px; padding: 9px 13px; }
  .ctc-home-cards { grid-template-columns: 1fr; gap: 12px; }
  .ctc-home-event-card { display: grid; grid-template-columns: 128px minmax(0,1fr); min-height: 0; align-items: start; }
  .ctc-home-event-media { width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 1; align-self: start; }
  .ctc-home-discipline { top: 8px; left: 8px; right: 8px; max-width: none; text-align: center; }
  .ctc-home-date { right: 8px; bottom: 8px; width: 49px; height: 52px; border-radius: 9px; }
  .ctc-home-date strong { font-size: 21px; }
  .ctc-home-event-body { padding: 13px 13px 11px; }
  .ctc-home-event-body h3 { font-size: 16px; margin-bottom: 10px; }
  .ctc-home-event-meta { font-size: 10.5px; gap: 5px; }
  .ctc-home-event-footer { margin-top: 10px; padding-top: 8px; }
  .ctc-home-placeholder-letter { font-size: 54px; }
  .ctc-home-empty { grid-template-columns: auto 1fr; }
  .ctc-home-empty a { grid-column: 1 / -1; }
}
@media (max-width: 390px) {
  .ctc-home-event-card { grid-template-columns: 112px minmax(0,1fr); }
  .ctc-home-event-media { width: 112px; height: 112px; min-height: 0; aspect-ratio: 1 / 1; }
  .ctc-home-event-footer span { display: none; }
}

/* Resultados v2.8: prioridad visual + lectura rápida por categoría */
.ctc-dialog-heading + .ctc-result-box { margin-top: -4px; margin-bottom: 24px; }
.ctc-result-box {
  padding: 18px;
  border-color: #e2ca52;
  background: #fff9d9;
}
.ctc-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.ctc-result-summary { margin: 0 !important; color: #504918; font-size: 12.5px; font-weight: 750; }
.ctc-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ctc-result-card { min-width: 0; padding: 13px 14px; border: 1px solid #e5dcad; border-radius: 11px; background: rgba(255,255,255,.82); }
.ctc-result-card h4 { margin: 0 0 9px; color: var(--ctc-ink); font-size: 13.5px; line-height: 1.25; text-transform: none; }
.ctc-result-card p { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; margin: 5px 0; color: #373a31; font-size: 12.5px; line-height: 1.38; }
.ctc-result-card p strong { white-space: nowrap; color: #665912; font-weight: 850; }
.ctc-result-card p span { min-width: 0; overflow-wrap: anywhere; }
.ctc-result-richtext { color: #30342f; font-size: 13.5px; line-height: 1.6; }
.ctc-result-richtext p { margin: 0 0 9px; }
.ctc-results-grid.is-collapsible:not(.is-expanded) .ctc-result-card:nth-child(n+7) { display: none; }
.ctc-public button.ctc-results-toggle,
.ctc-home-upcoming button.ctc-results-toggle {
  appearance: none;
  width: 100%;
  margin-top: 11px;
  padding: 9px 12px;
  border: 1px solid #ddc94d !important;
  border-radius: 9px;
  background: #fff !important;
  color: #3c371d !important;
  font-size: 11.5px;
  font-weight: 850;
  text-transform: none;
  cursor: pointer;
  box-shadow: none !important;
}
.ctc-public button.ctc-results-toggle:hover,
.ctc-home-upcoming button.ctc-results-toggle:hover { background: #f5f1d9 !important; color: #111 !important; }

/* Calendario mobile: convertir la lista mensual en una agenda compacta y escaneable. */
@media (max-width: 720px) {
  .ctc-calendar-wrap { overflow: hidden; border-radius: 12px; }
  .ctc-public .fc { font-size: 12px; }
  .ctc-public .fc .fc-header-toolbar { margin-bottom: 10px; }
  .ctc-public .fc .fc-toolbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; }
  .ctc-public .fc .fc-toolbar-title { font-size: 14px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ctc-public .fc .fc-button { min-width: 34px; min-height: 34px; padding: .45em .55em; border-radius: 9px; }
  .ctc-public .fc .fc-today-button { min-width: auto; padding-inline: 10px; }
  .ctc-public .fc-theme-standard .fc-list { border: 0; }
  .ctc-public .fc .fc-list-table { border-collapse: separate; border-spacing: 0 7px; }
  .ctc-public .fc .fc-list-day > th { border: 0; }
  .ctc-public .fc .fc-list-day-cushion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f1f2f1;
    color: #5d625f;
  }
  .ctc-public .fc .fc-list-day-text,
  .ctc-public .fc .fc-list-day-side-text { color: inherit; font-size: 11px; font-weight: 850; text-decoration: none; }
  .ctc-public .fc .fc-list-event td { border: 0; background: #fff; }
  .ctc-public .fc .fc-list-event-time { display: none; }
  .ctc-public .fc .fc-list-event-graphic { width: 24px; padding: 11px 5px 11px 10px; border-radius: 9px 0 0 9px; }
  .ctc-public .fc .fc-list-event-title { padding: 9px 10px 9px 4px; border-radius: 0 9px 9px 0; }
  .ctc-public .fc .fc-list-event:hover td { background: #f7f8f7; }
  .ctc-public .fc .fc-list-event-dot { border-width: 5px; }
  .ctc-public .fc .ctc-fc-event { gap: 3px; color: var(--ctc-ink); }
  .ctc-public .fc .ctc-fc-event strong { font-size: 12.5px; line-height: 1.25; }
  .ctc-public .fc .ctc-fc-time { display: none; }
  .ctc-public .fc .ctc-fc-result { margin-top: 2px; color: #6a5c08; font-size: 10.5px; }

  .ctc-dialog-heading + .ctc-result-box { margin-top: -5px; margin-bottom: 18px; }
  .ctc-result-box { padding: 14px; border-radius: 12px; }
  .ctc-result-head { align-items: flex-start; flex-direction: column; margin-bottom: 11px; }
  .ctc-results-grid { grid-template-columns: 1fr; gap: 7px; }
  .ctc-result-card { padding: 12px; }
  .ctc-result-card h4 { font-size: 13px; }
  .ctc-result-card p { font-size: 12px; }
}
