/* TranslaStars Blog - styles.css */
:root {
  --purple: #522D6D;
  --purple-dark: #3d2153;
  --purple-light: #7B3FAF;
  --orange: #FF6B00;
  --bg: #faf8fc;
  --card: #ffffff;
  --text: #2d2535;
  --text-light: #6b6472;
  --border: #ece5f2;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--orange); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  color: #fff;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(82, 45, 109, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo-mark {
  width: 38px; height: 38px; display: block; flex-shrink: 0;
}
.logo-text { font-size: 20px; font-weight: 700; color: #fff; }
.logo-text em { font-style: normal; color: #ffc9a3; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: rgba(255,255,255,.9); font-size: 15px; font-weight: 600; }
.site-nav a:hover { color: var(--orange); }

/* Featured */
.featured { padding: 32px 0 8px; }
.featured-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 4px 24px rgba(82,45,109,.10);
  border: 1px solid var(--border);
}
.featured-card:hover { box-shadow: 0 8px 32px rgba(82,45,109,.18); }
.featured-img img, .featured-img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.featured-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured-body h2 { font-size: 28px; line-height: 1.3; color: var(--purple-dark); }
.featured-body p { color: var(--text-light); }
.badge-featured {
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}

/* Posts section */
.posts-section { padding: 32px 0 64px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h1 { font-size: 38px; color: var(--purple-dark); margin-bottom: 8px; }
.section-head p { color: var(--text-light); font-size: 17px; }
.posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.post-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(82,45,109,.15); }
.card-img { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--border); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-fallback {
  width: 100%; height: 100%; min-height: 160px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.95); font-size: 40px; font-weight: 800;
  padding: 20px; text-align: center;
}
.card-img-fallback .fb-title {
  font-size: 19px; line-height: 1.35; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 90%;
}
.card-img-fallback.big { min-height: 280px; }
.card-img-fallback.big .fb-title { font-size: 26px; -webkit-line-clamp: 5; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-cat {
  background: var(--purple); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.card-cat:hover { background: var(--orange); color: #fff; }
.card-date { color: var(--text-light); font-size: 13px; }
.card-body h3 { font-size: 19px; line-height: 1.4; }
.card-body h3 a { color: var(--purple-dark); }
.card-body h3 a:hover { color: var(--orange); }
.card-body p { color: var(--text-light); font-size: 15px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-rt { color: var(--text-light); font-size: 13px; }
.card-more { color: var(--orange); font-weight: 700; font-size: 14px; }

/* Post page */
.post-page { padding: 40px 0 64px; }
.post-container { max-width: 860px; }
.post-head { margin-bottom: 28px; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.post-cat {
  background: var(--purple); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.post-cat:hover { background: var(--orange); color: #fff; }
.post-date, .post-rt { color: var(--text-light); font-size: 14px; }
.post-head h1 { font-size: 38px; line-height: 1.25; color: var(--purple-dark); margin-bottom: 10px; }
.post-author { color: var(--text-light); font-size: 15px; font-weight: 600; }
.post-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.post-hero img { width: 100%; max-height: 420px; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.post-layout.single { display: block; }
.post-layout.single .post-content { max-width: 860px; }
.post-toc { position: sticky; top: 92px; }
.toc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; font-size: 14px;
}
.toc h4 { color: var(--purple-dark); margin-bottom: 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.toc ul { list-style: none; }
.toc li { margin: 6px 0; }
.toc-l3 { padding-left: 14px; }
.toc a { color: var(--text-light); }
.toc a:hover { color: var(--orange); }
.toc-num { color: var(--orange); font-weight: 700; min-width: 1.2em; display: inline-block; }
.toc-l3 .toc-num { min-width: 1.9em; }
.post-content h2 .toc-num, .post-content h3 .toc-num { color: var(--purple-dark); margin-right: 6px; }
.post-content { min-width: 0; }

/* Tablas reales (transformadas desde divs) */
.post-content table {
  width: 100%; border-collapse: collapse; margin: 22px 0 26px;
  font-size: 15px; line-height: 1.55;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(82,45,109,.06);
}
.post-content thead th {
  background: var(--purple); color: #fff; text-align: left;
  padding: 11px 14px; font-size: 14px; letter-spacing: .3px;
}
.post-content tbody td {
  border-top: 1px solid var(--border); padding: 11px 14px; vertical-align: top;
}
.post-content tbody tr:nth-child(even) td { background: #faf6fd; }
.post-content tbody tr:hover td { background: #f3ecfa; }

/* Callouts (metodologia, notas, tips, resumen, verdict) */
.post-content p.callout {
  background: #f0ebf5; border-left: 4px solid var(--purple);
  padding: 15px 18px; margin: 22px 0; border-radius: 0 12px 12px 0;
  font-size: 15.5px; line-height: 1.65;
}
.post-content p.callout strong { color: var(--purple-dark); }

/* Tipografia general del contenido */
.post-content { font-size: 17px; line-height: 1.75; color: var(--text); }
.post-content p { margin-bottom: 20px; }
.post-content h2 { margin-top: 44px; }
.post-content h3 { margin-top: 34px; }

/* Imagenes SIN recorte (mostrar completas) */
.post-content img { height: auto !important; max-width: 100%; object-fit: contain; }
.post-hero img { max-height: none !important; height: auto !important; object-fit: contain; }
.post-content p, .post-content ul, .post-content ol { margin-bottom: 18px; }
.post-content h2 {
  font-size: 27px; color: var(--purple-dark); margin: 36px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
  scroll-margin-top: 92px;
}
.post-content h3 { font-size: 21px; color: var(--purple); margin: 28px 0 12px; scroll-margin-top: 92px; }
.post-content ul, .post-content ol { padding-left: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 4px solid var(--orange); background: #fff7f0;
  padding: 14px 18px; margin: 20px 0; border-radius: 0 10px 10px 0;
  color: var(--text);
}
.post-content strong { color: var(--purple-dark); }
.post-content a { color: var(--orange); font-weight: 600; }
.post-content img { border-radius: 12px; margin: 20px 0; }
.post-bottom { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-back {
  display: inline-block; background: var(--purple); color: #fff;
  padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 14px;
}
.btn-back:hover { background: var(--orange); color: #fff; }

/* Related articles */
.related-section { margin-top: 48px; padding: 40px 0; background: #faf6fd; border-top: 1px solid var(--border); }
.related-title { font-size: 24px; color: var(--purple-dark); margin-bottom: 20px; }

/* Footer */
.site-footer {
  background: var(--purple-dark); color: rgba(255,255,255,.85);
  padding: 48px 0 24px; margin-top: 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-logo em { font-style: normal; color: #ffc9a3; }
.site-footer p { font-size: 14px; color: rgba(255,255,255,.7); }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer ul { list-style: none; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: rgba(255,255,255,.75); font-size: 14px; }
.site-footer a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px;
  font-size: 13px; color: rgba(255,255,255,.55); text-align: center;
}

/* 404 / misc */
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 64px; color: var(--purple-light); }
.notfound p { color: var(--text-light); margin: 8px 0 20px; }
.empty { color: var(--text-light); text-align: center; padding: 40px 0; }

/* Language nav */
.nav-langs { display: inline-flex; gap: 4px; }
.nav-lang {
  color: rgba(255,255,255,.9) !important; font-size: 12px !important; font-weight: 700 !important;
  padding: 3px 7px; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; letter-spacing: .3px;
}
.nav-lang:hover { background: var(--orange); border-color: var(--orange); color: #fff !important; }

/* Filter bar */
.filter-bar { padding: 24px 0 4px; }
.filter-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.filter-row { display: flex; flex-direction: column; gap: 12px; }
.filter-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-label {
  font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-light);
}
.filter-field select, .filter-field input[type=search] {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); min-width: 0;
}
.filter-field select { min-width: 210px; }
.filter-search { flex: 1; min-width: 200px; }
.filter-field input[type=search] { flex: 1; width: 100%; }
.filter-actions { display: flex; gap: 8px; align-items: center; }
.btn-filter {
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 700;
}
.btn-filter:hover { background: var(--purple); }
.btn-clear { align-self: center; color: var(--text-light); font-size: 13px; padding: 8px 4px; }
.btn-clear:hover { color: var(--orange); }

/* Language badge on cards */
.card-img { position: relative; }
.lang-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(82,45,109,.92); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 6px; letter-spacing: .5px;
}
.card-img .lang-badge { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.post-author .lang-badge { position: static; margin-left: 6px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--purple); font-weight: 700; font-size: 14px;
}
.pg:hover { border-color: var(--purple); }
.pg.current { background: var(--purple); color: #fff; border-color: var(--purple); }
.pg-dots { align-self: center; color: var(--text-light); padding: 0 2px; }

/* Newsletter CTA */
.newsletter-cta {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  border-radius: var(--radius); margin: 0 20px 60px;
}
.nl-inner { max-width: 1120px; margin: 0 auto; padding: 40px 24px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.nl-text { flex: 1; min-width: 260px; }
.nl-text h2 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.nl-text p { color: rgba(255,255,255,.85); font-size: 15px; max-width: 520px; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nl-form input[type=email], .unsub-box input[type=email] {
  padding: 12px 16px; border: none; border-radius: 10px; font-size: 15px; min-width: 260px; font-family: inherit;
}
.nl-msg { width: 100%; font-size: 13px; font-weight: 600; color: #fff; }
.nl-msg.ok { color: #b8f0c4; }
.nl-msg.err { color: #ffd0c9; }
.footer-sub { margin-top: 8px; }
.footer-sub a { color: #ffc9a3; text-decoration: underline; }
.nl-faq { max-width: 640px; margin: 0 auto 40px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; }
.nl-faq h3 { color: var(--purple-dark); margin-bottom: 10px; }
.nl-faq ul { padding-left: 20px; color: var(--text-light); font-size: 15px; }
.nl-faq li { margin: 6px 0; }
.unsub-box { max-width: 480px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.unsub-box form { display: flex; gap: 8px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-toc { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-head h1 { font-size: 28px; }
  .section-head h1 { font-size: 30px; }
  .site-nav { gap: 12px; font-size: 13px; }
}

/* ── Compartir articulo ── */
.post-share { margin: 28px 0 8px; padding: 18px 20px; background: #f7f3fb; border: 1px solid #e6ddf0; border-radius: 14px; }
.share-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #522D6D; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .4px; }
.share-icon { width: 18px; height: 18px; fill: #FF6B00; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #ddd0ea; border-radius: 999px; background: #fff; color: #3d2b52; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s ease; }
.share-btn:hover { border-color: #FF6B00; color: #FF6B00; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(82,45,109,.12); }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.share-btn.copied { border-color: #2e9e5b; color: #2e9e5b; }


/* ===== RSS page (translastars-blog /rss) ===== */
.rss-subscribe { background: #fff; border: 1px solid #e6ddf0; border-radius: 16px; padding: 22px 24px; margin: 0 0 28px; box-shadow: 0 2px 10px rgba(82,45,109,.06); }
.rss-subscribe h2 { margin: 0 0 4px; font-size: 19px; color: #522D6D; }
.rss-subscribe p { margin: 0 0 14px; color: #6f6480; font-size: 14px; }
.rss-feed-url input { width: 100%; padding: 11px 14px; border: 1px solid #d9cce8; border-radius: 10px; font-size: 13px; color: #522D6D; background: #fbf9fd; font-family: inherit; }
.rss-reader-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rss-reader-links .btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 600; }
.btn-feedly { background: #2bb24c; color: #fff !important; }
.btn-feedly:hover { background: #259e43; }
.btn-inoreader { background: #1f7ac4; color: #fff !important; }
.btn-inoreader:hover { background: #1a6ba8; }
.rss-card { margin-bottom: 18px; }
.rss-card .post-share { margin: 16px 0 0; }
.rss-posts { padding-bottom: 30px; }

/* ==== Recurso para secciones de cursos dentro del contenido del post ==== */
.post-content .blog-toc {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin: 26px 0 30px;
}
.post-content .blog-toc h3 { margin: 0 0 10px; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; border: 0; padding: 0; }
.post-content .blog-toc ol { margin: 0; padding-left: 22px; }
.post-content .blog-toc li { margin: 6px 0; }
.post-content .blog-toc a { color: var(--text-light); font-weight: 500; }
.post-content .blog-toc a:hover { color: var(--orange); }

.post-content .blog-highlight {
  background: #fff7f0; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0;
  padding: 16px 20px; margin: 26px 0; font-size: 16.5px; line-height: 1.65;
}
.post-content .blog-highlight strong { color: var(--purple-dark); }

.post-content .blog-card {
  background: linear-gradient(135deg, #522D6D, #7B3FAF); color: #fff; border-radius: 16px;
  padding: 26px 28px; margin: 32px 0; text-align: center;
}
.post-content .blog-card p { color: #fff; font-size: 17px; line-height: 1.65; margin-bottom: 0; }
.post-content .blog-card a { color: #fff; font-weight: 700; text-decoration: underline; }

.post-content .blog-tags { margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-content .blog-tags span {
  background: var(--purple); color: #fff; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
}

.post-content .course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 26px 0 30px;
}
.post-content .course-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 16px rgba(82,45,109,.10); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-content .course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(82,45,109,.16); }
.post-content .course-card img { width: 100%; height: 150px; object-fit: cover; margin: 0; border-radius: 0; display: block; }
.post-content .course-card-body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.post-content .course-card-title { font-size: 16px; font-weight: 700; color: var(--purple-dark); line-height: 1.35; }
.post-content .course-card-tutor { font-size: 13.5px; color: var(--purple); font-weight: 600; }
.post-content .course-card-desc { font-size: 13.5px; color: var(--text-light); line-height: 1.5; margin: 0; }
.post-content .course-card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-content .course-card-price { font-size: 16px; color: var(--orange); font-weight: 700; }
.post-content .course-card-foot a { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.post-content .cc-lang { align-self: flex-start; background: rgba(123,63,175,.12); color: var(--purple); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; }

.post-content .org-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin: 26px 0 30px;
}
.post-content .org-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(82,45,109,.06); display: flex; flex-direction: column;
}
.post-content .org-card h4 { margin: 0 0 8px; font-size: 16px; color: var(--purple-dark); line-height: 1.4; }
.post-content .org-card p { margin: 0 0 10px; font-size: 14.5px; color: var(--text-light); line-height: 1.6; flex: 1; }
.post-content .org-card a { font-size: 13.5px; font-weight: 700; margin-top: auto; }

.post-content .platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 26px 0 30px;
}
.post-content .platform-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(82,45,109,.06);
}
.post-content .platform-card h4 { margin: 0 0 8px; font-size: 16.5px; color: var(--purple-dark); }
.post-content .platform-card p { margin: 0; font-size: 14.5px; color: var(--text-light); line-height: 1.6; }
