/* ===== OurVoice 1.0 — Home Page Styles ===== */

/* ===== Hero Carousel ===== */
.hero {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: var(--gray-900);
}

@media (min-width: 768px) {
  .hero { height: 500px; }
}

.hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero__slide--active {
  opacity: 1;
}

.hero__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 6s ease-out;
}

.hero__slide--active .hero__image {
  transform: scale(1.05);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.hero__caption {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s var(--ease-out) 0.2s forwards;
}

.hero__subtext {
  font-size: 1.0625rem;
  color: #e5e7eb;
  max-width: 40rem;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 0.8s var(--ease-out) 0.4s forwards;
}

/* Reset animation on non-active slides */
.hero__slide:not(.hero__slide--active) .hero__caption,
.hero__slide:not(.hero__slide--active) .hero__subtext {
  animation: none;
  opacity: 0;
  transform: translateY(20px);
}

.hero__slide--active .hero__caption,
.hero__slide--active .hero__subtext {
  animation: heroFadeIn 0.8s var(--ease-out) 0.2s forwards;
}

.hero__slide--active .hero__subtext {
  animation-delay: 0.4s;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .hero__caption { font-size: 3.5rem; }
  .hero__subtext { font-size: 1.25rem; }
}

/* Carousel Indicators */
.hero__indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.hero__dot--active {
  background: var(--white);
  width: 28px;
}

/* ===== Main Action Section ===== */
.actions {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  background: var(--white);
}

.actions__container {
  max-width: 56rem;
  width: 100%;
  text-align: center;
}

.actions__header {
  margin-bottom: 3rem;
}

.actions__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.actions__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .actions__title { font-size: 3rem; }
}

.actions__cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .actions__cards {
    flex-direction: row;
    justify-content: center;
  }
}

/* Action Cards */
.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  min-width: 280px;
  width: 100%;
  max-width: 320px;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.action-card:hover {
  transform: translateY(-4px) scale(1.02);
}

.action-card:active {
  transform: scale(0.98);
}

.action-card--outline {
  background: var(--white);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.action-card--outline:hover {
  border-color: var(--indigo-500);
  box-shadow: var(--shadow-xl);
}

.action-card--outline .action-card__icon {
  background: var(--indigo-50);
  color: var(--indigo-600);
}

.action-card--outline:hover .action-card__icon {
  background: var(--indigo-100);
}

.action-card--primary {
  background: var(--indigo-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.action-card--primary:hover {
  background: var(--indigo-700);
  box-shadow: var(--shadow-xl);
}

.action-card--primary .action-card__icon {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

.action-card--primary:hover .action-card__icon {
  background: rgba(255,255,255,0.3);
}

.action-card__icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: background var(--duration-normal);
}

.action-card__label {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.action-card__desc {
  font-size: 0.875rem;
  opacity: 0.7;
}

.action-card--primary .action-card__desc {
  color: var(--indigo-100);
}

.action-card__arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.action-card--primary:hover .action-card__arrow {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ===== View Metrics Section ===== */
.metrics {
  padding: 4rem 1rem;
  background: var(--bg-secondary);
}

.metrics__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.metrics__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.metrics__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.metrics__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto;
}

.metrics__cta {
  text-align: center;
  margin-top: 2rem;
}

/* --- Category Grid --- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  padding: 1rem 1.25rem; cursor: pointer; text-align: left;
  transition: border-color 0.2s, background 0.2s; width: 100%;
}
.cat-btn:hover { border-color: #818cf8; background: #eef2ff; }
.cat-btn__name { font-size: 1.125rem; font-weight: 600; color: #111827; }
.cat-btn__desc { font-size: 0.875rem; color: #6b7280; margin-top: 0.25rem; }
.cat-btn__arrow { color: #9ca3af; transition: color 0.2s; flex-shrink: 0; margin-left: 1rem; }
.cat-btn:hover .cat-btn__arrow { color: #4f46e5; }

/* --- Back Button --- */
.ov-back { display: inline-flex; align-items: center; gap: 0.25rem; background: none; border: none; color: #6b7280; font: 600 0.875rem 'Plus Jakarta Sans', sans-serif; cursor: pointer; padding: 0.25rem 0; margin-bottom: 1rem; transition: color 0.2s; }
.ov-back:hover { color: #4f46e5; }
.ov-back--inline { margin-bottom: 1.5rem; }

/* --- Metrics Header --- */
.metrics-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }

/* --- Question List --- */
.question-list { display: flex; flex-direction: column; gap: 2rem; }

.question-block {
  background: #fff; border-radius: 0.75rem; padding: 1.5rem;
  border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.question-block__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }

.question-block__layout { display: grid; gap: 1.5rem; }
@media (min-width: 1200px) {
  .question-block__layout--metrics { grid-template-columns: 9fr 3fr; }
}

.question-text { font-size: 1rem; font-weight: 500; color: #111827; margin-bottom: 1rem; }
.question-hint { display: block; font-size: 0.8rem; font-weight: 400; color: #6b7280; margin-top: 0.25rem; }

/* --- Results Panel --- */
.results-panel {
  background: #fafafa; border-radius: 0.5rem; padding: 1rem;
  border: 1px solid #f3f4f6;
}
.results-panel__heading {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 0.75rem;
}
.results-panel__heading--state { color: #1d4ed8; }
.results-panel__heading--national { color: #7c3aed; }

/* --- Result Bars --- */
.result-bar { margin-bottom: 0.5rem; }
.result-bar__header { display: flex; justify-content: space-between; font-size: 0.75rem; color: #6b7280; margin-bottom: 0.25rem; }
.result-bar__label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-bar__track { height: 8px; background: #f3f4f6; border-radius: 999px; overflow: hidden; }
.result-bar__fill { height: 100%; border-radius: 999px; transition: width 1s ease-out; }
.result-bar__fill--blue   { background: #3b82f6; }
.result-bar__fill--purple { background: #8b5cf6; }

/* --- State Breakdown --- */
.state-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; background: none;
  border: none; font: 600 0.8rem 'Plus Jakarta Sans', sans-serif;
  color: #4b5563; cursor: pointer; padding: 0; transition: color 0.2s;
}
.state-toggle:hover { color: #1d4ed8; }
.state-toggle__chevron { transition: transform 0.3s; }
.state-breakdown { display: none; margin-top: 1.5rem; }
.state-breakdown--open { display: block; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.state-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.75rem;
}
.state-card__name { font-size: 0.85rem; font-weight: 600; color: #111827; margin-bottom: 0.5rem; }

/* --- Ad Slot --- */
.ad-slot {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem;
  padding: 1rem; text-align: center; min-height: 250px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-slot ins { display: block; width: 100%; min-height: 250px; }

/* --- Share Button --- */
.share-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem;
  padding: 0.5rem 1rem; font: 600 0.8rem 'Plus Jakarta Sans', sans-serif;
  color: #4b5563; cursor: pointer; transition: all 0.2s;
}
.share-btn:hover { border-color: #a78bfa; color: #7c3aed; }
.share-btn--sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.share-btn--ghost { background: none; border: none; }

/* --- Share Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: #fff; border-radius: 1rem; padding: 1.5rem;
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.modal__header h3 { font-size: 1.125rem; font-weight: 700; }
.modal__close {
  width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
  border: none; background: none; font-size: 1.25rem; color: #6b7280;
  border-radius: 50%; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.modal__close:hover { background: #f3f4f6; color: #374151; }
.modal__desc { font-size: 0.85rem; color: #6b7280; margin-bottom: 1rem; }

.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.share-platform {
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 12px; padding: 0; overflow: hidden;
  width: 72px; height: 72px; margin: 0 auto;
  cursor: pointer; transition: transform 0.15s;
}
.share-platform:hover { transform: scale(1.05); }
.share-platform:active { transform: scale(0.95); }

.share-url {
  display: flex; align-items: center; gap: 0.5rem;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.5rem 0.75rem;
}
.share-url span { flex: 1; font-size: 0.8rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-copy-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: none; background: #f3f4f6;
  border-radius: 0.375rem; cursor: pointer; color: #6b7280; transition: background 0.2s;
}
.share-copy-btn:hover { background: #e5e7eb; }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: #1e293b; color: #fff; padding: 0.75rem 1.5rem;
  border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2); z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.toast--visible { transform: translateX(-50%) translateY(0); }

/* ===== Features Grid ===== */
.features {
  padding: 4rem 1rem;
  background: var(--bg-secondary);
}

.features__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.5rem;
}

.feature-card__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  color: var(--indigo-600);
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
