/* ============================================
   The Better Place AI - Resources / Articles
   Article-specific styles. Pairs with styles.css
   and reuses its CSS variables, navbar, footer,
   and button system.
   ============================================ */

/* --- Resources hub --- */

.resources-hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
  overflow: hidden;
  text-align: center;
}

.resources-hero::before {
  content: '';
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 90, 237, 0.12), transparent 60%);
  z-index: 0;
}

.resources-hero .container {
  position: relative;
  z-index: 1;
}

.resources-hero .section-tag {
  background: var(--white);
  border: 1px solid var(--primary-100);
  margin-bottom: 24px;
}

.resources-hero h1 {
  max-width: 800px;
  margin: 0 auto 20px;
}

.resources-hero p {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--gray-600);
  font-size: 1.125rem;
  line-height: 1.6;
}

.resources-hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.resources-section {
  padding: 80px 0;
}

.resources-section-header {
  margin-bottom: 48px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.resources-section-header h2 {
  margin-bottom: 8px;
}

.resources-section-header p {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.resource-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.resource-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.resource-card-cover {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.resource-card-cover::before,
.resource-card-cover::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(40px);
}

.resource-card-cover::before {
  top: -80px;
  right: -80px;
}

.resource-card-cover::after {
  bottom: -80px;
  left: -80px;
}

.resource-card-cover svg {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.95);
  width: 64px;
  height: 64px;
  transition: transform 0.3s ease;
}

.resource-card:hover .resource-card-cover svg {
  transform: scale(1.12);
}

/* Cover gradients per category */
.cover-compliance      { background: linear-gradient(135deg, #2074D5 0%, #4338CA 100%); }
.cover-documentation   { background: linear-gradient(135deg, #7C5AED 0%, #4338CA 100%); }
.cover-operations      { background: linear-gradient(135deg, #F59E0B 0%, #DF2A5D 100%); }
.cover-workforce       { background: linear-gradient(135deg, #DF2A5D 0%, #7C5AED 100%); }
.cover-ai              { background: linear-gradient(135deg, #4338CA 0%, #7CE8F4 100%); }

.resource-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.resource-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.resource-card-category {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.resource-card-divider {
  color: var(--gray-300);
}

.resource-card-readtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gray-500);
}

.resource-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.resource-card-desc {
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.55;
  flex: 1;
}

.resource-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 16px;
  transition: gap 0.2s ease;
}

.resource-card:hover .resource-card-link {
  gap: 10px;
}

/* --- Article page --- */

.article-hero {
  padding: 130px 0 50px;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--gray-200);
}

.article-hero .container {
  max-width: 880px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.article-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: var(--primary);
}

.article-breadcrumb svg {
  color: var(--gray-300);
}

.article-category-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-50);
  color: var(--primary-dark);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.article-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.article-subtitle {
  font-size: 1.1875rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 720px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 36px;
}

.article-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-cover {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.article-cover::before,
.article-cover::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(60px);
}

.article-cover::before {
  top: -120px;
  right: -120px;
}

.article-cover::after {
  bottom: -120px;
  left: -120px;
}

.article-cover svg {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 140px;
  color: rgba(255, 255, 255, 0.95);
  stroke-width: 1.25;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Article body --- */

.article-body {
  padding: 60px 0 40px;
}

.article-body .container {
  max-width: 760px;
}

.article-body p,
.article-body ul,
.article-body ol {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--gray-700);
  margin-bottom: 1.25em;
}

.article-body .lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--gray-700);
  margin-bottom: 1.5em;
}

.article-body h2 {
  font-size: 1.75rem;
  margin: 2.25em 0 0.75em;
  color: var(--gray-900);
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 1.75em 0 0.5em;
  color: var(--gray-900);
}

.article-body strong {
  color: var(--gray-900);
  font-weight: 600;
}

.article-body em {
  font-style: italic;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--primary-dark);
}

.article-body sup a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75em;
  padding: 0 2px;
}

/* --- Stat grid (inside article) --- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 32px 0;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-card-icon svg {
  width: 18px;
  height: 18px;
}

.stat-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.4;
  margin-bottom: 12px;
}

.stat-card-source {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.stat-card-source a {
  color: var(--gray-500);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.stat-card-source a:hover {
  color: var(--primary);
}

/* --- Callout boxes --- */

.callout {
  margin: 32px 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid;
  display: flex;
  gap: 14px;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-icon svg {
  width: 20px;
  height: 20px;
}

.callout-body {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-700);
}

.callout-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
  font-size: 0.9375rem;
}

.callout.warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}
.callout.warning .callout-icon { color: #D97706; }

.callout.info {
  background: var(--primary-50);
  border-color: var(--primary-100);
}
.callout.info .callout-icon { color: var(--primary); }

.callout.success {
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.callout.success .callout-icon { color: #059669; }

.callout.tip {
  background: #F5F3FF;
  border-color: #DDD6FE;
}
.callout.tip .callout-icon { color: var(--secondary); }

/* --- "Why Better Place AI" box --- */

.why-box {
  margin: 40px 0;
  padding: 32px;
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 100%);
}

.why-box-header {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.why-box-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-box-icon svg {
  width: 22px;
  height: 22px;
}

.why-box-title {
  font-size: 1.375rem;
  margin-bottom: 4px;
  color: var(--gray-900);
}

.why-box-eyebrow {
  font-size: 0.8125rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.why-box-intro {
  color: var(--gray-700);
  line-height: 1.65;
  margin-bottom: 20px;
}

.why-box-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.why-box-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--gray-700);
}

.why-box-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232074D5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* --- CTA banner inside article --- */

.article-cta {
  margin: 48px 0;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--grad-cosmos);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.article-cta::before,
.article-cta::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  filter: blur(60px);
}

.article-cta::before {
  top: -100px;
  right: -100px;
}

.article-cta::after {
  bottom: -100px;
  left: -100px;
}

.article-cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.article-cta h3 {
  font-size: 1.625rem;
  color: var(--white);
  margin-bottom: 12px;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 22px;
}

.article-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- References list --- */

.references {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.references h2 {
  font-size: 1.25rem;
  margin-bottom: 18px;
  color: var(--gray-900);
}

.references ol {
  font-size: 0.875rem;
  color: var(--gray-600);
  padding-left: 0;
  list-style: none;
  margin-bottom: 16px;
}

.references li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  line-height: 1.55;
}

.references li::before {
  content: counter(list-counter);
  counter-increment: list-counter;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--gray-400);
  flex-shrink: 0;
  min-width: 24px;
}

.references ol {
  counter-reset: list-counter;
}

.references .ref-source {
  font-weight: 600;
  color: var(--gray-800);
}

.references .ref-year {
  color: var(--gray-500);
}

.references a {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.references a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.references-note {
  font-size: 0.75rem;
  color: var(--gray-400);
  line-height: 1.55;
  margin-top: 24px;
}

/* --- Action checklist (end of article) --- */

.action-list {
  background: var(--gray-50);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px 4px 24px;
  margin: 24px 0;
}

.action-list h3 {
  font-size: 1.0625rem;
  margin-bottom: 12px;
  color: var(--gray-900);
}

/* --- Resources nav active state --- */

.nav-links a.active,
.nav-links-cta a.active {
  color: var(--primary);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .article-hero {
    padding: 110px 0 40px;
  }

  .article-cover {
    aspect-ratio: 16 / 10;
  }

  .article-cover svg {
    width: 96px;
    height: 96px;
  }

  .article-body {
    padding: 40px 0 20px;
  }

  .article-body p,
  .article-body ul,
  .article-body ol {
    font-size: 1rem;
  }

  .article-body .lead {
    font-size: 1.0625rem;
  }

  .why-box,
  .article-cta {
    padding: 24px;
  }

  .article-cta {
    margin: 32px 0;
  }

  .resources-hero {
    padding: 110px 0 60px;
  }
}
