/* Main site styles */
@font-face {
  font-family: "CampaignFont";
  src: url("../font.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CampaignFont";
  src: url("../fonts/IRANYekanXFaNum-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #319b42;
  --white: #ffffff;
  --red: #da291c;
  --ink: #111111;
  --muted: #5b616a;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  --shadowHover: 0 14px 34px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "CampaignFont", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--red);
  background-image: linear-gradient(
    to bottom,
    var(--green) 0%,
    var(--green) 26%,
    var(--white) 26%,
    var(--white) 72%,
    rgba(255, 255, 255, 0) 92%
  );
  background-repeat: no-repeat;
  background-size: 100% 100vh;
}

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.top {
  display: flex;
  justify-content: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.flag {
  width: clamp(120px, 34vw, 160px);
  height: auto;
  display: block;
  margin: 10px auto 12px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14));
}

.main {
  padding-bottom: 24px;
}

.panel {
  background: var(--white);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.title {
  margin: 4px 0 16px;
  text-align: center;
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.campaignStats {
  margin: 0 0 14px;
  padding: 12px 14px 0 14px;
  border-radius: 16px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.card:active {
  transform: translateY(0);
}

.card:focus-visible {
  outline: 3px solid rgba(49, 155, 66, 0.35);
  outline-offset: 3px;
}

.card__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background-color: #e5e7eb;
  background-image: url("../assets/placeholder.png");
  background-size: cover;
  background-position: center;
}

.card__icon--share {
  background-color: #2563eb;
  background-image: url("../share.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

.card__iconWrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.card__iconWrap .card__icon {
  width: 100%;
  height: 100%;
  display: block;
  flex: none;
}

.iconBadge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  pointer-events: none;
}

.card__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.card__title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}

.card__caption {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--muted);
}

.footer {
  padding-top: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
}

@media (min-width: 560px) {
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .panel {
    padding: 22px;
  }

  .title {
    font-size: 1.8rem;
  }
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadowHover);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  padding: 18px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
  z-index: 50;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 180ms ease, visibility 0s;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadowHover);
  padding: 18px;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.modal.is-open .modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: rgba(17, 17, 17, 0.06);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal__close:active {
  transform: scale(0.98);
}

.modal__title {
  margin: 6px 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}

.modal__desc {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}

.shareBox {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.shareUrl {
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(17, 17, 17, 0.03);
}

.shareUrl__text {
  display: block;
  font-size: 0.95rem;
  color: #111111;
  overflow-wrap: anywhere;
}

.shareGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shareBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #ffffff;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.shareBtn:active {
  transform: translateY(1px);
}

.shareBtn--primary {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.12);
}

.shareBtn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 3px;
}

.shareHint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.field__error {
  margin: -4px 4px 0;
  color: #b42318;
  font-size: 0.9rem;
  line-height: 1.35;
}

.field__help {
  margin: -6px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.modal__input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

.modal__input.is-invalid {
  border-color: rgba(180, 35, 24, 0.6);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}

.modal__input:focus:not(.is-invalid) {
  border-color: rgba(49, 155, 66, 0.6);
  box-shadow: 0 0 0 4px rgba(49, 155, 66, 0.18);
}

.modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  border: 0;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.modal__btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.modal__btn:active {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal__dialog,
  .card,
  .shareBtn {
    transition: none;
  }
}
