/* =============================================
   Roger Soluciones Web — assets/css/home.css
   Estilos específicos del Home
   ============================================= */

/* -----------------------------------------------
   GLOBO TERRÁQUEO — scroll driven
----------------------------------------------- */
.globe-wrap {
  position: fixed;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  width: 90vw;
  height: 90vw;
  max-width: 1000px;
  max-height: 1000px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  will-change: right, left, transform, opacity;
}

.globe-wrap dotlottie-player {
  width: 100%;
  height: 100%;
}

/* Estado centrado — al terminar el hero */
.globe-wrap.centered {
  right: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.10;
}

/* Móvil — desactivar globo para PageSpeed */
@media (max-width: 768px) {
  .globe-wrap,
  .globe-wrap dotlottie-player {
    display: none !important;
  }
}


.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 68px;
}

#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl) var(--space-lg);
}

/* Tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 129, 198, 0.08);
  color: var(--color-primary-neon);
  border: 0.5px solid rgba(0, 129, 198, 0.25);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 12px;
  margin-bottom: var(--space-md);
  width: fit-content;
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary-neon);
  animation: tagPulse 2s ease-in-out infinite;
}

@keyframes tagPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}

/* H1 */
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* Typewriter */
.hero-typewriter {
  color: var(--color-primary);
  border-right: 3px solid var(--color-primary-neon);
  padding-right: 4px;
  animation: blink .75s step-end infinite;
  display: inline-block;
  min-height: 1.2em;
}

/* Subtítulo */
.hero-sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero-sub strong {
  color: var(--color-text);
  font-weight: 500;
}

/* Botones hero */
.hero-btns {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

/* Trust signals */
.hero-trust {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.trust-dot.blue  { background: var(--color-primary); }
.trust-dot.green { background: var(--color-whatsapp); }
.trust-dot.red   { background: var(--color-accent-soft); }

/* ---- Columna derecha: card flotante ---- */
.hero-card-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-float-card {
  width: 100%;
  max-width: 340px;
  animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* Header de la card */
.hfc-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.hfc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.hfc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.hfc-role {
  font-size: 11px;
  color: var(--color-text-muted);
}

.hfc-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--color-whatsapp);
  margin-left: auto;
  white-space: nowrap;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  animation: tagPulse 1.5s ease-in-out infinite;
}

/* Stats de la card */
.hfc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  text-align: center;
}

.hfc-stat {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

.hfc-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.hfc-stat-num.red { color: var(--color-accent-soft); }

.hfc-stat-label {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 3px;
}

.hfc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Badges flotantes */
.hero-badge-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.badge-float-1 {
  top: -16px;
  right: -16px;
  animation: floatBadge1 3.5s ease-in-out infinite;
}

.badge-float-2 {
  bottom: -16px;
  left: -16px;
  animation: floatBadge2 4s ease-in-out infinite;
}

@keyframes floatBadge1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(0deg); }
}

@keyframes floatBadge2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%       { transform: translateY(8px) rotate(0deg); }
}

.bf-icon {
  font-size: 20px;
  line-height: 1;
}

.bf-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.bf-sub {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Scroll arrow */
/* -----------------------------------------------
   HERO SCROLL — flecha premium
----------------------------------------------- */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hero-scroll .scroll-label {
  font-size: 10px;
  font-family: var(--font-main);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(0,170,255,0.6);
  animation: scrollFade 2s ease-in-out infinite;
}

.hero-scroll .scroll-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.hero-scroll .scroll-arrows span {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--color-primary-neon);
  border-bottom: 1.5px solid var(--color-primary-neon);
  transform: rotate(45deg);
  animation: scrollChev 1.6s ease-in-out infinite;
}

.hero-scroll .scroll-arrows span:nth-child(1) {
  opacity: 0.3;
  animation-delay: 0s;
}
.hero-scroll .scroll-arrows span:nth-child(2) {
  opacity: 0.6;
  animation-delay: 0.2s;
}
.hero-scroll .scroll-arrows span:nth-child(3) {
  opacity: 1;
  animation-delay: 0.4s;
}

@keyframes scrollChev {
  0%        { transform: rotate(45deg) translate(0,0);    }
  50%       { transform: rotate(45deg) translate(3px,3px);}
  100%      { transform: rotate(45deg) translate(0,0);    }
}

@keyframes scrollFade {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1;  }
}

/* -----------------------------------------------
   SERVICIOS
----------------------------------------------- */
.services-section {
  border-top: none;
  border-bottom: none;
}

.services-grid {
  gap: var(--space-lg);
}

.services-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

/* -----------------------------------------------
   RUBROS
----------------------------------------------- */
.rubros-section {
  background: transparent;
}

.rubros-grid {
  gap: var(--space-md);
}

.rubro-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .25s, background .2s;
}

.rubro-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  background: var(--color-surface-2);
}

.rubro-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: rgba(0,129,198,.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rubro-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 3px;
}

.rubro-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.rubro-badge {
  position: absolute;
  top: 8px;
  right: 36px;
  font-size: 10px;
  background: rgba(0,129,198,.1);
  color: var(--color-primary-neon);
  border: 0.5px solid rgba(0,129,198,.25);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.rubro-arrow {
  position: absolute;
  right: var(--space-md);
  font-size: 16px;
  color: var(--color-text-muted);
  transition: color .2s, transform .2s;
}

.rubro-card:hover .rubro-arrow {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* -----------------------------------------------
   POR QUÉ ELEGIRME
----------------------------------------------- */
.why-section {
  border-top: none;
  border-bottom: none;
}

.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.why-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.why-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.why-icon.blue  { background: rgba(0,129,198,.15); color: var(--color-primary-neon); }
.why-icon.green { background: rgba(0,196,116,.15); color: var(--color-whatsapp); }

.why-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 3px;
}

.why-item-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Guarantee card */
.guarantee-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: rgba(0,129,198,.06);
  border: 0.5px solid rgba(0,129,198,.2);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.guarantee-icon { font-size: 28px; }

.guarantee-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 3px;
}

.guarantee-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* -----------------------------------------------
   CTA FINAL
----------------------------------------------- */
.cta-section {
  padding: var(--space-2xl) 0;
}

.cta-inner {
  position: relative;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 80px 60px;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0,129,198,.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  position: relative;
}

.cta-sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  position: relative;
}

.cta-btns {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
  position: relative;
}

.cta-trust {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  padding-top: var(--space-md);
  border-top: 0.5px solid rgba(255,255,255,0.05);
}

.cta-trust span {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-sub    { margin: 0 auto var(--space-lg); }
  .hero-btns   { justify-content: center; }
  .hero-trust  { justify-content: center; }
  .hero-tag    { margin: 0 auto var(--space-md); }
  .hero-card-wrap { display: none; }
  .why-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { min-height: auto; padding: 100px 0 60px; }
  .rubros-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: var(--space-xl) var(--space-md); }
  .cta-trust { flex-direction: column; gap: var(--space-sm); }
  .hero-btns { flex-direction: column; align-items: center; }
  .badge-float-1, .badge-float-2 { display: none; }
}

@media (max-width: 480px) {
  .hero-h1 { font-size: 26px; }
  .rubro-badge { display: none; }
}