:root {
  --navy: #1f3a5f;
  --red: #a6332e;
  --purple: #5a4b7a;
  --blue: #2e4fa3;
  --light: #f8f9fb;
  --text: #243447;
  --shadow: 0 10px 30px rgba(31, 58, 95, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--light);
  color: var(--text);
}

/* LAYOUT */

main {
  max-width: 1280px;
  margin: auto;
}

section {
  padding: 40px 40px;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  height: 85px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);
}

.logo {
  height: 60px;
  overflow: hidden;
}

.logo img {
  height: 160px;
  transform: translateY(-35px);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: 0.2s;
}

nav a:hover {
  color: var(--blue);
}

.nav-btn {
  background: var(--blue);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46, 79, 163, 0.3);
}

/* HERO */
.hero {
  position: relative;

  max-width: 1300px;

  margin: 40px auto;

  border-radius: 28px;

  overflow: hidden;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.hero-banner {
  width: 100%;

  display: block;
}

.hero-overlay {
  position: absolute;

  bottom: 110px;
  left: 50%;

  transform: translateX(-50%);

  text-align: center;

  width: 90%;
}

.hero-text {
  color: #fff;

  font-size: 1.4rem;

  line-height: 1.6;

  margin-bottom: 28px;

  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

.btn-primary {
  background: #fff;

  color: #1f3a5f;

  padding: 16px 34px;

  border-radius: 12px;

  border: none;

  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;

  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.btn-primary:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.page-wrapper {
  max-width: 1200px;
  margin: auto;
  padding-right: 340px; /* 🔥 SOLO AQUÍ */
}

.hero h1 {
  font-size: 3rem;
  margin: 0;
}

.hero .btn {
  background: #fff;
  color: var(--navy);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BUTTON */
.btn {
  padding: 14px 26px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

/* CARDS */
.card,
form,
.counter-card {
  background: #fff;
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.counter-card {
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.card {
  /* padding: 32px 28px; */
  padding: 22px;
}

.card h2 {
  margin-bottom: 8px;
}

.card p {
  margin-bottom: 10px;
}

.card:nth-child(2) {
  padding: 16px;
}

/* GRID */
.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;

  align-items: start;
}

.grid-2 > div {
  min-height: 100%;
}

.grid-2 > div:last-child {
  width: 100%;
}

/* FORM */
form {
  display: grid;
  gap: 12px;
}

.endorse-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.endorse-form input,
.endorse-form select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

.endorse-form button {
  background: #2e4fa3;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

.endorse-form button:hover {
  background: #1f3a80;
}

#formMessage {
  font-size: 0.9rem;
  margin-top: 8px;
}

input,
select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

#about p {
  line-height: 1.7;
}

.sticky-box {
  position: fixed;
  top: 120px;

  right: 20px;
  width: 320px;

  background: #fff;
  border-left: 5px solid var(--purple);
  border-radius: 18px;
  padding: 22px;

  font-size: 0.85rem;
  line-height: 1.6;

  box-shadow: var(--shadow);

  max-height: calc(100vh - 120px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.sticky-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.sticky-stop {
  position: absolute;
  bottom: 40px; /* ajustable */
}

.sticky-box ul {
  padding-left: 18px;
}

.sticky-box li {
  margin-bottom: 10px;
}

form .btn {
  background: var(--blue);
  color: #fff;
}

form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(46, 79, 163, 0.3);
}

.airtable-form {
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(31, 58, 95, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: fit-content;
}

.airtable-form::after {
  content: "";
  flex-grow: 1;
}

.airtable-embed {
  /*  height: 650px; */
  height: 300px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: white;
}

.airtable-form iframe {
  height: 700px;
}

.cf-turnstile {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 18px 0;
  overflow: hidden;
}

.endorsements-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}

.endorsement-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 28px;
  margin-top: 20px;
}

.endorsement-item {
  padding: 8px 0;
  border-bottom: 1px solid #d9d9d9;

  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.home-endorsements .endorsement-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 22px;
  margin-top: 18px;
}

.home-endorsements .endorsement-item {
  padding-bottom: 6px;
  border-bottom: 1px solid #d9d9d9;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2d3d;
}

.endorsement-item span:first-child {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  max-width: 220px;
}

.name {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.badge {
  background: #eef4ff;

  color: #2952cc;

  padding: 5px 10px;

  border-radius: 999px;

  font-size: 0.75rem;

  font-weight: 700;
}

.load-more {
  margin-top: 20px;
  background: #2e4fa3;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
}

#searchInput {
  width: 100%;
  padding: 10px;
  margin: 12px 0 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.see-all {
  display: inline-block;
  margin-top: 10px;
  color: #2e4fa3;
  font-weight: 600;
  text-decoration: none;
}
.see-all:hover {
  text-decoration: underline;
}

.form-title {
  margin-bottom: 16px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f3a80;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  margin-bottom: 2px;
}

.form-subtitle {
  margin-top: -4px;
  margin-bottom: 18px;
  margin-left: 12px; /* 👈 alinea con texto del título */
  font-size: 0.95rem;
  color: #6b7280; /* gris moderno */
  line-height: 1.6;
  max-width: 500px;
}

.form-title,
.form-subtitle {
  padding-left: 10px; /* mismo que el borde azul */
}

/* LIST */
.list-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.list-item:hover {
  transform: translateX(6px);
  transition: 0.2s;
}

.see-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-weight: bold;
}

.container {
  max-width: 1280px;
  margin: auto;
  padding: 40px 20px;
}

/* PRINCIPLES */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.flip-card {
  height: 180px;
  perspective: 1000px;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  transition: 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  backface-visibility: hidden;
}

.flip-card-front {
  background: #fff;
  border: 1px solid rgba(46, 79, 163, 0.12);
  transition: all 0.3s ease;
}

.flip-card-back {
  background: var(--navy);
  color: #fff;
  transform: rotateY(180deg);
}

#candidates {
  margin-top: 40px;
}

#endorsements h2,
#candidates h2 {
  margin-top: 0;
  /* font-size: 2.2rem; */
  margin-bottom: 20px;
}

#endorsements {
  padding-top: 10px;
}

.coming-soon-title {
font-size: 1.35rem;
font-weight: 700;
margin-top: 8px;
margin-bottom: 14px;
color: #3553a4;
}

.coming-soon-text {
  max-width: 700px;
  line-height: 1.8;
  color: #555;
}

.section-subtitle {
  margin-top: 14px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.6px;
}

#candidates {
  padding-top: 15px;
}

.candidates-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

  gap: 18px;

  align-items: start;
}

.candidate-card {
  background: #fff;

  border-radius: 18px;

  padding: 14px;

  box-shadow: var(--shadow);

  position: relative;

  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.candidate-card:hover {
  transform: translateY(-4px);
}

.candidate-card span {
  position: absolute;
  top: 12px;
  right: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.candidate-card img {
  width: 100%;

  height: 160px;

  object-fit: cover;

  border-radius: 14px;

  margin-bottom: 12px;
}

.candidate-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.candidate-card p {
  font-size: 0.95rem;
  color: #555;
}

.candidate-role {
  font-size: 0.95rem;

  line-height: 1.4;

  color: #555;
}

.badge-signed {
  background: #e6f4ea;
  color: #1e7e34;
  border: 1px solid #c3e6cb;
}

.badge-refused {
  background: #fdecea;
  color: #c62828;
}

.badge-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.badge-signed,
.badge-refused,
.badge-pending {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
}

/* Header clickable */
.accordion-header {
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #eee;
}

/* Icono */
.accordion-icon {
  transition: transform 0.3s ease;
}

.counter-card {
  text-align: center;
  background: linear-gradient(135deg, #2e4fa3, #6a3ea1);
  color: white;
  padding: 30px 20px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#selectedCount {
  font-size: 3rem;
  font-weight: bold;
  display: block;
}

.counter-label {
  margin-top: 8px;
  font-size: 0.95rem;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

/* Contenido oculto por defecto */
.accordion-content {
  max-height: none;
}

/* FOOTER */
footer {
  text-align: center;
  background: var(--navy);
  color: #fff;
  padding: 30px;
}

/* LAPTOP */
@media (max-width: 1366px) {
  main {
    padding-right: 240px;
  }

  .sticky-box {
    width: 180px;
    right: 12px;
    font-size: 0.85rem;
  }

  .home-endorsements .endorsement-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* TABLET */
@media (max-width: 1100px) {
  main {
    padding-right: 0;
  }

  .sticky-box {
    position: static;
    width: 100%;
    margin-top: 20px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  nav {
    gap: 16px;
  }

  .logo img {
    height: 55px;
  }

  .nav-btn {
    padding: 8px 14px;
  }

  .home-endorsements .endorsement-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .sticky-box {
    position: static !important; /* 🔥 clave */
    width: 100%;
    margin: 20px 0;
    top: auto;
    right: auto;
    border-left: none;
    border-top: 4px solid var(--purple);
    max-height: none; /* 🔥 importante */
    overflow: visible;
  }

  .page-wrapper {
    padding-right: 0; /* 🔥 evita espacios raros */
  }

  .home-endorsements .endorsement-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  /* HEADER */
  header {
    flex-direction: column;
    height: auto;
    padding: 16px;
  }

  nav {
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-btn {
    margin-top: 10px;
  }

  .logo {
    height: 50px;
  }

  .logo img {
    height: 110px;
    transform: translateY(-25px);
  }

  /* HERO */
  .hero {
    margin: 24px 12px;
    border-radius: 22px;
  }

  .hero-banner {
    min-height: 420px;

    object-fit: cover;
  }

  .hero-overlay {
    bottom: 85px;

    width: 88%;
  }

  .hero-text {
    font-size: 1.15rem;

    line-height: 1.45;

    margin-bottom: 22px;

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  }

  .btn-primary {
    padding: 14px 26px;

    font-size: 1rem;

    border-radius: 14px;
  }

  .hero::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.35)
    );
  }

  .hero-overlay {
    z-index: 2;
  }

  .hero h1 {
    font-size: 2rem;
  }

  /* LAYOUT */
  main {
    padding: 0 16px;
  }

  body {
    padding-bottom: 70px;
  }

  section {
    padding: 30px 0;
  }

  /* ENDORSEMENTS STACK */
  .endorsements-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  /* IFRAMES */
  .airtable-form iframe {
    height: 520px;
  }

  .airtable-embed {
    height: 300px;
  }

  /* CARDS */
  #endorsements .card {
    width: 100%;
  }

  .endorsement-item {
    padding: 16px;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .name {
    font-size: 1.2rem; /* 🔥 más grande */
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
  }

  .badge {
    font-size: 0.65rem;
    background: #eef2ff;
    color: #2e4fa3;
    padding: 3px 8px;
  }

  /* BOTONES */
  .btn {
    width: 100%;
    padding: 16px;
  }

  /* PLEDGE */
  .sticky-box {
    position: static;
    width: 100%;
    margin-top: 30px;
    border-left: none;
    border-top: 4px solid var(--purple);
  }
  .mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--blue);
    color: white;
    text-align: center;
    padding: 14px;
    font-weight: bold;
    z-index: 1000;
  }

  .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .accordion.active .accordion-content {
    max-height: 1000px; /* suficiente para expandir */
  }

  .accordion.active .accordion-icon {
    transform: rotate(90deg);
  }

  .home-endorsements .endorsement-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
  }

  .home-endorsements .endorsement-item {
    font-size: 0.88rem;
  }
  .cf-turnstile iframe {
    transform: scale(0.92);
    transform-origin: center;
  }
}
