/* ═══════════════════════════════════════════
   DCER CAPIXABA – PÁGINA DE PROGRAMAÇÕES
═══════════════════════════════════════════ */

/* ── Page Hero ── */
.prog-hero {
  background: linear-gradient(135deg, #001a5e 0%, #0047CC 55%, #002F8A 100%);
  padding: 120px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.prog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.prog-hero-tag {
  display: inline-block;
  border: 1.5px solid rgba(245,184,0,.5); color: var(--gold);
  font-size: .75rem; font-weight: 700; letter-spacing: 3px;
  padding: 6px 18px; border-radius: 50px; margin-bottom: 18px;
  position: relative; z-index: 1;
}
.prog-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900; color: #fff; margin-bottom: 12px;
  position: relative; z-index: 1;
}
.prog-hero h1 span { color: var(--gold); }
.prog-hero p {
  color: rgba(255,255,255,.75); font-size: .95rem;
  max-width: 500px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* ── Filter Tabs ── */
.prog-filter-bar {
  background: #fff;
  border-bottom: 1px solid rgba(0,71,204,.08);
  padding: 0 24px;
  position: sticky; top: 68px; z-index: 99;
  box-shadow: 0 2px 8px rgba(0,71,204,.06);
}
.prog-filter-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; gap: 2px;
}
.prog-filter-btn {
  padding: 16px 20px;
  font-size: .88rem; font-weight: 700; font-family: inherit;
  color: var(--gray); background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .2s; white-space: nowrap;
}
.prog-filter-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.prog-filter-btn:hover  { color: var(--blue); }

/* ── Main Layout ── */
.prog-body { background: var(--blue-bg); padding: 32px 0 80px; }
.prog-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* ── Calendar ── */
.prog-calendar {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cal-header {
  background: var(--blue);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
}
.cal-nav {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: .88rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.cal-nav:hover { background: rgba(255,255,255,.3); }
.cal-title { text-align: center; }
.cal-month-name { font-size: 1.1rem; font-weight: 800; letter-spacing: .5px; }
.cal-year-label { font-size: .82rem; font-weight: 600; opacity: .75; margin-left: 6px; }

.cal-legend {
  display: flex; gap: 20px; padding: 12px 20px 10px;
  border-bottom: 1px solid var(--blue-bg);
  flex-wrap: wrap;
}
.cal-legend-item { display: flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--gray); }
.cal-legend-dot  { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.dot-est { background: var(--gold); }
.dot-mun { background: var(--blue); }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--blue-bg);
}
.cal-wd {
  text-align: center; padding: 9px 4px;
  font-size: .7rem; font-weight: 700;
  color: var(--blue); letter-spacing: .5px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-day {
  min-height: 68px; padding: 7px 5px 5px;
  border: 1px solid #f0f4ff;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: background .15s; cursor: default;
}
.cal-day:not(.empty):hover { background: var(--blue-bg); cursor: pointer; }
.cal-day.empty { background: #fafbff; }

.day-num {
  font-size: .83rem; font-weight: 700; color: var(--dark);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-day.empty .day-num { color: #cbd5e1; font-weight: 400; }
.cal-day.today .day-num { background: var(--blue); color: #fff; }

.event-chip {
  font-size: .58rem; font-weight: 700;
  padding: 2px 6px; border-radius: 50px;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%;
  line-height: 1.5;
}
.chip-estadual { background: #FEF3C7; color: #92400E; border: 1px solid #F5B800; }
.chip-municipal { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }

/* ── Próximos Meses ── */
.prox-meses {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px 20px;
  margin-top: 18px;
}
.prox-meses h4 {
  font-size: .72rem; font-weight: 700; color: var(--gray);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.prox-meses-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.prox-mes-card {
  flex: 1; min-width: 130px;
  border-radius: 10px; padding: 10px 14px;
}
.prox-mes-card.estadual { background: #FEF9E7; border: 1px solid #F5B800; }
.prox-mes-card.municipal { background: var(--blue-bg); border: 1px solid #93C5FD; }
.prox-mes-card.vazio { background: var(--gray-light); border: 1px solid #e2e8f0; }
.prox-mes-label { font-size: .68rem; font-weight: 700; color: var(--gray); margin-bottom: 5px; }
.prox-mes-item  { display: flex; align-items: flex-start; gap: 6px; }
.prox-mes-dot   { width: 7px; height: 7px; border-radius: 2px; margin-top: 4px; flex-shrink: 0; }
.prox-mes-item span { font-size: .78rem; color: var(--dark); line-height: 1.4; }

/* ── Sidebar ── */
.prog-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 120px; }

.side-card {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px 20px;
}
.side-card-title {
  font-size: .9rem; font-weight: 800; color: var(--blue);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

/* ── Destaque próximo evento ── */
.next-highlight {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 16px; padding: 20px;
  color: #fff; text-align: center;
}
.nh-label { font-size: .65rem; font-weight: 700; letter-spacing: 2px; opacity: .7; margin-bottom: 6px; }
.nh-tipo  {
  display: inline-block; font-size: .7rem; font-weight: 800;
  padding: 3px 12px; border-radius: 50px; margin-bottom: 8px;
}
.nh-tipo.est { background: var(--gold); color: var(--dark); }
.nh-tipo.mun { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.nh-nome { font-size: 1rem; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
.nh-local { font-size: .8rem; opacity: .8; display: flex; align-items: center; justify-content: center; gap: 4px; }
.nh-countdown {
  background: rgba(255,255,255,.12); border-radius: 10px;
  padding: 10px 0; margin-top: 14px;
}
.nh-countdown strong { font-size: 1.8rem; font-weight: 900; display: block; line-height: 1; }
.nh-countdown span   { font-size: .72rem; opacity: .8; }
.nh-empty { opacity: .7; font-size: .88rem; padding: 8px 0; }

/* ── Agenda lista ── */
.agenda-item {
  display: flex; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--blue-bg);
  cursor: default; transition: background .15s;
}
.agenda-item:last-child { border-bottom: none; padding-bottom: 0; }

.agenda-date {
  width: 44px; flex-shrink: 0; text-align: center;
  border-radius: 10px; padding: 6px 4px; line-height: 1.2;
}
.agenda-date .ad-day { font-size: 1.2rem; font-weight: 900; display: block; }
.agenda-date .ad-mon { font-size: .62rem; font-weight: 700; text-transform: uppercase; display: block; }
.agenda-date.mun { background: #DBEAFE; }
.agenda-date.mun .ad-day { color: #1E40AF; }
.agenda-date.mun .ad-mon { color: var(--gray); }
.agenda-date.est { background: #FEF3C7; }
.agenda-date.est .ad-day { color: var(--gold-dark); }
.agenda-date.est .ad-mon { color: var(--gray); }

.agenda-info { flex: 1; min-width: 0; }
.agenda-badge {
  display: inline-block; font-size: .6rem; font-weight: 800;
  padding: 2px 8px; border-radius: 50px;
  margin-bottom: 3px; letter-spacing: .4px;
}
.badge-est { background: #FEF3C7; color: #92400E; border: 1px solid #F5B800; }
.badge-mun { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.agenda-info h4 { font-size: .84rem; font-weight: 700; color: var(--dark); margin-bottom: 2px; line-height: 1.3; }
.agenda-info p  { font-size: .73rem; color: var(--gray); display: flex; align-items: center; gap: 4px; }

/* ── Legenda card ── */
.legend-card-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px; margin-bottom: 8px;
}
.legend-card-item:last-child { margin-bottom: 0; }
.legend-card-item.est { background: #FEF9E7; border: 1px solid #F5B800; }
.legend-card-item.mun { background: var(--blue-bg); border: 1px solid #93C5FD; }
.legend-card-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0; color: #fff;
}
.legend-card-icon.est { background: var(--gold); }
.legend-card-icon.mun { background: var(--blue); }
.legend-card-item strong { display: block; font-size: .84rem; color: var(--dark); }
.legend-card-item span   { font-size: .74rem; color: var(--gray); }

/* ── Modal evento ── */
.prog-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.prog-modal.hidden { display: none; }
.prog-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,15,60,.6); backdrop-filter: blur(4px);
}
.prog-modal-card {
  position: relative; z-index: 1;
  background: #fff; border-radius: 20px;
  padding: 28px; max-width: 460px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { opacity:0; transform: translateY(-12px); } to { opacity:1; transform: translateY(0); } }
.prog-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prog-modal-header h3 { font-size: 1rem; font-weight: 800; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.prog-modal-close { background: none; border: none; cursor: pointer; color: var(--gray); font-size: 1.1rem; }
.prog-modal-tipo  {
  display: inline-block; font-size: .72rem; font-weight: 800;
  padding: 4px 14px; border-radius: 50px; margin-bottom: 10px;
}
.prog-modal-nome { font-size: 1.1rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.prog-modal-info  { font-size: .88rem; color: var(--gray); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .prog-grid { grid-template-columns: 1fr; }
  .prog-sidebar { position: static; }
}
@media (max-width: 600px) {
  .cal-day { min-height: 52px; padding: 4px 2px; }
  .event-chip { font-size: .52rem; }
  .prog-hero { padding: 100px 16px 48px; }
  .prog-filter-btn { padding: 14px 12px; font-size: .8rem; }
}
