/* Variables CSS para temas */
:root {
  --primary-color: #0088e0;
  --secondary-color: #00d4ff;
  --accent-color: #ff6b6b;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --border-color: #e9ecef;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
  --gradient-primary: linear-gradient(135deg, #0088e0, #00d4ff);
  --gradient-secondary: linear-gradient(135deg, #667eea, #764ba2);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --border-color: #333333;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(0, 0, 0, 0.2);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.3s ease;
}

/* Navegación - Copiada exactamente del index.html */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 0;
}

[data-theme="dark"] .navbar {
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  transition: all 0.3s ease;
  padding: 8px 0;
}

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

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

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

.btn-contacto {
  background: var(--gradient-primary);
  color: white !important;
  padding: 10px 20px !important;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-contacto:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 136, 224, 0.3);
  color: white !important;
}

.btn-contacto::after {
  display: none;
}

/* Theme Toggle Button - Exacto del index.html */
.theme-toggle {
  background: none;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-left: 15px;
}

.theme-toggle:hover {
  background: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 136, 224, 0.3);
}

.theme-toggle .sun,
.theme-toggle .moon {
  position: absolute;
  font-size: 18px;
  transition: all 0.3s ease;
  color: var(--primary-color);
}

.theme-toggle:hover .sun,
.theme-toggle:hover .moon {
  color: white;
}

.theme-toggle .sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .moon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .theme-toggle .sun {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Menu Toggle para móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: left 0.3s ease;
    gap: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    font-size: 18px;
    padding: 15px 0;
  }

  .theme-toggle {
    margin-left: 0;
  }
}

/* Contenido principal */
.main-content {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

/* Hero Section */
.hero-service {
  background: var(--gradient-primary);
  color: white;
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-service::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.service-icon-large {
  font-size: 80px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
}

.service-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}

.service-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Service Details */
.service-details {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.details-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Cards */
.detail-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: slideInUp 0.8s ease forwards;
}

.detail-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transition: left 0.5s ease;
}

.detail-card:hover::before {
  left: 0;
}

.detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow-medium);
}

.detail-card h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 30px;
  font-weight: 700;
}

/* Features List */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.feature-item:hover {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  transform: translateX(10px);
}

.feature-item i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 5px;
  flex-shrink: 0;
}

.feature-item h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.feature-item p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tech Stack */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
  text-align: center;
}

.tech-item:hover {
  transform: translateY(-5px);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 10px 25px rgba(0, 136, 224, 0.3);
}

.tech-item i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.tech-item:hover i {
  color: white;
}

.tech-item span {
  font-weight: 600;
  font-size: 1rem;
}

/* Process Steps */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
}

.process-steps::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 50px;
  bottom: 50px;
  width: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(0, 136, 224, 0.3);
  z-index: 2;
  position: relative;
}

.step-content {
  flex: 1;
  padding-top: 5px;
}

.step-content h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Use Cases */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.use-case {
  display: flex;
  gap: 20px;
  padding: 25px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.use-case:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-light);
}

.use-case-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.use-case-icon i {
  color: white;
  font-size: 1.5rem;
}

.use-case-content h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.use-case-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.benefit i {
  font-size: 1rem;
}

/* App Types */
.app-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.app-type {
  display: flex;
  gap: 20px;
  padding: 25px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.app-type:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-light);
}

.app-type-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-secondary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-type-icon i {
  color: white;
  font-size: 1.5rem;
}

.app-type-content h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.app-type-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ROI Metrics */
.roi-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
}

.roi-item {
  text-align: center;
  padding: 30px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.roi-item:hover {
  transform: translateY(-5px);
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 25px rgba(0, 136, 224, 0.3);
}

.roi-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.roi-item:hover .roi-number {
  color: white;
}

.roi-label {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.roi-item:hover .roi-label {
  color: white;
}

/* Sidebar */
.details-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 100px;
}

/* CTA Card */
.cta-card {
  background: var(--gradient-primary);
  color: white;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 136, 224, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

.cta-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.cta-card p {
  margin-bottom: 25px;
  opacity: 0.9;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
  text-decoration: none;
}

/* Info Cards */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.info-card h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.info-item i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.info-item span {
  font-weight: 500;
}

/* Footer - Copiado exactamente del index.html */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo img {
  height: 50px;
  width: auto;
  margin-bottom: 20px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-links-column h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  display: inline-block;
}

.footer-links-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-column li {
  margin-bottom: 12px;
}

.footer-links-column a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links-column a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-contact-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.footer-contact-info i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .details-sidebar {
    position: static;
    order: -1;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .hero-service {
    padding: 60px 0;
  }

  .service-details {
    padding: 40px 0;
  }

  .detail-card {
    padding: 25px;
  }

  .process-steps::before {
    left: 20px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .use-cases,
  .app-types {
    grid-template-columns: 1fr;
  }

  .tech-stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .roi-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cta-card {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .navbar-container {
    padding: 0 15px;
  }

  .service-icon-large {
    font-size: 60px;
  }

  .tech-stack {
    grid-template-columns: 1fr;
  }

  .roi-metrics {
    grid-template-columns: 1fr;
  }

  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .use-case,
  .app-type {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states para accesibilidad */
button:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
