/* ============================================================
   SIB Barcelona — Aniversariantes · style.css
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f1ec;
  color: #333;
  min-height: 100vh;
}

/* ── Header ───────────────────────────────────────────────── */

header {
  background: linear-gradient(135deg, #3d3270, #6b5aad);
  color: white;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.header-cross {
  font-size: 1.6rem;
  opacity: 0.7;
  margin-bottom: 0.4rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 1.05rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

.last-update {
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 0.6rem;
}

/* ── Main layout ──────────────────────────────────────────── */

main {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Section titles ───────────────────────────────────────── */

section h2 {
  font-size: 1.3rem;
  color: #3d3270;
  border-bottom: 2px solid #c7bef0;
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
}

/* ── Sub-headers de mês ───────────────────────────────────── */

.month-header {
  font-size: 0.8rem;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  padding-left: 0.2rem;
}

/* Mês atual — mais destaque */
.month-header--current {
  font-size: 0.9rem;
  color: #3d3270;
  border-left: 3px solid #6b5aad;
  padding-left: 0.6rem;
}

/* ── Today banner ─────────────────────────────────────────── */

.today-banner {
  background: linear-gradient(135deg, #f9d423, #f5a623);
  border-radius: 14px;
  padding: 1rem 1rem 0.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 18px rgba(245, 166, 35, 0.45);
}

.today-label {
  font-size: 1rem;
  font-weight: 700;
  color: #4a2800;
  text-align: center;
  margin-bottom: 0.8rem;
  letter-spacing: 0.3px;
}

/* ── Cards (shared) ───────────────────────────────────────── */

.card {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  transition: transform 0.12s, box-shadow 0.12s;
  border-left: 4px solid #ddd;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.11);
}

/* Today card (inside golden banner) */
.today-banner .card {
  background: rgba(255, 255, 255, 0.92);
  border-left: 4px solid #c97a00;
  font-weight: 600;
}

/* This-month card */
.card.this-month {
  border-left-color: #6b5aad;
  background: #faf8ff;
}

/* Other months */
.card.other {
  border-left-color: #e0dbe8;
}

/* ── Birthday card content ────────────────────────────────── */

.card-birthday {
  justify-content: space-between;
}

.card-name {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.card-date {
  font-size: 0.9rem;
  font-weight: 700;
  color: #6b5aad;
  white-space: nowrap;
  margin-left: 1rem;
}

.today-banner .card-date {
  color: #7a4800;
}

/* ── Wedding card content ─────────────────────────────────── */

.card-wedding {
  flex-direction: column;
  align-items: stretch;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.card-top .card-name {
  /* inherited */
}

.card-bottom {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: #999;
}

.card-wedding.this-month .card-bottom {
  color: #5a48a0;
  font-weight: 600;
}

.card-wedding.today .card-bottom {
  color: #7a4800;
  font-weight: 600;
}

/* ── Loading / Error / Empty ──────────────────────────────── */

.loading, .empty, .error {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.95rem;
  color: #bbb;
}

.error {
  color: #c0392b;
  line-height: 1.6;
}

.error small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #e07060;
}

/* ── Footer ───────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #bbb;
  font-size: 0.78rem;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 560px) {
  header h1 {
    font-size: 1.55rem;
  }

  .card {
    padding: 0.75rem 1rem;
  }

  .card-name {
    font-size: 0.88rem;
  }
}
