/* ===== LANDING PAGE — PREMIUM DESIGN LAYER ===== */

/* --- NOISE / GRAIN TEXTURE OVERLAY --- */
.grain::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- HERO ANIMATED GRADIENT MESH --- */
.hero-mesh {
  position: relative;
  overflow: hidden;
}
.hero-mesh::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  top: -300px;
  right: -200px;
  background: radial-gradient(circle, rgba(236,72,153,0.12) 0%, transparent 70%);
  animation: meshDrift 12s ease-in-out infinite;
}
.hero-mesh::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  bottom: -200px;
  left: -150px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  animation: meshDrift 15s ease-in-out infinite reverse;
}
@keyframes meshDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* --- FLOATING WhatsApp BUBBLES (hero) --- */
.wa-bubble {
  position: absolute;
  background: #22272b;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 13px;
  color: #c9d1d9;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wa-bubble.show { animation: bubbleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.wa-bubble.float-idle { opacity: 1; animation: bubbleFloat 4s ease-in-out infinite; }
.wa-bubble.hiding { animation: bubbleOut 0.5s ease forwards; }
.wa-bubble::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #22272b;
  border-right: 1px solid #30363d;
  border-bottom: 1px solid #30363d;
  transform: rotate(45deg);
}
.wa-bubble.left::before { right: -5px; top: 14px; }
.wa-bubble.right::before { left: -5px; top: 14px; }
.wa-bubble .bubble-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}
.wa-bubble .tag-ai { background: rgba(236,72,153,0.15); color: #f472b6; letter-spacing: 0.02em; }
.wa-bubble .tag-you { background: rgba(34,197,94,0.15); color: #4ade80; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bubbleOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-12px) scale(0.92); }
}
@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- CARD FLIP (Pain points) --- */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  height: 120px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.flip-card-front {
  z-index: 2;
}
.flip-card-back {
  transform: rotateY(180deg);
}

/* --- ICON CONTAINERS --- */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}
.icon-box svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}
.icon-box-brand {
  background: rgba(236,72,153,0.1);
  border: 1px solid rgba(236,72,153,0.15);
}
.icon-box-brand svg { stroke: #f472b6; }
.icon-box-red {
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.15);
}
.icon-box-red svg { stroke: #60a5fa; }

/* --- ANIMATED GRADIENT BORDER --- */
.gradient-border,
.gradient-border-cyan,
.gradient-border-amber {
  position: relative;
  overflow: hidden;
}
.gradient-border::before,
.gradient-border-cyan::before,
.gradient-border-amber::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* Pink → Purple → Blue (original) */
.gradient-border::before {
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6, #ec4899);
  background-size: 300% 300%;
  animation: gradientRotate 4s linear infinite;
}
/* Cyan → Teal → Blue */
.gradient-border-cyan::before {
  background: linear-gradient(135deg, #06b6d4, #14b8a6, #3b82f6, #06b6d4);
  background-size: 300% 300%;
  animation: gradientRotateCyan 5s linear infinite;
}
/* Amber → Orange → Rose */
.gradient-border-amber::before {
  background: linear-gradient(135deg, #f59e0b, #f97316, #ec4899, #f59e0b);
  background-size: 300% 300%;
  animation: gradientRotateAmber 6s linear infinite;
}
@keyframes gradientRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gradientRotateCyan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gradientRotateAmber {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- GLASS MORPHISM --- */
.glass {
  background: rgba(34, 39, 43, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* --- GLOW HOVER (features, cards) --- */
.card-glow {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.card-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(236,72,153,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.card-glow:hover::after { opacity: 1; }
.card-glow:hover {
  border-color: rgba(236,72,153,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(236,72,153,0.08);
}

/* --- STEP CONNECTOR (How it works) --- */
.step-arrow {
  display: none;
}
@media (min-width: 640px) {
  .step-arrow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 30px;
  }
  .step-arrow .arrow-line {
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: radial-gradient(ellipse at center, rgba(236,72,153,0.25) 0%, transparent 70%);
  }
}

/* --- ANIMATED COUNTER --- */
.counter {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

/* --- PULSE DOT --- */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ec4899;
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #ec4899;
  animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* --- COMPARISON TABLE ENHANCEMENTS --- */
.cmp-row:hover { background: rgba(236,72,153,0.03); }
.plan-row:hover { background: rgba(236,72,153,0.03); }

/* --- SECTION DIVIDER (gradient line) --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236,72,153,0.3), transparent);
  margin: 0 auto;
  max-width: 200px;
}

/* --- MOBILE: tap to flip instead of hover --- */
@media (hover: none) {
  .flip-card:hover .flip-card-inner {
    transform: none;
  }
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }
}

/* --- INDUSTRY TABS --- */
.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid #30363d;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.3s;
}
.tab-btn:hover { border-color: #484f58; color: #c9d1d9; }
.tab-btn.active {
  background: rgba(236,72,153,0.1);
  border-color: rgba(236,72,153,0.3);
  color: #f472b6;
}
.tab-panel { display: none; animation: fadeUp 0.5s ease; }
.tab-panel.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- KANBAN BACKGROUND ANIMATION --- */
/* kanban-bg class no longer used — kanban is inline visible element */
.kanban-bg-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 14px;
  height: 100%;
  align-content: start;

}
.kanban-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.kanban-col-header {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 6px;
  border-radius: 5px;
  text-align: left;
  margin-bottom: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kanban-col-header .col-count {
  font-size: 7px;
  opacity: 0.5;
}
.kanban-card-mini {
  background: #1c2128;
  border: 1px solid #2d333b;
  border-radius: 8px;
  padding: 7px 8px;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  flex-shrink: 0;
}
.kanban-card-mini.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.kanban-card-mini.exiting {
  opacity: 0;
  transform: translateX(20px) scale(0.9);
  transition: all 0.6s;
}
.kanban-card-mini.closing {
  opacity: 0;
  transform: scale(0.85);
  box-shadow: 0 0 10px rgba(34,197,94,0.3);
  transition: all 0.8s;
}
.kc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.kc-name {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85%;
}
.kc-cal {
  width: 10px;
  height: 10px;
  opacity: 0.35;
  flex-shrink: 0;
}
.kc-badges {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}
.kc-badge {
  font-size: 6px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.3;
  text-transform: uppercase;
}
.kc-badge-hoy { background: rgba(34,197,94,0.2); color: #4ade80; }
.kc-badge-cad { background: rgba(239,68,68,0.2); color: #f87171; }
.kc-badge-date { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.25); }
.kc-desc {
  font-size: 7px;
  color: rgba(255,255,255,0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kc-phone {
  font-size: 7px;
  color: rgba(255,255,255,0.18);
  font-family: monospace;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kc-phone svg {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
}
.kc-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  justify-content: flex-end;
}
.kc-actions svg {
  width: 9px;
  height: 9px;
  opacity: 0.3;
}

/* --- IMAGE ZOOM / LIGHTBOX --- */
.img-zoom-wrap {
  position: relative;
  cursor: zoom-in;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.img-zoom-wrap:hover {
  transform: scale(1.02);
}
.img-zoom-wrap:hover .img-zoom-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.img-zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.6), 0 0 60px rgba(236,72,153,0.08);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}
.lightbox-overlay.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

/* --- NAV SCROLL STATE --- */
nav.scrolled {
  border-bottom-color: rgba(236,72,153,0.15);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* H10: Mobile polish */
@media (max-width: 639px) {
  /* Before/after — compact list items on small screens */
  #beforeAfter .card { padding: 1rem; }
  #beforeAfter .card h3 { font-size: 1rem; }
  #beforeAfter .card ul { gap: 0.625rem; row-gap: 0.625rem; }
  #beforeAfter .card ul > li { gap: 0.5rem; }
  #beforeAfter .card ul > li > div > p:first-child { font-size: 12px; line-height: 1.3; }
  #beforeAfter .card ul > li > div > p:last-child { font-size: 10px; line-height: 1.3; margin-top: 0; }
  #beforeAfter .card .icon-box { width: 36px; height: 36px; }
  #beforeAfter .card .icon-box svg { width: 18px; height: 18px; }
}

/* H10: Comparativa horizontal scroll hint — right-side gradient that fades when scrolled to end */
.cmp-scroll-wrap {
  position: relative;
}
.cmp-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(to left, rgba(13, 16, 20, 0.95), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
@media (max-width: 767px) {
  .cmp-scroll-wrap::after { opacity: 1; }
}
.cmp-scroll-wrap.scroll-end::after { opacity: 0; }

/* H10: Plan cards — keep popular badge clear of the previous card in mobile column flow */
@media (max-width: 639px) {
  .popular-badge { top: -12px; }
}

/* --- GALLERY CAROUSEL --- */
.gallery-carousel {
  position: relative;
}
.gallery-track {
  position: relative;
  overflow: hidden;
}
.gallery-track img {
  transition: opacity 0.4s ease;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  line-height: 1;
}
.gallery-arrow:hover {
  background: rgba(236,72,153,0.3);
  border-color: rgba(236,72,153,0.5);
  transform: translateY(-50%) scale(1.1);
}
.gallery-arrow-left { left: 12px; }
.gallery-arrow-right { right: 12px; }
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.gallery-dot:hover { background: rgba(255,255,255,0.4); }
.gallery-dot.active {
  background: #ec4899;
  width: 24px;
  border-radius: 4px;
}

/* --- GALLERY LIGHTBOX ARROWS --- */
.gallery-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 9999;
  line-height: 1;
}
.gallery-lb-arrow:hover {
  background: rgba(236,72,153,0.2);
  border-color: rgba(236,72,153,0.4);
}
.gallery-lb-left { left: 20px; }
.gallery-lb-right { right: 20px; }
.gallery-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  z-index: 9999;
}
@media (max-width: 639px) {
  .gallery-arrow { width: 36px; height: 36px; font-size: 20px; }
  .gallery-arrow-left { left: 6px; }
  .gallery-arrow-right { right: 6px; }
  .gallery-lb-arrow { width: 40px; height: 40px; font-size: 24px; }
  .gallery-lb-left { left: 8px; }
  .gallery-lb-right { right: 8px; }
}

/* H10: Reinforce iOS Safari flip behavior (some versions ignore unprefixed property under transforms) */
.flip-card-front,
.flip-card-back {
  -webkit-backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
}
.flip-card-inner {
  -webkit-transform-style: preserve-3d;
}
