/* ===============================
   COMPONENTES CSS - INSOMNIA DEV
   =============================== */

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Hero Section Mejorada */
.hero {
  padding: 10rem 0 8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
  z-index: -1;
  animation: pulse 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
  z-index: -1;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  position: relative;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0.8;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-accent);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.9s forwards;
}

.hero-buttons .btn {
  position: relative;
  overflow: hidden;
}

.hero-buttons .btn:nth-child(1) {
  animation-delay: 1s;
}

.hero-buttons .btn:nth-child(2) {
  animation-delay: 1.2s;
}

/* Code Block Mejorado */
.code-block {
  background: linear-gradient(145deg, var(--dark-card) 0%, rgba(26, 26, 46, 0.95) 100%);
  border: 1px solid var(--dark-border);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.2s forwards;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(90deg, var(--dark-border) 0%, rgba(0, 245, 255, 0.1) 50%, var(--dark-border) 100%);
  border-radius: 1rem 1rem 0 0;
}

.code-block::after {
  content: '● ● ●';
  position: absolute;
  top: 8px;
  left: 15px;
  color: var(--primary-cyan);
  font-size: 0.8rem;
  letter-spacing: 3px;
}

.code-block pre {
  color: var(--primary-cyan);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-x: auto;
  margin-top: 10px;
  position: relative;
}

.code-block pre::after {
  content: '▋';
  color: var(--primary-cyan);
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.code-block:hover {
  transform: translateY(-2px);
  box-shadow: 
    var(--shadow-card),
    0 0 30px rgba(0, 245, 255, 0.2);
  border-color: rgba(0, 245, 255, 0.3);
}

/* Card Styles Mejoradas */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.4), 
    0 0 40px rgba(0, 245, 255, 0.3),
    0 0 80px rgba(139, 92, 246, 0.2);
  border-color: rgba(0, 245, 255, 0.5);
}

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

.card:hover::after {
  left: 100%;
}

/* Efecto de ripple para cards */
.card-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* Service Cards */
.service-card {
  position: relative;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.service-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.service-features {
  list-style: none;
  margin-top: 1rem;
}

.service-features li {
  color: var(--text-accent);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.service-features li::before {
  content: '▸';
  color: var(--primary-cyan);
  margin-right: 0.5rem;
}

/* Products Section */
.product-card {
  position: relative;
  overflow: hidden;
}

.product-header {
  margin-bottom: 1.5rem;
}

.product-name {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.product-description {
  color: var(--text-accent);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Product Gallery */
.product-gallery {
  margin: 2rem 0;
}

.gallery-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
  text-align: center;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.screenshot-item {
  position: relative;
  border-radius: 0.8rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid var(--dark-border);
  background: var(--dark-card);
}

.screenshot-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.screenshot-item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: transform 0.6s ease;
  z-index: 2;
  opacity: 0;
}

.screenshot-item:hover::before {
  opacity: 1;
}

.screenshot-item:hover::after {
  opacity: 1;
  transform: rotate(45deg) translate(50%, 50%);
}

.screenshot-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 245, 255, 0.4),
    0 0 80px rgba(139, 92, 246, 0.2);
  border-color: rgba(0, 245, 255, 0.5);
}

.screenshot-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 0.8rem;
}

.screenshot-item:hover .screenshot-img {
  transform: scale(1.08);
}

.screenshot-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-primary);
  font-size: 1.8rem;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 3;
}

.screenshot-item:hover .screenshot-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.screenshot-overlay i {
  background: rgba(0, 0, 0, 0.9);
  padding: 0.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.screenshot-item:hover .screenshot-overlay i {
  animation: pulse 1.5s infinite, glow 2s infinite;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.product-feature {
  background: rgba(0, 245, 255, 0.05);
  padding: 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 245, 255, 0.1);
}

/* Tech Stack */
.tech-section {
  background: var(--dark-card);
  margin: 0 -2rem;
  padding: 4rem 2rem;
  border-radius: 2rem;
}

.tech-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.tech-category {
  text-align: center;
}

.tech-category-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-cyan);
  margin-bottom: 1rem;
}

.tech-list {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Process Steps */
.process-steps {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(0, 245, 255, 0.02);
  border-radius: 1rem;
  border: 1px solid rgba(0, 245, 255, 0.1);
}

.step-number {
  background: var(--gradient-primary);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contact Section */
.contact-section {
  background: var(--gradient-card);
  border: 1px solid var(--dark-border);
  border-radius: 2rem;
  padding: 4rem 2rem;
  text-align: center;
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.contact-channel {
  background: var(--dark-card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--dark-border);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-channel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.channel-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--primary-cyan);
}

.channel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.channel-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 3rem auto 0;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  color: var(--text-accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  padding: 0.8rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--dark-card);
  border-top: 1px solid var(--dark-border);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-section h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--dark-border);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.social-link {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--primary-cyan);
  transform: translateY(-2px);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 400;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-accent);
  max-width: 600px;
  margin: 0 auto;
}

/* Terminal Window */
.terminal-window {
  background-color: var(--dark-card);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--dark-border);
}

.terminal-header {
  background-color: var(--dark-border);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-buttons {
  display: flex;
  gap: 0.25rem;
}

.btn-close, .btn-minimize, .btn-maximize {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27ca3f; }

.terminal-title {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.terminal-line {
  margin-bottom: 0.5rem;
}

.terminal-prompt {
  color: var(--primary-cyan);
  margin-right: 0.5rem;
}

.terminal-command {
  color: var(--text-primary);
}

.terminal-output {
  margin-top: 0.5rem;
}

/* Tech Badges */
.tech-badge {
  display: inline-block;
  background: rgba(0, 245, 255, 0.1);
  color: var(--primary-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  margin: 0.25rem;
  border: 1px solid rgba(0, 245, 255, 0.3);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 245, 255, 0.3);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--dark-card);
  border-radius: 0.5rem;
  border: 1px solid var(--dark-border);
  transition: all 0.3s ease;
}

.stat-item:hover {
  border-color: var(--primary-cyan);
  transform: translateY(-3px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-cyan);
  display: block;
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--gradient-primary);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-marker {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--text-primary);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  z-index: 2;
}

.timeline-content {
  flex: 1;
  margin-left: 2rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.timeline-tech {
  margin-top: 1rem;
}

.tech-badge-small {
  display: inline-block;
  background: rgba(0, 245, 255, 0.1);
  color: var(--primary-cyan);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  margin: 0.2rem;
  border: 1px solid rgba(0, 245, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hero {
    padding: 8rem 0 6rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-section {
    margin: 0 -1rem;
    padding: 3rem 1rem;
  }
  
  .process-step {
    flex-direction: column;
    text-align: center;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Loading states */
.loading {
  opacity: 0.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-cyan);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-purple);
}