/* ===== HERO BROWSER SECTION - REESCRITO DESDE CERO ===== */

/* Sección principal */
.hero-browser-section {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  padding: 20px 0 15px;
  min-height: 150px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Patrón de fondo sutil */
.hero-browser-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

/* Transición inferior */
.hero-browser-section::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.8) 50%, #f8fafc 100%);
  z-index: 1;
}

/* Container centrado */
.hero-browser-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Row con flexbox para centrar */
.hero-browser-section .row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

/* Columnas */
.hero-browser-section .col-lg-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

/* Contenido del hero */
.hero-browser-section .hero-content {
  color: white;
  padding-right: 2rem;
}

.hero-browser-section .hero-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero-browser-section .hero-subtitle {
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Botones del hero */
.hero-browser-section .hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Botones */
.btn-primary-hero {
  background: white;
  color: #1e40af;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary-hero:hover {
  color: white;
  text-decoration: none;
}

.btn-secondary-hero {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-secondary-hero:hover {
  background: white;
  color: #2563eb;
  text-decoration: none;
}

/* Demo del navegador */
.hero-browser-section .browser-demo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-browser-section .browser-window {
  background: #2d3748;
  border-radius: 8px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto;
}

/* Header del navegador */
.hero-browser-section .browser-header {
  background: #1a202c;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-browser-section .browser-controls {
  display: flex;
  gap: 8px;
}

.hero-browser-section .control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.hero-browser-section .control.close {
  background: #ff5f56;
}

.hero-browser-section .control.minimize {
  background: #ffbd2e;
}

.hero-browser-section .control.maximize {
  background: #27ca3f;
}

.hero-browser-section .browser-url {
  flex: 1;
  background: #4a5568;
  padding: 6px 12px;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.9rem;
}

/* Contenido del navegador */
.hero-browser-section .browser-content {
  height: 120px;
  position: relative;
  overflow: hidden;
}

/* Sección del terminal */
.hero-browser-section .terminal-section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8fafc;
  z-index: 2;
}

.hero-browser-section .terminal-header {
  background: #1e40af;
  padding: 12px 16px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #1e3a8a;
}

.hero-browser-section .control-panel-body {
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  background: #f8fafc;
}

.hero-browser-section .panel-step {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-browser-section .step-icon {
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.hero-browser-section .step-text {
  flex: 1;
  color: #374151;
  font-weight: 500;
}

.hero-browser-section .step-status {
  color: #10b981;
  font-weight: bold;
  margin-left: 8px;
  opacity: 1;
}

.hero-browser-section .step-status.success {
  color: #059669;
  font-size: 1.1rem;
}

.hero-browser-section .panel-success {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hero-browser-section .success-message {
  font-size: 1.1rem;
}

/* Vista previa del sitio web */
.hero-browser-section .website-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  z-index: 1;
  transform: translateY(0);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.hero-browser-section .preview-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.hero-browser-section .preview-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-browser-section .preview-header h2 {
  margin: 0;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.hero-browser-section .preview-content {
  padding: 25px;
  background: white;
}

.hero-browser-section .preview-nav {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.hero-browser-section .preview-nav::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.hero-browser-section .nav-item {
  color: #4a5568;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.hero-browser-section .nav-item:first-child {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.hero-browser-section .nav-item:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-1px);
}

.hero-browser-section .preview-hero {
  text-align: center;
  margin-bottom: 35px;
  padding: 25px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.hero-browser-section .preview-hero h3 {
  color: #2d3748;
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-browser-section .preview-hero p {
  color: #718096;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.hero-browser-section .preview-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.hero-browser-section .preview-card {
  height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  opacity: 1;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-browser-section .preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.hero-browser-section .preview-card:hover::before {
  transform: translateX(100%);
}

.hero-browser-section .preview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.hero-browser-section .preview-card:first-child::after {
  content: '📊 Analytics';
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-browser-section .preview-card:last-child::after {
  content: '🚀 Performance';
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Terminal section animations */
.hero-browser-section .terminal-section {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-browser-section .terminal-section.slide-out {
  transform: translateY(-100%);
  opacity: 0;
}

/* Browser demo animations */
@keyframes step-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  50% {
    opacity: 0.7;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.9);
  }
  50% {
    opacity: 0.6;
    transform: translateY(10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-out {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes preview-slide-in {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  50% {
    transform: translateY(20%);
    opacity: 0.7;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes preview-header-glow {
  0% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
  100% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
  }
}

@keyframes nav-item-highlight {
  0% {
    background: rgba(102, 126, 234, 0.1);
  }
  50% {
    background: rgba(102, 126, 234, 0.2);
  }
  100% {
    background: rgba(102, 126, 234, 0.1);
  }
}

/* Panel steps animation setup */
.hero-browser-section .panel-step {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Preview cards animation setup */
.hero-browser-section .preview-card {
  opacity: 0;
  transform: translateY(25px) scale(0.9);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Website preview transition */
.hero-browser-section .website-preview {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100%);
  opacity: 0;
}

.hero-browser-section .terminal-section.slide-out + .website-preview {
  transform: translateY(0);
  opacity: 1;
  animation: preview-slide-in 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced preview header animation */
.hero-browser-section .website-preview .preview-header {
  animation: preview-header-glow 2s ease-in-out infinite;
}

/* Enhanced nav item animation */
.hero-browser-section .nav-item:first-child {
  animation: nav-item-highlight 2s ease-in-out infinite;
}

/* RESPONSIVE DESIGN */
@media (max-width: 991.98px) {
  .hero-browser-section .row {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-browser-section .col-lg-6 {
    flex: none;
    max-width: 100%;
  }
  
  .hero-browser-section .hero-content {
    padding-right: 0;
    margin-bottom: 3rem;
  }
  
  .hero-browser-section .browser-window {
    max-width: 450px;
  }
}

@media (max-width: 768px) {
  .hero-browser-section {
    padding: 60px 0;
    min-height: 70vh;
  }
  
  .hero-browser-section .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-browser-section .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-browser-section .browser-window {
    max-width: 100%;
  }
  
  .hero-browser-section .browser-content {
    height: 350px;
  }
  
  .hero-browser-section .btn-primary-hero,
  .hero-browser-section .btn-secondary-hero {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-browser-section .preview-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .hero-browser-section .preview-card {
    height: 60px;
  }
}
