/* Importar tipografías desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&family=Open+Sans&display=swap');
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  line-height: 1.6;
  background-color: #dce9eb;
  color: #333;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, rgba(42,106,170,0.9), rgba(0,51,102,0.9));
  backdrop-filter: blur(6px);           /* desenfoque del fondo */
  -webkit-backdrop-filter: blur(6px);   /* soporte Safari */
  color: white;
  padding: 1rem;
}
nav {
  display: grid;
  grid-template-columns: auto 1fr auto; /* h1 izquierda, h2 centro, menú derecha */
  align-items: center;
  color: white;
  padding: 0.6rem 1rem;
}

nav h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.5rem;
  margin: 0;
}

nav h2 {
  font-family: 'Montserrat', serif;
  font-size: 1.10rem;
  font-weight: 400;
  margin: 0;
  text-align: center;
  color: rgba(255,255,255,0.85);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: #4CAF50;
}

/* Botón hamburguesa oculto en desktop */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  nav {
    grid-template-columns: auto auto; /* h1 + toggle */
    grid-template-rows: auto auto;    /* menú debajo */
  }
  nav h2 {
    display: none; /* ocultar subtítulo en móvil */
  }
  .nav-toggle {
    display: block;
    justify-self: end;
  }
  .nav-links {
    grid-column: 1 / -1;
    flex-direction: column;
    display: none; /* oculto por defecto */
    background: #003366;
    padding: 0.5rem 0;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-links li {
    text-align: center;
    padding: 0.4rem 0;
  }
}


h3 {
  font-size: 2rem;
  margin-top: 0;
}
/* Hero */
.inicio-subtitle,
.inicio-description,
.btn {
  opacity: 0;
}
/* Animaciones */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#inicio.inicio {
  position: relative;
  background: url('img/fondo-estudio2.png') center center / cover no-repeat !important;
  min-height: 45vh;               /* Un poco más alta para dar aire a la imagen */
  display: flex;
  flex-direction: column;
  justify-content: center;        
  align-items: center;
  padding: 4rem 1rem;
  text-align: center;
  overflow: hidden;               /* Evita desbordamientos del filtro */
}

/* Filtro oscuro: Hace que CUALQUIER imagen resalte y da contraste */
#inicio.inicio::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 40, 0.80) !important; /* Capa azul marino oscuro traslúcida */
  z-index: 1;
}

/* Eleva los textos y botones sobre el filtro */
.inicio > * {
  position: relative;
  z-index: 2;
}

/* Título principal: Ahora en BLANCO para contrastar con el filtro oscuro */
.inicio-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-style: italic;
  font-weight: 600;               /* Más gruesa para mejorar lectura */
  font-size: 2.5rem;              
  color: #ffffff !important;      /* Forzado a blanco puro */
  margin: 0 0 1rem 0;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Sombra para despegarlo del fondo */
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

/* Subtítulo descriptivo: También en blanco traslúcido */
.inicio-description {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.65rem;
  color: rgba(255, 255, 255, 0.9) !important; /* Blanco limpio */
  margin: 0 0 1.5rem 0;
  font-weight: 500;
  max-width: 600px;               /* Limita el ancho para que no ocupe toda la pantalla */
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

.btn {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 1rem;
  transition: background 0.3s ease;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.8s;
}

.btn:hover {
  background: #003366;
}
/* Contenedor del SVG */
.divisor-onda {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

/* Estilos de la onda gráfica */
.divisor-onda svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px; /* Controla qué tan alta o pronunciada es la onda */
}

/* EL TRUCO CLAVE: El color del relleno del SVG y del fondo de abajo */
.divisor-onda svg path {
  fill: #d9e7f0; /* Poné acá el color exacto de la sección de clientes */
}
/* Secciones */
/* Botones segmentación */
.segment-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.segment-buttons button {
  background: #003366;
  color: white;
  padding: 0.9rem 1.6rem;   /* botones un poco más grandes */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform 0.18s ease, background 0.25s ease;
}

.segment-buttons button:hover {
  background: #4CAF50;
  transform: scale(1.03);
}

.segment-buttons button.active {
  background: #4CAF50;
}
/* permitir que los wrappers se muestren fuera sin recortes */
#services-container {
  position: relative;
  overflow: visible;        /* importante para que los globos no se recorten */
  transition: min-height 0.18s ease; /* animación suave al expandir */
}

/* wrapper y globos ya definidos; asegurar z-index alto */
.services-wrapper {
  position: absolute;
  z-index: 60;
  /* left/top se calculan desde JS */
}

/* opcional: espacio extra para que no queden pegados al siguiente bloque */
section + section {
  padding-top: 1rem; /* si querés más separación entre secciones */
}

/* Mostrar wrapper */
.services-wrapper.show {
  opacity: 1;
}

/* Globos más compactos */
.service-bubble {
  background: #f4f4f4;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;   /* menos padding para que sean más cortos */
  margin-bottom: 0.6rem;
  max-width: 200px;         /* más pequeños */
  font-size: 0.9rem;        /* texto más chico */
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Animación de cada burbuja */
.service-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

/* Ajustes responsivos: si la pantalla es chica, los wrappers se centran y las burbujas ocupan más ancho */
@media (max-width: 900px) {
  .service-bubble { 
    max-width: 90vw; 
    padding: 0.6rem 1rem; 
    /* doble sombra: una cercana y otra difusa */
    box-shadow: 
      0 4px 8px rgba(0,0,0,0.15),   /* sombra corta y suave */
      0 10px 20px rgba(0,0,0,0.25); /* sombra más amplia y marcada */
  }
  .services-wrapper { 
    left: 50% !important; 
    transform: translateX(-50%); 
  }
}

@media (max-width: 520px) {
  .segment-buttons button { 
    font-size: 0.95rem; 
    padding: 0.6rem 1rem; 
  }
  .service-bubble { 
    font-size: 0.95rem; 
    /* mantenemos también la doble sombra en móvil más chico */
    box-shadow: 
      0 3px 6px rgba(0,0,0,0.18),
      0 8px 16px rgba(0,0,0,0.28);
  }
}

/* Alineaciones por perfil (cada clase ocupa su columna) */
.services-left        { grid-column: 1; align-items: flex-start; }
.services-center      { grid-column: 2; align-items: center; }
.services-right       { grid-column: 3; align-items: flex-end; }
.services-monotributo { grid-column: 4; align-items: center; }

/* Ajustes responsivos: en pantallas pequeñas apilar columnas */
@media (max-width: 900px) {
  #services-container { grid-template-columns: 1fr 1fr; padding: 0 1rem; }
  .services-left, .services-center, .services-right, .services-monotributo {
    grid-column: auto;
    align-items: center;
  }
}

@media (max-width: 520px) {
  #services-container { grid-template-columns: 1fr; }
  .segment-buttons button { font-size: 0.95rem; padding: 0.6rem 1rem; }
  .service-bubble { max-width: 100%; padding: 0.8rem 1rem; }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  animation: slideDown 0.4s ease;
  position: relative;
}

.close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Animaciones */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes slideDown {
  from {transform: translateY(-50px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

section {
  padding: 2rem 1rem;
}

h3 {
  font-family: 'Montserrat', sans-serif;
  text-align: center;       /* centra el texto */
  margin-bottom: 1.2rem;
  position: relative;
  display: block;           /* ocupa todo el ancho */
}

/* Subrayado decorativo */
h3::after {
  content: "";
  display: block;
  width: 120px;             /* más largo, pero no total */
  height: 3px;
  background: #000;         /* color negro */
  margin: 0.5rem auto 0;    /* centrado debajo del texto */
  border-radius: 2px;
}

/* Contenedor centrado y con padding lateral para que no queden muy anchas */
#servicios {
  padding: 3rem 1.25rem;      /* espacio arriba/abajo y laterales */
  box-sizing: border-box;
  background: transparent;
}

/* Título */
#servicios > h3 {
  text-align: center;
  margin-bottom: 1.25rem;
  font-family: 'Montserrat', sans-serif;
  color: #0b2b4a;
}

/* Grid: 3 columnas en desktop, centrado y con max-width */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 por fila */
  gap: 1.25rem;                           /* espacio entre cards */
  max-width: 1100px;                      /* limita el ancho total */
  margin: 0 auto;                         /* centra el grid en la página */
  padding: 0 1rem;                        /* padding lateral extra */
  box-sizing: border-box;
}

/* Card */
.card {
  background: #f0f2f5;
  padding: 1.05rem 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 120px;      /* altura base */
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

/* Hover / foco */
.card:hover,
.card:focus {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
  background: #e9eef6;
  outline: none;
}

/* Título dentro de la card (mantener en una línea si es posible) */
.card > :first-child {
  display: block;
  font-size: 1rem;
  color: #003366;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

/* Info oculta por defecto, se expande con transición */
.card .info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.36s cubic-bezier(.2,.9,.2,1), opacity 0.28s ease;
  font-size: 0.92rem;
  margin-top: 0.25rem;
  font-weight: 400;
  color: #333;
  text-align: left;
}

/* Clase que indica abierto (se controla desde JS) */
.card.open .info {
  opacity: 1;
  /* max-height se ajusta dinámicamente desde JS para animación precisa */
}

/* Pequeño indicador visual (opcional) */
.card::after {
  content: "";
  display: block;
  height: 4px;
  width: 48px;
  background: transparent;
  margin: 0.6rem auto 0;
  border-radius: 4px;
}

/* Responsivo: 2 columnas en tablet, 1 columna en móvil */
@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
  }
  .card { min-height: 110px; }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 0 0.75rem;
  }
  .card { min-height: auto; }
  .card > :first-child { font-size: 1rem; }
  .card .info { font-size: 0.95rem; }
}

/* Formulario */
#contacto {
  background-color: #dce9eb;
}
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: auto;
}

input, textarea {
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  background: #003366;
  color: white;
  padding: 0.7rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background: #4CAF50;
}

/* ---------------------------
   Sobre nosotros (estructura robusta)
   --------------------------- */

.about-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  box-sizing: border-box;
  --about-gap: 2.4rem;
  --team-col-width: 360px;
  --h3-underline-width: 140px;
}

/* Título centrado respecto a la sección */
.about-section > h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  margin: 0 0 1rem 0;
  text-align: center;
  color: #0b2b4a;
  line-height: 1.05;
  font-weight: 600;
}
.about-section > h3::after {
  content: "";
  display: block;
  width: var(--h3-underline-width);
  height: 3px;
  background: #003366;
  margin: 0.45rem auto 0;
  border-radius: 2px;
}

/* Contenido principal: texto + columna de equipo */
.about-main {
  display: grid;
  grid-template-columns: 1fr var(--team-col-width);
  gap: var(--about-gap);
  align-items: start;
}

/* Texto */
.about-text {
  max-width: 720px;
  margin: 0 auto 0 0; /* mantiene el texto a la izquierda dentro de la columna */
  padding-left: 0.6rem;
}
.about-text p {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  line-height: 1.55;
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
}

/* Columna del equipo (cards apiladas) */
.about-team {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 0.6rem;
  /* separación respecto al título: ajustable si necesitás más espacio */
  padding-top: 0.6rem;
}

/* Grid interno: columna única para cards */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  width: 100%;
  max-width: 360px;
}

/* Card vertical, tamaño y espaciado aumentado */
.team-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.05rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  transition: transform .18s ease, box-shadow .18s ease;
  width: 100%;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.10);
}

/* Imagen circular más grande */
.team-card img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.06);
}

/* Texto dentro de la card */
.team-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.team-info strong {
  font-size: 1.02rem;
  color: #003366;
}
.team-info span {
  font-size: 0.9rem;
  color: #666;
}

/* Responsive: apilar y centrar en pantallas pequeñas */
@media (max-width: 980px) {
  .about-main {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .about-text {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 100%;
  }
  .about-team {
    padding-left: 0;
    padding-top: 0;
    justify-content: center;
  }
  .team-grid {
    max-width: 520px;
  }
  .about-section > h3::after {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Ajustes finos para móviles */
@media (max-width: 520px) {
  .team-card img { width: 56px; height: 56px; }
  .team-card { padding: 0.9rem; gap: 0.7rem; }
  .team-info strong { font-size: 0.98rem; }
  .team-info span { font-size: 0.84rem; }
  .about-section { padding-left: 0.75rem; padding-right: 0.75rem; }
}
/* Modal overlay y diálogo */
.team-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 18, 34, 0.55);
  z-index: 1200;
  padding: 1.25rem;
}
.team-modal[aria-hidden="false"] { display: flex; }

.team-modal-dialog {
  background: #fff;
  border-radius: 10px;
  max-width: 760px;
  width: 100%;
  box-shadow: 0 18px 48px rgba(2,10,30,0.35);
  overflow: auto;
  max-height: 90vh;
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
}

.team-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgb(206, 205, 205);
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: #334155;
  padding: 0.35rem;
  border-radius: 6px;
}
.team-modal-close:focus { outline: 2px solid #4CAF50; outline-offset: 2px; }

.team-modal-name { margin: 0 0 0.35rem 0; color: #003366; font-size: 1.15rem; }
.team-modal-bio { color: #243b4a; font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; }

@media (max-width: 520px) {
  .team-modal-dialog { padding: 0.9rem; }
  .team-modal-name { font-size: 1rem; }
  .team-modal-bio { font-size: 0.92rem; }
}


/* Clientes */

/* Navbar sticky */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Sección clientes */
/* Carrusel clientes: layout y estilos */
/* Mantener estas reglas (pega las tuyas tal cual) */
.clients-section {
  margin-top: 1.5rem;
  padding: 2rem 1rem;
  background-color: #e4eef0;
  box-sizing: border-box;
}
.clients-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.clients-header h3 {
  text-align: center;
  margin: 0;
}
.clients-controls {
  display: flex;
  gap: 0.5rem;
}
.clients-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  border-radius: 8px;
  background: #dce9eb;
  padding: 0.75rem 0;
  box-sizing: border-box;
}
.clients-track {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Reemplazar/añadir: estilos para cada item con logo o placeholder */
.client-item {
  flex: 0 0 auto;
  width: 220px;               /* ancho base; ajustable */
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

.client-logo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f2f5;
}

.client-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Placeholder con iniciales (cuando no haya logo) */
.client-logo.placeholder {
  font-weight: 700;
  color: #1f2937;
  background: linear-gradient(135deg,#e6eefc,#f7fbff);
  font-size: 1rem;
  letter-spacing: 0.6px;
}

/* Texto: nombre en negrita y subtítulo */
.client-info { text-align: left; }
.client-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #0b2540;
  line-height: 1.1;
}
.client-sub {
  font-weight: 400;
  font-size: 0.85rem;
  color: #556b7a;
  margin-top: 0.18rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;      /* opcional: limitar subtítulo a 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive: items más pequeños en pantallas chicas */
@media (max-width: 900px) {
  .client-item { width: 180px; padding: 0.5rem; }
  .client-logo { width: 56px; height: 56px; }
  .client-name { font-size: 0.92rem; }
  .client-sub { font-size: 0.8rem; }
}
@media (max-width: 520px) {
  .client-item { width: 150px; gap: 0.5rem; }
  .client-logo { width: 48px; height: 48px; border-radius: 6px; }
  .client-name { font-size: 0.88rem; }
  .client-sub { display: none; } /* opcional: ocultar subtítulo en móviles */
}

/* Mantener tu prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .clients-track { transition: none !important; }
}


/* Footer */
.footer {
  background: linear-gradient(90deg, rgba(12,86,170,0.9), rgba(0,51,102,0.9));
  color: #fff;
  padding: 2rem 1rem 1rem;
  font-family: 'Montserrat', sans-serif;
}

.footer-container {
  max-width: 1800px;
  margin: 0 auto;
  margin-left: 15rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  align-items: start;
  text-align: left;
}

.footer-col h4.footer-brand {
  font-size: 1.3rem;
  margin: 0;
}

.footer-subtitle {
  font-size: 0.95rem;
  margin-top: 0.2rem;
  color: #ddd;
}

.footer-col h5 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #fff;
}

.footer-col p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.footer-col a {
  color: #4CAF50;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-col i {
  margin-right: 0.4rem;
  color: #4CAF50;
}

.social-icons a {
  font-size: 1.2rem;
  margin-right: 0.6rem;
  color: #fff;
  transition: color .2s ease;
}

.social-icons a:hover {
  color: #4CAF50;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 0.8rem;
  font-size: 0.85rem;
  color: #ccc;
}
@media (max-width: 980px) {
  .footer-container {
    margin-left: 0;
    padding: 0 1rem;
    text-align: center;
  }
}

/* Botón flotante WhatsApp */
/* Globo flotante WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 72px;
  height: 72px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  z-index: 1500;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}
.whatsapp-float i {
  font-size: 36px;
  color: #fff;
}

/* Popup de WhatsApp con estilo más atractivo */
.whatsapp-popup {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  z-index: 1600;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* Cabecera verde estilo WhatsApp */
.whatsapp-popup .popup-header {
  background: #25D366;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.whatsapp-popup .popup-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Cuerpo del chat */
.whatsapp-popup .popup-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.whatsapp-popup textarea {
  resize: none;
  height: 70px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  outline: none;
}
.whatsapp-popup textarea:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37,211,102,0.25);
}

/* Botón enviar */
.whatsapp-popup button#popup-send {
  background: #25D366;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.25s ease;
}
.whatsapp-popup button#popup-send:hover {
  background: #1ebe5d;
}

/* Estado visible con animación */
.whatsapp-popup.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Animación de salida */
.whatsapp-popup.hide {
  opacity: 0;
  transform: translateY(20px);
}

/* Responsive */
@media (max-width: 520px) {
  .whatsapp-float {
    width: 60px;
    height: 60px;
  }
  .whatsapp-float i {
    font-size: 30px;
  }
}

/* Estado inicial: oculto y preparado para animar */
#rotator, #rotator-sub {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .42s ease, transform .42s ease;
  will-change: opacity, transform;
  color: #ffffff;
}

/* Clase que activa visibilidad (aplicada por JS) */
.rot-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Evitar saltos: reservar espacio según la frase más larga */
#rotator {
  min-width: 360px;    /* ajustar si alguna frase es más larga */
  max-width: 70ch;
  font-style: italic;
  font-weight: 600;
  vertical-align: baseline;
  text-align: center;
}

/* Subtítulo rotante */
#rotator-sub {
  display: inline-block;
  min-width: 420px;    /* ajustar según el texto más largo del párrafo */
  max-width: 80ch;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  text-align: center;
  margin-top: .6rem;
  display: block;      /* para que el p mantenga su bloque y no rompa el layout */
}

/* Si ya tienes animaciones fadeUp en .inicio-subtitle/.inicio-description,
   .rot-visible se coordina con ellas y no debería interferir. */

/* Respeto a reduce motion */
@media (prefers-reduced-motion: reduce) {
  #rotator, #rotator-sub { transition: none; transform: none; opacity: 1; }
}
