/*
Theme Name: Miguel Atencia
Theme URI: https://miguelatencia.com
Author: Miguel Atencia
Author URI: https://miguelatencia.com
Description: Tema premium personalizado para miguelatencia.com - Escritor & Desarrollador. Diseño editorial con SEO avanzado, rendimiento optimizado y seguridad reforzada.
Version: 2.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miguelatencia
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready, custom-colors
*/

/* ── Variables de diseño ─────────────────────────────── */
:root {
  --color-bg: #F7F4EE;
  --color-text: #2D2D2D;
  --color-text-light: #6B7280;
  --color-primary: #1F6B6F;
  --color-primary-hover: #174f52;
  --color-accent: #B56E4A;
  --color-accent-hover: #9a5b3c;
  --color-border: #E5E1DB;
  --color-card: #FFFFFF;
  --color-card-hover: #FAFAF8;
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Skip link (accesibilidad WCAG) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.screen-reader-text:focus {
  clip: auto;
  position: static;
  width: auto;
  height: auto;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-hover); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ── Layout ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main { padding: 2rem 0 4rem; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 40px;
  width: auto;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after { width: 100%; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: 0.3s;
}

/* ── Cards / Posts Grid ───────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-border);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card__image img { transform: scale(1.05); }

.post-card__content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.post-card__meta {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card__category {
  background: var(--color-primary);
  color: #fff;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card__title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-card__title a { color: var(--color-text); }
.post-card__title a:hover { color: var(--color-primary); }

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
}

.post-card__read-more {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.post-card__read-more:hover { gap: 0.6rem; }

/* ── Single Post ──────────────────────────────────── */
.single-post-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding-top: 2rem;
}

.single-post-header h1 {
  margin-bottom: 1rem;
}

.single-post-meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.post-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { margin: 2.5rem 0 1rem; }
.post-content h3 { margin: 2rem 0 0.75rem; }

.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  background: rgba(181, 110, 74, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content img {
  border-radius: var(--radius);
  margin: 2rem auto;
}

/* Tags en post */
.post-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tags a {
  background: var(--color-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}

.post-tags a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  background: var(--color-text);
  color: #ccc;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-section a { color: #aaa; }
.footer-section a:hover { color: var(--color-accent); }

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.footer-social a:hover { background: var(--color-primary); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ── Pagination ───────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination .page-numbers {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.9rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Buy Me a Coffee ──────────────────────────────── */
.buymeacoffee {
  text-align: center;
  padding: 2rem;
  margin: 3rem 0;
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.buymeacoffee a {
  display: inline-block;
  background: #FFDD00;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.buymeacoffee a:hover { transform: scale(1.05); }

/* ── Contact Form ─────────────────────────────────── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-card);
  transition: border-color 0.2s;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.wpcf7 input[type="submit"] {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover { background: var(--color-primary-hover); }

/* ── Breadcrumbs ──────────────────────────────────── */
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.breadcrumbs a { color: var(--color-primary); }
.breadcrumbs .separator { margin: 0 0.5rem; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-card);
    padding: 4rem 2rem;
    transition: right 0.3s;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    z-index: 200;
  }
  
  .main-nav.active { right: 0; }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .main-nav a { font-size: 1.1rem; }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .header-inner { padding: 0.75rem 1rem; }
  
  .single-post-header { padding-top: 1rem; }
}

/* ── Overlay (mobile nav) ─────────────────────────── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

.nav-overlay.active { display: block; }

/* ── Share buttons ────────────────────────────────── */
.share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0;
}

.share-buttons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: transform 0.2s;
}

.share-buttons a:hover { transform: scale(1.1); }
.share-btn-facebook { background: #1877F2; }
.share-btn-twitter { background: #1DA1F2; }
.share-btn-whatsapp { background: #25D366; }
.share-btn-linkedin { background: #0A66C2; }

/* ── About page ───────────────────────────────────── */
.about-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.about-hero img {
  border-radius: 50%;
  width: 250px;
  height: 250px;
  object-fit: cover;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


/* ══════════════════════════════════════════════════════
   HOMEPAGE - Replica diseño Next.js
   ══════════════════════════════════════════════════════ */

/* ── Hero Section ─────────────────────────────────── */
.hero-section {
  background: var(--color-bg);
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.hero-desc-secondary {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-hover);
  color: #fff;
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: rgba(31, 107, 111, 0.4);
  color: var(--color-primary);
  background: rgba(31, 107, 111, 0.03);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  transition: all 0.2s;
}

.social-links a:hover {
  color: var(--color-primary);
  border-color: rgba(31, 107, 111, 0.5);
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.hero-photo-frame {
  width: 320px;
  height: 320px;
  border-radius: 2rem 1rem 2rem 1rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(31, 107, 111, 0.12);
  border: 1px solid rgba(229, 225, 219, 0.3);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Manifesto ────────────────────────────────────── */
.manifesto-section {
  padding: 3.5rem 0;
  background: var(--color-card);
}

.manifesto-text {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  text-align: center;
  color: var(--color-text);
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto;
}

/* ── Profile Cards ────────────────────────────────── */
.profiles-section {
  padding: 4rem 0;
  background: var(--color-bg);
}

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.profile-card {
  display: block;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--color-card);
  border: 1px solid rgba(229, 225, 219, 0.6);
  transition: all 0.2s;
  text-decoration: none;
}

.profile-card:hover {
  border-color: rgba(31, 107, 111, 0.5);
  box-shadow: var(--shadow-hover);
}

.profile-card--dev {
  background: var(--color-bg);
}

.profile-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.profile-icon--escritor {
  background: rgba(31, 107, 111, 0.1);
  color: var(--color-primary);
}

.profile-icon--dev {
  background: rgba(181, 110, 74, 0.1);
  color: var(--color-accent);
}

.profile-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  transition: color 0.2s;
}

.profile-card:hover h2 {
  color: var(--color-primary);
}

.profile-card p {
  color: var(--color-text-light);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ── Latest Section ───────────────────────────────── */
.latest-section {
  padding: 4rem 0;
  background: var(--color-card);
}

.latest-section--alt {
  background: var(--color-bg);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
}

.see-all {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
}

.see-all:hover {
  color: var(--color-primary-hover);
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.article-card {
  border-radius: var(--radius);
  border: 1px solid rgba(229, 225, 219, 0.5);
  overflow: hidden;
  background: var(--color-card);
  transition: all 0.2s;
}

.latest-section--alt .article-card {
  background: var(--color-card);
}

.article-card:hover {
  border-color: rgba(31, 107, 111, 0.3);
}

.article-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.article-card__image {
  width: 100%;
  height: 176px;
  overflow: hidden;
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .article-card__image img {
  transform: scale(1.05);
}

.article-card__content {
  padding: 1.25rem;
  flex: 1;
}

.article-card__content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  transition: color 0.2s;
}

.article-card:hover .article-card__content h3 {
  color: var(--color-primary);
}

.article-card__content time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  display: block;
  margin-bottom: 0.75rem;
}

.article-card__content p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── CTA Section ──────────────────────────────────── */
.cta-section {
  padding: 5rem 0;
  background: var(--color-card);
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ── Responsive Homepage ──────────────────────────── */
@media (max-width: 768px) {
  .hero-section { padding: 3rem 0; }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons { justify-content: center; }
  .social-links { justify-content: center; }
  
  .hero-photo { order: -1; margin-bottom: 1rem; }
  .hero-photo-frame { width: 240px; height: 240px; }
  
  .profiles-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}


/* ══════════════════════════════════════════════════════
   SECTION PAGES (Escritor / Dev)
   ══════════════════════════════════════════════════════ */
.section-page {
  padding: 4rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.section-page__header {
  margin-bottom: 3rem;
}

.section-page__header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.section-page__header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.6;
  max-width: 600px;
}

/* Article List (estilo blog/lista) */
.article-list {
  display: flex;
  flex-direction: column;
}

.article-list-item {
  border-bottom: 1px solid rgba(229, 225, 219, 0.5);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-list-item__link {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.article-list-item__thumb {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid rgba(229, 225, 219, 0.3);
}

.article-list-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-list-item:hover .article-list-item__thumb img {
  transform: scale(1.05);
}

.article-list-item__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.3;
}

.article-list-item__content {
  flex: 1;
  min-width: 0;
}

.article-list-item__content h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  line-height: 1.3;
  transition: color 0.2s;
}

.article-list-item:hover .article-list-item__content h2 {
  color: var(--color-primary);
}

.article-list-item__content time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  display: block;
  margin-bottom: 0.5rem;
}

.article-list-item__content p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-list-item__cats {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  margin-left: calc(96px + 1.25rem);
  flex-wrap: wrap;
}

.article-list-item__cats a {
  font-size: 0.7rem;
  background: var(--color-card);
  color: var(--color-text-light);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(229, 225, 219, 0.5);
  transition: all 0.2s;
}

.article-list-item__cats a:hover {
  border-color: rgba(31, 107, 111, 0.4);
  color: var(--color-primary);
}

.no-posts {
  color: var(--color-text-light);
  text-align: center;
  padding: 3rem 0;
}

@media (max-width: 768px) {
  .article-list-item__thumb { width: 72px; height: 72px; }
  .article-list-item__cats { margin-left: calc(72px + 1.25rem); }
  .article-list-item__content h2 { font-size: 1.1rem; }
}

/* ══════════════════════════════════════════════════════
   SOBRE MÍ PAGE
   ══════════════════════════════════════════════════════ */
.about-header {
  background: var(--color-bg);
  padding: 4rem 0 3rem;
}

.about-header__inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.about-header__photo {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 2rem;
  border: 2px solid rgba(229, 225, 219, 0.5);
  box-shadow: var(--shadow);
}

.about-header__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-header__intro {
  font-size: 1.15rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.about-content {
  padding: 4rem 0;
}

.about-content__inner {
  max-width: 700px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 3.5rem;
}

.about-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.about-section p {
  font-size: 1rem;
  color: rgba(45, 45, 45, 0.9);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-section a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-section a:hover {
  color: var(--color-primary-hover);
}

.about-section__note {
  color: var(--color-text-light);
  margin-top: 1.5rem;
}

/* Quote */
.about-quote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 3rem 0;
}

.about-quote p {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
}

/* Paths grid */
.about-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.about-path {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(229, 225, 219, 0.5);
}

.about-path--escritor {
  background: var(--color-card);
}

.about-path--dev {
  background: var(--color-bg);
}

.about-path h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.about-path p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .about-paths { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════════════════
   PREMIUM WIDGETS
   ══════════════════════════════════════════════════════ */

/* Base widget styling */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* ── Widget: Sobre el Autor ───────────────────────── */
.widget-author__card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.widget-author__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-primary);
  padding: 2px;
}

.widget-author__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.widget-author__name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.widget-author__bio {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.widget-author__social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.widget-author__social a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-light);
  transition: all 0.2s;
  border: 1px solid var(--color-border);
}

.widget-author__social a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.widget-author__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  transition: all 0.2s;
}

.widget-author__link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ── Widget: Posts Populares ──────────────────────── */
.widget-popular__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-popular__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 10px;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.widget-popular__item:hover {
  background: var(--color-bg);
}

.widget-popular__number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.widget-popular__item:nth-child(n+4) .widget-popular__number {
  background: var(--color-border);
  color: var(--color-text-light);
}

.widget-popular__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg);
}

.widget-popular__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-popular__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0.4;
}

.widget-popular__info {
  flex: 1;
  min-width: 0;
}

.widget-popular__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-popular__item:hover .widget-popular__title {
  color: var(--color-primary);
}

.widget-popular__date {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

/* ── Widget: CTA / Newsletter ─────────────────────── */
.widget-cta__box {
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.widget-cta--primary {
  background: linear-gradient(135deg, var(--color-primary), #174f52);
  color: #fff;
}

.widget-cta--accent {
  background: linear-gradient(135deg, var(--color-accent), #9a5b3c);
  color: #fff;
}

.widget-cta--dark {
  background: linear-gradient(135deg, #2D2D2D, #1a1a1a);
  color: #fff;
}

.widget-cta__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: inherit;
}

.widget-cta__text {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.widget-cta__btn {
  display: inline-block;
  background: #fff;
  color: var(--color-text);
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.widget-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: var(--color-text);
}

/* ── Widget: Categorías Premium ───────────────────── */
.widget-cats__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.widget-cats__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.widget-cats__item:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-primary);
}

.widget-cats__name {
  font-size: 0.88rem;
  font-weight: 500;
}

.widget-cats__count {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-text-light);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.widget-cats__item:hover .widget-cats__count {
  background: var(--color-primary);
  color: #fff;
}

/* ── Widget: Nube de Tags ─────────────────────────── */
.widget-tags__cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.widget-tags__pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--color-bg);
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all 0.2s;
}

.widget-tags__pill:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-1px);
}


/* ── After Post Widgets area ──────────────────────── */
.after-post-widgets {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.after-post-widgets .widget {
  margin-bottom: 2rem;
}


/* ── Sidebar Layout ───────────────────────────────── */
.has-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

@media (max-width: 1024px) {
  .has-sidebar {
    grid-template-columns: 1fr;
  }
  .site-sidebar {
    position: static;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    margin-top: 2rem;
  }
}
