/* ============================================================
   ENDORSEMENTS PAGE — Image Grid with Pulsing Diamond X Links
   Design: Cinematic dark navy, orange accents, HUD aesthetic
   ============================================================ */

/* --- Hero Section (original cinematic style) --- */
.end-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 0 3rem;
  overflow: hidden;
  background: var(--navy);
}
.end-hero-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/endorsements_hero_bg.webp') center/cover no-repeat;
  opacity: 0.35;
}
.end-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,20,40,0.5) 0%, rgba(10,20,40,0.8) 50%, var(--navy) 100%);
}
.end-hero-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}
.end-hero-inner {
  position: relative;
  z-index: 3;
}
.end-hero-h1 {
  font-family: "Geometos Neue Bold", "Geometos Neue", var(--font-display);
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.95;
  color: var(--bone);
  margin: 1rem 0 1.5rem;
  display: flex;
  flex-direction: column;
}
.end-hero-sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(244,241,234,0.65);
  max-width: 600px;
  margin-bottom: 1rem;
}
.end-hero-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: rgba(255,107,26,0.8);
  margin-top: 0.5rem;
}

/* Nav active state */
.nav-link.active {
  color: var(--orange);
}

/* --- CTA Section (Ready to Lock In) --- */
.end-cta {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(180deg, #060B19 0%, var(--navy) 100%);
  overflow: hidden;
}
.end-cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(255,107,26,0.04), transparent 60%);
  pointer-events: none;
}
.end-cta-inner {
  position: relative;
  z-index: 2;
}
.end-cta-h2 {
  font-family: "Geometos Neue Bold", "Geometos Neue", var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.95;
  color: var(--bone);
  margin: 1rem 0 1.5rem;
}
.end-cta-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(244,241,234,0.6);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.end-cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

/* --- Endorsement Grid Section --- */
.endorsement-grid-section {
  padding: 4rem 2rem 5rem;
  background: #0a0e1a;
  position: relative;
}

.endorsement-grid-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,26,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,26,0.012) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* --- The Grid --- */
.endorsement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* --- Individual Endorsement Card --- */
.endorsement-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255,107,0,0.12);
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), 
              box-shadow 0.3s cubic-bezier(0.23,1,0.32,1),
              border-color 0.3s ease;
  cursor: default;
  opacity: 0;
  animation: card-enter 0.6s cubic-bezier(0.23,1,0.32,1) forwards;
}

.endorsement-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 16px 48px rgba(255,107,0,0.12), 0 4px 12px rgba(0,0,0,0.5);
  border-color: rgba(255,107,0,0.35);
}

/* Staggered entrance */
.endorsement-card:nth-child(1) { animation-delay: 0.05s; }
.endorsement-card:nth-child(2) { animation-delay: 0.12s; }
.endorsement-card:nth-child(3) { animation-delay: 0.19s; }
.endorsement-card:nth-child(4) { animation-delay: 0.26s; }
.endorsement-card:nth-child(5) { animation-delay: 0.33s; }
.endorsement-card:nth-child(6) { animation-delay: 0.40s; }
.endorsement-card:nth-child(7) { animation-delay: 0.47s; }
.endorsement-card:nth-child(8) { animation-delay: 0.54s; }
.endorsement-card:nth-child(9) { animation-delay: 0.61s; }

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image container */
.endorsement-card .card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.endorsement-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
}

.endorsement-card:hover .card-image img {
  transform: scale(1.03);
}

/* --- Pulsing Diamond X Link --- */
.diamond-x-link {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,26,0.88);
  border: 2px solid #ff6b00;
  transform: rotate(45deg);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
  animation: diamond-pulse 2.5s ease-in-out infinite;
  text-decoration: none;
}

.diamond-x-link:hover {
  background: #ff6b00;
  border-color: #fff;
  box-shadow: 0 0 20px rgba(255,107,0,0.7);
  animation: none;
}

.diamond-x-link svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
  transform: rotate(-45deg);
}

.diamond-x-link:hover svg {
  fill: #0a0e1a;
}

/* Pulse animation */
@keyframes diamond-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255,107,0,0.4);
  }
  50% {
    box-shadow: 0 0 14px 5px rgba(255,107,0,0.25);
  }
}

/* Staggered pulse delays */
.endorsement-card:nth-child(1) .diamond-x-link { animation-delay: 0s; }
.endorsement-card:nth-child(2) .diamond-x-link { animation-delay: 0.3s; }
.endorsement-card:nth-child(3) .diamond-x-link { animation-delay: 0.6s; }
.endorsement-card:nth-child(4) .diamond-x-link { animation-delay: 0.9s; }
.endorsement-card:nth-child(5) .diamond-x-link { animation-delay: 1.2s; }
.endorsement-card:nth-child(6) .diamond-x-link { animation-delay: 1.5s; }
.endorsement-card:nth-child(7) .diamond-x-link { animation-delay: 1.8s; }
.endorsement-card:nth-child(8) .diamond-x-link { animation-delay: 2.1s; }
.endorsement-card:nth-child(9) .diamond-x-link { animation-delay: 2.4s; }

/* --- Follow CTA Section --- */
.follow-cta-section {
  padding: 3rem 2rem 4rem;
  background: linear-gradient(180deg, #0a0e1a 0%, #0d1220 100%);
  text-align: center;
}

.follow-cta-section p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.2rem;
}

.follow-cta-section .x-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  background: transparent;
  border: 2px solid #ff6b00;
  color: #ff6b00;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.follow-cta-section .x-follow-btn:hover {
  background: #ff6b00;
  color: #0a0e1a;
  box-shadow: 0 0 20px rgba(255,107,0,0.3);
}

.follow-cta-section .x-follow-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .endorsement-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .endorsement-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .endorsements-hero {
    min-height: 30vh;
    padding: 5rem 1.5rem 3rem;
  }

  .diamond-x-link {
    width: 30px;
    height: 30px;
    bottom: 8px;
    right: 8px;
  }

  .diamond-x-link svg {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 400px) {
  .endorsement-grid {
    grid-template-columns: 1fr;
  }
}
