:root {
  --primary: #ce1126;
  --primary-dark: #a50e1e;
  --secondary: #0038a8;
  --accent: #0038a8;
  --bg: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, hsla(0,100%,50%,0.05) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(220,100%,50%,0.03) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(0,0%,100%,0.1) 0, transparent 50%);
  color: var(--text);
  line-height: 1.6;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
}

h1 { 
  font-size: clamp(2.2rem, 8vw, 3.5rem); 
  letter-spacing: -0.02em; 
  margin-bottom: 1rem;
}
h2 { 
  font-size: clamp(1.8rem, 6vw, 2.5rem); 
  letter-spacing: -0.01em; 
  margin-bottom: 1.5rem; 
}
h3 { 
  font-size: clamp(1.3rem, 4vw, 1.5rem); 
}

p { color: var(--text-light); }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section { padding: 40px 0; }
}

/* Responsive Grid Utilities */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 992px) {
  .grid-2-col { gap: 2rem; }
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .grid-form {
    grid-template-columns: 1fr;
  }
}

.card-responsive {
  padding: 4rem 3rem;
}

@media (max-width: 768px) {
  .card-responsive {
    padding: 2.5rem 1.5rem;
  }
}

.section-padding-responsive {
  padding: 5rem 4rem;
}

@media (max-width: 768px) {
  .section-padding-responsive {
    padding: 3rem 1.5rem;
  }
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), transparent);
}

nav.scrolled {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  padding: 0.75rem 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
  opacity: 0.8;
}

.nav-links a:hover {
  color: var(--white);
  opacity: 1;
}

.nav-links a:active {
  transform: scale(0.95);
}

.menu-toggle, .btn, .nav-links a, .nav-item, .back-to-top, .whatsapp-float {
  touch-action: manipulation;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: none;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px -1px rgba(206, 17, 38, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(206, 17, 38, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(206, 17, 38, 0.05);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  overflow: hidden;
  text-align: center;
}

.slider-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.slider-arrow:hover {
  background: var(--primary);
  color: white;
}

.slider-arrow.prev { left: 2rem; }
.slider-arrow.next { right: 2rem; }

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 span {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 1.5rem auto 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

#hero-title, #hero-description, #hero-tag-text {
  transition: opacity 0.5s ease-in-out;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Features */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.2);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary);
  color: white;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

/* Web Design Section */
.web-design {
  background: #0f172a;
  color: var(--white);
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0;
}

.web-design-content {
  padding: 4rem;
  flex: 1;
}

.web-design-content h2 { color: inherit; }
.web-design-content p { color: #94a3b8; }

.web-design-image {
  flex: 1;
  height: 100%;
}

.web-design-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(5px);
  transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Footer */
footer {
  background: #f1f5f9;
  padding: 80px 0 40px;
}

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

.footer-about p {
  margin: 1.5rem 0;
}

.footer-links h4 {
  margin-bottom: 1.5rem;
}

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

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

.footer-links a {
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

@media (max-width: 991px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .web-design { flex-direction: column !important; }
  #totem .web-design { flex-direction: column-reverse !important; }
  h1 { font-size: clamp(2rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2rem); }
  .section-header h2 { font-size: 1.8rem; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block !important; padding: 0.5rem; background: transparent; border: none; color: white; cursor: pointer; }
  .nav-btn { display: none; }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-links a { font-size: 1.2rem; }

  .footer-grid { grid-template-columns: 1fr !important; }
  .stats { grid-template-columns: 1fr !important; margin-top: 0 !important; }
  .hero { padding-top: 140px; }
  .hero p { font-size: 1rem !important; margin-bottom: 1.5rem !important; }
  .slider-arrow { width: 40px !important; height: 40px !important; }
  .slider-arrow.prev { left: 0.5rem !important; }
  .slider-arrow.next { right: 0.5rem !important; }
  .hero-btns { flex-direction: column !important; gap: 0.5rem !important; margin-bottom: 2rem !important; }
  
  #bot-guide > div { grid-template-columns: 1fr !important; }
  #totem .web-design-content > div { grid-template-columns: 1fr !important; }
  #seguros { padding: 3rem 1.5rem !important; }
  #contacto > div { padding: 1.5rem !important; }
  .web-design-content { padding: 2rem 1.5rem !important; }
  
  .features-grid { grid-template-columns: 1fr !important; }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 110px; /* Al lado del WhatsApp */
  width: 55px;
  height: 55px;
  background: var(--white);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.05);
}

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

.back-to-top:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1) translateY(-5px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Floating WhatsApp Bubble */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 2000;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
  background-color: #20ba5a;
}

.pulse-ring {
  content: '';
  width: 100%;
  height: 100%;
  background: rgba(37, 211, 102, 0.4);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: pulse-ring 2s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }
}

/* Allies Section */
.allies-section {
  padding: 60px 0;
  background: rgba(15, 23, 42, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.allies-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  flex-wrap: wrap;
}

.ally-logo {
  max-width: 180px;
  max-height: 80px;
  opacity: 0.6;
  transition: var(--transition);
  filter: grayscale(100%);
}

.ally-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .allies-grid {
    gap: 3rem;
  }
  .ally-logo {
    max-width: 140px;
  }
}
/* Floating Language Toggle */
.lang-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 65px;
  height: 65px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
}

.lang-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.lang-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

@media (max-width: 768px) {
  .lang-float {
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
  }
}
