/* ── Global ─────────────────────────────────────────────────── */
* { font-family: 'Poppins', sans-serif; box-sizing: border-box; }

.page-bg {
  background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 45%, #e8eaf6 100%);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2.5rem 3rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c2185b;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: #1f2937;
}

.hero-sub {
  font-size: 1.05rem;
  color: #6b7280;
  line-height: 1.7;
  max-width: 38ch;
}

.hero-cta {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  align-self: flex-start;
  text-decoration: none;
}

/* Portrait photo — ratio ~0.563 ≈ 9:16 */
.hero-photo-wrap {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 75vh;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(233, 30, 99, 0.22);
  justify-self: center;
  width: 100%;
}

.hero-photo-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f8bbd0 0%, #e1bee7 45%, #d1c4e9 100%);
}

/* Camera hint on placeholder */
.hero-photo-placeholder::after {
  content: '📸';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.35;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Mobile: stack, photo first */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem 1.5rem;
    gap: 2rem;
  }
  .hero-photo-wrap {
    order: -1;
    max-height: 80vw;
    aspect-ratio: 9 / 16; /* matches portrait image ratio ~0.563 */
  }
  .hero-title { font-size: 2.25rem; }
  .hero-cta   { align-self: stretch; text-align: center; }
}

/* ── Typography helpers ─────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 1.25rem;
}

/* ── Layout ─────────────────────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Photo strip ────────────────────────────────────────────── */
.photo-strip-section {
  padding: 0 0 2rem;
}

.strip-eyebrow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c2185b;
  margin-bottom: 1rem;
}

.strip-fade-wrap {
  position: relative;
  overflow: hidden;
}

/* Fade edges to match page background */
.strip-fade-wrap::before,
.strip-fade-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.strip-fade-wrap::before { left:  0; background: linear-gradient(to right, #fce4ec, transparent); }
.strip-fade-wrap::after  { right: 0; background: linear-gradient(to left,  #e8eaf6, transparent); }

.strip-track {
  overflow: hidden;
  cursor: default;
}

.strip-inner {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: strip-scroll linear infinite;
}

.strip-inner:hover { animation-play-state: paused; }

@keyframes strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.strip-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  width: 200px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.strip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(233,30,99,0.18);
}

.strip-card-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Text-only card: no image, centred content, gradient accent */
.strip-card--text {
  width: 200px;
  justify-content: center;
  background: linear-gradient(145deg, #fdf2f8, #f5f0ff);
}

.strip-card--text .strip-card-body {
  padding: 1.25rem;
}

.strip-card--text .strip-card-msg {
  color: #9d174d;
}

.strip-card-body {
  padding: 0.75rem;
  flex: 1;
}

.strip-card-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip-card-msg {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.25rem;
}

/* ── Goal card photo ────────────────────────────────────────── */
.goal-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0 0;
  position: relative;
  background: #f3f4f6;
}

.goal-photo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.goal-card:hover .goal-photo-img {
  transform: scale(1.06);
}

.goal-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.placeholder-0 { background: linear-gradient(135deg, #f48fb1, #e91e63); }
.placeholder-1 { background: linear-gradient(135deg, #ce93d8, #9c27b0); }
.placeholder-2 { background: linear-gradient(135deg, #9fa8da, #3f51b5); }
.placeholder-3 { background: linear-gradient(135deg, #ffcc80, #ff9800); }

.goal-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Goals grid ─────────────────────────────────────────────── */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.goal-card {
  background: white;
  border-radius: 1.25rem;
  padding: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.goal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(233,30,99,0.18);
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar-fill {
  background: linear-gradient(90deg, #e91e63, #9c27b0);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* ── Buttons ────────────────────────────────────────────────── */
.donate-btn {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  box-shadow: 0 4px 14px rgba(233,30,99,0.3);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  cursor: pointer;
  border: none;
  text-align: center;
  display: inline-block;
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233,30,99,0.4);
  filter: brightness(1.05);
}

.btn-danger {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover { background: #ffe4e6; }

/* ── Floating birthday emoji ────────────────────────────────── */
@keyframes float {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-14px) rotate(3deg); }
}
.float-emoji { animation: float 3.5s ease-in-out infinite; }

/* ── Confetti background dots ───────────────────────────────── */
.confetti-dots {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  z-index: 0;
}
.confetti-dots::before,
.confetti-dots::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  opacity: 0.06;
}
.confetti-dots::before {
  background: radial-gradient(circle, #e91e63 0%, transparent 70%);
  top: -120px; right: -80px;
}
.confetti-dots::after {
  background: radial-gradient(circle, #9c27b0 0%, transparent 70%);
  bottom: -100px; left: -60px;
}

/* ── Donations sidebar ──────────────────────────────────────── */
.donations-sidebar {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  overflow: hidden;
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}

/* ── IBAN card ──────────────────────────────────────────────── */
.iban-card {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(135deg, #fdf2f8, #f5f0ff);
}

.iban-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9d174d;
  margin-bottom: 0.3rem;
}

.iban-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.04em;
  font-family: 'Courier New', monospace;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.iban-copy-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e91e63;
  background: white;
  border: 1.5px solid #f9a8d4;
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.iban-copy-btn:hover { background: #fce7f3; }
.iban-copy-btn.copied { color: #16a34a; border-color: #86efac; background: #f0fdf4; }

.panel-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
}

/* The HTMX swap target must relay the flex chain down to the list */
#donations-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.donations-list {
  list-style: none;
  margin: 0; padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.donations-list::-webkit-scrollbar { width: 5px; }
.donations-list::-webkit-scrollbar-track { background: #f9fafb; }
.donations-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e91e63, #9c27b0);
  border-radius: 3px;
}

.donation-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f9fafb;
  transition: background 0.15s;
}
.donation-item:hover { background: #fdf2f8; }
.donation-item:last-child { border-bottom: none; }

.donation-avatar {
  width: 2.5rem; height: 2.5rem; min-width: 2.5rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: white;
  overflow: hidden;
}

.donation-photo { object-fit: cover; }

.avatar-0 { background: linear-gradient(135deg, #e91e63, #c2185b); }
.avatar-1 { background: linear-gradient(135deg, #9c27b0, #7b1fa2); }
.avatar-2 { background: linear-gradient(135deg, #2196f3, #1565c0); }
.avatar-3 { background: linear-gradient(135deg, #ff9800, #e65100); }
.avatar-4 { background: linear-gradient(135deg, #4caf50, #2e7d32); }
.avatar-5 { background: linear-gradient(135deg, #00bcd4, #00838f); }

.donation-badge {
  background: linear-gradient(135deg, #fce4ec, #f3e5f5);
  color: #c2185b;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fade-in 0.2s ease;
}

.modal-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  animation: slide-up 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.warning-box {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #7c6000;
}

/* ── Form inputs ────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  color: #1f2937;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233,30,99,0.1);
}

/* ── Toggle switch ──────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #e5e7eb;
  border-radius: 9999px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #e91e63, #9c27b0);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Admin table ────────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table thead {
  background: #fdf2f8;
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #9d174d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}

.admin-table tbody tr:hover { background: #fdf2f8; }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ── Confetti (merci page) ──────────────────────────────────── */
#confetti-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(0)     rotate(0deg);   opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}
