:root {
  --primary-color: #0e2a55;
  --secondary-color: #1a4e9a;
  --tertiary-color: #0e2a55;
  --quaternary-color: rgb(24, 142, 206);
  --bg-color: #e6edf7;
  /* Crema */
  --text-color: #333;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Quicksand", "Inter", sans-serif;
}

/* Navbar */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.navbar-brand .logo-placeholder {
  width: 50px;
  height: 50px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  color: #999;
  font-size: 0.8rem;
}

.nav-link {
  color: var(--quaternary-color) !important;
  font-weight: 500;
  transition: color 0.3s ease;
  margin-left: 1.5rem;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Common Section Styling */
section {
  padding: 80px 0;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
}

/* Hero Section */
#inicio {
  background: var(--primary-color);
  color: white;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

/* Hero CTA Button - Premium Transformation */
.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 45px;
  background: linear-gradient(135deg, var(--secondary-color), var(--quaternary-color));
  color: white !important;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(26, 78, 154, 0.4);
  border: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-hero-cta::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: 0.6s;
}

.btn-hero-cta:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(26, 78, 154, 0.6);
  filter: brightness(1.1);
  color: white !important;
}

.btn-hero-cta:hover::before {
  left: 100%;
}

.btn-hero-cta:active {
  transform: translateY(-2px) scale(0.98);
}

/* Mockup Collage Styling */
.mockup-collage {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-img {
  position: absolute;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.collage-img:hover {
  transform: translateY(-15px) scale(1.08) rotate(0deg) !important;
  z-index: 100 !important;
}

.collage-pc {
  width: 90%;
  z-index: 1;
}

.collage-tablet {
  width: 65%;
  /* Ancho adecuado para vertical */
  position: relative;
  z-index: 5;
  margin: 0 auto;
  display: block;
  transition: transform 0.5s ease;
  /* Transición suave para el hover */
}

.collage-tablet:hover {
  transform: scale(1.04);
  /* Acercamiento muy sutil al pasar el mouse */
}

.collage-phone {
  width: 20%;
  right: 5px;
  bottom: 20px;
  z-index: 10;
  transform: rotate(8deg);
}

.collage-img.collage-tablet {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
}

.mockup-collage img.collage-tablet,
.mockup-collage img.phone-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* WhatsApp Style Chat Thread Animation */
.chat-thread {
  position: absolute;
  width: 250px;
  bottom: 80px;
  /* Subido para encajar con la tablet vertical */
  right: -30px;
  z-index: 200;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msg-top {
  margin-left: -420px;
  /* Movido otros 30px a la derecha */
  position: relative;
  top: -95px;
}

.msg {
  padding: 10px 15px;
  /* Restored more standard padding */
  border-radius: 15px;
  min-height: auto;
  /* Allow auto height for text */
  width: fit-content;
  white-space: nowrap;
  max-width: 95%;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(30px);
  animation: msgAppear 5s infinite ease-in-out;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: #333;
}

.msg-in {
  background-color: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 4px;
}

.msg-out {
  background-color: #dcf8c6;
  align-self: flex-end;
  margin-right: -125px;
  /* Movido 5px a la izquierda (era -170px) */
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 4px;
  top: -20px;
  /* Bajado 50px según solicitado */
}

.msg:nth-child(1) {
  animation-delay: 0.2s;
}

.msg:nth-child(2) {
  animation-delay: 2.5s;
}

@keyframes msgAppear {
  0%,
  5%,
  95%,
  100% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }

  12%,
  88% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsiveness for collage */
@media (max-width: 991px) {
  .mockup-collage {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .mockup-collage {
    height: 350px;
  }
}

.hero-btn {
  background-color: var(--secondary-color);
  border: none;
  color: white;
  padding: 12px 30px;
  font-weight: 600;
  transition: transform 0.2s;
}

.hero-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  color: white;
}

/* Typewriter Effect */
.typewriter {
  font-size: 3rem;
  line-height: 1.2;
  min-height: 3.8em;
  /* Reserva el espacio para evitar saltos de layout */
  display: block;
  white-space: pre-wrap;
  /* Respeta los saltos de línea del script */
  overflow: visible;
  letter-spacing: 0.05em;
  width: 100%;
}

.robot-hero-img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

/* The typing effect */
@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: var(--secondary-color);
  }
}

/* Services */
.service-card {
  background: white;
  border: none;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--tertiary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: white;
  font-size: 1.5rem;
}

/* Badge Cards (Key Points) */
/* Badge Carousel Styles */
.badge-slider {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  margin-top: 40px;
  position: relative;
}

.badge-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll-badges 30s linear infinite;
}

.badge-track:hover {
  animation-play-state: paused;
}

.badge-card {
  background: rgba(104, 194, 196, 0.1);
  border-radius: 12px;
  padding: 12px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--tertiary-color);
  transition: all 0.3s ease;
  white-space: nowrap;
  /* Evita que el texto se rompa */
  min-width: 200px;
  justify-content: center;
}

.badge-card:hover {
  transform: translateY(-5px);
  background: rgba(104, 194, 196, 0.2);
}

@keyframes scroll-badges {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-220px * 5 - 20px * 5));
  }

  /* Mueve el ancho de 5 cards + gaps */
}

.badge-card i {
  font-size: 1.2rem;
  color: var(--secondary-color);
}

.badge-card span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--quaternary-color);
}

/* Info Cards Section - Optimized for Long Text */
.info-section {
  padding: 100px 0;
  /* Más aire entre secciones */
  overflow-x: hidden;
}

.info-card {
  background: white;
  border-radius: 24px;
  /* Bordes más redondeados */
  padding: 40px;
  /* Mucho más padding para respirar */
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.02);
  flex: 1;
  min-width: 300px;
  /* Asegura que no se compriman demasiado */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-bottom: 4px solid transparent;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.info-card:hover {
  border-bottom-color: var(--tertiary-color);
  transform: translateY(-8px);
}

.info-card i {
  font-size: 2.5rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.info-card h4 {
  color: var(--quaternary-color);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.info-card p {
  color: #555;
  line-height: 1.8;
  /* Mejor interlineado para lectura larga */
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Ajuste de gaps para filas */
.info-section .row {
  row-gap: 30px;
}

/* Modern FAQ Styles */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.faq-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--tertiary-color);
}

.faq-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--tertiary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.faq-card:hover::before {
  opacity: 1;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--quaternary-color);
  margin-bottom: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  color: #666;
  line-height: 1.6;
  margin-top: 0;
}

/* State for opened FAQ (handled by JS or Bootstrap collapse) */
.faq-card.active .faq-answer {
  max-height: 200px;
  margin-top: 15px;
}

.faq-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  /* Asegura que no se aplaste */
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tertiary-color);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  /* Evita que se convierta en óvalo por el texto largo */
}

.faq-card.active .faq-icon {
  transform: rotate(180deg);
  background: var(--tertiary-color);
  color: white;
}

/* Contact */
.contact-form {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.btn-submit {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-submit:hover {
  background-color: var(--quaternary-color);
  color: white;
}

/* Glassmorphism for Contact Form */
.contact-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--secondary-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  border-radius: 2rem;
}

.contact-glass .section-title {
  color: var(--primary-color) !important;
}

.contact-glass .section-title i {
  color: var(--secondary-color);
  text-shadow: 0 0 15px var(--primary-color);
}

.contact-glass .form-control {
  transition: all 0.3s ease;
}

.contact-glass .form-control:focus {
  background: white !important;
  box-shadow: 0 0 0 4px rgba(0, 131, 58, 0.1) !important;
  border-color: var(--primary-color) !important;
}

/* Image Placeholder for Body */
.img-placeholder {
  width: 100%;
  height: 300px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ddd;
  color: #aaa;
  margin-bottom: 20px;
}

/* Features Page Specific - Vertical Timeline */
.features-footer {
  background: var(--primary-color);
  color: white;
  padding: 151px 0 10px 0;
  position: relative;
  border-top: none;
  overflow: visible;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.footer-nav a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-nav a:hover {
  opacity: 1;
}

.features-footer h2 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.features-footer .lead {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.top-waves {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 150px;
  transform: rotate(180deg);
  z-index: 10;
}

/* Remove bottom waves to match hero style */
.bottom-waves {
  display: none;
}

.footer-social-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social-icon:hover {
  background: var(--secondary-color);
  transform: translateY(-10px);
  color: white;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.features-hero {
  background: var(--primary-color);
  color: white;
  min-height: 110vh;
  display: flex;
  align-items: center;
  padding: 100px 0 200px 0 !important;
  position: relative;
  overflow: hidden;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.features-page .navbar {
  background-color: transparent !important;
  position: absolute;
  width: 100%;
  z-index: 1000;
  box-shadow: none !important;
}

.features-page .nav-link {
  color: white !important;
}

.features-page .nav-link:hover {
  color: white !important;
  opacity: 1;
  /* Ensure it's fully opaque on hover */
}

/* Mobile Menu Alignment and Style */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(14, 42, 85, 0.97);
    /* var(--primary-color) con alta opacidad */
    backdrop-filter: blur(10px);
    margin-top: 15px;
    padding: 20px;
    border-radius: 15px;
    border: none;
  }

  .navbar-toggler {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  .navbar-nav {
    text-align: right;
  }

  .nav-link {
    margin-left: 0 !important;
    padding: 10px 0;
    font-size: 1.2rem;
  }
}

.features-page .logo-placeholder {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.waves-container {
  position: absolute;
  width: 100%;
  bottom: 0;
  left: 0;
  line-height: 0;
}

.waves {
  position: relative;
  width: 100%;
  height: 15vh;
  min-height: 100px;
  max-height: 150px;
}

/* Static Blurred Waves */
.static-waves-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 250px;
  line-height: 0;
  overflow: hidden;
  z-index: 5;
}

.static-wave-svg {
  width: 100%;
  height: 100%;
}

.wave-static {
  transition: all 0.5s ease;
}

.wave-bg {
  fill: rgba(253, 251, 247, 0.4);
}

.wave-mid {
  fill: rgba(253, 251, 247, 0.6);
}

.wave-front {
  fill: var(--bg-color);
}

.frosted-glass-overlay {
  display: none;
}

/* Wave Animations (Simplified for Parallax) */
.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}

.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}

.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}

.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }

  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* Services Chat Section - Flexible height */
.services-chat-section {
  position: relative;
  min-height: 110vh;
  padding: 120px 0;
  background: var(--bg-color);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fixed Phone in Center */
.phone-sticky {
  position: absolute;
  /* Changed to absolute for perfect centering */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  width: 300px;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  cursor: pointer;
}

.phone-sticky.visible {
  opacity: 1;
  pointer-events: auto;
}

.phone-sticky:hover .phone-image {
  transform: scale(1.05);
}

.phone-image {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
}

/* Click Hint Icon */
.phone-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(55, 173, 104, 0.5);
  z-index: 200;
  pointer-events: none;
  animation: iconPulse 2s infinite ease-in-out;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.phone-hint.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

@keyframes iconPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 0 rgba(55, 173, 104, 0.7);
  }

  70% {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 20px rgba(55, 173, 104, 0);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 0 rgba(55, 173, 104, 0);
  }
}

/* Bubble Sets - Positioned absolutely to swap in place */
.bubble-set {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transform: scale(0.95);
  z-index: 1;
}

.bubble-set.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 50;
}

/* Service Bubble Base Styles */
.service-bubble {
  position: relative;
  background: white;
  padding: 20px 30px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  width: 350px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
}

.service-bubble + .service-bubble {
  margin-top: -20px;
}

.service-bubble h3 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: left;
}

.service-bubble ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-bubble ul li {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
}

.service-bubble ul li::before {
  content: "✓";
  color: var(--primary-color);
  margin-right: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Left Bubbles - White with green text, tail pointing RIGHT */
.bubble-left {
  align-self: flex-start;
  margin-left: calc(50% - 495px);
  background: white;
  border-bottom-right-radius: 4px;
  transform: translate(0, -20px) scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 330px;
}

.bubble-left::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 20px;
  height: 20px;
  background: white;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* Right Bubbles - Light green WhatsApp style, tail pointing LEFT */
.bubble-right {
  align-self: flex-end;
  margin-right: calc(50% - 495px);
  /* Precise positioning relative to the center phone */
  background: #dcf8c6;
  border-bottom-left-radius: 4px;
  transform: translateX(150px) scale(0.9);
  width: 330px;
}

.bubble-right h3 {
  color: #2d5016;
}

.bubble-right ul li {
  color: #444;
}

.bubble-right::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 20px;
  height: 20px;
  background: #dcf8c6;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Active State Animation */
.bubble-set.active .service-bubble {
  opacity: 1;
  transform: translateX(0) scale(1) !important;
}

/* Stagger entrance for bubbles in a set */
.bubble-set.active .service-bubble:nth-child(2) {
  transition-delay: 0.1s;
}

.bubble-set.active .service-bubble:nth-child(3) {
  transition-delay: 0.2s;
}

/* Google Nest Hub / iPad Pro Portrait (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .bubble-left {
    margin-left: calc(50% - 508px) !important;
  }
  .bubble-right {
    margin-right: calc(50% - 508px) !important;
  }
  .service-bubble {
    width: 350px !important;
  }
}

/* Desktop/Large Screen Adjustments (iPad Pro Landscape, Monitors 1200px+) */
@media (min-width: 1200px) {
  .bubble-left {
    margin-left: calc(50% - 600px) !important;
  }
  .bubble-right {
    margin-right: calc(50% - 600px) !important;
  }
  .service-bubble {
    width: 380px !important;
  }
}

/* Responsive adjustments - Phones and Small Devices (0 - 740px) */
@media (max-width: 740px) {
  section {
    padding: 100px 0;
  }

  .features-hero {
    padding: 70px 0 70px 0 !important;
    min-height: auto;
  }

  .typewriter {
    font-size: 1.6rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .mockup-collage {
    height: 300px;
    margin-top: -20px;
    max-width: 100%;
  }

  .collage-pc {
    width: 100%;
    position: relative;
    left: 0;
    top: 0;
  }

  .collage-tablet,
  .collage-phone,
  .chat-thread {
    display: none !important;
  }

  .features-footer h2 {
    font-size: 2.5rem;
  }

  .features-footer .lead {
    font-size: 1.2rem;
  }

  .waves-container {
    bottom: -5px;
  }

  .services-chat-section {
    height: auto;
    min-height: auto;
    padding: 70px 0;
    overflow: visible;
  }

  #faq {
    padding: 70px 0 !important;
  }

  .phone-sticky {
    display: none !important;
  }

  .service-bubble {
    width: 100%;
    max-width: 365px;
    margin: 0 auto !important;
    min-height: auto;
    padding: 15px 20px;
  }

  .service-bubble h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
  }

  .service-bubble ul li {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .msg {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .bubble-left, .bubble-right {
    margin-left: auto !important;
    margin-right: auto !important;
    transform: scale(0.95);
    align-self: center;
  }

  .bubble-left::after,
  .bubble-right::after {
    display: none;
  }

  .bubble-set {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%) scale(0.95);
    padding: 20px 15px;
    gap: 20px;
    width: 100%;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .bubble-set.active {
    position: relative !important;
    top: auto;
    transform: scale(1);
    opacity: 1;
  }

  .bubble-set.active .service-bubble {
    transform: translateX(0) scale(1) !important;
  }

  .service-bubble + .service-bubble {
    margin-top: 15px;
  }

  #paquetes {
    padding: 40px 0 !important;
  }

  #paquetes h2.section-title {
    font-size: 1.6rem;
  }

  #paquetes .pricing-wrapper {
    padding: 1rem !important;
    border-radius: 14px;
  }

  .pricing-table {
    min-width: 550px;
  }

  .package-card {
    padding: 0.5rem 0.75rem;
  }

  .package-card h4 {
    font-size: 1.1rem;
  }

  .package-card--empresarial {
    transform: scale(1) !important;
  }

  .badge-popular {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
    letter-spacing: 0.5px;
  }

  .pricing-feature-label {
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  .pricing-feature-header {
    font-size: 0.85rem;
  }

  .pricing-row td:not(.pricing-feature-label) {
    font-size: 0.75rem !important;
  }

  .contact-glass {
    padding: 2rem;
    border-radius: 1.5rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 10px;
  }
}

/* Medium Tablets (iPad Mini, iPad Air, Surface) - Same as iPad Pro/Desktop but scaled down */
@media (min-width: 741px) and (max-width: 1023px) {
  .services-chat-section {
    height: auto;
    min-height: 700px;
    padding: 70px 0;
    overflow: hidden;
  }

  .phone-sticky {
    display: block !important;
    opacity: 0;
    width: 240px; /* Scaled down from 300px to fit iPad Mini width */
  }

  .phone-sticky.visible {
    opacity: 1;
  }

  .service-bubble {
    width: 215px; /* Further reduced from 250px to ensure it fits 768px screen with gaps */
    min-height: auto;
    padding: 15px 18px;
  }

  .bubble-left {
    margin-left: calc(50% - 370px) !important; /* Adjusted for narrower gap */
    align-self: flex-start !important;
  }

  .bubble-right {
    margin-right: calc(50% - 370px) !important;
    align-self: flex-end !important;
  }

  .bubble-set {
    position: absolute;
    inset: 0;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .service-bubble h3 {
    font-size: 0.95rem;
  }

  .service-bubble ul li {
    font-size: 0.72rem;
  }

  /* Ensure active state works in this range */
  .bubble-set.active {
    opacity: 1;
    z-index: 50;
  }
}

/* Ver todo button */
.btn-ver-todo {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--quaternary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    color 0.2s ease,
    gap 0.2s ease;
}

.btn-ver-todo:hover {
  color: var(--primary-color);
  gap: 0.6rem;
}

.btn-ver-todo .ver-todo-chevron {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

/* =============================================
   Plan Cards Section
   ============================================= */

.plan-cards-section {
  background: var(--bg-color);
}

/* ---- Modo estático para #planes (no acordeón) ---- */
#planes .pf-btn {
  cursor: default;
  pointer-events: none;
  background: transparent !important;
}

#planes .pf-btn:hover {
  background: transparent !important;
}

#planes .pf-item--dark .pf-btn {
  background: transparent !important;
}

#planes .pf-chevron {
  display: none;
}

#planes .pf-sub {
  max-height: none !important;
  overflow: visible;
}

#planes .pf-sub li {
  background: transparent !important;
}

/* ---- Estilos para categorias en la tabla ---- */
.category-header-row {
  background: rgba(14, 42, 85, 0.05) !important;
}

.category-header-label {
  color: var(--secondary-color);
  font-size: 1.1rem;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-top: 1.5rem !important;
  padding-bottom: 0.75rem !important;
}

/* Base card */
.plan-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.75rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12);
}

/* Header */
.plan-card__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Icon circle */
.plan-card__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.plan-card:hover .plan-card__icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

.plan-icon--individual {
  background: rgba(0, 41, 63, 0.12);
  color: var(--quaternary-color);
}

.plan-icon--empresarial {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.plan-icon--profesional {
  background: rgba(24, 142, 206, 0.12);
  color: var(--quaternary-color);
}

/* Title & subtitle */
.plan-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

.plan-card__subtitle {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0;
}

/* Feature list */
.plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.plan-card__features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #444;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  transition: background 0.2s ease;
}

.plan-card__features li:hover {
  background: rgba(0, 0, 0, 0.05);
}

.plan-card__features li i {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: var(--quaternary-color);
}

/* ---- Acordeón dentro de las cards (pf = plan feature) ---- */
.pf-item {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2px;
  background: rgba(0, 0, 0, 0.03);
  /* 0.0 = transparente, 1.0 = sólido */
}

.pf-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  border: none;
  border-radius: 0px;
  padding: 0.15rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.pf-btn:hover {
  background: rgba(0, 0, 0, 0.07);
}

.pf-btn span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pf-btn span i {
  color: var(--quaternary-color);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.pf-chevron {
  font-size: 0.7rem;
  color: #aaa;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* Sub-lista colapsable */
.pf-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.pf-sub li {
  font-size: 0.82rem;
  color: #555;
  padding: 0.3rem 0.75rem 0.3rem 2rem;
  position: relative;
}

.pf-sub li::before {
  content: "›";
  position: absolute;
  left: 0.9rem;
  color: var(--quaternary-color);
  font-weight: bold;
}

/* Variante oscura para Empresarial */
.pf-item--dark .pf-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.pf-item--dark .pf-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pf-item--dark .pf-btn span i {
  color: rgba(255, 255, 255, 0.85);
}

.pf-item--dark .pf-chevron {
  color: rgba(255, 255, 255, 0.5);
}

.pf-item--dark .pf-sub li {
  color: rgba(255, 255, 255, 0.75);
}

.pf-item--dark .pf-sub li::before {
  color: rgba(255, 255, 255, 0.6);
}

/* Flecha cuando está abierto */
.pf-item.pf-open .pf-btn {
  border-radius: 8px 8px 0 0;
  background: rgba(0, 0, 0, 0.05);
}

.pf-item--dark.pf-open .pf-btn {
  background: rgba(255, 255, 255, 0.15);
}

.plan-card--individual {
  border-top: 4px solid var(--quaternary-color);
}

/* ---- Empresarial (featured) ---- */
.plan-card--empresarial {
  background: linear-gradient(
    145deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border: none;
  box-shadow: 0 16px 50px rgba(14, 42, 85, 0.25);
  transform: scale(1.03);
}

.plan-card--empresarial:hover {
  transform: scale(1.03) translateY(-6px);
}

.plan-card--empresarial .plan-card__title,
.plan-card--empresarial .plan-card__subtitle,
.plan-card--empresarial .plan-card__features li {
  color: rgba(255, 255, 255, 0.9);
}

.plan-card--empresarial .plan-card__subtitle {
  color: rgba(255, 255, 255, 0.65);
}

.plan-card--empresarial .plan-card__features li {
  background: rgba(255, 255, 255, 0.1);
}

.plan-card--empresarial .plan-card__features li:hover {
  background: rgba(255, 255, 255, 0.18);
}

.plan-card--empresarial .plan-card__features li i {
  color: rgba(255, 255, 255, 0.85);
}

/* "RECOMENDADO" badge */
.plan-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: hsl(231, 100%, 73%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ---- Profesional ---- */
.plan-card--profesional {
  border-top: 4px solid var(--quaternary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .plan-card--empresarial {
    transform: scale(1) !important;
  }

  .plan-card--empresarial:hover {
    transform: translateY(-6px) !important;
  }

  .plan-card__icon-wrap {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .plan-card__title {
    font-size: 1.15rem;
  }

  .plan-card__features li {
    font-size: 0.82rem;
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff !important;
  border-radius: 50px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: floatBounce 3s infinite ease-in-out;
  overflow: hidden;
}

.whatsapp-float::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: 0.6s;
}

.whatsapp-float:hover::before {
  left: 100%;
}

.whatsapp-float i {
  font-size: 1.6rem;
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
  filter: brightness(1.1);
  color: #fff;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Reset default position (Desktop) */
.whatsapp-float {
  bottom: 30px;
  right: 30px;
}

/* Google Nest Hub Specific adjustment (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .whatsapp-float {
    bottom: 40px;
    right: 50px; /* Moved slightly inside to match user request */
    padding: 12px 28px;
  }
}

/* Medium Tablets (iPad Mini, Air, 741px - 1023px) */
@media (min-width: 741px) and (max-width: 1023px) {
  .whatsapp-float {
    bottom: 25px;
    right: 25px;
    padding: 10px 22px;
    font-size: 1rem;
    gap: 10px;
  }
  .whatsapp-float i {
    font-size: 1.4rem;
  }
}

/* Mobile Phones */
@media (max-width: 740px) {
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 0.9rem;
    gap: 6px;
  }
  .whatsapp-float i {
    font-size: 1.2rem;
  }
}

/* =============================================
   Pricing / Packages Section
   ============================================= */

#paquetes .pricing-wrapper {
  border-radius: 24px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.pricing-table {
  min-width: 800px;
  table-layout: auto;
  width: 100%;
}

/* Columna Características — se ajusta automáticamente al texto más largo */
.pricing-feature-label,
.pricing-feature-header {
  white-space: nowrap;
}

/* Columnas de planes — reparten el espacio restante en partes iguales */
.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3),
.pricing-table th:nth-child(4),
.pricing-table td:nth-child(4) {
  width: 1%;
  /* fuerza al navegador a asignar el mínimo y repartir el resto */
}

/* Header label "Características" */
.pricing-table th.pricing-feature-header {
  font-weight: 600;
}

/* Generic package header card */
.package-card {
  border-radius: 0rem;
  padding: 0.6rem 1rem;
  transition: transform 0.3s ease;
}

.package-card h4 {
  font-size: 1.4rem;
}

.package-card:hover {
  transform: translateY(-4px);
}

/* Individual Plan */
.package-card--individual {
  background: rgba(24, 142, 206, 0.05);
  border: 1px solid rgba(24, 142, 206, 0.2);
  color: var(--primary-color);
}

.package-card--individual h4 {
  color: var(--quaternary-color);
}

/* Empresarial Plan (featured) */
.package-card--empresarial {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.05);
  position: relative;
  z-index: 1;
}

.package-card--empresarial h4 {
  color: #fff;
}

/* Profesional Plan */
.package-card--profesional {
  background: rgba(24, 142, 206, 0.05);
  border: 1px solid rgba(24, 142, 206, 0.2);
}

.package-card--profesional h4 {
  color: var(--quaternary-color);
}

/* "POPULAR" badge */
.badge-popular {
  background: hsl(231, 100%, 73%);
  z-index: 2;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 8px !important;
}

/* Table body separator */
.pricing-table tbody {
  border-top: 2px solid #eee;
}

/* Each feature row */
.pricing-row {
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.3s;
}

.pricing-row:last-child {
  border-bottom: none;
}

.pricing-row:hover {
  background: #fbfdff;
}

/* Feature label cell (first column) */
.pricing-feature-label {
  color: var(--primary-color);
  font-size: 0.95rem;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Value cells (plan columns) */
.pricing-row td:not(.pricing-feature-label) {
  font-size: 0.82rem;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Highlighted value in Empresarial column */
.pricing-value--highlight {
  color: var(--secondary-color);
}
