:root {
  --primary: #5398da;
  --secondary: #12314c;
  --accent: #6bb73a;
  --white: #ffffff;
  --light-gray: #f8fafc;
  --gray: #64748b;
  --dark: #0f172a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--white);
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-left {
  transform: translateX(-40px);
}

.animate-left.visible {
  transform: translateX(0);
}

.animate-right {
  transform: translateX(40px);
}

.animate-right.visible {
  transform: translateX(0);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  box-shadow: 0 4px 30px rgba(18, 49, 76, 0.1);
  border-bottom: 1px solid rgba(83, 152, 218, 0.1);
}

nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  width: 20vw;
  height: auto;
  transition: transform 0.3s ease;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

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

.cta-btn {
  background: linear-gradient(135deg, var(--accent), #5cb82f);
  color: var(--white);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(107, 183, 58, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 183, 58, 0.4);
}

.cta-btn-secondary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 15px rgba(83, 152, 218, 0.3);
}

.cta-btn-secondary:hover {
  box-shadow: 0 8px 25px rgba(83, 152, 218, 0.4);
}

.mobile-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--secondary);
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary) 0%, #1a4263 50%, var(--primary) 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::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.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  animation: fadeInRight 1s ease 0.5s forwards;
  opacity: 0;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(107, 183, 58, 0.15) 0%, rgba(83, 152, 218, 0.05) 60%, transparent 80%);
  border-radius: 50%;
  z-index: -1;
  filter: blur(20px);
}

.hero-image img {
  width: 100%;
  max-height: 650px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(18, 49, 76, 0.2));
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.hero-text {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(107, 183, 58, 0.2);
  border: 1px solid rgba(107, 183, 58, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-badge i {
  color: var(--accent);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero h1 span {
  color: var(--accent);
  position: relative;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
}

.hero-feature i {
  color: var(--accent);
  font-size: 1.25rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.8s forwards;
  opacity: 0;
}

.hero-buttons .cta-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  box-shadow: none;
}

.hero-visual {
  position: relative;
  animation: fadeInRight 1s ease 0.5s forwards;
  opacity: 0;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 2.5rem;
  animation: float 6s ease-in-out infinite;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent), #5cb82f);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.hero-card-title {
  color: white;
}

.hero-card-title h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.hero-card-title p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  color: white;
}

.stat-item h4 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-item p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0;
}

/* Economic Indicators Ticker */
.economic-indicators {
  background: var(--secondary);
  color: white;
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ticker-container {
  width: 100%;
  overflow: hidden;
}

.ticker-wrapper {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  /* Removed padding-left to avoid initial gap */
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  margin-right: 4rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.ticker-item i {
  color: var(--accent);
  margin-right: 8px;
}

.ticker-value {
  color: #4facfe;
  margin-left: 5px;
  font-weight: 700;
}

.ticker-loading {
  padding-left: 2rem;
  font-style: italic;
  opacity: 0.7;
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-10%, 0, 0);
  }

  /* Moves 1/10th of the width (assuming 10 copies) */
}

/* Pause on hover */
.economic-indicators:hover .ticker-wrapper {
  animation-play-state: paused;
}

/* Services Section */
.services {
  padding: 6rem 2rem;
  background: var(--white);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(83, 152, 218, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 1.5rem;
  grid-auto-flow: dense;
}

.service-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  will-change: transform;
}

/* Dynamic Grid Layout */
.service-card:nth-child(1) {
  grid-row: span 2;
}

.service-card:nth-child(2) {
  grid-column: span 2;
}

.service-card:nth-child(5) {
  grid-column: span 2;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(18, 49, 76, 0.12);
  border-color: transparent;
}

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

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(83, 152, 218, 0.1), rgba(107, 183, 58, 0.1));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  transform: scale(1.1);
}

.service-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Stats Section */
.stats {
  padding: 6rem 2rem;
  background: linear-gradient(-45deg, var(--primary), #4facfe, var(--accent), #00f2fe);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.stats-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.stats-particles span {
  position: absolute;
  display: block;
  list-style: none;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  animation: floatUp 25s linear infinite;
  bottom: -150px;
  border-radius: 50%;
}

.stats-particles span:nth-child(1) {
  left: 25%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
  animation-duration: 20s;
}

.stats-particles span:nth-child(2) {
  left: 10%;
  width: 30px;
  height: 30px;
  animation-delay: 2s;
  animation-duration: 12s;
}

.stats-particles span:nth-child(3) {
  left: 70%;
  width: 40px;
  height: 40px;
  animation-delay: 4s;
  animation-duration: 15s;
}

.stats-particles span:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 0s;
  animation-duration: 18s;
}

.stats-particles span:nth-child(5) {
  left: 65%;
  width: 25px;
  height: 25px;
  animation-delay: 0s;
  animation-duration: 22s;
}

.stats-particles span:nth-child(6) {
  left: 85%;
  width: 90px;
  height: 90px;
  animation-delay: 3s;
  animation-duration: 25s;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }

  20% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(-1000px) scale(1.2);
    opacity: 0;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.stat-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.4);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.stat-number span {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--secondary);
  font-weight: 600;
  opacity: 0.9;
}

/* Testimonials */
.testimonials {
  padding: 6rem 2rem;
  background: var(--light-gray);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: rgba(107, 183, 58, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  border: 1px solid rgba(107, 183, 58, 0.2);
  box-shadow: 0 8px 32px 0 rgba(107, 183, 58, 0.05);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  box-shadow: 0 15px 30px rgba(18, 49, 76, 0.1);
  transform: translateY(-4px);
}

.testimonial-quote {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.1;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-content {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.testimonial-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
}

.testimonial-info p {
  font-size: 0.9rem;
  color: var(--gray);
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  color: #fbbf24;
}

/* Technology Section */
.technology-section {
  padding: 6rem 0;
  background: radial-gradient(circle at center, var(--secondary) 0%, #0a1c2e 100%);
  color: white;
  overflow: hidden;
  position: relative;
}

#neuro-network {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

.technology-section .section-header h2,
.technology-section .section-header p {
  color: white;
}

.technology-section .section-header p {
  opacity: 0.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.technology-section .section-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-carousel-container {
  margin-top: 4rem;
  width: 100vw;
  margin-left: -50vw;
  left: 50%;
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
  background: #ffffff;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}



.logo-track {
  display: flex;
  width: max-content;
  animation: scrollLogos 40s linear infinite;
  gap: 4rem;
  position: relative;
  z-index: 2;
  /* Ensure logos are above background */
}

.logo-track img {
  height: 180px;
  width: auto;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: contain;
  transform-origin: center center;
  opacity: 0.9;
  /* Increased opacity for better visibility */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  /* Slight shadow to lift off bg */
}

.logo-track img.active-center {
  transform: scale(1.3);
  opacity: 1;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  z-index: 10;
}

.logo-track img:hover {
  opacity: 1;
}

@keyframes scrollLogos {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.logo-carousel-container:hover .logo-track {
  animation-play-state: paused;
}

/* Team Section */
.team {
  padding: 6rem 2rem;
  background: var(--white);
}

.team-category {
  margin-bottom: 3rem;
}

.team-category h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 4px solid rgba(83, 152, 218, 0.1);
  padding: 4px;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Contact Section */
.contact {
  padding: 6rem 2rem;
  background: url('Imagenes/home/sentada.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

/* Optional overlay to ensure text readability outside cards if needed */
.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  /* Dark overlay for better text contrast */
  z-index: 0;
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 1200px;
  /* Increased to allow side-by-side cards */
  margin: 0 auto;
}

.contact-info {
  text-align: center;
}

.contact-info h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  /* White text for contrast */
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  /* Stronger shadow */
}

.contact-info p {
  color: rgba(255, 255, 255, 0.9);
  /* Slightly transparent white */
  margin-bottom: 3rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.contact-details {
  display: flex;
  flex-direction: row;
  /* Changed to row for side-by-side */
  gap: 1.5rem;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-item {
  background: rgba(255, 255, 255, 0.4);
  /* Increased opacity by 20% (0.2 + 0.2) */
  backdrop-filter: blur(10px);
  /* Slightly less blur for cleaner look */
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  /* Adjusted shadow */
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Softer border */
  width: auto;
  min-width: 280px;
  flex: 1;
  transition: transform 0.3s ease, background 0.3s ease;
  text-align: left;
}

.contact-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.5);
  /* Increased hover opacity (0.3 + 0.2) */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  /* Matching transparent background */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  /* White icon for better contrast on dark bg */
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-item span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  /* Lighter text for dark bg context */
  margin-bottom: 0.25rem;
}

.contact-item p {
  font-weight: 400;
  /* Removed bold (was 600) */
  color: var(--white);
  /* White text */
  margin: 0;
  font-size: 1rem;
}

/* Footer */
footer {
  background: var(--secondary);
  color: white;
  padding: 5rem 0 2rem;
}

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

.footer-brand .logo img {
  width: 180px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  opacity: 0.7;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-column h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  opacity: 0.5;
  font-size: 0.9rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(83, 152, 218, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

/* Clients Carousel Section Highlight */
.clients-carousel-section {
  margin-top: 6rem;
  background: var(--white);
  border-radius: 24px;
  padding: 4rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.clients-carousel-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.clients-carousel-section::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(107, 183, 58, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.clients-carousel-section h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.clients-carousel-section h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.clients-carousel-section .logo-carousel-container {
  margin-top: 2rem;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  border: none;
}

/* Clients Carousel Section Highlight */
.clients-carousel-section {
  margin-top: 6rem;
  background: var(--white);
  border-radius: 24px;
  padding: 4rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative background elements */
.clients-carousel-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.clients-carousel-section::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(107, 183, 58, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.clients-carousel-section h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.clients-carousel-section h3::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* Override carousel container within this section to remove background/border if needed, 
   or keep it if it looks good. Let's keep it but ensure it fits. */
.clients-carousel-section .logo-carousel-container {
  margin-top: 2rem;
  background: transparent;
  /* Remove background inside the white card */
  backdrop-filter: none;
  box-shadow: none;
  border: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-image {
    justify-content: center;
    order: -1;
    /* Image on top for tablet */
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-features {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

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

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {

  /* Header & Nav */
  .mobile-menu {
    display: block;
    z-index: 1001;
  }

  /* Increase logo size on mobile */
  .logo img {
    width: 160px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: 6rem 2rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    align-items: flex-start;
    gap: 1.5rem;
    z-index: 1000;
  }

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

  .nav-links::before {
    content: 'Menú';
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
  }

  /* Typography */
  .hero h1 {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Contact */
  .contact-grid {
    gap: 3rem;
  }

  .contact-details {
    flex-direction: column;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .contact-icon {
    margin-bottom: 1rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

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

  .footer-social {
    justify-content: center;
  }

  /* Ticker */
  .ticker-item {
    margin-right: 2rem;
    font-size: 0.85rem;
  }

  /* Faster Carousel on Mobile */
  .logo-track {
    animation-duration: 15s;
  }
}

/* Optimized Mobile Styles for Small Screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem !important;
    /* Smaller hero title to prevent overflow */
  }

  .section-header h2 {
    font-size: 1.75rem !important;
  }

  .contact-grid {
    gap: 2rem;
  }

  .contact-item {
    min-width: 100%;
    /* Ensure full width on very small screens */
    padding: 1.5rem;
  }

  .footer-grid {
    gap: 2.5rem;
  }

  /* Ensure ticker doesn't break layout */
  .ticker-container {
    overflow-x: hidden;
  }
}