/**
 * AG Learn - Apple-Inspired Blog Design
 * Optimized for scalability from few posts to many
 * Premium aesthetic with smooth GSAP animations
 */

/* ============================================
   VARIABLES & FOUNDATION
   ============================================ */
:root {
  --learn-gradient-start: #558fff;
  --learn-gradient-mid: #6a9fff;
  --learn-gradient-end: #7ee4b3;
  --learn-accent: #558fff;
  --learn-text-primary: #ffffff;
  --learn-text-secondary: #b0b0b0;
  --learn-bg-primary: #0c1321;
  --learn-bg-secondary: #111a2b;
  --learn-card-bg: rgba(26, 26, 26, 0.6);
  --learn-glass-bg: rgba(26, 26, 26, 0.7);
  --learn-border: rgba(255, 255, 255, 0.08);
  --learn-hover-border: rgba(255, 255, 255, 0.15);
  --learn-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --learn-shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.5);
  --learn-transition: ;
}

/* ============================================
   BASE LAYOUT
   ============================================ */
.learn-page {
  background: #0c1321;
  min-height: 100vh;
  overflow-x: hidden;
}

.learn-page .container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.in-hero {
  padding-top: 0.5rem;
  padding-bottom: 0;
}

/* Hero section positioning adjustments for glow effect */
.learn-hero {
  position: relative;
  height: calc(100vh - 6rem);
  width: calc(100vw - 4rem);
  margin: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: visible; /* Changed to visible to allow glow to extend */
  border-radius: 36px;
  top: 2.5rem;
  left: 0.5rem;

  /* CSS Variables for dynamic border effects */
  --mouse-x: 50%;
  --mouse-y: 50%;
  --border-angle: 135deg;
  --border-opacity: 0.6;
}

/* Apple's signature gradient border refraction for hero */
.learn-hero::before {
  content: '';
  position: absolute;
  inset: 0px;
  border-radius: 36px;
  padding: 1.5px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.3) 0%,
    rgba(85, 143, 255, 0.2) 15%,
    rgba(126, 228, 179, 0.15) 35%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(126, 228, 179, 0.15) 65%,
    rgba(85, 143, 255, 0.2) 85%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* Show border when video is playing */
.learn-hero.video-playing::before {
  opacity: var(--border-opacity, 0.6);
}

.learn-hero.video-playing:hover::before {
  --border-opacity: 0.9;
}

/* Video wrapper to contain both layers */
.learn-hero__video-wrapper {
  position: absolute;
  inset: 0;
  overflow: visible; /* Allow glow to extend beyond */
  border-radius: 36px;
  z-index: 0;
}

/* Base video styles */
.learn-hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* Glow layer - blurred and expanded */
.learn-hero__video--glow {
  z-index: 1;
  transform: translate(-50%, -50%) scaleX(1.008) scaleY(1.04); /* Expand beyond borders */
  filter: blur(20px) brightness(1.4) saturate(1.1);
  -webkit-filter: blur(20px) brightness(1.4) saturate(1.4);
  -moz-filter: blur(20px) brightness(1.4) saturate(1.4);
  -ms-filter: blur(20px) brightness(1.4) saturate(1.4);
  -o-filter: blur(20px) brightness(1.4) saturate(1.4);
  opacity: 0;
  border-radius: 0px;
}

/* Main video layer - sharp and contained */
.learn-hero__video--main {
  z-index: 2;
  border-radius: 36px;
  overflow: hidden;
  clip-path: inset(
    0 round 24px
  ); /* Ensure video stays within rounded corners */
}

/* Show both layers when playing */
.learn-hero__video--main.playing {
  opacity: 1;
}

.learn-hero__video--glow.playing {
  opacity: 0.6; /* Subtle glow effect */
}

/* Fallback: ensure videos are visible after timeout if they don't get playing class */
@media (prefers-reduced-motion: no-preference) {
  .learn-hero__video--main {
    animation: fallback-video-visibility 6s ease-out 1 forwards;
  }

  .learn-hero__video--glow {
    animation: fallback-video-visibility-glow 6s ease-out 1 forwards;
  }
}

@keyframes fallback-video-visibility {
  0% {
    opacity: 0;
  }
  99.9% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fallback-video-visibility-glow {
  0% {
    opacity: 0;
  }
  99.9% {
    opacity: 0;
  }
  100% {
    opacity: 0.6;
  }
}

/* Cancel fallback animation once playing class is applied */
.learn-hero__video--main.playing {
  animation: none;
}

.learn-hero__video--glow.playing {
  animation: none;
}

/* Dark overlay for text readability */
.learn-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
  pointer-events: none;
  border-radius: 36px;
}

@keyframes heroGradientFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, -5%) rotate(3deg);
  }
  66% {
    transform: translate(-5%, 5%) rotate(-3deg);
  }
}

.learn-hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero branding */
.learn-hero__brand {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #558fff 0%, #6a9fff 50%, #7ee4b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

/* Hero title */
.learn-hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  filter: blur(8px);
}

.learn-hero__title-gradient {
  background: #fff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero subtitle with shimmer effect */
.learn-hero__subtitle {
  position: relative;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--learn-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0;
  transform: translateY(30px);
  background: linear-gradient(
    90deg,
    var(--learn-text-secondary) 0%,
    var(--learn-text-secondary) 35%,
    rgba(255, 255, 255, 1) 50%,
    var(--learn-text-secondary) 65%,
    var(--learn-text-secondary) 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer animation */
@keyframes subtitleShimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Apply shimmer when triggered */
.learn-hero__subtitle[style*='--shimmer-active: 1'] {
  animation: subtitleShimmer 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll indicator - Apple Liquid Glass Effect */
.learn-hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  z-index: 100;
  overflow: hidden;

  /* CSS Variables for dynamic effects */
  --border-angle: 135deg;
  --border-opacity: 0.7;

  /* Apple glassmorphism foundation */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  /* Smooth transitions */
  transition:
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apple's signature gradient border refraction effect */
.learn-hero__scroll-indicator::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle gradient overlay for glass refraction */
.learn-hero__scroll-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.learn-hero__scroll-indicator:hover {
  transform: translateX(-50%) scale(1.1);
  background: rgba(255, 255, 255, 0.08);
  --border-opacity: 1;
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.18),
    0 2px 8px 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
}

.learn-hero__scroll-indicator:active {
  transform: translateX(-50%) scale(0.95);
  transition-duration: 0.1s;
}

.learn-hero__scroll-indicator.visible {
  opacity: 1;
}

.learn-hero__scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Category filters */
.learn-hero__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

.learn-filter {
  position: relative;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--learn-border);
  border-radius: 50px;
  background: var(--learn-glass-bg);
  backdrop-filter: blur(2px);
  color: var(--learn-text-secondary);
  text-decoration: none;
  transition: var(--learn-transition);
  cursor: pointer;
  overflow: hidden;
}

.learn-filter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--learn-gradient-start),
    var(--learn-gradient-mid),
    var(--learn-gradient-end)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.learn-filter--active {
  border-color: var(--learn-accent);
  color: var(--learn-text-primary);
  background: rgba(17, 196, 212, 0.1);
}

.learn-filter--active::before {
  opacity: 0.15;
}

/* ============================================
   FEATURED POST - Hero Card (Apple Liquid Glass)
   ============================================ */
.learn-featured {
  padding: 3.5rem 0 0;
  margin: 16.5rem 0 8rem;
  background: var(--learn-bg-primary);
  overflow: hidden;
}

.learn-featured__card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 36px;
  background: var(--learn-bg-secondary);
  overflow: hidden;
  transition: var(--learn-transition);
  opacity: 0;
  transform: translateY(40px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);

  /* CSS Variables for border animation */
  --border-angle: 0deg;
  --border-opacity: 0.7;

  /* Remove solid border for gradient border */
  border: none;
}

/* Apple's signature gradient border refraction for featured card */
.learn-featured__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.learn-featured__card:hover::before {
  --border-opacity: 1;
}

.learn-featured__image-link {
  position: relative;
  overflow: hidden;
  border-radius: 36px 0 0 36px;
}

.learn-featured__image {
  position: relative;
  height: 100%;
  min-height: none;
  overflow: hidden;
}

.learn-featured__image img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.learn-featured__card:hover .learn-featured__image img {
  transform: scale(1.05);
}

/* Subtle gradient overlay on image */
.learn-featured__image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.learn-featured__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  z-index: 2;
}

/* Meta info with Apple Liquid Glass Effect */
.learn-featured__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  flex-wrap: wrap;
}

/* Individual meta items with glassmorphism */
.learn-featured__category,
.learn-featured__meta time,
.learn-featured__reading-time {
  position: relative;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  white-space: nowrap;

  /* CSS Variables for border animation */
  --border-angle: 0deg;
  --border-opacity: 0.7;

  /* Apple glassmorphism foundation */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 4px 16px 0 rgba(0, 0, 0, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.05);

  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.learn-featured__category {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Apple's signature gradient border refraction for meta items */
.learn-featured__category::before,
.learn-featured__meta time::before,
.learn-featured__reading-time::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Inner light refraction layer */
.learn-featured__category::after,
.learn-featured__meta time::after,
.learn-featured__reading-time::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 50%;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.learn-featured__divider {
  display: none; /* Remove dividers for cleaner look */
}

.learn-featured__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.learn-featured__title a {
  color: #ffffff;
  text-decoration: none;
  display: inline;
  background-image: linear-gradient(
    to right,
    var(--learn-accent),
    var(--learn-accent)
  );
  background-size: 0% 3px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.learn-featured__excerpt {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  font-weight: 300;
}

.learn-featured__author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.learn-featured__author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--learn-border);
}

.learn-featured__author-name {
  font-weight: 600;
  color: var(--learn-text-primary);
}

.learn-featured__author-title {
  font-size: 0.9rem;
  color: var(--learn-text-secondary);
}

/* Featured CTA - Apple Liquid Glass Effect */
.learn-featured__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 50px;
  position: relative;
  overflow: visible;

  /* CSS Variables for dynamic effects */
  --mouse-x: 50%;
  --mouse-y: 50%;
  --border-angle: 0deg;
  --border-opacity: 0.7;

  /* Apple glassmorphism foundation */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);

  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  align-self: flex-start;

  /* Smooth transitions */
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apple's signature gradient border refraction effect */
.learn-featured__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle gradient overlay for glass refraction */
.learn-featured__cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 50px 50px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 1;
  pointer-events: none;
}

.learn-featured__cta:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  --border-opacity: 1;
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.18),
    0 2px 8px 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
}

.learn-featured__cta:active {
  transform: translateY(0px);
  transition-duration: 0.1s;
}

/* Post grid CTA button - Apple Liquid Glass Effect */
.learn-post__cta {
  display: block;
  width: 100%;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 50px;
  position: relative;
  overflow: visible; /* Changed to allow border gradient to show */

  /* CSS Variables for dynamic effects */
  --mouse-x: 50%;
  --mouse-y: 50%;
  --shimmer-opacity: 0;
  --pulse: 1;
  --border-angle: 0deg;

  /* Apple glassmorphism foundation - More transparent */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);

  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  margin-top: 1.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  /* Smooth transitions */
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apple's signature gradient border refraction effect */
.learn-post__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 1px; /* Border thickness */
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle gradient overlay for glass refraction */
.learn-post__cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 50px 50px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 1;
  pointer-events: none;
}

/* Inner shimmer layer for depth */
.learn-post__cta > span {
  position: relative;
  z-index: 2;
}

.learn-post__cta:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  --border-opacity: 1;
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.18),
    0 2px 8px 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
}

.learn-post__cta:active {
  transform: translateY(0px);
  transition-duration: 0.1s;
}

/* ============================================
   POST GRID - Scalable Layout
   ============================================ */
.learn-grid {
  padding: 6rem 0;
  background: var(--learn-bg-primary);
}

.learn-grid__header {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(30px);
  width: 100%;
  text-align: left;
}

.learn-grid__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: 1rem;
  text-align: center;
}

.learn-grid__subtitle {
  font-size: 1.2rem;
  color: var(--learn-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* Fixed grid system - maintains card widths when filtering */
.learn-grid__posts {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive breakpoints for fixed grid */
@media (max-width: 1200px) {
  .learn-grid__posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .learn-grid__posts {
    grid-template-columns: 1fr;
  }
}

/* Individual post card - FULL BLEED DESIGN */
.learn-post {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 36px;
  background: var(--learn-bg-secondary);
  overflow: hidden; /* Changed from hidden to allow border to show */
  /* Removed CSS transitions - GSAP handles all animations */
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-height: 30rem;
  cursor: pointer;

  /* GPU acceleration for smooth GSAP animations */
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  /* CSS Variables for border animation */
  --border-angle: 0deg;
  --border-opacity: 0.7;

  /* Remove solid border for gradient border */
  border: none;
}

/* Apple's signature gradient border refraction for post cards */
.learn-post::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1.5px; /* Uniform border thickness */
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* Ensure image stays clipped */
.learn-post__image {
  overflow: hidden;
  border-radius: 36px 36px 0 0;
}

.learn-post:hover::before {
  --border-opacity: 1;
}

/* Full bleed image container */
.learn-post__image {
  position: relative;
  height: 30rem;
  overflow: hidden;
  background: var(--learn-bg-secondary);
  border-radius: 36px 36px 0 0;
}

/* Image link wrapper - ensure it covers the entire image area */
.learn-post__image-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

.learn-post__image img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
  /* Simple CSS parallax - smooth and performant */
  transform: translateY(calc(var(--scroll-progress, 0) * -5%));
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; /* Allow clicks to pass through to the link */
}

.learn-post:hover .learn-post__image img {
  transform: translateY(calc(var(--scroll-progress, 0) * -5%)) scale(1.05);
}

/* Strong gradient overlay for better text contrast */
.learn-post__image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  transition: opacity 0.4s ease;
  pointer-events: none; /* Allow clicks to pass through to the link */
}
/* Content positioned over image - full bleed style */
.learn-post__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.55) 80%,
    transparent 100%
  );
  padding-top: 5rem;
  pointer-events: none; /* Allow clicks to pass through */
}

/* Re-enable pointer events for interactive elements */
.learn-post__content a,
.learn-post__content button {
  pointer-events: auto;
}

/* Meta info - Apple Liquid Glass Effect */
.learn-post__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  flex-wrap: nowrap;
}

/* Individual meta items with glass morphism */
.learn-post__category,
.learn-post__date,
.learn-post__reading-time {
  position: relative;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;

  /* CSS Variables for border animation */
  --border-angle: 0deg;
  --border-opacity: 0.7;

  /* Apple glassmorphism foundation - More transparent */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 4px 16px 0 rgba(0, 0, 0, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.05);
}

.learn-post__category {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.learn-post__date,
.learn-post__reading-time {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Apple's signature gradient border refraction for meta items */
.learn-post__category::before,
.learn-post__date::before,
.learn-post__reading-time::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    rgba(255, 255, 255, 0.3) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Inner light refraction layer */
.learn-post__category::after,
.learn-post__date::after,
.learn-post__reading-time::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 50%;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.learn-post__divider {
  display: none; /* Remove dividers for cleaner look */
}

/* Title - Bold and prominent */
.learn-post__title {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.7rem;
  letter-spacing: -0.02em;
  max-width: 75%;
}

.learn-post__title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline;
  background-image: linear-gradient(
    to right,
    var(--learn-accent),
    var(--learn-accent)
  );
  background-size: 0% 3px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

/* Excerpt - Lighter weight, good contrast */
.learn-post__excerpt {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 80%;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
  font-weight: 100;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Footer - Simplified, no border */
.learn-post__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.learn-post__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.learn-post__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.learn-post__author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* Read more - Icon only, clean */
.learn-post__read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: var(--learn-accent);
  text-decoration: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}

.learn-post__read-more::after {
  content: '→';
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
/* ============================================
   NEWSLETTER CTA - Apple Liquid Glass Card
   ============================================ */
.learn-newsletter {
  padding: 8rem 0;
  background: #0c1321;
  position: relative;
  overflow: hidden;
}

/* Subtle stage glow at bottom */
.learn-newsletter::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 250px;
  background: radial-gradient(
    ellipse 90vw 200px at center,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

.learn-newsletter__card {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  border-radius: 36px;
  background: var(--learn-bg-secondary);
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  overflow: hidden;

  /* CSS Variables for border animation */
  --border-angle: 135deg;
  --border-opacity: 0.7;

  /* Remove solid border for gradient border */
  border: none;

  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Video background */
.learn-newsletter__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.learn-newsletter__video.playing {
  opacity: 1;
}

/* Dark overlay for text readability */
.learn-newsletter__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.75) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Content wrapper for proper layering */
.learn-newsletter__content {
  position: relative;
  z-index: 3;
  padding: 4rem;
  max-width: 700px;
  margin: auto;
} /* Apple's signature gradient border refraction */
.learn-newsletter__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.learn-newsletter__card:hover::before {
  --border-opacity: 1;
}

.learn-newsletter__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;

  /* CSS Variables for dynamic effects */
  --border-angle: 135deg;
  --border-opacity: 0.7;

  /* Apple glassmorphism foundation */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px) saturate(200%);
  -webkit-backdrop-filter: blur(2px) saturate(200%);

  /* Remove solid border for gradient border */
  border: none;

  /* Softer shadows for authentic glass look */
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);

  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  /* Smooth transitions */
  transition:
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apple's signature gradient border refraction effect */
.learn-newsletter__icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle gradient overlay for glass refraction */
.learn-newsletter__icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.learn-newsletter__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--learn-text-primary);
}

.learn-newsletter__description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--learn-text-secondary);
  margin-bottom: 3rem;
}

.learn-newsletter__form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.learn-newsletter__input {
  position: relative;
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: 50px;
  background: transparent;
  backdrop-filter: blur(2px);
  border: 2px solid var(--learn-border);
  color: var(--learn-text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;

  /* CSS Variables */
  --border-opacity: 0.7;
  opacity: 1 !important;

  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);
}

.learn-newsletter__input:focus {
  outline: none;
  --border-opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-color: transparent;
}

.learn-newsletter__input::placeholder {
  color: var(--learn-text-secondary);
}

.learn-newsletter__submit {
  position: relative;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(2px);
  color: var(--learn-text-primary);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: visible;

  /* CSS Variables */
  --border-opacity: 0.7;

  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.06);

  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient border for submit button */
.learn-newsletter__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(
    var(--border-angle, 135deg),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    rgba(255, 255, 255, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--border-opacity, 0.7);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* Glass refraction overlay */
.learn-newsletter__submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 50px 50px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 1;
  pointer-events: none;
}

.learn-newsletter__submit:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  --border-opacity: 1;
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.18),
    0 2px 8px 0 rgba(255, 255, 255, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
}

.learn-newsletter__submit:active {
  transform: translateY(0px);
  transition-duration: 0.1s;
}

.learn-newsletter__privacy {
  font-size: 0.9rem;
  color: var(--learn-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem !important;
}

.learn-newsletter__privacy i {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.learn-empty {
  padding: 8rem 0;
  text-align: center;
}

.learn-empty__icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--learn-card-bg);
  border: 1px solid var(--learn-border);
  font-size: 3rem;
}

.learn-empty__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.learn-empty__message {
  font-size: 1.1rem;
  color: var(--learn-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   LOADING STATES
   ============================================ */
.learn-post--loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Skeleton loader */
.learn-skeleton {
  background: linear-gradient(
    90deg,
    var(--learn-card-bg) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    var(--learn-card-bg) 100%
  );
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  .learn-grid__posts {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .learn-hero {
    height: calc(100vh - 3rem);
    width: calc(100vw - 1.5rem);
    margin: 1.5rem 0.75rem;
    border-radius: 20px;
  }

  .learn-hero::before {
    border-radius: 20px;
  }

  .learn-hero::after,
  .learn-hero__video-container {
    border-radius: 20px;
  }

  .learn-featured__card {
    grid-template-columns: 1fr;
  }

  .learn-featured__image-link {
    border-radius: 36px 36px 0 0;
  }

  .learn-featured__image {
    min-height: 400px;
    border-radius: 36px 36px 0 0;
  }

  .learn-featured__content {
    padding: 3rem;
  }

  .learn-newsletter__form {
    flex-direction: column;
  }

  .learn-newsletter__submit {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .learn-page .container {
    padding: 0 1.5rem;
  }

  .learn-hero {
    height: calc(100vh - 2rem);
    width: calc(100vw - 1rem);
    margin: 1rem 0.5rem;
    border-radius: 16px;
  }

  .learn-hero::before {
    border-radius: 16px;
  }

  .learn-hero::after,
  .learn-hero__video-container {
    border-radius: 16px;
  }

  .learn-hero__content {
    padding: 0 1.5rem;
  }

  .learn-hero__scroll-indicator {
    bottom: 1.5rem;
  }

  .learn-hero__filters {
    justify-content: flex-start;
  }

  /* Single column on mobile */
  .learn-grid__posts {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Full bleed cards - adjust heights for mobile */
  .learn-post__image {
    height: 240px;
  }

  .learn-post__content {
    padding: 1.5rem;
  }

  .learn-post__title {
    font-size: 1.5rem;
  }

  .learn-featured__image {
    min-height: 300px;
  }

  .learn-featured__content {
    padding: 2rem;
  }

  .learn-newsletter__card {
    padding: 3rem 2rem;
  }

  .learn-newsletter__content {
    padding: 3rem 2rem;
  }
}

@media (max-width: 480px) {
  .learn-hero {
    height: calc(100vh - 1.5rem);
    width: calc(100vw - 0.75rem);
    margin: 0.75rem 0.375rem;
    border-radius: 12px;
  }

  .learn-hero::before {
    border-radius: 12px;
  }

  .learn-hero::after,
  .learn-hero__video-container {
    border-radius: 12px;
  }

  .learn-hero__content {
    padding: 0 1rem;
  }

  .learn-hero__scroll-indicator {
    bottom: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .learn-hero__filters {
    width: 100%;
  }

  .learn-filter {
    flex: 1;
    text-align: center;
    justify-content: center;
    min-width: calc(50% - 0.5rem);
  }

  .learn-post__content {
    padding: 1.25rem;
  }

  .learn-post__meta {
    font-size: 0.7rem;
    gap: 0.5rem;
  }

  .learn-post__title {
    font-size: 1.35rem;
  }

  .learn-post__excerpt {
    font-size: 0.9rem;
  }

  .learn-post__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .learn-post__read-more {
    align-self: flex-end;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states */
.learn-filter:focus-visible,
.learn-newsletter__input:focus-visible,
.learn-newsletter__submit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .learn-filter,
  .learn-post,
  .learn-featured__card,
  .learn-newsletter__card {
    border-width: 2px;
  }
}
