/* ============================================================
   WebWooCommerce — Fix responsive mobile
   Subir a: public_html/css/home.css
   REEMPLAZA el archivo completo
   ============================================================ */

/* ── HERO ────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #12101e 0%, #2a1858 55%, #12101e 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(127,84,179,.18) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(150,88,138,.14) 0%, transparent 50%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237F54B3' fill-opacity='0.055'%3E%3Cpath d='M26 0l26 26-26 26L0 26z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(127,84,179,.18);
  border: 1px solid rgba(127,84,179,.35);
  color: #c4a8e8;
  padding: .4rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 1.5rem;
  /* FIX: no dejar que el badge desborde */
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-eyebrow span { width: 6px; height: 6px; background: #9b6fd4; border-radius: 50%; flex-shrink: 0; }

.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  /* FIX: evitar overflow horizontal */
  word-break: break-word;
  overflow-wrap: break-word;
}
.hero h1 em { font-style: normal; color: #c4a8e8; }

.hero-desc {
  color: rgba(255,255,255,.6);
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero visual side */
.hero-visual { display: flex; flex-direction: column; gap: 1rem; }
.hero-card-dark {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.hero-card-title {
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.plugin-pill {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .85rem;
  background: rgba(127,84,179,.15);
  border: 1px solid rgba(127,84,179,.25);
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  margin-bottom: .4rem;
  transition: all .2s;
}
.plugin-pill:last-child { margin-bottom: 0; }
.plugin-pill .badge { font-size: .6rem; padding: 2px 5px; }
.pp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--woo-mid); flex-shrink: 0; }
.hero-stats { display: flex; gap: .75rem; }
.hero-stat {
  flex: 1;
  background: rgba(127,84,179,.14);
  border: 1px solid rgba(127,84,179,.22);
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
}
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1;
  margin-bottom: .25rem;
}
.hero-stat-label { font-size: .72rem; color: rgba(255,255,255,.45); font-weight: 500; }

/* ── SERVICES SECTION ────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--woo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover { border-color: var(--woo-mid); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.service-name { font-size: 1.1rem; margin-bottom: .5rem; }
.service-desc { font-size: .9rem; line-height: 1.65; margin-bottom: 1rem; }
.service-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--woo);
  transition: gap var(--transition);
}
.service-card:hover .service-link { gap: .6rem; }

/* ── PLUGINS PREVIEW ─────────────────────────── */
.plugins-bg { background: var(--light); }
.plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.plugin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: all var(--transition);
}
.plugin-card:hover { border-color: var(--woo-mid); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.plugin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.plugin-name { font-size: 1rem; margin-top: .4rem; }
.plugin-price { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: var(--woo); white-space: nowrap; }
.plugin-price small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.plugin-desc { font-size: .875rem; line-height: 1.65; }
.plugin-features { display: flex; flex-direction: column; gap: .4rem; }
.plugin-features li { font-size: .85rem; color: var(--text); display: flex; align-items: flex-start; gap: .6rem; }
.plugin-features li::before { content: '✓'; color: var(--woo); font-weight: 700; flex-shrink: 0; }
.btn-plugin {
  display: block;
  margin-top: auto;
  padding: .7rem;
  background: var(--woo-light);
  color: var(--woo);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}
.btn-plugin:hover { background: var(--woo); color: #fff; }

/* ── WHY US ──────────────────────────────────── */
.why-dark { background: var(--dark); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
}
.why-item { text-align: center; padding: 1rem; }
.why-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.why-title { color: #fff; font-size: 1.05rem; margin-bottom: .5rem; }
.why-desc  { font-size: .875rem; color: rgba(255,255,255,.48); line-height: 1.65; }

/* ── PORTFOLIO PREVIEW ───────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}
.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: all var(--transition);
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.portfolio-thumb {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
}
.portfolio-info { padding: 1.25rem; }
.portfolio-name { font-size: 1rem; margin-bottom: .2rem; }
.portfolio-cat  { font-size: .8rem; color: var(--muted); }
.portfolio-tags { display: flex; gap: .4rem; margin-top: .75rem; flex-wrap: wrap; }
.ptag { font-size: .72rem; background: var(--light); color: var(--muted); padding: 3px 9px; border-radius: 5px; }

/* ── CTA STRIP ───────────────────────────────── */
.cta-strip {
  background: linear-gradient(135deg, var(--woo) 0%, var(--woo-deep) 100%);
  padding: 5.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M26 0l26 26-26 26L0 26z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-strip .container { position: relative; z-index: 1; }
.cta-title { color: #fff; margin-bottom: .75rem; }
.cta-desc  { color: rgba(255,255,255,.72); font-size: 1.05rem; margin-bottom: 2.25rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   RESPONSIVE MOBILE — FIX PRINCIPAL
   ══════════════════════════════════════════════ */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-visual { display: none; }
  .hero {
    min-height: auto;
    padding: 4rem 0 3.5rem;
  }
}

/* Mobile grande (≤ 860px) */
@media (max-width: 860px) {
  /* Hero */
  .hero { padding: 3.5rem 0 3rem; }
  .hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
  .hero-eyebrow {
    font-size: .72rem;
    padding: .35rem .85rem;
    max-width: calc(100vw - 3rem);
  }
  .hero-desc { font-size: .95rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Trust badges — scroll horizontal en mobile */
  .trust-inner {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .5rem;
    -webkit-overflow-scrolling: touch;
  }
  .trust-badge { flex-shrink: 0; }

  /* Grids */
  .services-grid  { grid-template-columns: 1fr; }
  .plugins-grid   { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .why-grid       { grid-template-columns: 1fr 1fr; }
}

/* Mobile chico (≤ 480px) */
@media (max-width: 480px) {
  /* Container padding extra para no pegar a los bordes */
  .container { padding: 0 1.1rem; }

  /* Hero — tamaño de fuente más pequeño */
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .hero-eyebrow { font-size: .68rem; letter-spacing: .03em; }
  .hero-desc { font-size: .9rem; }

  /* Secciones */
  .section { padding: 3.5rem 0; }

  /* Botones full width en mobile */
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 340px; justify-content: center; }

  /* Why grid — 1 columna en mobile muy chico */
  .why-grid { grid-template-columns: 1fr; }

  /* Plugin cards — precio y nombre en columna */
  .plugin-header { flex-direction: column; gap: .5rem; }
}
