:root {
  --bg-color: #0d141a;
  --surface-primary: #231933;
  --surface-secondary: #0d141a;
  --surface-hover: rgba(110, 75, 146, 0.3);
  --border-color: rgba(110, 75, 146, 0.25);
  --border-highlight: #6e4b92;
  
  --text-main: #ffffff;
  --text-muted: #f3efff; /* Soft purple text */
  --text-dark: #a89bbd; /* Slightly darker for labels */
  
  --accent-main: #6e4b92;
  --accent-light: #9471b8;
  --accent-gradient: linear-gradient(135deg, #6e4b92 0%, #9471b8 100%);
  
  --shadow-sm: 0 4px 12px rgba(13, 20, 26, 0.5);
  --shadow-md: 0 8px 24px rgba(13, 20, 26, 0.8);
  --shadow-glow: 0 0 40px rgba(110, 75, 146, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  --max-width: 1280px;
}

[data-theme="light"] {
  --bg-color: #f7fafc;
  --surface-primary: #ffffff;
  --surface-secondary: #edf2f7;
  --surface-hover: rgba(110, 75, 146, 0.05);
  --border-color: rgba(110, 75, 146, 0.15);
  --border-highlight: #6e4b92;
  
  --text-main: #1a202c;
  --text-muted: #4a5568;
  --text-dark: #2d3748;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 40px rgba(110, 75, 146, 0.15);
}

.btn-theme {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  position: relative;
  transition: all var(--transition-fast);
  outline: none;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.btn-theme svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0 !important;
}

.btn-theme:hover {
  background: var(--surface-hover);
  border-color: var(--border-highlight);
  color: var(--text-main);
}

[data-theme="light"] .btn-theme .sun-icon { display: block !important; }
[data-theme="light"] .btn-theme .moon-icon { display: none !important; }



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--accent-main);
  color: #fff;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Variables */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p {
  color: var(--text-muted);
  font-size: 1.125rem;
  font-weight: 300;
  opacity: 0.9;
}

.text-gradient {
  background: linear-gradient(180deg, #FFFFFF 0%, #a89bbd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  color: var(--accent-light);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 8rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 5rem 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.75rem;
  margin: 0;
  height: 48px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(255,255,255,0.1);
}

.btn-primary:hover {
  background: #EAEAEA;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.btn-secondary {
  background: var(--accent-main);
  color: var(--text-main);
  border-color: rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all var(--transition-normal);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(13, 20, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-color);
  padding: 1rem 0;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-inner .logo {
  justify-self: start;
}

.header-inner .nav-links {
  justify-self: center;
}

.header-inner .header-cta {
  justify-self: end;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.03em;
}

.logo svg {
  width: 24px;
  height: 24px;
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-main);
}

.header-cta {
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.lang-dropdown {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  z-index: 1050;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 1rem;
  height: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn:hover, .lang-dropdown.active .lang-btn {
  border-color: var(--border-highlight);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn .chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.lang-dropdown.active .chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-color);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 1000;
  overflow: hidden;
}

.lang-dropdown.active .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.lang-option:hover, .lang-option.active {
  background: var(--surface-primary);
  color: var(--text-main);
}

.lang-flag {
  font-size: 1.1rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links, .header-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(110, 75, 146, 0.15) 0%, rgba(35, 25, 51, 0.2) 40%, rgba(13,20,26,0) 70%);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float 20s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 50px) scale(1.05); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(110, 75, 146, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
  gap: 0.5rem;
}

.hero-badge span {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-light);
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.abstract-shape-1, .abstract-shape-2 {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.abstract-shape-1 {
  width: 380px;
  height: 380px;
  z-index: 2;
  background: linear-gradient(135deg, rgba(110, 75, 146, 0.2) 0%, rgba(35, 25, 51, 0.4) 100%);
  animation: orbit1 25s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abstract-shape-1::after {
  content: '';
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.1);
}

.abstract-shape-2 {
  width: 120px;
  height: 120px;
  z-index: 3;
  right: 10%;
  top: 15%;
  background: radial-gradient(circle at 30% 30%, #f3efff 0%, #6e4b92 100%);
  animation: floatOrb 8s ease-in-out infinite alternate;
  box-shadow: var(--shadow-glow);
}

@keyframes orbit1 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-40px) scale(1.1); }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-badge {
    margin: 0 auto 1.5rem auto;
  }
  .hero-visual {
    height: 400px;
  }
}

/* Trust Section (Pilares) */
.trust-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-primary);
}

.logo-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  flex-wrap: wrap;
}

.trust-item {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item::before {
  content: '•';
  color: var(--accent-main);
}

/* Solutions Section */
.solutions {
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem auto;
}

.section-tag {
  display: inline-block;
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.solution-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.solution-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-highlight);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.solution-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(110, 75, 146, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-light);
  transition: all var(--transition-normal);
}

.solution-card:hover .card-icon {
  background: var(--accent-main);
  color: #fff;
  border-color: var(--accent-light);
}

.solution-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.solution-card p {
  font-size: 1rem;
  margin: 0;
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Books / Saga Section */
.books-section {
  background: var(--bg-color);
  position: relative;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.book-card {
  perspective: 1000px;
  max-width: 320px;
  width: 100%;
  height: 480px;
  margin: 0 auto;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.05);
  display: block;
  transform-style: preserve-3d;
}

.book-card:hover .book-cover {
  transform: translateY(-15px) scale(1.03) rotateY(-5deg) rotateX(5deg);
  box-shadow: 0 35px 60px rgba(0,0,0,0.6), -10px 10px 40px rgba(110, 75, 146, 0.4);
  border-color: rgba(110, 75, 146, 0.8);
}

/* Platform Section */
.platform {
  background: var(--surface-primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  margin-bottom: 8rem;
}

.split-layout.reversed {
  margin-bottom: 0;
}

.split-layout.reversed .split-text {
  order: 2;
}

.split-layout.reversed .split-visual {
  order: 1;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-item svg {
  color: var(--accent-light);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.9375rem;
  margin: 0;
}

.split-visual {
  position: relative;
  height: 500px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.visual-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-window {
  width: 80%;
  height: 70%;
  background: var(--surface-primary);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Custom visual for 3D map */
.map-visual {
  width: 100%;
  height: 100%;
  position: relative;
  background: radial-gradient(circle at center, rgba(110, 75, 146, 0.2) 0%, transparent 70%);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: center bottom;
  opacity: 0.5;
}

.map-node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent-light);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--accent-light);
}

.map-node::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--accent-main);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

@media (max-width: 900px) {
  .split-layout, .split-layout.reversed {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .split-layout.reversed .split-text { order: 1; }
  .split-layout.reversed .split-visual { order: 2; }
}

/* Human-centered Section */
.human-section {
  padding: 6rem 0;
}

.human-container {
  background: linear-gradient(180deg, var(--surface-primary) 0%, rgba(35, 25, 51, 0.5) 100%);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 6rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.human-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200px;
  background: radial-gradient(ellipse at top, rgba(110, 75, 146, 0.3), transparent 70%);
  pointer-events: none;
}

.human-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.human-content h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

/* Metrics Section (Dilemas Centrales) */
.metrics {
  background: var(--surface-primary);
  border-top: 1px solid var(--border-color);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.metric-item {
  padding: 2rem;
}

.metric-number {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.metric-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.5;
}

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

/* CTA Section */
.cta-section {
  position: relative;
  padding: 10rem 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(110, 75, 146, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.cta-content p {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
}

/* Footer */
footer {
  background: var(--bg-color);
  border-top: 1px solid rgba(110, 75, 146, 0.2);
  padding: 6rem 0 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 6rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  max-width: 300px;
}

.footer-col h5 {
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(110, 75, 146, 0.15);
}

.copyright {
  color: var(--text-dark);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-dark);
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--accent-light);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Video Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 20, 26, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  background: var(--bg-color);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), 0 0 40px rgba(110, 75, 146, 0.4);
  /* Optional purple glowing edge */
  overflow: visible; 
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.btn-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.btn-close:hover {
  color: var(--accent-light);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .btn-close {
    top: -35px;
    font-size: 1.5rem;
  }
}

/* Video Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: #000;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.btn-close:hover {
  color: var(--accent-light);
}
