/* 
  Estilos principales de Academia CyPA
  Esquema de color basado en logo Azul (#004aa8 aprox)
*/

:root {
  /* Colors */
  --cypa-blue: #0A52A3; /* Color principal extraído del logo */
  --cypa-blue-dark: #053b7a;
  --cypa-blue-light: #e6f0fa;
  --cypa-accent: #3b82f6;
  
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-glow: 0 0 25px rgba(10, 82, 163, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.highlight {
  color: var(--cypa-blue);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: var(--cypa-blue-light);
  z-index: -1;
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--cypa-blue);
  color: white;
  box-shadow: 0 4px 14px rgba(10, 82, 163, 0.3);
}

.btn-primary:hover {
  background-color: var(--cypa-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 82, 163, 0.4);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Logo CSS Shape (Hexagon) */
.logo-hexagon {
  background-color: var(--cypa-blue);
  width: 50px;
  height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  color: white;
  font-family: 'League Gothic', sans-serif;
  font-weight: normal;
  font-size: 20px; /* League Gothic suele verse más pequeña que Impact */
  letter-spacing: 0.5px;
  transition: var(--transition-normal);
}

.logo-hexagon span {
  position: relative;
  z-index: 2;
  transform: scaleY(1.4); /* Estira la fuente verticalmente */
  display: inline-block; /* Necesario para que funcione el transform */
}

.logo-hexagon.small {
  width: 60px;
  height: 52px;
  font-size: 16px;
}

.logo:hover .logo-hexagon {
  transform: scale(1.05) rotate(5deg);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:not(.btn):hover {
  color: var(--cypa-blue);
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--cypa-blue);
  transition: var(--transition-normal);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: -1;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--cypa-blue-light);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.1);
  bottom: -50px;
  left: -150px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--cypa-blue-light);
  color: var(--cypa-blue);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-text h1 {
  font-size: 4rem;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
}

.brand-text {
  color: var(--cypa-blue);
}

/* Code Window (Hero Visual) */
.code-window {
  background: #1e1e1e;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: var(--transition-slow);
  border: 1px solid rgba(255,255,255,0.1);
}

.code-window:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(10, 82, 163, 0.3);
}

.window-header {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #3d3d3d;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
  color: #8c8c8c;
  font-size: 0.8rem;
  font-family: monospace;
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-24px); /* exact dead center fix */
}

.window-body {
  padding: 24px;
  overflow-x: auto;
}

.window-body pre {
  margin: 0;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #d4d4d4;
}

/* Syntax Highlighting Fake */
.keyword { color: #569cd6; }
.class { color: #4ec9b0; }
.method { color: #dcdcaa; }
.variable { color: #9cdcfe; }
.string { color: #ce9178; }
.comment { color: #6a9955; font-style: italic; }

/* Cursos Section */
.seccion-cursos {
  padding: 120px 0;
  background-color: var(--surface-color);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.curso-card {
  position: relative;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.curso-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(10, 82, 163, 0.1);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(10, 82, 163, 0.05), transparent 60%);
  z-index: -1;
  opacity: 0;
  transition: var(--transition-normal);
}

.curso-card:hover .card-glow {
  opacity: 1;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  transition: var(--transition-normal);
}

.python-icon { background-color: #f0f7ff; color: #3b82f6; }
.web-icon { background-color: #fdf4ff; color: #d946ef; }
.algo-icon { background-color: #f0fdf4; color: #22c55e; }

.curso-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cypa-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition-fast);
  margin-top: auto;
}

.card-link:hover {
  color: var(--cypa-blue-dark);
  gap: 12px;
}

/* Footer Section */
.footer {
  background-color: var(--text-primary);
  color: white;
  padding: 80px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand p {
  color: var(--text-light);
  margin-top: 24px;
  max-width: 320px;
}

.footer-socials h4 {
  color: white;
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-btn:hover {
  background-color: var(--cypa-blue);
  transform: translateY(-4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .badge { margin: 0 auto 24px; }
  
  .hero-text p {
    margin: 0 auto 40px;
  }
  
  .hero-visual {
    margin-top: 40px;
    max-width: 600px;
    margin-inline: auto;
  }
  
  .code-window {
    transform: none;
  }
  .code-window:hover {
    transform: translateY(-10px);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .footer-brand p {
    margin: 24px auto 0;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .logo-hexagon.small {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--surface-color);
    flex-direction: column;
    justify-content: center;
    box-shadow: -10px 0 20px rgba(0,0,0,0.05);
    transition: var(--transition-normal);
    z-index: 999;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 1000;
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
}
