:root {
  --bg: #fff1f2;
  --ink: #2f1013;
  --brand: #c62020;
  --brand-dark: #951212;
  --card: #ffffff;
  --line: #efcfcf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff9f9 0%, var(--bg) 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.hero {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(60, 8, 10, 0.52);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 1rem;
}

.logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  padding: 0.5rem;
}

.hero h1 {
  margin: 0.25rem 0;
  letter-spacing: 0.06em;
  font-size: clamp(1.2rem, 3.2vw, 2rem);
}

.hero p {
  margin: 0;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
}

.layout {
  width: min(1520px, 95vw);
  margin: 1.2rem auto 2rem;
  display: grid;
  grid-template-columns: 280px minmax(660px, 860px) 320px;
  gap: 1rem;
  align-items: start;
}

.center-column {
  width: 100%;
}

.side-column {
  display: grid;
  gap: 1rem;
}

.side-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.side-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.side-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(118, 19, 19, 0.28);
}

.badge-list {
  display: grid;
  gap: 0.55rem;
}

.donation-badge {
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff8f8;
  padding: 0.45rem 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.donation-badge img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.donation-badge:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 12px 22px rgba(129, 17, 17, 0.22);
  border-color: #d15151;
  background: #fff1f1;
}

.badge-text {
  display: grid;
  gap: 0.2rem;
}

.badge-text strong {
  font-size: 0.93rem;
}

.badge-text small {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.82rem;
  color: #782020;
  transition: max-height 0.24s ease, opacity 0.24s ease;
}

.donation-badge:hover .badge-text small {
  max-height: 80px;
  opacity: 1;
}

.documents-placeholder {
  display: grid;
  gap: 0.45rem;
}

.doc-btn {
  width: 100%;
  border: 1px dashed #d0a2a2;
  border-radius: 8px;
  padding: 0.55rem;
  font-size: 0.92rem;
  color: #7f4d4d;
  background: #fff7f7;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.doc-btn:hover:not(:disabled) {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.9rem;
  margin-bottom: 0.8rem;
}

.amount-btn {
  border: 1px solid #d6aaaa;
  background: #fff7f7;
  border-radius: 8px;
  padding: 0.52rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.amount-btn:hover {
  background: #ffe9e9;
  border-color: #ca7f7f;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(152, 24, 24, 0.14);
}

.amount-btn.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.block {
  display: block;
  margin: 0.8rem 0 0.35rem;
  font-weight: 600;
}

.donor-label {
  margin-top: 0.3rem;
}

.donor-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.donor-name-col {
  display: flex;
  flex-direction: column;
}

.donor-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #d6b2b2;
  font-size: 1rem;
}

.custom-amount-label {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #851818;
}

.custom-amount-highlight {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 4px solid #c62020;
  border-radius: 12px;
  background: #fff2f2;
}

input[type="number"] {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #d6b2b2;
  font-size: 1rem;
}

.custom-amount-input {
  padding: 0.95rem 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  border: 2px solid #c62020;
  background: #fffdfd;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  margin-top: 0.8rem;
}

.checkbox-row input {
  width: auto;
}

.help {
  margin: 0.7rem 0 0;
  line-height: 1.45;
  color: #5b252a;
}

.email-note {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #6c3439;
}

.totals .line-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e6c5c5;
}

.totals .line-item.total {
  font-size: 1.1rem;
  font-weight: 800;
  border-bottom: none;
  margin-top: 0.15rem;
}

#calculation-note {
  display: block;
  margin-top: 0.45rem;
  color: #6d373b;
}

.output {
  min-height: 70px;
  white-space: pre-wrap;
  margin-top: 0.75rem;
  background: #fff8f8;
  border: 1px solid #efcdcd;
  border-radius: 8px;
  padding: 0.65rem;
}

#paypal-button-container {
  margin-top: 0.6rem;
}

.paypal-funding-slot + .paypal-funding-slot {
  margin-top: 0.55rem;
}

.payment-legal-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #5b2428;
  background: #fff5f5;
  border: 1px solid #ebcece;
  border-radius: 8px;
}

.recent-donations-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.recent-donations-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
  border-bottom: 1px dashed #e5caca;
  padding-bottom: 0.35rem;
  font-size: 0.95rem;
}

.recent-donations-list li strong {
  white-space: nowrap;
}

.privacy-note {
  margin: 0.75rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #6c3439;
}

.public-list-container {
  width: min(1100px, 94vw);
  margin: 1.2rem auto 2rem;
}

.public-list-header {
  margin-bottom: 1rem;
}

.donations-table-wrap {
  overflow-x: auto;
}

.donations-table {
  width: 100%;
  border-collapse: collapse;
}

.donations-table th,
.donations-table td {
  text-align: left;
  border-bottom: 1px solid #edd2d2;
  padding: 0.62rem 0.45rem;
}

.donations-table th {
  color: #73171c;
  font-size: 0.95rem;
}

.donations-empty {
  margin: 0;
  color: #7b474b;
}

.site-footer {
  margin-top: 0.75rem;
  padding: 1.5rem 0;
  background: #3f0e11;
  color: #ffe8e9;
}

.site-footer-inner {
  width: min(1520px, 95vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  font-size: 0.95rem;
}

.footer-left {
  display: grid;
  gap: 0.25rem;
}

.footer-center {
  display: flex;
  justify-content: center;
}

.emergency-number {
  text-align: center;
  padding: 1.5rem 2rem;
  background: rgba(255, 232, 233, 0.1);
  border-radius: 8px;
  border: 2px solid #c62020;
}

.emergency-number strong {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.emergency-phone {
  font-size: 2rem;
  font-weight: 900;
  color: #ff9999;
}

.footer-right {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  align-items: center;
}

.footer-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .donor-name-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .center-column {
    order: 1;
  }

  .left-column {
    order: 2;
  }

  .right-column {
    order: 3;
  }

  .side-column {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
