/* WiwiOpportunity — home (hero, featured, filters, list, newsletter) + archive */

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  color: #fff;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-blob--1 {
  top: -180px;
  right: -140px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(145, 150, 250, 0.45), transparent 65%);
  animation: wFloat 14s ease-in-out infinite alternate;
}

.hero-blob--2 {
  bottom: -160px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(209, 186, 246, 0.3), transparent 65%);
  animation: wFloat 18s ease-in-out infinite alternate-reverse;
}

@keyframes wFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(36px, -28px, 0) scale(1.12);
  }
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(52px, 8vw, 104px) clamp(20px, 4vw, 32px) clamp(52px, 7vw, 88px);
  text-align: center;
}

.hero-title {
  font-size: var(--h1-hero);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.hero-sub {
  max-width: 600px;
  font-size: clamp(15px, 1.7vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-on-dark-2);
}

.hero-search {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 640px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--shadow-hero);
}

.hero-search:focus-within {
  box-shadow: var(--shadow-hero), var(--focus-ring);
}

.hero-search-input {
  flex: 1;
  min-width: 170px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.hero-search-btn {
  padding: 12px 26px;
  font-size: 15px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-chips-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.hero-chip {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease);
}

.hero-chip:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28);
}

.hero-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 13px;
}

.hero-social-label {
  color: rgba(255, 255, 255, 0.5);
}

.hero-social .social-link {
  color: var(--mauve);
}

.hero-social .social-link:hover {
  color: #fff;
}

/* Featured ---------------------------------------------------------------- */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
  margin-top: 24px;
}

.featured-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(46, 20, 81, 0.1);
  border-radius: var(--r-panel);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(46, 20, 81, 0.18);
  color: var(--ink);
  text-decoration: none;
}

.featured-card--dark {
  border-color: transparent;
  background: var(--grad-card-dark);
  color: #fff;
}

.featured-card--dark:hover {
  color: #fff;
}

.featured-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.featured-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

.featured-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
}

.featured-desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}

.featured-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.featured-deadline {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.featured-cta {
  font-size: 14px;
  font-weight: 800;
  color: var(--link);
}

.featured-card--dark .featured-meta,
.featured-card--dark .featured-desc,
.featured-card--dark .featured-deadline {
  color: rgba(255, 255, 255, 0.72);
}

.featured-card--dark .featured-cta {
  color: var(--mauve);
}

/* Filters panel + results row --------------------------------------------- */

.filters-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-panel);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters-search {
  flex: 2;
  min-width: 200px;
  width: auto;
}

.filters-country {
  flex: 1;
  min-width: 160px;
  width: auto;
  padding: 11px 16px;
}

.results-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 2px 14px;
}

.results-count {
  font-size: 15px;
  font-weight: 800;
}

.btn-clear {
  padding: 6px 12px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--bg-chip);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  transition: background var(--t-fast) var(--ease);
}

.btn-clear:hover {
  background: rgba(46, 20, 81, 0.1);
}

.results-hint {
  margin-left: auto;
  font-size: 12.5px;
  color: rgba(46, 20, 81, 0.45);
}

/* Cards ------------------------------------------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(46, 20, 81, 0.1);
  border-radius: var(--r-card);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(145, 150, 250, 0.7);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  text-decoration: none;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-title {
  font-size: 16.5px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.card-org {
  font-size: 13.5px;
  color: var(--ink-3);
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.card-deadline {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(46, 20, 81, 0.55);
}

.card-deadline.is-urgent {
  color: var(--danger);
}

.card--skeleton {
  min-height: 150px;
  pointer-events: none;
}

/* Archived cards */

.card--archived {
  border-style: dashed;
  border-color: var(--border-strong);
  opacity: 0.85;
  box-shadow: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}

.card--archived:hover {
  opacity: 1;
  border-color: var(--border-strong);
  box-shadow: none;
}

.card--archived .card-title {
  color: rgba(46, 20, 81, 0.8);
}

.card--archived .card-org {
  color: rgba(46, 20, 81, 0.55);
}

.card--archived .card-deadline {
  color: rgba(46, 20, 81, 0.45);
}

/* Empty / error states */

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 52px 16px;
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(145, 150, 250, 0.16);
  font-size: 20px;
  font-weight: 800;
  color: var(--link);
}

.empty-title {
  font-size: 17px;
  font-weight: 800;
}

.empty-hint {
  font-size: 14px;
  color: var(--ink-3);
}

.empty-state .btn {
  margin-top: 6px;
}

.load-error {
  grid-column: 1 / -1;
  padding: 32px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--danger);
}

/* Pagination */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
}

.pagination:empty {
  display: none;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.page-btn:hover {
  border-color: var(--lilas);
}

.page-btn.is-active {
  background: var(--violet-nuit);
  border-color: var(--violet-nuit);
  color: #fff;
}

/* Newsletter -------------------------------------------------------------- */

.newsletter-section {
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(44px, 6vw, 80px);
}

.newsletter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-block);
  background: var(--grad-brand);
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 40px rgba(46, 20, 81, 0.22);
}

.newsletter-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.newsletter-text {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
  padding: 5px;
  border-radius: var(--r-pill);
  background: #fff;
}

.newsletter-form:focus-within {
  box-shadow: var(--focus-ring);
}

.newsletter-form input {
  flex: 1;
  min-width: 150px;
  padding: 11px 16px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}

.newsletter-form .btn {
  padding: 11px 20px;
  font-size: 14px;
}

.newsletter-status {
  min-height: 18px;
  font-size: 13.5px;
  font-weight: 700;
}

.newsletter-status.is-ok {
  color: #94deab;
}

.newsletter-status.is-error {
  color: #ffb3af;
}

.newsletter-social {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-social .social-link {
  color: var(--mauve);
}

.newsletter-social .social-link:hover {
  color: #fff;
}

/* Archive page ------------------------------------------------------------ */

.archive-page {
  padding-top: clamp(28px, 5vw, 52px);
  padding-bottom: clamp(44px, 6vw, 72px);
}

.archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.archive-search {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  width: auto;
}

.archive-toolbar .results-count {
  margin-left: auto;
  font-size: 14px;
}

.cards-grid--archive {
  margin-top: 18px;
}
