/* v2 = layout from the hand-drawn sketch. Loaded AFTER style.css (shared tokens + program tabs). */

body { padding-top: 16px; }

/* 1) Identity block: photo (start/right) | name + pill | logo (end/left) */
.id-block { position: relative; overflow: hidden; border-radius: 32px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--surface-2), var(--bg) 55%, color-mix(in srgb, var(--gold-light) 60%, transparent));
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.35); padding: 28px 20px; }
.id-block::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--red), var(--black), var(--gold)); }
.id-grid { display: grid; gap: 20px 16px; align-items: center; justify-items: center;
  grid-template-columns: 1fr 1fr; grid-template-areas: "photo logo" "text text"; }
.id-photo { grid-area: photo; } .id-logo { grid-area: logo; } .id-text { grid-area: text; text-align: center; }
.circle { border-radius: 50%; overflow: hidden; background: #fff; border: 4px solid var(--gold); box-shadow: 0 14px 34px -12px rgba(0,0,0,.45); }
.circle img { width: 100%; height: 100%; object-fit: cover; }
.id-photo .circle { width: clamp(130px, 38vw, 230px); height: clamp(130px, 38vw, 230px); border-color: var(--red); }
.id-photo .circle img { object-position: top; }
.id-logo .circle { width: clamp(110px, 32vw, 190px); height: clamp(110px, 32vw, 190px); }
.id-text small { display: block; font-weight: 700; color: var(--text-muted); font-size: clamp(14px, 2vw, 18px); }
.id-text h1 { font-weight: 900; line-height: 1.3; font-size: clamp(30px, 5.2vw, 60px); }
.id-text h1 em { font-style: normal; color: var(--red); }
.pill-slogan { display: inline-block; margin-top: 10px; background: var(--black); color: #fff; border: 1px solid var(--gold); border-radius: 999px; padding: 8px 22px; font-weight: 800; font-size: clamp(13px, 2vw, 17px); }
.id-text .sub { margin-top: 14px; color: var(--text-muted); font-weight: 700; font-size: 14px; }
@media (min-width: 760px) {
  .id-block { padding: 40px 48px; }
  .id-grid { grid-template-columns: auto 1fr auto; grid-template-areas: "photo text logo"; gap: 32px; }
}

/* About: values cards stretch to the dark card's height - center their content */
.value { align-items: center; }

/* Stats row inside the identity block (reuses .stats/.stat from style.css) */
.id-text .stats { margin-inline: auto; margin-top: 22px; }

/* 2) Contact bar */
.contact-bar { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--black); color: #fff; border: 1px solid var(--gold); border-radius: 36px; padding: 12px 14px 12px 22px; }
.contact-bar h2 { font-size: clamp(15px, 2.4vw, 20px); font-weight: 900; }
@media (max-width: 600px) {
  .contact-bar { flex-direction: column; justify-content: center; text-align: center; padding: 18px 16px; }
  .contact-icons { justify-content: center; }
}
.contact-icons { display: flex; gap: 10px; }
.cbtn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; transition: transform .15s, background .15s; }
.cbtn svg { width: 22px; height: 22px; }
a.cbtn:hover { transform: translateY(-2px); }
a.cbtn.tel { background: var(--gold); color: #000; border-color: var(--gold); }
a.cbtn.fb { background: #1877F2; border-color: #1877F2; }
a.cbtn.wa { background: #25D366; color: #000; border-color: #25D366; }
span.cbtn { opacity: .35; cursor: not-allowed; }

/* 3) Program intro row */
.prog-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.prog-intro h2 { font-size: clamp(26px, 4.5vw, 44px); font-weight: 900; line-height: 1.25; }
.prog-intro p { margin-top: 10px; max-width: 52ch; color: var(--text-muted); font-weight: 700; font-size: 15px; }
.age-badge { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.age-badge b { font-size: 20px; font-weight: 900; background: var(--gold); color: #000; padding: 6px 22px; border-radius: 999px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* 4) Trust & support + Facebook embed */
.trust h2 { text-align: center; font-size: clamp(26px, 4.5vw, 44px); font-weight: 900; }
.trust .lead { text-align: center; margin: 10px auto 28px; max-width: 54ch; color: var(--text-muted); font-weight: 700; font-size: 15px; }
.fb-wrap { margin-inline: auto; display: flex; justify-content: center; }
.fb-placeholder { width: 100%; max-width: 560px; min-height: 220px; display: grid; place-items: center; text-align: center; gap: 8px; padding: 32px;
  border: 2px dashed color-mix(in srgb, var(--gold) 60%, transparent); border-radius: 28px; background: var(--surface); color: var(--text-muted); font-weight: 800; }
.fb-placeholder b { color: #1877F2; font-size: 22px; }
.fb-open { display: flex; justify-content: center; margin-top: 16px; }
.cm-grid { margin-top: 28px; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cm-grid { grid-template-columns: repeat(2, 1fr); } }
.cm { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.cm p { font-weight: 700; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm footer { all: unset; display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; font-weight: 800; color: var(--text-muted); }

footer.v2 { margin-top: 56px; }

/* ===== PRINT: only البرنامج الانتخابي الرسمي, organized, black on white ===== */
@page { size: A4; margin: 14mm 12mm; }
@media print {
  /* hide everything except the program section */
  .id-block, .contact-bar, #about, .divider, #trust, #share, footer.v2, .toast,
  .tabs, .panel-nav, .age-badge .btn, .no-print { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }
  body { padding: 0; font-size: 11.5pt; line-height: 1.8; }
  .container { max-width: none; padding: 0; }
  .section { padding: 0; }
  #program { display: block !important; }

  .prog-intro { margin-bottom: 14pt; padding-bottom: 10pt; border-bottom: 2px solid var(--gold); align-items: flex-end; flex-wrap: nowrap; }
  .prog-intro h2 { font-size: 24pt; color: #000; }
  .prog-intro p { color: #444; font-size: 11pt; max-width: none; margin-top: 4pt; }
  .age-badge b { background: none; border: 1.5px solid var(--gold); color: #000; padding: 2pt 14pt; font-size: 12pt; white-space: nowrap; }

  .prog-grid { display: block; }
  .panel { display: block !important; border: 0; border-radius: 0; padding: 0; margin: 0 0 18pt; background: none; overflow: visible; }
  .panel::before { display: none; }

  .panel-head { break-after: avoid; page-break-after: avoid; padding: 6pt 0; border-bottom: 1.5px solid #000; margin-bottom: 8pt; align-items: center; }
  .panel-head .l { gap: 10pt; align-items: center; }
  .panel-head .num { width: 30pt; height: 30pt; border-radius: 50%; background: none !important; color: var(--red) !important; border: 2px solid var(--red); font-size: 15pt; }
  .panel-head h3 { font-size: 13.5pt; line-height: 1.5; color: #000; }
  .panel-head p { font-size: 10pt; color: #555; margin-top: 0; }
  .count { background: none; border: 1px solid #999; color: #333; font-size: 9pt; padding: 1pt 8pt; }

  .items { margin-top: 0; gap: 6pt; }
  .item { break-inside: avoid; page-break-inside: avoid; border: 1px solid #ccc; border-radius: 4pt; background: none; padding: 6pt 9pt; gap: 8pt; }
  .item .b { width: 20pt; height: 20pt; background: none; border: 1px solid #999; font-size: 9pt; }
  .item p { font-size: 11pt; line-height: 1.85; color: #000; font-weight: 600; }
}

/* QR block inside the share box */
.qr-block { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-frame { flex: none; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 10px; box-shadow: 0 10px 28px -14px rgba(0,0,0,.35); }
.qr-frame canvas { display: block; width: 170px; height: 170px; }
.qr-info { flex: 1 1 200px; min-width: 0; }
.qr-info h4 { font-size: 17px; font-weight: 900; }
.qr-info p { margin: 6px 0 14px; font-size: 13px; }
@media (max-width: 480px) { .qr-block { justify-content: center; text-align: center; } .qr-info { flex-basis: 100%; } }
