/**
 * Featured Cards - Editor's Picks Section
 * Standalone styles for the bento grid featured guides section
 *
 * Dependencies: None (self-contained)
 * Used by: /articles/content/index.html
 */

/* ============================================================================
   Featured Section - Bento Grid Design
   Modern asymmetric layout with visual hierarchy through card size
   ============================================================================ */

/* Featured Section Container */
#featured-section {
  position: relative;
}

/* Featured grid container */
#featured-grid {
  position: relative;
}

/* ============================================================================
   Bento Grid Header
   ============================================================================ */
.bento-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.bento-header-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.bento-header-icon i {
  font-size: 1rem;
  color: #b45309;
}

.bento-header-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a3a3a3;
  line-height: 1;
}

.bento-header-title {
  font-size: 1rem;
  font-weight: 600;
  color: #171717;
  margin-top: 2px;
}

/* ============================================================================
   Bento Grid Layout
   ============================================================================ */
.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
  }
}

/* Secondary cards stack */
.bento-secondary-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .bento-secondary-stack {
    gap: 0.875rem;
  }
}

/* ============================================================================
   Bento Primary Card
   ============================================================================ */
.bento-primary-card {
  position: relative;
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(229, 229, 229, 0.6);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease-out;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06),
              0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.bento-primary-card:hover {
  border-color: rgba(191, 219, 254, 0.8);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.1),
              0 4px 8px -2px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Featured badge */
.bento-featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.bento-featured-badge i {
  font-size: 9px;
}

/* Primary icon */
.bento-primary-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.bento-primary-card:hover .bento-primary-icon {
  transform: scale(1.05);
}

.bento-primary-icon i {
  font-size: 1.375rem;
  color: #3b82f6;
}

/* Primary content */
.bento-primary-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #171717;
  line-height: 1.35;
  margin-bottom: 0.625rem;
  transition: color 0.2s ease;
}

.bento-primary-card:hover .bento-primary-title {
  color: #2563eb;
}

.bento-primary-description {
  font-size: 0.875rem;
  color: #525252;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Meta row */
.bento-primary-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #737373;
  margin-bottom: 1rem;
}

.bento-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bento-meta-item i {
  font-size: 13px;
  color: #a3a3a3;
}

.bento-meta-divider {
  color: #d4d4d4;
}

/* Footer */
.bento-primary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  border-top: 1px solid #f5f5f5;
  margin-top: auto;
}

.bento-tagline {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 500;
}

.bento-cta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #3b82f6;
  transition: gap 0.2s ease;
}

.bento-primary-card:hover .bento-cta {
  gap: 8px;
}

.bento-cta i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.bento-primary-card:hover .bento-cta i {
  transform: translateX(2px);
}

/* ============================================================================
   Bento Secondary Cards - Hero-Style Float Cards
   Matches the layered, rotated card aesthetic from articles-hero.js
   ============================================================================ */

/* --- Float Card Wrapper (provides positioning context) --- */
.bento-float-card-wrapper {
  position: relative;
  /* Extra padding for depth layer overflow */
  padding-top: 4px;
  padding-left: 4px;
}

.bento-float-card-wrapper--compact,
.bento-float-card-wrapper--minimal {
  padding-top: 0;
  padding-left: 0;
}

/* --- Depth Layer (shadow card behind main card) --- */
.bento-depth-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #eff6ff, #dbeafe80);
  border-radius: 1rem;
  pointer-events: none;
  z-index: 0;
}

.bento-depth-layer--primary {
  top: 6px;
  left: 6px;
  right: -2px;
  bottom: -2px;
  transform: rotate(1.5deg);
}

/* --- Base Float Card --- */
.bento-float-card {
  position: relative;
  display: block;
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(229, 231, 235, 0.8);
  padding: 1rem;
  z-index: 1;
  box-shadow:
    0 4px 12px -2px rgba(0, 0, 0, 0.08),
    0 2px 4px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-float-card:hover {
  box-shadow:
    0 12px 32px -4px rgba(0, 0, 0, 0.12),
    0 4px 8px -2px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  border-color: rgba(191, 219, 254, 0.8);
}

/* --- Primary Float Card (featured, larger) --- */
.bento-float-card--primary {
  transform: rotate(-0.5deg);
}

.bento-float-card--primary:hover {
  transform: rotate(0deg) translateY(-3px);
}

/* --- Float Card Header --- */
.bento-float-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* --- Icon Box (hero-style gradient) --- */
.bento-float-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe80);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.bento-float-card:hover .bento-float-icon {
  transform: scale(1.05);
}

.bento-float-icon i {
  font-size: 0.9375rem;
  color: #3b82f6;
}

.bento-float-icon--sm {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4375rem;
}

.bento-float-icon--sm i {
  font-size: 0.8125rem;
}

/* --- Float Card Meta --- */
.bento-float-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-float-category {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.bento-float-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  box-shadow: 0 1px 4px rgba(251, 191, 36, 0.2);
}

.bento-float-badge i {
  font-size: 8px;
}

/* --- Float Card Title --- */
.bento-float-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #171717;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.bento-float-card:hover .bento-float-title {
  color: #2563eb;
}

/* --- Progress Bar (hero-style) --- */
.bento-float-progress-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.bento-float-progress-track {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.bento-float-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-float-progress-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  flex-shrink: 0;
}

/* --- Arrow Icon --- */
.bento-float-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #d4d4d4;
  transition: all 0.2s ease;
}

.bento-float-card:hover .bento-float-arrow {
  color: #3b82f6;
  transform: translateY(-50%) translateX(3px);
}

.bento-float-arrow--sm {
  font-size: 14px;
}

/* --- Compact Float Card --- */
.bento-float-card--compact {
  padding: 0.875rem 1rem;
  padding-right: 2.5rem;
  transform: rotate(0.3deg);
}

.bento-float-card--compact:hover {
  transform: rotate(0deg) translateY(-2px);
}

.bento-float-card--compact .bento-float-header {
  margin-bottom: 0;
  align-items: center;
}

.bento-compact-content {
  flex: 1;
  min-width: 0;
}

.bento-compact-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #171717;
  line-height: 1.3;
  margin-bottom: 2px;
  transition: color 0.2s ease;
}

.bento-float-card--compact:hover .bento-compact-title {
  color: #2563eb;
}

.bento-compact-meta {
  font-size: 0.6875rem;
  color: #a3a3a3;
}

/* --- Minimal Float Card --- */
.bento-float-card--minimal {
  padding: 0.75rem 1rem;
  padding-right: 2.25rem;
  background: #fafafa;
  border-color: transparent;
  box-shadow: none;
  transform: rotate(-0.2deg);
}

.bento-float-card--minimal:hover {
  background: white;
  border-color: rgba(229, 231, 235, 0.8);
  box-shadow:
    0 4px 12px -2px rgba(0, 0, 0, 0.06),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transform: rotate(0deg) translateY(-1px);
}

.bento-minimal-indicator {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.bento-float-card--minimal:hover .bento-minimal-indicator {
  transform: scale(1.25);
}

.bento-minimal-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bento-minimal-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #525252;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.bento-float-card--minimal:hover .bento-minimal-title {
  color: #171717;
}

.bento-minimal-meta {
  font-size: 0.6875rem;
  color: #a3a3a3;
  flex-shrink: 0;
}

.bento-float-card--minimal .bento-float-arrow {
  color: transparent;
}

.bento-float-card--minimal:hover .bento-float-arrow {
  color: #3b82f6;
}

/* ============================================================================
   Bento Secondary Stack Layout (Hero-Style)
   ============================================================================ */
.bento-secondary-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (min-width: 768px) {
  .bento-secondary-stack {
    gap: 0.75rem;
  }
}

/* Blur accent beneath the card stack (matches hero illustration) */
.bento-secondary-stack::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
  border-radius: 9999px;
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

/* ============================================================================
   Mobile Optimizations
   ============================================================================ */
@media (max-width: 767px) {
  .bento-header {
    margin-bottom: 1rem;
  }

  .bento-header-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .bento-header-icon i {
    font-size: 0.875rem;
  }

  .bento-primary-card {
    padding: 1.25rem;
  }

  .bento-primary-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.875rem;
  }

  .bento-primary-icon i {
    font-size: 1.125rem;
  }

  .bento-primary-title {
    font-size: 1.125rem;
  }

  .bento-primary-description {
    font-size: 0.8125rem;
  }

  .bento-featured-badge {
    top: 0.875rem;
    right: 0.875rem;
    padding: 4px 8px;
    font-size: 0.625rem;
  }

  /* Float cards mobile - Primary */
  .bento-float-card-wrapper {
    padding-top: 3px;
    padding-left: 3px;
  }

  .bento-depth-layer--primary {
    top: 4px;
    left: 4px;
  }

  .bento-float-card {
    padding: 0.875rem;
    border-radius: 0.875rem;
  }

  .bento-float-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4375rem;
  }

  .bento-float-icon i {
    font-size: 0.8125rem;
  }

  .bento-float-title {
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }

  .bento-float-badge {
    padding: 2px 6px;
    font-size: 0.5rem;
  }

  .bento-float-progress-track {
    height: 5px;
  }

  .bento-float-arrow {
    right: 0.875rem;
    font-size: 14px;
  }

  /* Float cards mobile - Compact */
  .bento-float-card--compact {
    padding: 0.75rem;
    padding-right: 2.25rem;
  }

  .bento-float-icon--sm {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
  }

  .bento-float-icon--sm i {
    font-size: 0.75rem;
  }

  .bento-compact-title {
    font-size: 0.75rem;
  }

  /* Float cards mobile - Minimal */
  .bento-float-card--minimal {
    padding: 0.625rem 0.75rem;
    padding-right: 2rem;
  }

  .bento-minimal-indicator {
    width: 6px;
    height: 6px;
  }

  .bento-minimal-title {
    font-size: 0.75rem;
  }

  /* Stack gap mobile */
  .bento-secondary-stack {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .bento-secondary-stack::after {
    bottom: -6px;
    height: 8px;
    filter: blur(6px);
  }
}

/* ============================================================================
   Legacy Featured Styles (kept for backwards compatibility)
   ============================================================================ */

/* Primary card wrapper with depth effect */
.featured-primary-wrapper {
  position: relative;
}

/* Back depth card - behind primary card only */
.featured-primary-depth {
  position: absolute;
  left: 0.375rem;
  top: 0.375rem;
  width: calc(100% - 0.75rem);
  height: 100%;
  background: linear-gradient(to bottom right, #eff6ff, rgba(219, 234, 254, 0.5));
  border-radius: 0.75rem;
  transform: rotate(2deg);
  z-index: -1;
  pointer-events: none;
}

/* Blur accent beneath primary card */
.featured-primary-blur {
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 1rem;
  background: linear-gradient(to bottom right, #eff6ff, rgba(219, 234, 254, 0.4));
  border-radius: 9999px;
  filter: blur(20px);
  opacity: 0.4;
  z-index: -2;
  pointer-events: none;
}

/* Featured badge - Clean pill style */
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(to bottom right, #fef3c7, rgba(253, 230, 138, 0.5));
  color: #b45309;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.featured-badge i {
  font-size: 9px;
}

/* Grid layout for featured content */
.featured-grid-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .featured-grid-layout {
    grid-template-columns: 1.1fr 1fr;
    gap: 1.25rem;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .featured-grid-layout {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* Secondary items list */
.featured-secondary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Mobile simplifications */
@media (max-width: 639px) {
  .featured-primary-depth,
  .featured-primary-blur {
    display: none;
  }
}
