@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;700;800;900&display=swap');

:root {
  --green-dark:   #1b5e3a;
  --green-mid:    #2d8a52;
  --green-light:  #e8f5ec;
  --green-accent: #c8e630;
  --white: #ffffff;
  --text-dark: #1a2e22;
  --text-muted: #3d5c48;
  --width: 1080px;
  --height: 1920px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: var(--width);
  height: var(--height);
  overflow: hidden;
  background: #111;
  font-family: 'Heebo', Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.flyer {
  width: var(--width);
  height: var(--height);
  background: var(--white);
  direction: rtl;
  position: relative;
  overflow: hidden;
  color: var(--text-dark);
}

.hero {
  position: relative;
  height: 780px;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background: url('assets/hero.jpg') center center / cover no-repeat;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.88) 22%,
    rgba(255, 255, 255, 0.35) 38%,
    transparent 58%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 52px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 580px;
  height: 100%;
  margin-left: auto;
}

.headline {
  font-size: 76px;
  line-height: 1.02;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: 18px;
}

.free-badge {
  display: inline-block;
  background: var(--green-dark);
  color: var(--white);
  font-size: 64px;
  font-weight: 900;
  padding: 8px 36px 14px;
  border-radius: 8px;
  transform: rotate(-2deg);
  box-shadow: 0 10px 24px rgba(27, 94, 58, 0.35);
  margin-bottom: 22px;
  position: relative;
}

.free-badge::before {
  content: '';
  position: absolute;
  inset: -6px -10px;
  background: var(--green-dark);
  opacity: 0.12;
  border-radius: 12px;
  transform: rotate(3deg);
  z-index: -1;
}

.subheadline {
  font-size: 32px;
  line-height: 1.45;
  font-weight: 600;
  color: #2d4a38;
  max-width: 500px;
}

.wave-divider {
  height: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--green-dark) 100%);
  margin-top: -1px;
}

.date-bar {
  background: var(--green-dark);
  color: var(--white);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-bar-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.date-bar-main {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
}

.date-bar-sub {
  font-size: 28px;
  font-weight: 500;
  opacity: 0.95;
  margin-top: 6px;
}

.location-card {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 36px 40px 28px;
  padding: 28px 32px;
  background: var(--green-light);
  border: 2px solid rgba(45, 138, 82, 0.35);
  border-radius: 20px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(27, 94, 58, 0.08);
}

.location-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(27, 94, 58, 0.25);
}

.location-icon {
  width: 36px;
  height: 36px;
}

.location-body {
  flex: 1;
  text-align: right;
}

.location-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.25;
  margin-bottom: 4px;
}

.location-address {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

.location-waze {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--white);
  border-radius: 999px;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
  border: 1px solid rgba(45, 138, 82, 0.25);
}

.location-waze svg {
  width: 28px;
  height: 28px;
}

.urgency {
  margin: 0 40px;
  background: var(--green-dark);
  border-radius: 18px;
  padding: 30px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--white);
}

.tennis-ball {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.urgency-title {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
}

.urgency-sub {
  font-size: 28px;
  font-weight: 600;
  margin-top: 10px;
  opacity: 0.95;
  line-height: 1.35;
}

.footer {
  margin-top: 40px;
  padding: 0 44px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: end;
}

.footer-contact {
  text-align: right;
}

.contact-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 20px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--green-light);
  border-radius: 14px;
  border: 1px solid rgba(45, 138, 82, 0.2);
}

.contact-row-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-row-icon svg {
  width: 26px;
  height: 26px;
}

.contact-row-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-row-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--green-mid);
  line-height: 1.2;
}

.contact-row-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--green-dark);
  direction: ltr;
  unicode-bidi: embed;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.social-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}

.social-btn svg {
  width: 28px;
  height: 28px;
}

.social-btn--website {
  background: var(--green-dark);
  color: var(--white);
}

.social-btn--instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
  color: var(--white);
}

.social-btn--facebook {
  background: #1877f2;
  color: var(--white);
}

.closing-badge {
  margin-top: 20px;
  display: inline-block;
  background: var(--white);
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(45, 138, 82, 0.3);
}

.qr-block {
  text-align: center;
}

.qr-label {
  font-size: 26px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.qr-wrap {
  background: var(--white);
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(27, 94, 58, 0.15);
  display: inline-block;
  border: 3px solid var(--green-mid);
}

#qrcode {
  display: block;
  width: 240px !important;
  height: 240px !important;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-logo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(27, 94, 58, 0.12);
  padding: 6px;
  object-fit: contain;
}

.footer-club-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.4;
  max-width: 240px;
  text-align: right;
}

/* ============================================================
   STICKY REGISTRATION CTA
   Hidden by default (not in PNG export, which screenshots #flyer).
   Visible only on phone browsers via the media query below.
   ============================================================ */
.sticky-cta {
  display: none;
}

/* ============================================================
   WEB / MOBILE RESPONSIVE MODE
   Triggers only when viewport < 1080px (phone/tablet browser).
   Playwright export sets viewport to exactly 1080px, so these
   rules never apply to the PNG or OG-preview outputs.
   ============================================================ */
@media screen and (max-width: 1079px) {
  html,
  body {
    width: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f0f4f2;
  }

  .flyer {
    width: 100%;
    height: auto;
    overflow: visible;
    padding-bottom: 84px; /* clear sticky CTA */
  }

  .hero {
    height: clamp(240px, 68vw, 440px);
  }

  .hero-content {
    padding: clamp(20px, 5vw, 56px);
    max-width: 78%;
  }

  .headline {
    font-size: clamp(24px, 6.2vw, 76px);
    margin-bottom: clamp(8px, 2vw, 18px);
  }

  .free-badge {
    font-size: clamp(20px, 5.2vw, 64px);
    padding: clamp(4px, 1vw, 8px) clamp(14px, 3.5vw, 36px) clamp(7px, 1.8vw, 14px);
    margin-bottom: clamp(8px, 2vw, 22px);
    border-radius: 6px;
  }

  .subheadline {
    font-size: clamp(12px, 3vw, 32px);
    max-width: 100%;
  }

  .date-bar {
    padding: clamp(12px, 3.2vw, 32px) clamp(14px, 3.5vw, 48px);
    gap: clamp(10px, 2.5vw, 20px);
  }

  .date-bar-icon {
    width: clamp(26px, 6vw, 56px);
    height: clamp(26px, 6vw, 56px);
  }

  .date-bar-main {
    font-size: clamp(17px, 4.2vw, 44px);
  }

  .date-bar-sub {
    font-size: clamp(11px, 2.8vw, 28px);
    margin-top: clamp(2px, 0.8vw, 6px);
  }

  .location-card {
    margin: clamp(14px, 3.5vw, 36px) clamp(10px, 2.5vw, 40px) clamp(10px, 2.5vw, 28px);
    padding: clamp(12px, 3vw, 28px) clamp(14px, 3.5vw, 32px);
    gap: clamp(10px, 2.5vw, 24px);
    border-radius: clamp(12px, 3vw, 20px);
  }

  .location-icon-wrap {
    width: clamp(38px, 9vw, 72px);
    height: clamp(38px, 9vw, 72px);
  }

  .location-icon {
    width: clamp(20px, 5vw, 36px);
    height: clamp(20px, 5vw, 36px);
  }

  .location-title {
    font-size: clamp(15px, 3.8vw, 32px);
  }

  .location-address {
    font-size: clamp(12px, 3vw, 26px);
  }

  .location-waze {
    font-size: clamp(11px, 2.8vw, 22px);
    padding: clamp(5px, 1.3vw, 8px) clamp(10px, 2.5vw, 16px);
    margin-top: clamp(6px, 1.5vw, 12px);
  }

  .location-waze svg {
    width: clamp(16px, 4vw, 28px);
    height: clamp(16px, 4vw, 28px);
  }

  .urgency {
    margin: 0 clamp(10px, 2.5vw, 40px);
    padding: clamp(14px, 3.5vw, 30px) clamp(14px, 3.5vw, 36px);
    gap: clamp(10px, 2.5vw, 24px);
    border-radius: clamp(10px, 2.5vw, 18px);
  }

  .tennis-ball {
    width: clamp(48px, 12vw, 96px);
    height: clamp(48px, 12vw, 96px);
  }

  .urgency-title {
    font-size: clamp(17px, 4.2vw, 40px);
  }

  .urgency-sub {
    font-size: clamp(11px, 3vw, 28px);
    margin-top: clamp(4px, 1vw, 10px);
  }

  /* Stack footer to single column */
  .footer {
    margin-top: clamp(18px, 4.5vw, 40px);
    padding: 0 clamp(10px, 2.5vw, 44px) clamp(14px, 3.5vw, 48px);
    grid-template-columns: 1fr;
    gap: clamp(18px, 4.5vw, 28px);
    align-items: start;
  }

  .footer-contact { order: 1; }

  .qr-block {
    order: 2;
    padding: clamp(10px, 2.5vw, 0px) 0;
    border-top: 1px solid rgba(45, 138, 82, 0.15);
    border-bottom: 1px solid rgba(45, 138, 82, 0.15);
  }

  #qrcode {
    width: clamp(130px, 36vw, 240px) !important;
    height: clamp(130px, 36vw, 240px) !important;
  }

  .qr-label {
    font-size: clamp(14px, 3.5vw, 26px);
    margin-bottom: clamp(8px, 2vw, 14px);
  }

  .qr-wrap {
    padding: clamp(10px, 2.5vw, 16px);
  }

  .footer-brand {
    order: 3;
    flex-direction: row;
    align-items: center;
    gap: clamp(10px, 2.5vw, 14px);
  }

  .footer-logo {
    width: clamp(64px, 16vw, 200px);
    height: clamp(64px, 16vw, 200px);
  }

  .footer-club-name {
    font-size: clamp(12px, 3vw, 22px);
    max-width: none;
    flex: 1;
  }

  .contact-title {
    font-size: clamp(15px, 3.8vw, 30px);
    margin-bottom: clamp(10px, 2.5vw, 20px);
  }

  .contact-list {
    gap: clamp(10px, 2.5vw, 14px);
  }

  .contact-row {
    padding: clamp(10px, 2.5vw, 16px) clamp(12px, 3vw, 20px);
    gap: clamp(10px, 2.5vw, 16px);
    border-radius: clamp(10px, 2.5vw, 14px);
  }

  .contact-row-icon {
    width: clamp(36px, 9vw, 48px);
    height: clamp(36px, 9vw, 48px);
  }

  .contact-row-icon svg {
    width: clamp(18px, 4.5vw, 26px);
    height: clamp(18px, 4.5vw, 26px);
  }

  .contact-row-label {
    font-size: clamp(11px, 2.8vw, 20px);
  }

  .contact-row-value {
    font-size: clamp(18px, 4.5vw, 32px);
  }

  .social-row {
    margin-top: clamp(12px, 3vw, 20px);
    gap: clamp(12px, 3vw, 16px);
  }

  .social-btn {
    width: clamp(44px, 11vw, 56px);
    height: clamp(44px, 11vw, 56px);
  }

  .social-btn svg {
    width: clamp(22px, 5.5vw, 28px);
    height: clamp(22px, 5.5vw, 28px);
  }

  .closing-badge {
    font-size: clamp(12px, 3vw, 24px);
    padding: clamp(8px, 2vw, 12px) clamp(14px, 3.5vw, 22px);
    margin-top: clamp(10px, 2.5vw, 20px);
  }

  /* Sticky CTA bar — shown only on web/phone */
  .sticky-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 16px);
    background: var(--green-accent);
    color: var(--green-dark);
    padding: clamp(14px, 3.5vw, 20px) clamp(20px, 5vw, 32px);
    padding-bottom: max(clamp(14px, 3.5vw, 20px), env(safe-area-inset-bottom));
    font-family: 'Heebo', Arial, sans-serif;
    text-decoration: none;
    box-shadow: 0 -4px 20px rgba(27, 94, 58, 0.4);
    direction: rtl;
    animation: cta-pulse 2s ease-in-out infinite;
  }

  .sticky-cta-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
  }

  .sticky-cta-urgency {
    font-size: clamp(10px, 2.5vw, 13px);
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.8;
    text-transform: uppercase;
  }

  .sticky-cta-text {
    font-size: clamp(17px, 4.2vw, 23px);
    font-weight: 900;
    letter-spacing: -0.01em;
  }

  .sticky-cta-arrow {
    font-size: clamp(18px, 4.5vw, 24px);
    font-weight: 400;
  }

  @keyframes cta-pulse {
    0%, 100% { box-shadow: 0 -4px 20px rgba(27, 94, 58, 0.4); }
    50%       { box-shadow: 0 -4px 32px rgba(200, 230, 48, 0.6); }
  }
}

/* ============================================================
   DESKTOP BROWSER MODE (≥ 1080px)
   Shows the registration CTA on desktop browsers too.
   The Playwright export screenshots only #flyer (not .sticky-cta),
   so this never affects the PNG output.
   ============================================================ */
@media screen and (min-width: 1080px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .flyer {
    margin-bottom: 90px;
  }

  .sticky-cta {
    display: flex;
    padding: 18px 64px;
  }

  .sticky-cta-urgency {
    font-size: 12px;
  }

  .sticky-cta-text {
    font-size: 24px;
  }

  .sticky-cta-arrow {
    font-size: 26px;
  }
}
