/* Ported from src/components/HeroSection.astro and PostCard.astro (#658/#659).
 * Astro scopes these per-component; here they're plain global CSS since the
 * class names (.hero-*, .centered-*, .post-card, .category-tag, .story-*)
 * are already unique enough not to collide with anything else on the site.
 */

/* ── Hero icon ─────────────────────────────────────────────────────────── */
.hero-icon {
  font-size: 2.5rem;
  color: #3157d6;
  margin-bottom: 0.75rem;
  display: block;
}

/* ── Split variant ─────────────────────────────────────────────────────── */
.hero-section {
  width: 100%;
  min-height: 480px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 480px;
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    min-height: 540px;
  }
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem;
  background-color: #0f172a;
  color: #f8fafc;
  order: 2;
}

@media (min-width: 768px) {
  .hero-text-col {
    padding: 4rem 3rem;
    order: 1;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 42ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background-color: #1e40af;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.15s;
  align-self: flex-start;
}

.hero-cta:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.hero-image-col {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  order: 1;
}

@media (min-width: 768px) {
  .hero-image-col {
    min-height: unset;
    order: 2;
  }
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 60%, #0ea5e9 100%);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.15) 50%,
    rgba(15, 23, 42, 0.00) 100%
  );
  pointer-events: none;
}

.story-cards-stack {
  position: absolute;
  bottom: 1.25rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .story-cards-stack {
    bottom: 1.5rem;
    left: 1.25rem;
    right: 1.25rem;
  }
}

.story-card {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.story-card:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.story-card-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 0.25rem;
}

.story-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: #f8fafc;
}

.story-card-date {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* ── Centered variant ───────────────────────────────────────────────────── */
.centered-hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0f172a;
}

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

.centered-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.centered-hero-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 60%, #0ea5e9 100%);
}

.centered-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  pointer-events: none;
}

.centered-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 720px;
  width: 100%;
}

.centered-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 0.85rem;
}

.centered-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.centered-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #e2e8f0;
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 56ch;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.centered-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background-color: #1e40af;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.15s;
}

.centered-cta:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

/* ── PostCard ───────────────────────────────────────────────────────────── */
.post-card {
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.15s;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

.category-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b82f6;
  background-color: transparent;
  border: 1px solid #3b82f6;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Homepage (ported from src/pages/index.astro, #660) ──────────────────── */
.featured-card {
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.15s;
}

.featured-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

.category-card {
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.15s;
}

.category-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

.category-pill {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 9999px;
  white-space: nowrap;
}

.cat-icon-blue   { background-color: rgba(59, 130, 246, 0.1); }
.cat-icon-red    { background-color: rgba(239, 68, 68, 0.1); }
.cat-icon-orange { background-color: rgba(249, 115, 22, 0.1); }
.cat-icon-green  { background-color: rgba(16, 185, 129, 0.1); }

/* ── Blog post prose (ported from src/layouts/BlogPost.astro, #661) ──────── */
.prose {
  color: #334155;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #1e293b;
  font-weight: 700;
}

.prose a {
  color: #3b82f6;
  text-decoration: none;
}

.prose a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.prose ul,
.prose ol {
  margin-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
