/**
 * CORTEX101 - Production Stylesheet
 * 
 * Organized, modular CSS with:
 * - CSS Custom Properties for theming
 * - Mobile-first responsive design
 * - Accessibility features
 * - Performance optimizations
 * - Reduced motion support
 */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */

:root {
  /* Colors */
  --color-primary: #7800ff;
  --color-secondary: #ff6400;
  --color-bg: #000000;
  --color-bg-alt: #0a0a15;
  --color-bg-alt2: #0a0510;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-text-dim: rgba(255, 255, 255, 0.5);
  --color-text-faint: rgba(255, 255, 255, 0.3);

  /* Gradients */
  --gradient-silver: linear-gradient(135deg, #fff 0%, #a0a0a0 50%, #fff 100%);
  --gradient-rainbow: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Transitions */
  --transition-fast: 300ms ease-out;
  --transition-normal: 500ms ease-out;
  --transition-slow: 1000ms ease-out;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 80px rgba(255, 255, 255, 0.3);
  --shadow-glow-color: 0 0 100px rgba(100, 100, 255, 0.1);

  /* Z-index */
  --z-particles: 1;
  --z-content: 10;
  --z-modal: 1000;
  --z-error: 10000;
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  direction: rtl;
}

body {
  font-family: 'Vazirmatn', 'Vazir', var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: rtl;
  text-align: right;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(120, 0, 255, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 100, 0, 0.1) 0%, transparent 40%);
  animation: pulse 8s ease-in-out infinite;
  z-index: var(--z-particles);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Particles */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: var(--z-particles);
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-full);
  animation: float 15s infinite;
  will-change: transform, opacity;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Logo */
.logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 8rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  white-space: nowrap;
  position: relative;
  animation: titleReveal 2s ease-out forwards;
  opacity: 0;
  background: var(--gradient-silver);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: var(--shadow-glow);
  z-index: var(--z-content);
  width: 100%;
  text-align: center;
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    letter-spacing: 1em;
    filter: blur(20px);
  }

  100% {
    opacity: 1;
    letter-spacing: 0.5em;
    filter: blur(0);
  }
}

/* Tagline */
.tagline {
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-top: var(--spacing-lg);
  opacity: 0;
  animation: fadeUp 1s ease-out 1.5s forwards;
  color: var(--color-text-muted);
  z-index: var(--z-content);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  opacity: 0;
  animation: fadeUp 1s ease-out 2.5s forwards;
  z-index: var(--z-content);
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.scroll-arrow {
  width: 20px;
  height: 30px;
  border: 2px solid var(--color-text-faint);
  border-radius: var(--radius-lg);
  position: relative;
}

.scroll-arrow::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transform: translateX(-50%);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    top: 6px;
    opacity: 1;
  }

  50% {
    top: 16px;
    opacity: 0.3;
  }
}

/* ========================================
   COMMON SECTION STYLES
   ======================================== */

section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  position: relative;
}

.section-content {
  max-width: 1200px;
  width: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: all var(--transition-slow);
  will-change: transform, opacity;
}

.section-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section headings */
section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.2em;
  text-align: center;
}

/* ========================================
   STORY/SYNOPSIS SECTION
   ======================================== */

.section-story {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 50%, var(--color-bg) 100%);
}

.synopsis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

/* Poster */
.poster {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-color);
}

.poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="30" r="20" fill="rgba(255,255,255,0.03)"/><path d="M20,80 Q50,60 80,80" stroke="rgba(255,255,255,0.05)" fill="none" stroke-width="0.5"/></svg>');
}

.poster-text {
  position: absolute;
  bottom: var(--spacing-lg);
  left: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 1;
}

.poster-text h3 {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.1em;
}

.poster-text p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: var(--spacing-xs);
}

/* Synopsis text */
.synopsis-text h2 {
  text-align: left;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(90deg, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.synopsis-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  font-weight: 300;
}

.synopsis-text p+p {
  margin-top: var(--spacing-md);
}

/* ========================================
   TEAM/CONTRIBUTORS SECTION
   ======================================== */

.section-team {
  background: radial-gradient(ellipse at center, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.section-team h2 {
  margin-bottom: var(--spacing-2xl);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  width: 100%;
}

.team-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
  will-change: transform;
}

.team-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

/* Focus styles for accessibility */
.team-card:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--spacing-md);
  background: linear-gradient(135deg, #333 0%, #111 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-text-faint);
}

.team-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.team-card p {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  font-style: italic;
}

/* ========================================
   MEDIA SECTION
   ======================================== */

.section-media {
  background: var(--color-bg);
  position: relative;
}

.section-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--color-bg) 0%, transparent 20%, transparent 80%, var(--color-bg) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
}

.media-container {
  text-align: center;
  position: relative;
  z-index: var(--z-content);
}

.section-media h2 {
  margin-bottom: var(--spacing-xl);
}

/* Play button */
.play-button {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--color-text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.play-button::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.play-button:hover,
.play-button:focus {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  outline: none;
}

.play-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.play-icon {
  width: 0;
  height: 0;
  border-left: 30px solid var(--color-text);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  margin-left: 8px;
}

/* Video player (when loaded) */
.video-player {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   HIGHLIGHT SECTION
   ======================================== */

.section-highlight {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt2) 50%, var(--color-bg) 100%);
  text-align: center;
}

.section-highlight h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-text-dim);
  margin-bottom: var(--spacing-sm);
}

.highlight-date {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: 0.1em;
  background: var(--gradient-rainbow);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 5s ease infinite;
}

@keyframes gradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.partner-logos {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
  flex-wrap: wrap;
}

.partner-logo {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--color-text-dim);
  transition: all var(--transition-fast);
}

.partner-logo:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text-muted);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  padding: var(--spacing-xl);
  text-align: center;
  background: var(--color-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
  color: var(--color-text-faint);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

footer a {
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}

footer a:hover,
footer a:focus {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }

  section {
    padding: var(--spacing-xl) var(--spacing-sm);
  }

  .synopsis-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-sm);
  }

  .partner-logos {
    gap: var(--spacing-sm);
  }

  .logo {
    font-size: clamp(1.5rem, 8vw, 4rem);
  }
}

@media (max-width: 480px) {
  .team-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
  }

  .play-button {
    width: 80px;
    height: 80px;
  }

  .play-icon {
    border-left-width: 20px;
    border-top-width: 12px;
    border-bottom-width: 12px;
    margin-left: 5px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: var(--z-modal);
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

  .hero::before,
  .particles,
  .scroll-indicator,
  .play-button {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  section {
    page-break-inside: avoid;
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use content-visibility for better performance */
section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: 100vh;
}

/* Optimize animations */
.particle,
.section-content,
.cast-card,
.play-button {
  will-change: transform;
}

/* Prevent layout shift */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Image Placeholder Layouts */

/* Layout 1: Right Sidebar */
.content-layout-right-sidebar {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}

/* Layout 2: Left Sidebar */
.content-layout-left-sidebar {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Layout 3: Top Banner */
.content-layout-top-banner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-layout-top-banner .image-placeholder {
  width: 100%;
  height: 300px;
}

/* Layout 4: Bottom Footer */
.content-layout-bottom-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 2rem;
}

.content-layout-bottom-footer .image-placeholder {
  width: 100%;
  height: 300px;
}

/* Layout 5: Full Width (no sidebar) */
.content-layout-full-width {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-layout-full-width .image-placeholder {
  width: 100%;
  height: 400px;
}

/* Image Placeholder Base Styles */
.image-placeholder {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-color);
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="30" fill="rgba(76,175,80,0.1)"/><path d="M20,80 Q50,60 80,80" stroke="rgba(76,175,80,0.15)" fill="none" stroke-width="2"/></svg>');
  background-size: cover;
}

.image-caption {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  width: 100%;
}

/* Text Content in Layouts */
.text-content {
  flex: 1;
}

/* Responsive Design for Layouts */
@media (max-width: 968px) {

  .content-layout-right-sidebar,
  .content-layout-left-sidebar {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .content-layout-left-sidebar .image-placeholder {
    order: -1;
  }
}

@media (max-width: 768px) {
  .image-placeholder {
    min-height: 200px;
  }

  .content-layout-top-banner .image-placeholder,
  .content-layout-bottom-footer .image-placeholder {
    height: 200px;
  }

  .content-layout-full-width .image-placeholder {
    height: 250px;
  }
}

/* Educational Content Styles for Persian */
.educational-content {
  padding: 2rem;
  line-height: 2;
}

.educational-content h3 {
  font-family: 'Vazirmatn', 'Vazir', var(--font-display);
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--color-primary);
  font-weight: 700;
}

.educational-content h4 {
  font-family: 'Vazirmatn', 'Vazir', var(--font-display);
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.educational-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 2.2;
}

.educational-content ul,
.educational-content ol {
  margin: 1.5rem 0 1.5rem 2rem;
  padding-right: 1.5rem;
}

.educational-content li {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  line-height: 2;
}

.educational-content strong {
  color: var(--color-primary);
  font-weight: 700;
}

.educational-content code {
  background: rgba(76, 175, 80, 0.1);
  padding: 0.2em 0.5em;
  border-radius: 3px;
  font-family: monospace;
}

@media (max-width: 480px) {
  .educational-content {
    padding: 1rem;
  }

  .educational-content ul,
  .educational-content ol {
    padding-right: 1rem;
    margin-left: 0;
  }
}

/* ========================================
   EDUCATIONAL SECTIONS
   ======================================== */

.section-educational {
  min-height: 100vh;
  padding: var(--spacing-2xl) var(--spacing-lg);
}

.section-educational h2 {
  font-family: 'B-NAZANIN', 'Vazirmatn', 'Vazir', var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text);
}

/* Educational Layout */
.educational-layout-with-image {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--spacing-xl);
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

.educational-layout-full {
  max-width: 900px;
  margin: 0 auto;
}

.educational-text {
  font-family: 'B-NAZANIN', 'Vazirmatn', 'Vazir', sans-serif;
  line-height: 2;
}

.educational-description {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  line-height: 2.2;
}

.educational-card {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.educational-card p {
  font-size: 1.2rem;
  line-height: 2.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.educational-card ul,
.educational-card ol {
  margin: var(--spacing-md) 0 var(--spacing-md) 0;
  padding-right: var(--spacing-lg);
  list-style-position: inside;
}

.educational-card li {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-muted);
}

.educational-card strong {
  color: #4CAF50;
  font-weight: 700;
}

/* Educational Image */
.educational-image {
  position: sticky;
  top: var(--spacing-xl);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.educational-image img {
  width: 100%;
  height: auto;
  max-width: 400px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ========================================
   PIE CHARTS
   ======================================== */

.pie-charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.pie-chart-wrapper {
  display: flex;
  justify-content: center;
}

.pie-chart-figure {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  max-width: 300px;
}

.pie-chart-svg {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--spacing-md);
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.pie-chart-legend {
  font-family: 'B-NAZANIN', 'Vazirmatn', 'Vazir', sans-serif;
}

.pie-chart-legend ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-md) 0;
  text-align: right;
}

.pie-chart-legend li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
  font-size: 1rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.pie-chart-title {
  font-family: 'B-NAZANIN', 'Vazirmatn', 'Vazir', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   RESPONSIVE DESIGN FOR EDUCATIONAL
   ======================================== */

@media (max-width: 968px) {
  .educational-layout-with-image {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .educational-image {
    position: relative;
    top: 0;
    order: -1;
  }
}

@media (max-width: 768px) {
  .section-educational {
    padding: var(--spacing-xl) var(--spacing-sm);
  }

  .educational-card p {
    font-size: 1.1rem;
  }

  .educational-card li {
    font-size: 1rem;
  }

  .pie-charts-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .pie-chart-svg {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .educational-description {
    font-size: 1.1rem;
  }

  .educational-card {
    padding: var(--spacing-md);
  }

  .educational-card p {
    font-size: 1rem;
  }

  .pie-chart-figure {
    padding: var(--spacing-md);
  }

  .pie-chart-svg {
    width: 140px;
    height: 140px;
  }
}