/* Agenda e lembretes: extensão da identidade preto, dourado e luz. */
.events-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(224, 201, 121, 0.18), transparent 28rem),
    linear-gradient(180deg, #fbfaf6 0%, #f5f0e4 100%);
}

.events-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(200, 164, 75, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(200, 164, 75, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

.events-section .container { position: relative; }

.events-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}

.event-highlight-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  min-height: 178px;
  padding: 1.3rem;
  color: #fff;
  background: linear-gradient(145deg, #171a21, #07090d);
  border: 1px solid rgba(224, 201, 121, 0.4);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(9, 11, 15, 0.16);
  overflow: hidden;
}

.event-highlight-card::after {
  content: '';
  position: absolute;
  right: -4rem;
  bottom: -5.5rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 201, 121, 0.22), transparent 68%);
  pointer-events: none;
}

.event-date {
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 52px;
  padding: 0.55rem 0.5rem;
  color: #17120a;
  background: linear-gradient(135deg, #fff5c8, #d2a946);
  border-radius: 11px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.6);
}

.event-card-body { min-width: 0; }
.event-category {
  display: block;
  margin-bottom: 0.25rem;
  color: #e0c979;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.event-card-body h3,
.event-card-body h4 {
  margin: 0;
  color: inherit;
  font-family: var(--font-display);
  line-height: 1.25;
}
.event-card-body h3 { font-size: 1.18rem; }
.event-card-body h4 { font-size: 1rem; }

.event-calendar-link {
  grid-column: 1 / -1;
  z-index: 1;
  align-self: end;
  color: #fff5c8;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 180ms ease;
}
.event-calendar-link:hover { color: #fff; }

.events-empty {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(200, 164, 75, 0.2);
  border-radius: 14px;
}

.reminder-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(285px, 0.9fr);
  gap: 1.25rem;
  align-items: center;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  color: #fff;
  background: radial-gradient(circle at 88% 16%, rgba(224, 201, 121, 0.28), transparent 16rem), linear-gradient(125deg, #06080c 0%, #1b1d25 100%);
  border: 1px solid rgba(224, 201, 121, 0.38);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(8, 10, 14, 0.18);
}

.reminder-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #17120a;
  background: var(--gradient-gold);
  border-radius: 50%;
  font-size: 1.55rem;
  box-shadow: 0 6px 22px rgba(224, 201, 121, 0.28);
}

.reminder-copy .section-tag { margin-bottom: 0.25rem; }
.reminder-copy h3 {
  margin: 0 0 0.36rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.15;
}
.reminder-copy p { color: rgba(255, 255, 255, 0.76); font-size: 0.94rem; line-height: 1.55; }

.reminder-controls { display: flex; flex-wrap: wrap; gap: 0.65rem 0.9rem; align-items: center; justify-content: flex-start; }
.reminder-choice { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255, 255, 255, 0.9); font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.reminder-choice input { width: 1rem; height: 1rem; accent-color: #d2a946; }
.reminder-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; width: 100%; }
.reminder-actions .btn { min-height: 42px; padding: 0.65rem 1rem; font-size: 0.87rem; }
.btn-reminder-secondary { color: #fff5c8; background: transparent; border: 1px solid rgba(255, 245, 200, 0.5); }
.btn-reminder-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.reminder-status { width: 100%; color: rgba(255, 255, 255, 0.68); font-size: 0.79rem; line-height: 1.45; }
.reminder-status[data-state='error'] { color: #ffd2c5; }
.reminder-status[data-state='success'] { color: #f3dfa0; }
.events-agenda { padding: clamp(1.2rem, 3vw, 2rem); background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(200, 164, 75, 0.22); border-radius: 20px; box-shadow: 0 18px 38px rgba(44, 34, 12, 0.08); }
.events-agenda-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(200, 164, 75, 0.22); }
.events-agenda-heading .section-tag { margin-bottom: 0.28rem; }
.events-agenda-heading h3 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.32rem, 2.4vw, 1.8rem); line-height: 1.2; }
.events-count { flex: 0 0 auto; padding: 0.36rem 0.65rem; color: #725213; background: #fbf1d1; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.events-months { display: grid; gap: 0.7rem; }

.events-month { overflow: hidden; border: 1px solid rgba(200, 164, 75, 0.2); border-radius: 12px; background: rgba(255, 255, 255, 0.7); }
.events-month summary { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 1rem 1.1rem; list-style: none; cursor: pointer; font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; font-weight: 700; }
.events-month summary::-webkit-details-marker { display: none; }
.events-month summary small { position: relative; padding-right: 1.2rem; color: #87631d; font-family: var(--font-body); font-size: 0.75rem; font-weight: 800; }
.events-month summary small::after { content: '+'; position: absolute; right: 0; font-size: 1.1rem; line-height: 0.75; }
.events-month[open] summary { color: #715113; background: #fff8e7; }
.events-month[open] summary small::after { content: '−'; }
.events-month-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding: 0 0.9rem 0.9rem; }
.event-card { display: grid; grid-template-columns: auto 1fr; gap: 0.72rem; padding: 0.85rem; border: 1px solid rgba(200, 164, 75, 0.16); border-radius: 10px; background: #fff; }
.event-card .event-date { min-width: 61px; min-height: 48px; font-size: 0.82rem; }
.event-card .event-calendar-link { grid-column: 2; color: #87631d; font-size: 0.8rem; }
.event-card .event-calendar-link:hover { color: #17120a; }

@media (max-width: 850px) {
  .events-featured { grid-template-columns: 1fr; }
  .event-highlight-card { min-height: 0; }
  .reminder-card { grid-template-columns: auto 1fr; }
  .reminder-controls { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .events-section::before { background-size: 28px 28px; }
  .reminder-card { grid-template-columns: 1fr; gap: 0.8rem; border-radius: 16px; }
  .reminder-icon { width: 46px; height: 46px; }
  .events-agenda { padding: 1rem; border-radius: 15px; }
  .events-agenda-heading { align-items: flex-start; flex-direction: column; }
  .events-month summary { padding: 0.9rem; font-size: 1.04rem; }
  .events-month-list { grid-template-columns: 1fr; padding: 0 0.68rem 0.68rem; }
  .event-highlight-card { padding: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .event-calendar-link, .btn-reminder-secondary { transition: none; }
}
