:root {
  --bg-color: #06080F;
  --surface-color: rgba(15, 18, 25, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #0ea5e9;
  --accent: #8b5cf6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a0d14 0%, var(--bg-color) 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: float 15s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--primary);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: var(--accent);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  background: var(--secondary);
  opacity: 0.2;
  animation-duration: 20s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(5%, 5%) scale(1.05);
  }

  100% {
    transform: translate(-5%, -5%) scale(0.95);
  }
}

h1,
h2,
h3,
h4,
.logo {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6%;
}

.section-padding {
  padding: 6rem 0;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: var(--transition);
}

.glass-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 1.5rem 0;
}

.glass-nav.scrolled {
  background: rgba(6, 8, 15, 0.8);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.logo-footer .logo-img {
  height: 140px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mobile-only {
  display: none;
}

.nav-links a:hover {
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.text-gradient {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations Trigger */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-size: 4rem;
  margin: 1rem 0;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(79, 70, 229, 0.4);
  color: var(--secondary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image-container {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
}

.hero-image-actual {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-container:hover .hero-image-actual {
  transform: scale(1.05);
}

/* Sections */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 3rem 2rem;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(79, 70, 229, 0.5);
}

.icon-box {
  width: 70px;
  height: 70px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: var(--secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent 70%);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.service-link {
  font-weight: 600;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.service-link:hover {
  gap: 0.8rem;
  color: var(--text-main);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card p {
  font-style: italic;
  font-size: 1.1rem;
  margin: 1.5rem 0;
}

.stars {
  color: #fbbf24;
  font-size: 1.2rem;
}

.cta-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4rem 2rem;
}

.cta-card h2 {
  margin-bottom: 1rem;
}

.cta-card p {
  margin-bottom: 2rem;
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-map-card {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  padding: 3rem;
  align-items: center;
}

.contact-info-large {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.c-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.c-item i {
  font-size: 2.5rem;
  color: var(--secondary);
  background: rgba(14, 165, 233, 0.1);
  padding: 1rem;
  border-radius: 12px;
}

.c-item h4 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.c-item p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.c-item a {
  color: var(--text-muted);
}

.c-item a:hover {
  color: var(--secondary);
}

.map-container {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

/* Footer */
footer {
  background: rgba(6, 8, 15, 0.9);
  border-top: 1px solid var(--surface-border);
  padding-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-desc {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--secondary);
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
}

.contact-info i {
  color: var(--secondary);
  font-size: 1.2rem;
}

.footer-bottom {
  padding: 2rem 0;
  border-top: 1px solid var(--surface-border);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 900px) {
  .contact-map-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    margin: 1rem auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-desc {
    margin: 1rem auto;
  }

  .contact-info li {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-left: auto;
  }

  .mobile-toggle {
    display: block;
    position: relative;
    z-index: 1001;
    /* Siempre el botón por encima del menú desplegable */
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(10, 13, 20, 0.98);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-bottom: 1px solid var(--surface-border);
    z-index: 1000;
  }

  .mobile-only {
    display: inline-block;
  }
}

@media (max-width: 500px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .section-padding {
    padding: 4rem 0;
  }
}

/* Cookie Banner & Privacy Modal */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: rgba(20, 22, 33, 0.95);
  border: 1px solid var(--primary);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    bottom: -100px;
    opacity: 0;
  }

  to {
    bottom: 2rem;
    opacity: 1;
  }
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-content i {
  font-size: 2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.cookie-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem 2rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--text-main);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1rem;
}

.modal-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--secondary);
}

.modal-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    animation: slideUpMobile 0.5s ease forwards;
  }

  @keyframes slideUpMobile {
    from {
      bottom: -100px;
      opacity: 0;
    }

    to {
      bottom: 0;
      opacity: 1;
    }
  }

  .cookie-buttons {
    flex-direction: column;
  }
}