/* === Post.css — versión mejorada, limpia y responsiva === */

:root {
  --color-main: #16a34a;
  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-bg: #ffffff;
  --color-light: #f8f9fa;
  --radius: 12px;
  --max-width: 960px;
  --font-title: "Lora", Georgia, serif;
  --font-body: "Poppins", system-ui, sans-serif;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* === Cabecera === */
.site {
  background: var(--color-bg);
  border-bottom: 1px solid #eee;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site .brand {
  font-weight: 700;
  color: var(--color-main);
  text-decoration: none;
  font-size: 1.2rem;
}

.site nav a {
  text-decoration: none;
  margin-left: 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

/* === Migas === */
.crumbs {
  font-size: 0.9rem;
  color: #666;
  margin: 0.5rem 0 1rem;
}
.crumbs a {
  color: var(--color-main);
  text-decoration: none;
}
.crumbs span {
  color: var(--color-muted);
}

/* === Encabezado del post === */
.post__head h1 {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  margin: 0.25rem 0 0.5rem;
}
.post__date {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* === Imagen principal === */
.post__hero-wrap {
  margin: 1.25rem 0 1rem;
}
.post__hero {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* === Excerpt === */
.post__excerpt {
  background: var(--color-light);
  border-left: 4px solid var(--color-main);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  color: #333;
  font-size: 1.05rem;
  margin: 1.25rem 0;
}

/* === Contenido === */
.post__content {
  font-size: 1.07rem;
  color: #222;
  word-break: break-word;
}
.post__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.post__content h2,
.post__content h3 {
  margin-top: 2rem;
  font-family: var(--font-title);
  color: var(--color-main);
}

/* === Botón WhatsApp === */
.post__contact {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.btn-whatsapp {
  background-color: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.25s ease, transform 0.15s ease;
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
  transform: translateY(-1px);
}

.btn-whatsapp::before {
  content: none !important; /* elimina el ícono anterior */
  background: none !important;
}

.btn-whatsapp svg {
  flex-shrink: 0;
  fill: white;
}



/* === Bloque compartir === */
.share {
  margin: 2rem 0;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.share a {
  border: 1px solid #ddd;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.share a:hover {
  background: var(--color-light);
  border-color: var(--color-main);
  color: var(--color-main);
}

/* === Botón volver === */
.post__foot {
  text-align: center;
  margin-bottom: 2.5rem;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  background: var(--color-main);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}
.btn:hover {
  background: #12893e;
}

/* === Pie === */
.footer {
  border-top: 1px solid #eee;
  padding: 1.5rem 0;
  color: #777;
  font-size: 0.95rem;
  text-align: center;
}

/* === CTA flotante === */
.floating-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
}
.floating-cta img {
  width: 70px;
  height: 70px;
  border-radius: 9999px;
}

/* === Responsividad === */
@media (max-width: 768px) {
  .wrap {
    padding: 0.9rem;
  }
  .post__excerpt {
    font-size: 1rem;
  }
  .post__content {
    font-size: 1rem;
  }
  .btn-whatsapp {
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }
  .share a {
    font-size: 0.9rem;
  }
}

.icon-share {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f3f3f3;
  background-size: 22px;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0 .3rem;
  transition: transform .2s ease, background-color .2s ease;
}
.icon-share:hover {
  transform: translateY(-2px);
}

.icon-share.wa {
  background-image: url("/blog/assets/ico-wa.svg");
  background-color: #25D366;
}
.icon-share.fb {
  background-image: url("/blog/assets/ico-fb.svg");
  background-color: #1877F2;
}
.icon-share.x {
  background-image: url("/blog/assets/ico-x.svg");
  background-color: #000;
}
.icon-share.mail {
  background-image: url("/blog/assets/ico-mail.svg");
  background-color: #888;
}
.icon-share.wa:hover,
.icon-share.fb:hover,
.icon-share.x:hover,
.icon-share.mail:hover {
  filter: brightness(1.15);
}
.icon-share{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:50%;
  background:#25D366;margin:0 .35rem;transition:transform .2s ease;
}
.icon-share:hover{ transform:translateY(-2px); }
.icon-share{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;margin:0 .35rem;transition:transform .2s}
.icon-share:hover{transform:translateY(-2px)}
.icon-share.wa{background:#25D366}
.icon-share.fb{background:#1877F2}
.icon-share.x{background:#000}
.icon-share.mail{background:#888}

.share {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.share-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.25s ease;
}

.share-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

.share-btn.wa   { background-color: #25D366; }
.share-btn.fb   { background-color: #1877F2; }

.share-btn.mail { background-color: #7E7E7E; }

.share-btn.x {
  background-color: #1b1b1b;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.15);
}

.share-btn.x:hover {
  filter: brightness(1.3);
  transform: translateY(-3px);
}
 
.post__video{ margin:16px 0; }
.post__video .ratio{ position:relative; width:100%; aspect-ratio:16/9; }
.post__video iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Contenedor general del post */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Imagen hero */
.post__hero-wrap { margin: 16px 0 8px; }
.post__hero { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Video responsivo 16:9 */
.post__video { max-width: 900px; margin: 16px auto 20px; }
.post__video .ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.post__video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* Ajuste del excerpt (evitar cajas raras) */
.post__excerpt { margin: 12px 0 8px; line-height: 1.6; }

/* CTA flotante por si tapa el video en móvil */
.floating-cta { z-index: 50; }

