/*
Theme Name: PymeClick Child
Description: Tema hijo de GeneratePress para PymeClick. Estilo sobrio en blanco y negro, con azul como detalle.
Template: generatepress
Version: 1.1.0
Text Domain: pymeclick-child
*/

/* ---------- Tokens ---------- */
:root {
  --pc-ink: #0b0b0c;
  --pc-paper: #ffffff;
  --pc-mist: #f6f6f7;
  --pc-line: #e6e7ea;
  --pc-muted: #5d6270;
  --pc-blue: #0b5fff;
  --pc-blue-deep: #0a4bd1;
  --pc-radius: 12px;
  --pc-shadow: 0 1px 2px rgba(11, 11, 12, 0.04), 0 8px 24px -14px rgba(11, 11, 12, 0.14);
  --pc-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
body {
  background: var(--pc-paper);
  color: var(--pc-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pc-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pc-blue-deep); }
:focus-visible { outline: 2px solid var(--pc-blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; color: var(--pc-ink); }

/* En la portada el hero ya trae su propio título; el de la página sobra. */
body.home.page .entry-header { display: none; }

/* Diseño de una sola columna: sin barra lateral de widgets. */
#right-sidebar, .sidebar { display: none !important; }
.right-sidebar .content-area,
.right-sidebar .site-main { width: 100%; float: none; }
.separate-containers .inside-article { padding: 0; }

/* ---------- Anchura común ---------- */
.inside-header, .site-info, .inside-footer-widgets { max-width: 1120px; margin-left: auto; margin-right: auto; }
.site-header .inside-header { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.site-footer .site-info { padding: 28px 24px; }
.pc-copy { color: #b8bcc6; font-size: 14px; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pc-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pc-cta { text-align: left; border-top: 1px solid var(--pc-line); }
.pc-cta h2 { margin-bottom: 12px; }

/* ---------- Cabecera ---------- */
.site-header {
  background: var(--pc-paper);
  border-bottom: 1px solid var(--pc-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-navigation .main-nav ul li a {
  font-size: 15px;
  font-weight: 500;
  color: var(--pc-ink);
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--pc-blue);
}
.site-branding .main-title a {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pc-ink);
  text-decoration: none;
}

/* ---------- Portada: hero ---------- */
.pc-hero {
  padding: 96px 24px 72px;
  max-width: 1120px;
  margin: 0 auto;
}
.pc-hero .pc-kicker {
  font-family: var(--pc-mono);
  font-size: 13px;
  color: var(--pc-muted);
  margin: 0 0 24px;
  padding-top: 18px;
  border-top: 2px solid var(--pc-blue);
  display: inline-block;
}
.pc-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  max-width: 16ch;
  margin: 0 0 24px;
  color: var(--pc-ink);
}
.pc-hero p.pc-lead {
  color: var(--pc-muted);
  font-size: clamp(17px, 2vw, 20px);
  max-width: 52ch;
  margin: 0 0 36px;
}
.pc-btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pc-btn-primary { background: var(--pc-ink); color: #fff; }
.pc-btn-primary:hover { background: var(--pc-blue); color: #fff; }
.pc-btn-ghost { color: var(--pc-ink); border: 1px solid var(--pc-line); margin-left: 10px; }
.pc-btn-ghost:hover { border-color: var(--pc-ink); color: var(--pc-ink); }

/* ---------- Secciones ---------- */
.pc-section { padding: 80px 24px; max-width: 1120px; margin: 0 auto; }
.pc-section.pc-alt { background: none; border-top: 1px solid var(--pc-line); }
.pc-section.pc-alt > .pc-wrap { max-width: 1120px; margin: 0 auto; }
.pc-wrap { max-width: 1120px; margin: 0 auto; }
.pc-eyebrow {
  font-family: var(--pc-mono);
  font-size: 13px;
  color: var(--pc-muted);
  margin: 0 0 12px;
}
.pc-section h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; margin: 0 0 14px; }
.pc-section p.pc-sub { color: var(--pc-muted); max-width: 60ch; font-size: 18px; margin: 0 0 36px; }

/* ---------- Tarjetas ---------- */
.pc-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pc-card {
  position: relative;
  background: var(--pc-paper);
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  padding: 28px;
  box-shadow: var(--pc-shadow);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s ease;
  text-decoration: none;
  color: var(--pc-ink);
  display: block;
}
.pc-card:hover { border-color: var(--pc-ink); }
.pc-card .pc-idx { font-family: var(--pc-mono); font-size: 13px; color: var(--pc-muted); }
.pc-card h3 { font-size: 20px; font-weight: 700; margin: 12px 0 10px; }
.pc-card p { color: var(--pc-muted); margin: 0; font-size: 15px; }
.pc-card .pc-tag {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--pc-mono);
  font-size: 12px;
  color: var(--pc-blue-deep);
}
.pc-dark { background: var(--pc-ink); border-color: var(--pc-ink); }
.pc-dark h3 { color: #fff; }
.pc-dark p { color: #b8bcc6; }
.pc-dark .pc-idx, .pc-dark .pc-tag { color: #9cc2ff; }
.pc-dark:hover { border-color: var(--pc-blue); }

/* ---------- Listado de guías ---------- */
.blog .site-main, .archive .site-main {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}
.blog article.type-post,
.archive article.type-post {
  background: var(--pc-paper);
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  padding: 28px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s ease;
  margin: 0 !important;
}
.blog article.type-post:hover,
.archive article.type-post:hover { border-color: var(--pc-ink); }
.blog article.type-post .entry-title,
.archive article.type-post .entry-title { font-size: 21px; font-weight: 700; margin: 10px 0; }
.blog article.type-post .entry-title a,
.archive article.type-post .entry-title a { color: var(--pc-ink); text-decoration: none; }
.blog article.type-post .entry-title a:hover { color: var(--pc-blue); }
.blog article.type-post .entry-summary,
.archive article.type-post .entry-summary { color: var(--pc-muted); }
.blog article.type-post .entry-meta,
.archive article.type-post .entry-meta { font-size: 13px; color: var(--pc-muted); }
.entry-meta .byline, .entry-meta .comments-link { display: none !important; }

/* ---------- Artículo ---------- */
.single .entry-content, .page .entry-content { max-width: 720px; margin-left: auto; margin-right: auto; }
.single .entry-content { font-size: 18px; line-height: 1.75; }
.single .entry-title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; max-width: 720px; margin-left: auto; margin-right: auto; }
.single .entry-content h2 { font-size: 28px; margin-top: 48px; }
.single .entry-content h3 { font-size: 22px; margin-top: 36px; }
.single .entry-content blockquote,
.single .entry-content .pc-note {
  border-left: 3px solid var(--pc-blue);
  background: var(--pc-mist);
  padding: 18px 22px;
  border-radius: 0 var(--pc-radius) var(--pc-radius) 0;
  margin: 32px 0;
}
.single .entry-content code { font-family: var(--pc-mono); font-size: 15px; }

/* ---------- Comentarios ---------- */
.comments-area { max-width: 720px; margin: 64px auto 0; border-top: 1px solid var(--pc-line); padding-top: 40px; font-size: 16px; }
.comments-area .comments-title, .comments-area .comment-reply-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .comment { margin: 0 0 16px; }
.comment-list .comment-body { border: 1px solid var(--pc-line); border-radius: var(--pc-radius); padding: 20px 22px; background: var(--pc-paper); }
.comment-list .comment-author { font-weight: 700; }
.comment-list .comment-author .avatar { border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.comment-list .comment-metadata { font-family: var(--pc-mono); font-size: 12px; color: var(--pc-muted); margin-bottom: 10px; }
.comment-list .comment-metadata a { color: var(--pc-muted); }
.comment-list .reply a { font-size: 14px; font-weight: 600; text-decoration: none; }
.comment-list .children { list-style: none; padding-left: 24px; margin: 16px 0 0; border-left: 2px solid var(--pc-line); }
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; color: var(--pc-ink); }
.comment-form p { margin: 0 0 16px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--pc-line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  color: var(--pc-ink);
  background: var(--pc-paper);
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--pc-blue); box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.15); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--pc-muted); }
.comment-form .comment-form-cookies-consent label { font-weight: 400; margin: 0; color: var(--pc-muted); }
.comment-form .form-submit .submit {
  background: var(--pc-ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease;
}
.comment-form .form-submit .submit:hover { background: var(--pc-blue); }
.comment-notes, .logged-in-as { font-size: 14px; color: var(--pc-muted); }
.comment-awaiting-moderation { font-size: 14px; color: var(--pc-blue-deep); }

/* ---------- Pie ---------- */
.site-footer, .site-info, .copyright-bar { background: var(--pc-ink); color: #b8bcc6; }
.site-footer .inside-site-info, .copyright-bar .inside-site-info { max-width: none; }
.pc-footer { max-width: 1120px; margin: 0 auto; padding: 56px 24px 40px; display: grid; gap: 24px; text-align: left; }
.pc-footer-brand { font-weight: 800; font-size: 20px; color: #fff; margin: 0; letter-spacing: -0.02em; }
.pc-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.pc-footer-nav a { color: #d6d9e0; text-decoration: none; font-size: 15px; }
.pc-footer-nav a:hover { color: #fff; text-decoration: underline; }
.pc-footer .pc-copy { margin: 16px 0 0; font-size: 13px; color: #8a909c; border-top: 1px solid #22252b; padding-top: 20px; }

/* ---------- Animaciones de entrada ----------
   La clase js la pone un script al principio de la cabecera. Sin JavaScript
   no hay estado oculto: todo se ve. */
.js .pc-reveal {
  opacity: 0;
  transform: perspective(1000px) translateY(20px) rotateX(6deg);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transform-origin: 50% 0%;
}
.js .pc-reveal.is-visible {
  opacity: 1;
  transform: perspective(1000px) translateY(0) rotateX(0);
}
.js .pc-reveal.pc-delay-1 { transition-delay: .08s; }
.js .pc-reveal.pc-delay-2 { transition-delay: .16s; }
.js .pc-reveal.pc-delay-3 { transition-delay: .24s; }

/* Transición de página: el contenido entra girando desde el fondo. */
.pc-page-enter .site-content {
  animation: pc-page-in .7s cubic-bezier(.2, .7, .2, 1) both;
  transform-origin: 50% 100%;
}
@keyframes pc-page-in {
  from { opacity: 0; transform: perspective(1400px) rotateX(-6deg) translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.pc-page-leave .site-content {
  opacity: 0;
  transform: perspective(1400px) rotateX(4deg) translateY(-14px);
  transition: opacity .25s ease, transform .3s ease;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .pc-card, .blog article.type-post, .archive article.type-post { transform: none !important; }
}

/* ---------- Móvil ---------- */
@media (max-width: 640px) {
  .pc-hero { padding: 56px 20px 48px; }
  .pc-btn-ghost { margin-left: 0; margin-top: 12px; display: inline-block; }
  .pc-section { padding: 56px 20px; }
  .pc-card { padding: 22px; }
}
