/* ========================================
   ECOSISTIA ENHANCED STYLES
   Diseño Atractivo y Moderno v2.0
   ======================================== */

/* Resetear estilos problemáticos previos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   BASE STYLES MEJORADOS
   ======================================== */
body {
  font-family: var(--eco-font-body);
  color: var(--eco-deep-blue);
  line-height: var(--eco-leading-normal);
  background: var(--eco-white);
  overflow-x: hidden;
}

/* Mejora de la tipografía base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--eco-font-display);
  font-weight: var(--eco-weight-bold);
  line-height: var(--eco-leading-tight);
  letter-spacing: var(--eco-tracking-tight);
  margin-bottom: var(--eco-space-4);
}

h1 {
  font-size: var(--eco-text-5xl);
  font-weight: var(--eco-weight-extrabold);
}

h2 {
  font-size: var(--eco-text-4xl);
  font-weight: var(--eco-weight-bold);
}

h3 {
  font-size: var(--eco-text-2xl);
  font-weight: var(--eco-weight-semibold);
}

p {
  font-size: var(--eco-text-lg);
  line-height: var(--eco-leading-relaxed);
  margin-bottom: var(--eco-space-4);
  color: var(--eco-gray-600);
}

/* ========================================
   HEADER MODERNO
   ======================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: all var(--eco-transition-base);
}

.navbar {
  padding: var(--eco-space-4) 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--eco-container-7xl);
  margin: 0 auto;
  padding: 0 var(--eco-space-6);
}

.logo-text {
  font-family: var(--eco-font-display);
  font-size: var(--eco-text-2xl);
  font-weight: var(--eco-weight-extrabold);
  background: var(--eco-gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: var(--eco-tracking-wider);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--eco-space-8);
  align-items: center;
}

.nav-link {
  font-size: var(--eco-text-base);
  font-weight: var(--eco-weight-medium);
  color: var(--eco-gray-700);
  text-decoration: none;
  position: relative;
  transition: all var(--eco-transition-base);
  letter-spacing: var(--eco-tracking-wide);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--eco-gradient-primary);
  transition: width var(--eco-transition-base);
}

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

.nav-link:hover {
  color: var(--eco-indigo);
}

.cta-button {
  background: var(--eco-gradient-accent) !important;
  color: var(--eco-white) !important;
  padding: var(--eco-space-3) var(--eco-space-6) !important;
  border-radius: var(--eco-radius-full) !important;
  font-weight: var(--eco-weight-semibold) !important;
  text-transform: uppercase !important;
  font-size: var(--eco-text-sm) !important;
  letter-spacing: var(--eco-tracking-wide) !important;
  box-shadow: var(--eco-shadow-lg), var(--eco-shadow-orange) !important;
}

.cta-button::after {
  display: none !important;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--eco-shadow-xl), var(--eco-shadow-orange) !important;
}

/* ========================================
   HERO SECTION IMPACTANTE
   ======================================== */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--eco-texture-primary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.geometric-shape {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  top: 20%;
  left: 10%;
  width: 150px;
  height: 150px;
  background: var(--eco-gradient-accent);
  border-radius: 50%;
  animation-delay: 0s;
}

.shape-2 {
  top: 60%;
  right: 15%;
  width: 100px;
  height: 100px;
  background: var(--eco-gradient-success);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: 2s;
}

.shape-3 {
  bottom: 20%;
  left: 20%;
  width: 80px;
  height: 80px;
  background: var(--eco-indigo);
  border-radius: var(--eco-radius-xl);
  animation-delay: 4s;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--eco-space-16);
  align-items: center;
  position: relative;
  z-index: 2;
  max-width: var(--eco-container-7xl);
  margin: 0 auto;
  padding: 0 var(--eco-space-6);
}

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

.hero-title {
  font-size: var(--eco-text-5xl);
  font-weight: var(--eco-weight-extrabold);
  line-height: var(--eco-leading-tight);
  margin-bottom: var(--eco-space-6);
  color: var(--eco-white);
}

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

.hero-subtitle {
  font-size: var(--eco-text-xl);
  color: var(--eco-gray-300);
  margin-bottom: var(--eco-space-8);
  line-height: var(--eco-leading-relaxed);
}

.hero-buttons {
  display: flex;
  gap: var(--eco-space-4);
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  height: 500px;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--eco-radius-3xl);
  padding: var(--eco-space-6);
  box-shadow: var(--eco-shadow-xl);
  transition: all var(--eco-transition-base);
  animation: float 4s ease-in-out infinite;
}

.floating-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--eco-shadow-2xl);
}

.card-1 {
  top: 50px;
  left: 50px;
  animation-delay: 0s;
}

.card-2 {
  top: 200px;
  right: 80px;
  animation-delay: 1.5s;
}

.card-3 {
  bottom: 100px;
  left: 100px;
  animation-delay: 3s;
}

.card-icon {
  font-size: var(--eco-text-3xl);
  margin-bottom: var(--eco-space-3);
}

.floating-card h3 {
  font-size: var(--eco-text-lg);
  font-weight: var(--eco-weight-semibold);
  color: var(--eco-deep-blue);
  margin: 0;
}

/* ========================================
   SECCIONES MEJORADAS
   ======================================== */
.services {
  padding: var(--eco-space-24) 0;
  background: var(--eco-texture-surface);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: var(--eco-container-3xl);
  margin: 0 auto var(--eco-space-16);
}

.section-title {
  font-size: var(--eco-text-4xl);
  font-weight: var(--eco-weight-extrabold);
  color: var(--eco-deep-blue);
  margin-bottom: var(--eco-space-4);
}

.section-subtitle {
  font-size: var(--eco-text-xl);
  color: var(--eco-gray-600);
  line-height: var(--eco-leading-relaxed);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--eco-space-8);
  max-width: var(--eco-container-7xl);
  margin: 0 auto;
  padding: 0 var(--eco-space-6);
}

.service-card {
  background: var(--eco-white);
  border-radius: var(--eco-radius-3xl);
  padding: var(--eco-space-8);
  box-shadow: var(--eco-shadow-lg);
  border: 1px solid var(--eco-gray-100);
  transition: all var(--eco-transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--eco-gradient-primary);
  transform: scaleX(0);
  transition: transform var(--eco-transition-base);
  transform-origin: left;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--eco-shadow-2xl);
  border-color: var(--eco-gray-200);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: var(--eco-gradient-primary);
  border-radius: var(--eco-radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--eco-space-6);
  box-shadow: var(--eco-shadow-lg), var(--eco-shadow-blue);
}

.service-icon .icon-svg {
  width: 40px;
  height: 40px;
  color: var(--eco-white);
}

.service-card h3 {
  font-size: var(--eco-text-xl);
  font-weight: var(--eco-weight-bold);
  color: var(--eco-deep-blue);
  margin-bottom: var(--eco-space-4);
}

.service-card p {
  color: var(--eco-gray-600);
  margin-bottom: var(--eco-space-6);
  line-height: var(--eco-leading-relaxed);
}

.service-features {
  list-style: none;
}

.service-features li {
  padding: var(--eco-space-2) 0;
  padding-left: var(--eco-space-6);
  position: relative;
  color: var(--eco-gray-600);
  font-size: var(--eco-text-base);
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--eco-emerald);
  font-weight: var(--eco-weight-bold);
}

/* ========================================
   BOTONES MEJORADOS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--eco-space-4) var(--eco-space-8);
  font-family: var(--eco-font-body);
  font-size: var(--eco-text-base);
  font-weight: var(--eco-weight-semibold);
  line-height: var(--eco-leading-tight);
  border-radius: var(--eco-radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  overflow: hidden;
  transition: all var(--eco-transition-base);
  letter-spacing: var(--eco-tracking-wide);
  text-transform: uppercase;
  font-size: var(--eco-text-sm);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--eco-transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--eco-gradient-primary);
  color: var(--eco-white);
  box-shadow: var(--eco-shadow-lg), var(--eco-shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--eco-shadow-xl), var(--eco-shadow-glow);
}

.btn-secondary {
  background: var(--eco-white);
  color: var(--eco-deep-blue);
  border: 2px solid var(--eco-gray-200);
  box-shadow: var(--eco-shadow-sm);
}

.btn-secondary:hover {
  background: var(--eco-gray-50);
  border-color: var(--eco-indigo);
  color: var(--eco-indigo);
  transform: translateY(-2px);
  box-shadow: var(--eco-shadow-md);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--eco-space-12);
    text-align: center;
  }
  
  .hero-visual {
    height: 300px;
  }
  
  .floating-card {
    position: relative;
    margin: var(--eco-space-4);
  }
  
  .card-1, .card-2, .card-3 {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: var(--eco-space-4);
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--eco-space-6);
  }
  
  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: var(--eco-text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--eco-text-lg);
  }
  
  .section-title {
    font-size: var(--eco-text-3xl);
  }
  
  .btn {
    padding: var(--eco-space-3) var(--eco-space-6);
    font-size: var(--eco-text-xs);
  }
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

.animate-fade-in {
  animation: fadeInUp 0.8s var(--eco-ease-out);
}

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

.focus-visible:focus-visible {
  outline: 3px solid var(--eco-orange);
  outline-offset: 2px;
}

/* ========================================
   MEJORAS GENERALES
   ======================================== */

/* Container mejorado */
.container {
  max-width: var(--eco-container-7xl);
  margin: 0 auto;
  padding: 0 var(--eco-space-6);
}

/* Texto con mejor legibilidad */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Enlaces mejorados */
a {
  color: var(--eco-indigo);
  transition: color var(--eco-transition-base);
}

a:hover {
  color: var(--eco-blue);
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Selección de texto personalizada */
::selection {
  background: var(--eco-orange);
  color: var(--eco-white);
}