/* ===========================
   HOME: CAMPAIGN JOIN FORM
   =========================== */

/* Make the whole header area the positioning context */
.page-home .home-join-header{
  position: relative;
}

/* Turn the banner into a fixed-height stage */
.page-home .home-join-banner{
  position: relative;
  height: clamp(600px, 40vw, 800px);
  overflow: hidden;

	background-image: url("/assets/images/home-banner.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Place the form ON TOP of the image, inside the portal (No longer using cloud design, too lazy to change html and class names) */
.page-home .home-join-cloud{
  position: absolute;
  z-index: 5;

  /* Vertical center */
  top: 55%;

  /* Portal center position (adjust this %) */
  left: 27%;

  transform: translate(-50%, -50%);
  width: min(600px, calc(100% - 32px));
	padding: 2rem;
  text-align: center;

  border-radius: 28px;

  background: rgba(255, 255, 255, 0.28);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);

	border: 1px solid rgba(120,255,180,0.35);

	box-shadow:
  0 0 50px rgba(120, 255, 180, 0.35), /* portal glow */
  0 20px 60px rgba(0,0,0,0.35);

	overflow: hidden;
	animation: portalPulse 6s ease-in-out infinite;
}

@keyframes portalPulse {
	0% {
		box-shadow:
			0 0 60px rgba(120, 255, 180, 0.35),
			0 20px 60px rgba(0,0,0,0.45);
	}

	50% {
		box-shadow:
			0 0 145px rgba(120, 255, 180, 0.45),
			0 20px 60px rgba(0,0,0,0.45);
	}

	100% {
		box-shadow:
			0 0 60px rgba(120, 255, 180, 0.35),
			0 20px 60px rgba(0,0,0,0.45);
	}
}

@media (max-width: 600px){
  /* On mobile the banner needs more height to accommodate the centered form */
  .page-home .home-join-banner{
    height: clamp(680px, 120vw, 820px);
    background-position: 42% center; /* pull portal further right on narrow screens */
  }

  /* Reset the desktop left-offset positioning and center the card */
  .page-home .home-join-cloud{
    /* Clear desktop values */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: calc(100% - 2rem); /* full width minus safe margins */
    max-width: 420px;         /* don't let it get huge on wide-ish phones */

    padding: 1.25rem 1rem;
    border-radius: 1.1rem;
  }

  /* Tighten the heading on small screens */
  .page-home .home-join-cloud h2{
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    margin-bottom: 0.9rem;
  }

  /* Make inputs comfortably tappable */
  .page-home .home-join-form input{
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  /* Full-width submit button */
  .page-home .home-join-form .btn{
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }
}

/* ===========================
   PORTAL FORM ELEMENTS
   =========================== */

.page-home .home-join-cloud h2{
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
	color: rgba(10,25,15,0.85);
}

/* Form layout */
.page-home .home-join-form form{
  display: grid;
  gap: 0.75rem;
}

/* Inputs */
.page-home .home-join-form input{
  width: 100%;
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  font-family: inherit;

  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;

  color: #111;

  box-shadow:
    inset 0 1px 4px rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.15);

  transition: all 0.2s ease;
}

/* Placeholder tone */
.page-home .home-join-form input::placeholder{
  color: rgba(20,40,30,0.7);
}

.page-home .home-join-form input:focus{
  outline: none;
  border: 1px solid rgba(120,255,180,0.9);

  box-shadow:
    0 0 0 3px rgba(120,255,180,0.35),
    inset 0 1px 4px rgba(0,0,0,0.15);
}

/* Consent checkbox */
.page-home .home-join-form .consent-label{
	display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
	color: rgba(10,25,15,0.85);
}

.consent-label input[type="checkbox"] {
  accent-color: #1e8f4d;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Submit button */
.page-home .home-join-form .btn{
  position: relative;
  margin-top: 0.5rem;
  padding: 0.75rem 1.25rem;

  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.95rem;

  border-radius: 999px;
  text-decoration: none;

  color: #0a2e1c;

  background:
    linear-gradient(
      135deg,
      rgba(120,255,180,0.35),
      rgba(94,214,255,0.25)
    );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(120,255,180,0.6);

  box-shadow:
    0 0 20px rgba(120,255,180,0.35),
    inset 0 0 12px rgba(120,255,180,0.25);

  transition:
    transform 0.3s ease,
    box-shadow 0.4s ease,
    background 0.6s ease;
}

.page-home .home-join-form .btn::before{
	content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    rgba(120,255,180,0.8),
    rgba(94,214,255,0.7),
    rgba(120,255,180,0.8)
  );

  background-size: 200% 100%;
  z-index: -1;

  filter: blur(10px);
  opacity: 0.6;

  animation: portalFormAura 6s linear infinite;
}

@keyframes portalFormAura{
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

/* Button hover */
.page-home .home-join-form .btn:hover{
  transform: translateY(-4px);

  box-shadow:
    0 0 35px rgba(120,255,180,0.6),
    inset 0 0 16px rgba(120,255,180,0.35);
}


/* ===========================
   PORTAL SUCCESS STATE
=========================== */

.portal-success-message {
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-weight: 500;
}

/* Glow intensifies briefly */
.portal-success-glow {
  animation: portalSuccessPulse 1.2s ease forwards;
}

@keyframes portalSuccessPulse {
  0% {
    box-shadow: 0 0 50px rgba(120, 255, 180, 0.4);
  }
  50% {
    box-shadow: 0 0 200px rgba(120, 255, 180, 0.85);
  }
  100% {
    box-shadow: 0 0 60px rgba(120, 255, 180, 0.5);
  }
}

/* ===========================
   PORTAL SUCCESS SHARE STATE
=========================== */

.portal-success-wrapper {
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
}

.portal-success-text {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portal-success-subtext {
  opacity: 0.85;
  margin-bottom: 1.2rem;
}

.portal-share-btn {
  background: linear-gradient(90deg, #78ffb4, #5ed6ff);
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(120, 255, 180, 0.6);
}

.portal-share-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-size: 1.2rem;
}

.portal-share-links a {
  color: inherit;
  transition: transform 0.2s ease;
}

.portal-share-links a:hover {
  transform: scale(1.15);
}

/* ===========================
   HOME: HEADER (CONDITIONAL STICKY)
   =========================== */

/* Override shared sticky behavior */
body.page-home .site-header{
  position: static;
  top: auto;
}

/* Enabled only when JS adds .is-sticky */
body.page-home .site-header.is-sticky{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}

/* Prevent layout jump when header becomes fixed */
body.page-home.has-sticky-header{
  padding-top: var(--home-header-h, 64px);
}

/* ===========================
   HOME: MEET CANDIDATE SECTION
	 =========================== */
.page-home .meet-candidate{
	position: relative;
  width: 100%;
  padding: clamp(4rem, 7vw, 7rem) 1.5rem;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(120,255,180,0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 40%,
      rgba(0,128,55,0.12),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(0,128,55,0.14),
      rgba(0,128,55,0.05)
    );

  border-top: 1px solid rgba(120,255,180,0.25);
  border-bottom: 1px solid rgba(120,255,180,0.18);
}

.page-home .meet-candidate::before{
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);

  background-size: 4px 4px;
  opacity: 0.25;
  pointer-events: none;
}

.page-home .meet-candidate-inner {
  max-width: 1100px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 3rem;
}

.page-home .meet-candidate .candidate-bio{
	flex: 1;
}

.page-home .meet-candidate h2{
	color: var(--primary);
	margin-bottom: 1rem;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.page-home .candidate-bio p{
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.page-home .candidate-photo img{
	width: 100%;
	max-width: 600px;
	border-radius: 1rem;
}

@media (max-width: 700px){
  .page-home .meet-candidate{
    padding: 2.5rem 1.25rem 3rem;
  }

  /* Stack photo above text */
  .page-home .meet-candidate-inner{
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
  }

  /* Photo sits first, centered, meaningfully large */
  .page-home .candidate-photo{
    width: 65%;
    max-width: 280px;
    flex-shrink: 0;
  }

  .page-home .candidate-photo img{
    width: 100%;
    max-width: unset;
    border-radius: 1rem;
  }

  /* Bio fills width below */
  .page-home .meet-candidate .candidate-bio{
    width: 100%;
  }

  /* Keep button centered */
  .page-home .btn-meet{
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
  }
}

/* ===========================
	 HOME: CANDIDATE BUTTON
   =========================== */
.page-home .btn-meet{
  position: relative;
  display: inline-block;
  margin-top: 1.8rem;
  padding: 0.75rem 1.6rem;

  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.95rem;

  border-radius: 999px;
  text-decoration: none;

  color: #0a2e1c;

  background:
    linear-gradient(
      135deg,
      rgba(120,255,180,0.35),
      rgba(94,214,255,0.25)
    );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(120,255,180,0.6);

  box-shadow:
    0 0 20px rgba(120,255,180,0.35),
    inset 0 0 12px rgba(120,255,180,0.25);

  transition:
    transform 0.3s ease,
    box-shadow 0.4s ease,
    background 0.6s ease;
}

.page-home .btn-meet::before{
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    rgba(120,255,180,0.8),
    rgba(94,214,255,0.7),
    rgba(120,255,180,0.8)
  );

  background-size: 200% 100%;
  z-index: -1;

  filter: blur(10px);
  opacity: 0.6;

  animation: portalButtonAura 6s linear infinite;
}

@keyframes portalButtonAura{
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.page-home .btn-meet:hover{
  transform: translateY(-4px);

  box-shadow:
    0 0 35px rgba(120,255,180,0.6),
    inset 0 0 16px rgba(120,255,180,0.35);
}

/* ===========================
	 HOME: VALUES SECTION
	 =========================== */
.page-home .values-section{
	position: relative;
  padding: clamp(4rem, 6vw, 6rem) 1.5rem;
  overflow: hidden;
}

.page-home .issue-cards{
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap: 1.5rem;
	padding: 1.5rem;
	color: var(--primary);
	text-align: center;
	align-items: center;
}

.page-home .issue-icon{
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);

  text-shadow:
    0 0 12px rgba(120,255,180,0.6);
}

.page-home .values-section h2{
	color: var(--primary);
	text-align: center;
	margin-bottom: 1.5rem;
}

/* Issues Button */
.page-home .values-section .btn-issues{
	position: relative;
	display: block;           /* Important */
  width: fit-content;       /* So it doesn’t stretch */
  margin: 2.5rem auto 0;    /* TRUE centering */
  padding: 0.75rem 1.6rem;

  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.95rem;

  border-radius: 999px;
  text-decoration: none;

  color: #0a2e1c;

  background:
    linear-gradient(
      135deg,
      rgba(120,255,180,0.35),
      rgba(94,214,255,0.25)
    );

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(120,255,180,0.6);

  box-shadow:
    0 0 20px rgba(120,255,180,0.35),
    inset 0 0 12px rgba(120,255,180,0.25);

  transition:
    transform 0.3s ease,
    box-shadow 0.4s ease,
    background 0.6s ease;
}

.page-home .values-section .btn-issues::before{
	content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    rgba(120,255,180,0.8),
    rgba(94,214,255,0.7),
    rgba(120,255,180,0.8)
  );

  background-size: 200% 100%;
  z-index: -1;

  filter: blur(10px);
  opacity: 0.6;

  animation: portalIssuesAura 6s linear infinite;
}

@keyframes portalIssuesAura{
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.page-home .btn-issues:hover{
  transform: translateY(-4px);

  box-shadow:
    0 0 35px rgba(120,255,180,0.6),
    inset 0 0 16px rgba(120,255,180,0.35);
}

@media (max-width: 700px){
	.page-home .issue-cards{
		display: grid;
		grid-template-columns: repeat(2,1fr);
		gap: 1.5rem;
		padding: 1.5rem;
		color: var(--primary);
		text-align: center;
		align-items: center;
	}
}

/* ===========================
	 HOME: NEWS SECTION
	 =========================== */
.page-home .news-section {
  padding: 3rem 0;
}

.page-home .news-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-home .news-inner h2 {
  text-align: center;
  margin: 0 0 1.25rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}

/* Container for injected articles */
.page-home .news-articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1000px) {
  .page-home .news-articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .page-home .news-articles {
    grid-template-columns: 1fr;
  }
}

/* Individual news card */
.page-home .news-article {
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #d6ead6;
  box-shadow: 0 6px 22px rgba(0,0,0,0.22);

  display: flex;
  flex-direction: column;
  min-height: 220px;

  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.page-home .news-article:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 44px rgba(0,0,0,0.32);
	border-color: var(--primary);
}

.page-home .news-article h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--primary, #eaf7ee);
}

.page-home .news-article .news-category {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--primary, #78ffb4);
	margin: 0 0 0.5rem;
}

.page-home .news-article .news-date {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  opacity: 0.75;
  color: var(--muted, rgba(234,247,238,0.72));
}

/* Keep summaries tidy */
.page-home .news-article .news-summary {
  margin: 0;
  color: var(--muted, rgba(234,247,238,0.75));
  line-height: 1.5;

  /* 3-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
	line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more pinned to bottom */
.page-home .news-article .read-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  width: fit-content;

  font-weight: 700;
  text-decoration: none;

  color: var(--primary);
  border: 1px solid rgba(120, 255, 180, 0.25);
  background: rgba(20, 40, 18, 0.18);

  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.page-home .news-article .read-more:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 230, 120, 0.35);
  background: rgba(20, 40, 18, 0.28);
}

/* ===========================
	 NEWS CAROUSEL
	 =========================== */
.page-home .news-carousel {
  display: flex;
  align-items: center;
  gap: 1rem;
	padding: 0.5rem 0;
}

.page-home .news-articles {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
	overflow-y: visible; /* Allow vertical overflow for shadows and hover effects */
  scroll-behavior: smooth;
	padding: 0.5rem 0; /* breathing room for hover */
}

.page-home .news-scroll {
  background: none;
  border: 1px solid rgba(120,255,180,0.4);
  color: var(--primary);
  font-size: 1.2rem;
  padding: 0.6rem;
  border-radius: 50%;
  cursor: pointer;
}

/* ============================================================
   DARK MODE — home page form card
   ============================================================ */

/* Card: swap the frosted-glass white tint for a dark tint,
   keep the portal glow so it still looks cohesive             */
html.a11y-dark .page-home .home-join-cloud {
  background: rgba(15, 30, 20, 0.72);
  border-color: rgba(76, 201, 122, 0.3);
  box-shadow:
    0 0 50px rgba(76, 201, 122, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.55);
}

/* Heading */
html.a11y-dark .page-home .home-join-cloud h2 {
  color: #e8e8e8;
}

/* Inputs */
html.a11y-dark .page-home .home-join-form input {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e8e8e8;
}

html.a11y-dark .page-home .home-join-form input::placeholder {
  color: rgba(200, 220, 210, 0.55);
}

html.a11y-dark .page-home .home-join-form input:focus {
  border-color: rgba(76, 201, 122, 0.75);
  box-shadow:
    0 0 0 3px rgba(76, 201, 122, 0.25),
    inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Consent label */
html.a11y-dark .page-home .home-join-form .consent-label {
  color: rgba(200, 220, 210, 0.8);
}