/* Central Musical: estilos do módulo. Reaproveita as cores e os componentes do app.css (prefixo cm-). */
.cm-view { padding-bottom: 8px; }
.cm-icon { flex: 0 0 auto; vertical-align: -.2em; }
.cm-muted { color: var(--muted); }
.cm-eyebrow { display: block; color: #7a8180; font-size: 10px; font-weight: 700; letter-spacing: .9px; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cm-link { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; }
.cm-link:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.cm-heading { margin-bottom: 22px; }
.cm-heading h1[tabindex="-1"]:focus, .cm-article h1[tabindex="-1"]:focus { outline: none; }

/* Início */
.cm-view .home-hero-copy .cm-actions { margin-top: 22px; }
.cm-view .area-grid { max-width: none; margin-bottom: 20px; }
.cm-event { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; padding: 16px 20px; border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 8px; color: inherit; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.cm-event:hover { border-color: #aeb6b3; }
.cm-event > span:nth-child(2) { flex: 1; min-width: 0; }
.cm-event strong { display: block; margin: 3px 0 2px; font-family: Manrope, sans-serif; font-size: 17px; }
.cm-event small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.cm-date { display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 58px; border-radius: 9px; color: var(--green-dark); background: var(--green-pale); text-align: center; }
.cm-date strong { margin: 0; font-size: 22px; line-height: 1; }
.cm-date small { margin-top: -6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.cm-section-heading { margin-top: 8px; }

/* Filtros */
.cm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.cm-search { flex: 1 1 280px; height: 41px; }
.cm-search input { font-size: 13px; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-chip { display: inline-flex; align-items: center; min-height: 37px; padding: 0 14px; border: 1px solid #d7dad6; border-radius: 999px; color: #424a4b; background: var(--surface); font-size: 12px; font-weight: 700; text-decoration: none; }
.cm-chip:hover { border-color: #aeb5b2; background: #f5f5f1; }
.cm-chip.selected { border-color: var(--green); color: #fff; background: var(--green); }
.cm-select { width: auto; min-width: 170px; min-height: 41px; font-size: 13px; }
.cm-count { margin: 6px 0 14px; color: var(--muted); font-size: 12px; }
.cm-clear { margin-top: 14px; }
.cm-more { display: flex; justify-content: center; margin: 22px 0 8px; }

/* Ensaios: alternância Por dia / Por setor e grupos por horário */
.cm-segmented { display: inline-flex; gap: 3px; margin: 4px 0 14px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cm-segmented button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 8px; color: #566061; background: transparent; font-size: 13px; font-weight: 700; transition: background .15s, color .15s; }
.cm-segmented button:hover { background: var(--green-pale); }
.cm-segmented button.selected { color: #fff; background: var(--green); box-shadow: 0 2px 7px rgba(36, 44, 44, .18); }
.cm-slot-chips { margin-bottom: 18px; }
.cm-chip { gap: 8px; }
.cm-count-badge { min-width: 20px; padding: 1px 6px; border-radius: 10px; color: #5b6566; background: #e6e8e4; font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.cm-chip.selected .cm-count-badge { color: var(--green-dark); background: rgba(255, 255, 255, .85); }
.cm-chip-soon:not(.selected) { border-color: #c9b77a; background: #fbf5de; color: #6a5008; }
.cm-chip-soon:not(.selected) .cm-count-badge { background: #efe2ae; color: #6a5008; }
.cm-slot { margin-bottom: 22px; }
.cm-slot-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 2px solid var(--green-pale); }
.cm-slot-head h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 19px; letter-spacing: -.3px; }
.cm-slot-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.cm-slot-head p strong { color: var(--ink); text-transform: capitalize; }
.cm-when { padding: 5px 11px; border-radius: 999px; color: #566061; background: #e6e8e4; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cm-when-soon { color: #6a5008; background: #fbf0c4; }
.cm-when-today { color: #fff; background: var(--green); }
.cm-slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 8px; }
.cm-slot-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid #e0e1dc; border-radius: 8px; color: inherit; background: var(--surface); text-decoration: none; font-size: 14px; transition: border-color .15s, background .15s, transform .15s; }
.cm-slot-item:hover { transform: translateY(-1px); border-color: var(--green); background: #fff; }
.cm-slot-item:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.cm-slot-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.cm-time { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--green-dark); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-slot-tag { padding: 2px 8px; border-radius: 6px; color: #566061; background: #e9ebe8; font-size: 11px; font-weight: 700; }

/* Cartões e listas */
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; margin-bottom: 18px; }
.cm-list { display: grid; gap: 10px; }
.cm-notice, .cm-row, .cm-church, .cm-aside, .cm-contact { min-height: 0; }
.cm-notice { display: flex; flex-direction: column; gap: 9px; padding: 18px; }
.cm-notice h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 16px; line-height: 1.3; }
.cm-notice h3 a, .cm-row h3 a, .cm-church h3 a { color: inherit; text-decoration: none; }
.cm-notice h3 a:hover, .cm-row h3 a:hover, .cm-church h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cm-notice p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cm-notice .cm-link { margin-top: auto; padding-top: 4px; }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.cm-tag { padding: 3px 9px; border-radius: 12px; color: #384243; background: #e6e8e4; font-size: 11px; font-weight: 700; }
.cm-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; }
.cm-row h3 { margin: 3px 0 0; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.cm-row p { margin: 4px 0 0; font-size: 13px; }
.cm-icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--green); text-decoration: none; }
.cm-icon-link:hover { background: var(--green-pale); }
.cm-church { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cm-church-image { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 148px; height: 148px; overflow: hidden; color: #9aa3a1; background: var(--green-pale); }
.cm-church-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cm-church-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 15px 16px 16px; }
.cm-church-body h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 16px; line-height: 1.3; }
.cm-church-body p { margin: 0; font-size: 13px; line-height: 1.45; }
.cm-church-body .cm-link { margin-top: auto; padding-top: 6px; }

/* Rodapé do módulo */
.cm-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 26px 5.3% 0; padding: 14px 0 22px; border-top: 1px solid var(--line); color: #858b89; font-size: 12px; }
.cm-footer a { color: inherit; }

/* Calendário */
.cm-calendar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 14px; }
.cm-calendar-main, .cm-aside { padding: 20px; }
.cm-calendar-main:hover, .cm-aside:hover, .cm-prose:hover, .cm-contact:hover { transform: none; box-shadow: var(--shadow); border-color: #e0e1dc; }
.cm-calendar-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cm-calendar-head h2, .cm-aside h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 18px; }
.cm-calendar-main .cm-actions { margin-bottom: 4px; }
.cm-calendar-text { margin-top: 16px; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.cm-calendar-image { display: block; width: 100%; height: auto; margin-top: 16px; border-radius: 8px; }
.cm-fine-print { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.cm-aside h2 { margin-bottom: 10px; }
.cm-agenda-item { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; }
.cm-agenda-item > span { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-agenda-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cm-aside .cm-link { margin-top: 10px; }

/* Detalhe */
.cm-article { max-width: 900px; }
.cm-back { margin-bottom: 14px; }
.cm-article-heading { margin-bottom: 18px; }
.cm-article-heading h1 { margin: 10px 0 8px; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; text-wrap: balance; }
.cm-article-heading .page-description { font-size: 14px; line-height: 1.5; }
.cm-photo { margin: 0 0 16px; overflow: hidden; border-radius: 10px; background: var(--green-pale); }
.cm-photo img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.cm-highlight { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 8px; background: var(--surface); }
.cm-highlight strong { display: block; margin-top: 3px; font-size: 15px; }
.cm-source { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.cm-contact { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px; }
.cm-contact h2 { margin: 0 0 4px; font-size: 17px; }
.cm-contact p { margin: 0; color: var(--muted); font-size: 13px; }

/* Texto vindo do site (Markdown) */
.cm-prose { padding: 22px 24px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.cm-prose > :first-child { margin-top: 0; }
.cm-prose > :last-child { margin-bottom: 0; }
.cm-prose h1, .cm-prose h2, .cm-prose h3, .cm-prose h4 { margin: 1.4em 0 .5em; font-family: Manrope, sans-serif; line-height: 1.3; }
.cm-prose h1 { font-size: 24px; } .cm-prose h2 { font-size: 20px; } .cm-prose h3 { font-size: 17px; } .cm-prose h4 { font-size: 15px; }
.cm-prose p { margin: 0 0 1em; }
.cm-prose ul, .cm-prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.cm-prose li + li { margin-top: .3em; }
.cm-prose a { color: var(--green); text-underline-offset: 3px; }
.cm-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.cm-prose hr { margin: 1.4em 0; border: 0; border-top: 1px solid var(--line); }
.cm-prose table { display: block; width: 100%; margin: 0 0 1em; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.cm-prose th, .cm-prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.cm-prose th { background: var(--green-pale); }

@media (max-width: 1100px) {
  .cm-calendar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  /* A barra inferior do módulo tem mais itens: rola na horizontal em vez de espremer os rótulos. */
  .main-nav-scroll { overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .main-nav-scroll::-webkit-scrollbar { display: none; }
  .main-nav-scroll .nav-link { flex: 0 0 auto; width: auto; min-width: 78px; white-space: nowrap; }
}

@media (max-width: 640px) {
  .cm-row { grid-template-columns: 34px minmax(0, 1fr); }
  .cm-row .cm-icon-link { grid-column: 2; justify-self: start; width: auto; padding: 0 12px; }
  .cm-contact { grid-template-columns: minmax(0, 1fr); }
  .cm-contact .button { justify-self: start; }
  .cm-prose { padding: 16px; }
  .cm-select, .cm-chip { min-height: 44px; }
  .cm-search input { font-size: 16px; }
  .cm-event { flex-wrap: wrap; }
}

/* Aplicativo: botões em forma de link sem sublinhado */
.cm-actions a.button, .cm-contact a.button, .cm-more .button { text-decoration: none; }
