/* ============================================================
   WEX Newsletter Landing Page — newsletter-landing.css
   All selectors prefixed with .wex- to avoid conflicts
   with the existing Bootstrap theme CSS.
   ============================================================ */

/* ---------- Design tokens ------------------------------------------------ */
:root {
  --wex-red:        #DB3745;
  --wex-red-hover:  #b92e3a;
  --wex-black:      #111111;
  --wex-ink:        #1a1a1a;
  --wex-muted:      #555555;
  --wex-line:       #dcdcdc;
  --wex-bg:         #f5f5f5;
  --wex-card:       #ffffff;
  --wex-white:      #ffffff;

  --wex-radius-sm: 2px;
  --wex-radius-md: 4px;

  --wex-shadow-card:     0 12px 32px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.1);
  --wex-shadow-card-red: 0 10px 28px rgba(219,55,69,.28), 0 4px 8px rgba(219,55,69,.18);

  --wex-font:
    "gotham", "Gotham", "Proxima Nova", "Montserrat",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --wex-container-padding: clamp(16px, 3.33vw, 48px);
}

/* ---------- Page shell reset for this template --------------------------- */
#wex-nl-main {
  width: 100%;
  background: var(--wex-bg);
  font-family: var(--wex-font);
  color: var(--wex-ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- A11y --------------------------------------------------------- */
.wex-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

div#tdi_50 {
    display: none;
}

/* ---------- Hero --------------------------------------------------------- */
.wex-hero {
  position: relative;
  background-color: #0b0b0b;
  background-image: url("../images/wex-hero-img-2x.png");
  background-size: cover;
  background-position: center;
  color: var(--wex-white);
  padding: 56px var(--wex-container-padding) 0;
  text-align: center;
}

.wex-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.wex-hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.wex-hero-logo img {
  width: 500px;
  height: auto;
  max-width: 100%;
  display: block;
}

.wex-hero-logo-fallback {
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
}

.wex-hero-logo img + .wex-hero-logo-fallback { display: none; }
.wex-hero-logo img[style*="display: none"] + .wex-hero-logo-fallback { display: inline; }

.wex-hero-title {
    font-size: clamp(32px, 4.17vw, 60px);
    font-weight: 900;
    line-height: 1;
    margin: -2px 0 30px;
    color: white !important;
}

.wex-hero-sub {
  font-size: clamp(14px, 2.08vw, 30px);
  opacity: .9;
  margin: 0;
}

.wex-hero-capture {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: 1100px;
  margin: -24px auto 0;
  padding: clamp(12px,1.5vw,18px) clamp(24px,4.17vw,60px);
  gap: 20px;
  background: var(--wex-red);
  border-radius: 10px;
  transform: translateY(50%);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.wex-hero-cta {
  flex: 0 0 auto;
  color: var(--wex-white);
  font-weight: 700;
  font-size: clamp(16px, 2.08vw, 30px);
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

.wex-hero-email {
  flex: 1 1 auto !important;
  background: var(--wex-white) !important;
  border: none !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: clamp(14px, 1.53vw, 22px) !important;
  padding: 11px 24px !important;
  color: var(--wex-ink) !important;
  outline: none !important;
  text-align: center !important;
}

.wex-hero-email::placeholder { color: #888; }
.wex-hero-email:focus { box-shadow: inset 0 0 0 2px var(--wex-red); }

/* ---------- Filter tabs -------------------------------------------------- */
.wex-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 84px var(--wex-container-padding) 32px;
  padding: 0;
}

.wex-tab {
  background: var(--wex-white);
  color: var(--wex-ink);
  border: 1px solid var(--wex-line);
  border-radius: 6px;
  font-family: var(--wex-font);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 120px;
  padding: 8px 16px;
  text-align: center;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.wex-tab:hover { border-color: var(--wex-ink); }

.wex-tab.is-active,
.wex-tab[aria-pressed="true"] {
  background: var(--wex-black);
  color: var(--wex-white);
  border-color: var(--wex-black);
}

/* ---------- Categories --------------------------------------------------- */
.wex-category {
  max-width: 1160px;
  margin: 0 auto 40px;
  padding: 0 var(--wex-container-padding);
}

.wex-category.is-hidden { display: none; }

.wex-category-title {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 16px;
}

/* ---------- Card grid ---------------------------------------------------- */
.wex-card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.wex-card {
  --wex-card-padding: clamp(12px, 1.39vw, 20px);
  position: relative;
  background: var(--wex-card);
  border-radius: 12px;
  box-shadow: var(--wex-shadow-card);
  padding: var(--wex-card-padding);
  display: flex;
  flex-direction: column;
  transition: box-shadow 200ms ease;
}

.wex-card:hover,
.wex-card:has(.wex-nl-checkbox:checked) {
  box-shadow: var(--wex-shadow-card-red);
}

.wex-card-check {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--wex-ink);
  cursor: pointer;
  margin-bottom: 10px;
  user-select: none;
}

.wex-card-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--wex-red);
  cursor: pointer;
}

.wex-card-tag {
  position: absolute;
  top: var(--wex-card-padding);
  right: var(--wex-card-padding);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wex-ink);
}

.wex-card-tag::after {
  content: "";
  display: block;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.wex-card[data-category="must-read"] .wex-card-tag::after {
  background-image: url("../images/wex-icon-must-read-2x.png");
}
.wex-card[data-category="alerts"] .wex-card-tag::after {
  background-image: url("../images/wex-icon-alert-2x.png");
}
.wex-card[data-category="policy"] .wex-card-tag::after {
  background-image: url("../images/wex-icon-policy-2x.png");
}

.wex-card-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  margin: 2px 0 10px;
}

.wex-card-desc {
  font-size: 16px;
  color: var(--wex-ink);
  line-height: 1.5;
  margin-bottom: auto;
  padding-bottom: 12px;
}

.wex-card-meta {
  font-size: 12px;
  color: var(--wex-ink);
  margin-bottom: 2px;
}

.wex-card-meta strong { font-weight: 700; }

.wex-card-cta {
  display: inline-block;
  align-self: flex-start;
  margin-top: 14px;
  background: var(--wex-red);
  color: var(--wex-white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 7px 30px;
  border-radius: 10px;
  transition: background 150ms ease;
}

.wex-card-cta:hover { background: var(--wex-red-hover); color: var(--wex-white); }
.wex-card-cta.is-hidden { display: none; }

/* ---------- Submit row --------------------------------------------------- */
.wex-submit-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 40px 0 48px;
  padding: 0 var(--wex-container-padding);
}

.wex-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.wex-subscribe-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wex-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--wex-ink);
  cursor: pointer;
  user-select: none;
}

.wex-subscribe-all input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--wex-black);
  cursor: pointer;
}

.wex-submit-btn {
  background: var(--wex-black);
  color: var(--wex-white);
  border: none;
  font-family: var(--wex-font);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  padding: 16px 48px;
  min-width: clamp(240px, 27.78vw, 400px);
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease, transform 50ms ease;
}

.wex-submit-btn:hover { background: #000; }
.wex-submit-btn:active { transform: translateY(1px); }
.wex-submit-btn:disabled { opacity: .7; cursor: not-allowed; }

.wex-submit-error {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--wex-red);
  text-align: center;
}

.wex-submit-error[hidden] { display: none; }

/* ---------- reCAPTCHA spacing -------------------------------------------- */
#wex-recaptcha { margin: 8px 0; }

/* ---------- Footer -------------------------------------------------------- */
.wex-nl-footer {
  text-align: center;
  padding: 32px 16px 40px;
  background: var(--wex-bg);
  border-top: 1px solid var(--wex-line);
}


.wex-footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  min-height: 32px;
}

.wex-footer-logo img {
  width: 400px;
  height: auto;
  max-width: 100%;
  display: block;
}

.wex-footer-logo-fallback {
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--wex-ink);
}

.wex-footer-logo img + .wex-footer-logo-fallback { display: none; }
.wex-footer-logo img[style*="display: none"] + .wex-footer-logo-fallback { display: inline; }

.wex-footer-social {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.wex-footer-social a {
  display: inline-flex;
  color: #4a4a4a;
  transition: color 150ms ease;
}

.wex-footer-social a:hover { color: var(--wex-ink); }

.wex-footer-social-icon {
  width: 40px;
  height: 40px;
  display: block;
}

.wex-footer-privacy {
  font-size: 14px;
  font-weight: 700;
  color: var(--wex-ink);
  margin: 0 0 6px;
}

.wex-footer-links {
  font-size: 12px;
  color: var(--wex-muted);
}

.wex-footer-links a {
  color: var(--wex-muted);
  text-decoration: none;
}

.wex-footer-links a:hover {
  color: var(--wex-ink);
  text-decoration: underline;
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1100px) {
  .wex-hero-title,
  .wex-hero-sub {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .wex-hero-capture {
    width: 80%;
    flex-direction: column;
    gap: 10px;
  }
  .wex-hero-cta,
  .wex-hero-email { width: 100%; }

  .wex-card-grid { justify-content: center; }
}

@media (max-width: 600px) {
  .wex-hero {
    padding-top: 40px;
    padding-bottom: 0;
  }

  .wex-hero-capture {
    width: 90%;
    flex-direction: column;
    padding: 14px 20px;
    gap: 10px;
  }

  .wex-hero-cta,
  .wex-hero-email { width: 100%; }

  .wex-hero-email { padding: 10px 20px; }

  .wex-tabs {
    margin-top: 100px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0 16px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
  }

  .wex-tabs::-webkit-scrollbar { display: none; }

  .wex-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .wex-card-grid { grid-template-columns: 1fr; }

  .wex-submit-btn { min-width: 100%; }
}
