/*
 * Partnerships Page Styles
 * Tekvera Initiative Theme
 */

/* ── Intro ─────────────────────────────────────────────────── */
.tv-part-intro { background: var(--tv-cream); }

.tv-part-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.tv-part-intro-grid h2 { font-size: clamp(2rem, 3vw, 2.9rem); font-weight: 300; margin-top: 1rem; margin-bottom: 1.5rem; }
.tv-part-intro-grid p  { font-size: .96rem; color: var(--tv-text-secondary); line-height: 1.82; margin-bottom: 1.1rem; }

/* Pull-quote / quick link panel */
.tv-part-quote-panel { border-left: 3px solid var(--tv-amber-400); padding-left: 2.5rem; }
.tv-part-quote { font-family: var(--tv-font-serif); font-size: clamp(1.2rem, 2vw, 1.65rem); font-weight: 300; font-style: italic; line-height: 1.42; color: var(--tv-text-primary); margin-bottom: 1.75rem; }
.tv-part-quote strong { font-weight: 600; font-style: normal; color: var(--tv-green-700); }
.tv-part-intro-grid p.tv-part-quote { font-size: 1.3rem; line-height: 1.65; }

/* Partner type quick-links */
.tv-ptype-links { display: flex; flex-direction: column; gap: .72rem; }

.tv-ptype-link {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .95rem 1.2rem;
  background: var(--tv-white);
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  transition: all .22s;
  text-decoration: none;
}

.tv-ptype-link:hover { border-color: var(--tv-green-300); box-shadow: var(--tv-shadow-sm); transform: translateX(4px); }
.tv-ptype-link:hover .tv-ptl-arrow { color: var(--tv-green-600); transform: translateX(3px); }

.tv-ptl-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--tv-green-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tv-ptl-text h4 { font-size: .88rem; font-weight: 600; color: var(--tv-text-primary); }
.tv-ptl-text p  { font-size: .75rem; color: var(--tv-text-tertiary); margin-top: .1rem; }
.tv-ptl-arrow   { margin-left: auto; color: var(--tv-text-muted); flex-shrink: 0; transition: all .22s; }

/* ── Logo wall ─────────────────────────────────────────────── */
.tv-logo-wall { background: var(--tv-green-800); position: relative; overflow: hidden; }

.tv-logo-wall::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.tv-logo-wall::after {
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(57,173,130,.12) 0%, transparent 70%);
  pointer-events: none;
}

.tv-logo-wall-hd { text-align: center; margin-bottom: 3.5rem; position: relative; z-index: 1; }
.tv-logo-wall-hd p { font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.35); }

/* Logo grid */
.tv-logo-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.06);
  border-left: 1px solid rgba(255,255,255,.06);
}

.tv-logo-item {
  border-right: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.75rem;
  transition: background .22s;
  text-decoration: none;
  position: relative;
  min-height: 110px;
}

.tv-logo-item:hover { background: rgba(255,255,255,.06); }

/* Logo image — filter to white */
.tv-logo-item img {
  max-height: 42px;
  max-width: 110px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .55;
  transition: opacity .22s;
}

.tv-logo-item:hover img { opacity: .9; }

/* Text fallback logo */
.tv-logo-text { text-align: center; line-height: 1.22; max-width: 120px; opacity: .55; transition: opacity .22s; }
.tv-logo-item:hover .tv-logo-text { opacity: .9; }
.tv-logo-text-main { display: block; font-size: .82rem; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.tv-logo-text-sub  { display: block; font-size: .6rem; color: rgba(255,255,255,.65); margin-top: .18rem; letter-spacing: .04em; }

/* Placeholder slot */
.tv-logo-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; }
.tv-logo-slot-plus { width: 36px; height: 36px; border: 1.5px dashed rgba(255,255,255,.35); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: rgba(255,255,255,.35); }
.tv-logo-slot-label { font-size: .6rem; color: rgba(255,255,255,.28); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.tv-logo-wall-caption { text-align: center; margin-top: 2rem; font-size: .72rem; color: rgba(255,255,255,.28); position: relative; z-index: 1; line-height: 1.65; }
.tv-logo-wall-caption a { color: var(--tv-amber-300); text-decoration: underline; text-underline-offset: 2px; }

/* ── Active partner cards ───────────────────────────────────── */
.tv-part-cards-sec { background: var(--tv-cream); }

.tv-part-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.tv-part-card {
  background: var(--tv-white);
  border: 1px solid var(--tv-border);
  border-radius: 22px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: all .25s;
}

.tv-part-card:hover { box-shadow: var(--tv-shadow-lg); transform: translateY(-3px); border-color: var(--tv-border-dark); }

.tv-part-card-type { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tv-green-600); margin-bottom: .75rem; }
.tv-part-card h3   { font-family: var(--tv-font-serif); font-size: 1.2rem; font-weight: 500; color: var(--tv-text-primary); margin-bottom: .75rem; line-height: 1.28; }
.tv-part-card-desc { font-size: .85rem; color: var(--tv-text-secondary); line-height: 1.72; flex: 1; margin-bottom: 1.5rem; }

.tv-part-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--tv-border); padding-top: 1rem; margin-top: auto; }

.tv-part-status { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .24rem .7rem; border-radius: 9999px; }
.tv-part-status--active  { background: var(--tv-green-50);   color: var(--tv-green-600);  border: 1px solid var(--tv-green-100); }
.tv-part-status--funded  { background: var(--tv-amber-50);   color: var(--tv-amber-600);  border: 1px solid var(--tv-amber-100); }
.tv-part-status--seeking { background: var(--tv-cream-dark); color: var(--tv-text-tertiary); border: 1px solid var(--tv-border); }

.tv-part-card-link { font-size: .78rem; font-weight: 700; color: var(--tv-green-700); display: inline-flex; align-items: center; gap: .32rem; transition: all .2s; text-decoration: none; }
.tv-part-card-link:hover { color: var(--tv-green-500); gap: .55rem; }

/* Invite card */
.tv-part-card--invite {
  border-style: dashed;
  border-color: var(--tv-border-dark);
  background: var(--tv-cream);
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  min-height: 280px;
}

.tv-part-card--invite:hover { border-color: var(--tv-green-400); background: var(--tv-green-50); }

.tv-part-invite-plus { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--tv-border-dark); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--tv-text-tertiary); margin: 0 auto 1rem; transition: all .22s; }
.tv-part-card--invite:hover .tv-part-invite-plus { border-color: var(--tv-green-400); color: var(--tv-green-600); background: var(--tv-green-50); }
.tv-part-invite-label { font-size: .9rem; font-weight: 600; color: var(--tv-green-700); display: block; margin-bottom: .4rem; }
.tv-part-card--invite small { font-size: .78rem; color: var(--tv-text-tertiary); line-height: 1.55; display: block; }

/* ── Partnership types section ──────────────────────────────── */
.tv-ptypes-sec { background: var(--tv-white); border-top: 1px solid var(--tv-border); }

.tv-ptypes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.tv-ptypes-grid h2 { font-size: clamp(1.85rem, 3vw, 2.65rem); font-weight: 300; margin-top: 1rem; margin-bottom: 1.25rem; letter-spacing: -.02em; }
.tv-ptypes-grid p  { font-size: .94rem; color: var(--tv-text-secondary); line-height: 1.82; margin-bottom: 1.25rem; }

.tv-ptyc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tv-ptyc {
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  padding: 1.5rem 1.35rem;
  transition: all .22s;
  position: relative;
  overflow: hidden;
}

.tv-ptyc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2.5px; background: var(--tv-green-400); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.tv-ptyc:hover::before { transform: scaleX(1); }
.tv-ptyc:hover { box-shadow: var(--tv-shadow-sm); transform: translateY(-2px); border-color: var(--tv-green-200); }

.tv-ptyc-ico { width: 38px; height: 38px; border-radius: 8px; background: var(--tv-green-50); display: flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.tv-ptyc h4  { font-family: var(--tv-font-serif); font-size: .96rem; font-weight: 600; color: var(--tv-text-primary); margin-bottom: .38rem; }
.tv-ptyc p   { font-size: .88rem; color: var(--tv-text-tertiary); line-height: 1.45; }

/* ── Testimonial ────────────────────────────────────────────── */
.tv-testimonial-sec { background: var(--tv-cream); }
.tv-testimonial-wrap { max-width: 800px; margin: 0 auto; text-align: center; }
.tv-t-quote { font-family: var(--tv-font-serif); font-size: clamp(1.3rem, 2.2vw, 1.85rem); font-weight: 300; font-style: italic; line-height: 1.48; color: var(--tv-text-primary); margin-bottom: 2rem; }
.tv-t-quote strong { font-style: normal; font-weight: 600; color: var(--tv-green-700); }
.tv-t-source { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.tv-t-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--tv-green-100), var(--tv-green-50)); display: flex; align-items: center; justify-content: center; font-family: var(--tv-font-serif); font-size: 1.1rem; font-weight: 600; color: var(--tv-green-600); flex-shrink: 0; }
.tv-t-name { font-size: .88rem; font-weight: 600; color: var(--tv-text-primary); text-align: left; }
.tv-t-org  { font-size: .77rem; color: var(--tv-text-tertiary); margin-top: .1rem; }

/* ── Apply / Become a partner ───────────────────────────────── */
.tv-apply-sec { background: var(--tv-green-900); position: relative; overflow: hidden; }
.tv-apply-sec::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 60px 60px;
}

.tv-apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.tv-apply-grid h2 { font-size: clamp(1.85rem, 3vw, 2.65rem); font-weight: 300; color: #fff; margin: 1rem 0 1.25rem; letter-spacing: -.018em; }
.tv-apply-grid > div > p { font-size: .98rem; color: rgba(255,255,255,.5); line-height: 1.65; margin-bottom: 2rem; max-width: 480px; }

/* Process steps */
.tv-apply-steps { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 2rem; }

.tv-apply-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
}

.tv-as-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(57,173,130,.18); border: 1px solid rgba(57,173,130,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tv-font-serif); font-size: .88rem; font-weight: 600;
  color: var(--tv-green-300); flex-shrink: 0;
}

.tv-apply-step p { font-size: .84rem; color: rgba(255,255,255,.58); line-height: 1.55; }
.tv-apply-step strong { color: rgba(255,255,255,.82); font-weight: 600; }

/* Form panel */
.tv-apply-form-panel {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 2.75rem;
}

.tv-afp-title { font-family: var(--tv-font-serif); font-size: 1.3rem; font-weight: 500; color: #fff; margin-bottom: .4rem; }
.tv-afp-sub   { font-size: .92rem; color: rgba(255,255,255,.44); margin-bottom: 2rem; line-height: 1.35; }

.tv-af-field  { margin-bottom: 1.1rem; }
.tv-af-label  { display: block; font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.55); margin-bottom: .45rem; letter-spacing: .04em; }

.tv-af-input, .tv-af-select, .tv-af-textarea {
  width: 100%; padding: .78rem 1.1rem;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 12px;
  font-family: var(--tv-font-sans); font-size: .875rem;
  color: #fff; background: rgba(255,255,255,.06);
  outline: none; transition: border-color .2s;
  appearance: none;
}

.tv-af-input::placeholder, .tv-af-textarea::placeholder { color: rgba(255,255,255,.28); }
.tv-af-input:focus, .tv-af-select:focus, .tv-af-textarea:focus { border-color: var(--tv-green-400); }
.tv-af-input.is-invalid, .tv-af-select.is-invalid, .tv-af-textarea.is-invalid {
  border-color: #f0807e;
  background: rgba(229, 36, 59, 0.12);
}
.tv-af-input.is-invalid::placeholder, .tv-af-textarea.is-invalid::placeholder { color: #f5b5b5; }

/* Partnership enquiry status messages */
.tv-pf-status {
  padding: .5rem 1rem;
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.tv-pf-status--success {
  background: rgba(57, 173, 130, 0.14);
  border-color: rgba(57, 173, 130, 0.35);
  color: #c9efde;
}
.tv-pf-status--error {
  background: rgba(229, 36, 59, 0.14);
  border-color: rgba(229, 36, 59, 0.4);
  color: #f5c2c8;
}
.tv-af-select { color: rgba(255,255,255,.7); }
.tv-af-select option { background: var(--tv-green-900); color: #fff; }
.tv-af-textarea { border-radius: 12px; resize: vertical; min-height: 100px; line-height: 1.65; }

.tv-af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Partnerships helpers (extracted from inline styles) ─────────────────── */
.tv-testimonial-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2rem;
}
.tv-testimonial-line {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--tv-green-400);
}
.tv-testimonial-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--tv-green-600);
}

.tv-logo-default {
  cursor: default;
  opacity: var(--tv-logo-opacity, 0.3);
}
.tv-logo-faded { opacity: .25; }

.tv-part-cards-hd { margin-bottom: 2.75rem; }
.tv-part-cards-title {
  margin-top: .85rem;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 300;
}

.tv-ptypes-body {
  font-size: .88rem;
  color: var(--tv-text-tertiary);
  line-height: 1.78;
}
.tv-btn-mt-2 { margin-top: 2rem; }

.tv-btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.tv-btn-row-mt-2 {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.tv-align-self-center { align-self: center; }
.tv-eyebrow--green-400 { color: var(--tv-green-400); }
.tv-apply-submit {
  width: 100%;
  justify-content: center;
  margin-top: .5rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) { .tv-logo-grid { grid-template-columns: repeat(5, 1fr); } }

@media (max-width: 1024px) {
  .tv-part-intro-grid, .tv-ptypes-grid, .tv-apply-grid { grid-template-columns: 1fr; gap: 3rem; }
  .tv-part-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .tv-logo-grid { grid-template-columns: repeat(4, 1fr); }
  .tv-part-cards-grid { grid-template-columns: 1fr; }
  .tv-ptyc-grid, .tv-af-row { grid-template-columns: 1fr; }

  /* Tighter padding on mobile */
  .tv-apply-form-panel { padding: 1.75rem; }
  .tv-part-card { padding: 1.75rem; }
  .tv-part-intro-grid,
  .tv-ptypes-grid,
  .tv-apply-grid { gap: 2.5rem; }

  /* Prevent long emails in the apply form from overflowing */
  .tv-af-input,
  .tv-af-select,
  .tv-af-textarea { max-width: 100%; }

  /* Stats row on mobile: smaller gap + wrap */
  .tv-page-hero__stats { gap: 1.5rem; }

  /* Logo wall: slightly tighter tile padding at narrow widths */
  .tv-logo-item { padding: 1.5rem 1.1rem; min-height: 96px; }

  /* Testimonial: tighter padding */
  .tv-testimonial-sec { padding: 4rem 0; }

  /* Ensure the intro quote panel doesn't feel cramped once stacked */
  .tv-part-quote-panel { padding-left: 1.5rem; }

  .tv-part-intro-grid .tv-part-quote { font-size: 1.15rem; line-height: 1.55; }

  .tv-ptl-text p { font-size: 0.98rem; color: var(--tv-text-tertiary); margin-top: 0.45rem; line-height: 1.25; }

  .tv-logo-wall-hd p { font-size: 0.82rem; }

  .tv-ptypes-grid p { font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.25rem; }

  .tv-ptyc p { font-size: 0.98rem; color: var(--tv-text-tertiary); line-height: 1.45; }

  .tv-ptyc h4 { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.38rem; letter-spacing: 0.25px; }

  /* Icon beside title on mobile */
  .tv-ptyc {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "ico title"
      "body body";
    column-gap: 0.9rem;
    row-gap: 0.35rem;
    align-items: center;
  }
  .tv-ptyc-ico { grid-area: ico; margin-bottom: 0; }
  .tv-ptyc h4  { grid-area: title; margin-bottom: 0; align-self: center; font-size: 1.02rem; }
  .tv-ptyc p   { grid-area: body; margin-top: 0.5rem; }

  .tv-apply-step p { font-size: 0.95rem; }

  .tv-afp-sub { font-size: 0.95rem; }

  .tv-af-label { font-size: 0.92rem; font-weight: 500; letter-spacing: 0.05em; }

  .tv-logo-wall-caption { font-size: 0.95rem; }
}

@media (max-width: 560px) {
  .tv-logo-grid { grid-template-columns: repeat(3, 1fr); }

  /* Quote-panel quick-link rows: allow title/sub to wrap naturally */
  .tv-ptype-link { padding: 0.85rem 1rem; gap: 0.75rem; }
  .tv-ptl-text h4 { font-size: 0.98rem; letter-spacing: 0.125px; }

  /* Apply form: stack first+last name rows already collapsed via af-row */
  .tv-apply-form-panel { padding: 1.35rem; border-radius: 18px; }

  /* Partner cards: reduce padding further */
  .tv-part-card { padding: 1.5rem; }
}

@media (max-width: 420px) {
  /* Very narrow screens: 2-col logo wall so tiles don't get too tiny */
  .tv-logo-grid { grid-template-columns: repeat(2, 1fr); }
  .tv-logo-item { padding: 1.35rem 1rem; min-height: 88px; }

  /* Testimonial avatar + name stack on very narrow screens */
  .tv-t-source { flex-direction: column; text-align: center; }
  .tv-t-name { text-align: center; font-size: 0.95rem; }
}
