[hidden] {
  display: none !important;
}

/* ── Shell principal: calendário esquerda + painel direita ── */

.cal-shell {
  display: grid;
  grid-template-columns: 316px 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 40px;
}

.cal-widget {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: var(--branco);
  border: 1.5px solid rgba(136, 105, 46, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--sombra-media);
  overflow: hidden;
  flex-shrink: 0;
}

.cal-widget-inner {
  padding: 18px 16px 14px;
}

/* Header: botões navegar + mês/ano */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 6px;
}

#cal-mes-ano {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  color: var(--marrom-escuro);
  font-weight: 700;
  text-align: center;
  flex: 1;
  line-height: 1.2;
}

.cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(136, 105, 46, 0.22);
  background: var(--fundo-claro);
  color: var(--marrom);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.cal-nav-btn:hover {
  background: var(--amarelo);
  border-color: var(--amarelo);
  color: var(--marrom-escuro);
  transform: scale(1.1);
}

/* Grade de dias */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* Cabeçalho: Dom Seg Ter … */
.cal-dow {
  text-align: center;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--marrom);
  opacity: 0.5;
  padding: 2px 0 6px;
}

/* Célula de dia */
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: default;
  transition: background 0.16s, transform 0.14s;
  padding: 0;
  min-width: 0;
}

.cal-day--vazio {
  pointer-events: none;
}

.cal-day[disabled] {
  opacity: 0.28;
  cursor: not-allowed;
}

.cal-day.has-event {
  cursor: pointer;
}

.cal-day.has-event:hover {
  background: var(--amarelo-pastel);
  transform: scale(1.1);
}

/* Hoje */
.cal-day.today::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 6px;
  border: 2px solid var(--amarelo);
  pointer-events: none;
}

/* Selecionado */
.cal-day.selected {
  background: var(--amarelo) !important;
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(242, 190, 44, 0.45);
}

.cal-day.selected .cal-day-num {
  color: var(--marrom-escuro);
  font-weight: 700;
}

.cal-day.selected .cal-dot {
  background: var(--marrom-escuro);
}

.cal-day-num {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--marrom-escuro);
  line-height: 1;
}

/* Ponto de evento */
.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--marrom);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Lista de eventos do dia (múltiplos no mesmo dia) */
.cal-events-list {
  display: none;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  border-top: 1.5px solid rgba(136, 105, 46, 0.12);
  padding-top: 8px;
  animation: fadeUp 0.2s ease both;
}

.cal-events-list.visible {
  display: flex;
}

.cal-ev-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s;
  width: 100%;
  border-left: 3px solid transparent;
}

.cal-ev-item:hover {
  background: var(--fundo-claro);
}

.cal-ev-item.ativo {
  background: var(--amarelo-pastel);
  border-left-color: var(--amarelo);
}

.cal-ev-item-nome {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--marrom-escuro);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-ev-item-hora {
  font-size: 0.62rem;
  background: rgba(242, 190, 44, 0.3);
  color: var(--marrom-escuro);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.cal-ev-item-fotos {
  font-size: 0.58rem;
  color: var(--marrom);
  opacity: 0.55;
  flex-shrink: 0;
}

/* Rodapé do widget: legenda de cores */
.cal-legenda {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid rgba(136, 105, 46, 0.1);
  background: var(--fundo-claro);
}

.cal-legenda-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.55rem;
  color: var(--marrom);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  opacity: 0.75;
}

.cal-legenda-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-legenda-dot--evento {
  background: var(--marrom);
}

.cal-legenda-dot--hoje {
  border: 2px solid var(--amarelo);
  background: transparent;
}

.cal-legenda-dot--sel {
  background: var(--amarelo);
}

/* ─────────────────────────────────────────────────────────
   COLUNA DIREITA: programação + painel de fotos
───────────────────────────────────────────────────────── */
.cal-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Card da programação mensal ── */
.cal-prog-card {
  background: var(--branco);
  border: 1.5px solid rgba(136, 105, 46, 0.15);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--sombra-leve);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Carrossel da programação (uma ou várias imagens) */
.cal-prog-carousel {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.cal-prog-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cal-prog-carousel .cal-prog-thumb {
  position: absolute;
  inset: 0;
}

.cal-prog-thumb:hover {
  transform: scale(1.06);
  box-shadow: var(--sombra-media);
}

/* Setas de navegação do carrossel */
.cal-prog-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--marrom-escuro);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: background 0.16s, transform 0.16s;
  z-index: 2;
}

.cal-prog-nav:hover {
  background: var(--amarelo);
  transform: translateY(-50%) scale(1.12);
}

.cal-prog-prev {
  left: -10px;
}

.cal-prog-next {
  right: -10px;
}

/* Contador "1/3" */
.cal-prog-counter {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 2;
  pointer-events: none;
}

.cal-prog-info h4 {
  font-family: "Playfair Display", serif;
  font-size: 0.92rem;
  color: var(--marrom-escuro);
  margin-bottom: 4px;
}

.cal-prog-info h4 em {
  color: var(--marrom);
  font-style: italic;
}

.cal-prog-info p {
  font-size: 0.76rem;
  color: var(--marrom-escuro);
  line-height: 1.5;
  margin-bottom: 8px;
  opacity: 0.8;
}

.cal-prog-info .insta-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--marrom);
  border: 1px solid rgba(136, 105, 46, 0.25);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.18s;
}

.cal-prog-info .insta-link:hover {
  background: var(--amarelo-pastel);
  border-color: var(--amarelo);
  color: var(--marrom-escuro);
}

/* ── Painel de fotos ── */
.cal-panel {
  background: var(--branco);
  border: 1.5px solid rgba(136, 105, 46, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--sombra-leve);
  overflow: hidden;
  min-height: 280px;
  transition: box-shadow 0.3s;
}

.cal-panel:hover {
  box-shadow: var(--sombra-media);
}

/* Header do painel */
#panel-header {
  padding: 20px 22px 0;
  border-bottom: 1px solid rgba(136, 105, 46, 0.08);
  padding-bottom: 14px;
  margin-bottom: 0;
}

#panel-titulo {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  color: var(--marrom-escuro);
  margin-bottom: 6px;
  line-height: 1.25;
}

#panel-meta {
  font-size: 0.8rem;
  color: var(--marrom-escuro);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  opacity: 0.88;
}

.panel-meta-sep {
  opacity: 0.35;
}

.panel-meta-hora {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--amarelo);
  color: var(--marrom-escuro);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
}

.panel-meta-desc {
  opacity: 0.7;
  font-style: italic;
}

/* Grade de fotos */
#panel-fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  padding: 18px 22px 22px;
  animation: fadeUp 0.3s ease both;
}

/* Loading */
#panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 12px;
  color: var(--marrom);
  opacity: 0.55;
  font-size: 0.82rem;
}

.cal-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(242, 190, 44, 0.2);
  border-top-color: var(--amarelo);
  border-radius: 50%;
  animation: calSpin 0.7s linear infinite;
}

@keyframes calSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Estado: sem fotos */
#panel-sem-fotos {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 10px;
  padding: 40px 20px;
  color: var(--marrom-escuro);
  opacity: 0.5;
  text-align: center;
}

#panel-sem-fotos .material-symbols-outlined {
  font-size: 2.4rem;
  color: var(--amarelo);
  opacity: 0.9;
}

#panel-sem-fotos p {
  font-size: 0.85rem;
}

/* Placeholder: selecione um evento */
#panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 12px;
  color: var(--marrom-escuro);
  opacity: 0.32;
  padding: 40px;
  text-align: center;
}

#panel-placeholder .material-symbols-outlined {
  font-size: 3.2rem;
  color: var(--amarelo);
  opacity: 0.6;
}

#panel-placeholder p {
  font-size: 0.86rem;
  line-height: 1.65;
}

/* ── Responsivo ── */
@media (max-width: 1060px) {
  .cal-shell {
    grid-template-columns: 280px 1fr;
    gap: 22px;
  }
}

@media (max-width: 860px) {
  .cal-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cal-widget {
    position: static;
  }

  /* Calendário centralizado em mobile */
  .cal-widget-inner {
    max-width: 340px;
    margin: 0 auto;
  }
}

@media (max-width: 540px) {
  .cal-prog-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .cal-prog-carousel {
    width: 100%;
    height: 200px;
  }

  .cal-prog-thumb {
    width: 100%;
    height: 200px;
    border-radius: calc(var(--radius) - 4px);
  }

  .cal-prog-prev {
    left: 8px;
  }

  .cal-prog-next {
    right: 8px;
  }

  .cal-prog-nav {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
  }

  #panel-fotos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
  }

  #panel-header {
    padding: 14px 14px 10px;
  }

  #panel-titulo {
    font-size: 1.1rem;
  }
}

@media (max-width: 360px) {
  .cal-day-num {
    font-size: 0.68rem;
  }

  .cal-dow {
    font-size: 0.5rem;
  }

  .cal-grid {
    gap: 1px;
  }
}