/*
Theme Name:  Manuel Gracián
Theme URI:   https://manuelgracian.com
Author:      Emmanuel Gracián
Description: Blog literario elegante y minimalista para Manuel Gracián. Incluye carrusel en portada, grid de artículos con thumbnails y página de post individual con sidebar.
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: manuel-gracian
Tags:        blog, two-columns, custom-menu, featured-images, sticky-post
*/

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

:root {
    --ink:       #1a1a18;
    --muted:     #6b6b65;
    --light:     #f5f3ef;
    --accent:    #8b6914;
    --accent-lt: rgba(139,105,20,0.10);
    --border:    rgba(0,0,0,0.10);
    --bg:        #faf9f6;
    --serif:     'Playfair Display', Georgia, serif;
    --sans:      'Jost', system-ui, sans-serif;
    --max-w:     1320px;
    --content-w: 820px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: #e8e4dc;
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--ink);
}

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 0.5px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-title {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.site-title em {
    font-style: italic;
    color: var(--accent);
}

.main-navigation ul {
    display: flex;
    gap: 32px;
}

.main-navigation a {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--ink);
}

/* ─────────────────────────────────────────
   HERO CAROUSEL
───────────────────────────────────────── */
.hero-carousel {
    position: relative;
    height: 345px;
    overflow: hidden;
    background: var(--light);
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s ease;
    display: flex;
    pointer-events: none;
}

.carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Mitad izquierda: imagen */
.slide-image {
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #1a1a18;
    transition: transform 6s ease;
}

.carousel-slide.is-active .slide-image img {
    transform: scale(1.05);
}

/* Placeholder cuando no hay imagen */
.slide-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 96px;
    opacity: 0.55;
}

/* Mitad derecha: texto */
.slide-body {
    flex: 1;
    padding: 52px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--light);
}

.slide-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.slide-title {
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 400;
    line-height: 1.22;
    color: var(--ink);
    margin-bottom: 16px;
}

.slide-excerpt {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 28px;
}

.slide-meta {
    font-size: 11px;
    letter-spacing: 0.07em;
    color: #9b9b92;
    margin-bottom: 20px;
}

.slide-link {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
    width: fit-content;
    transition: color 0.2s, border-color 0.2s;
}

.slide-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Controles */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(250,249,246,0.88);
    border: 0.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--ink);
    transition: background 0.2s;
    line-height: 1;
}

.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 18px; }
.carousel-btn.next { right: 18px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
    z-index: 5;
}

.carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s;
}

.carousel-dot.is-active { background: var(--accent); }

/* ─────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 40px 48px 26px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-header h2 {
    font-family: var(--serif);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 0.5px;
    background: #e8e4dc;
}

/* ─────────────────────────────────────────
   ARTICLES GRID (home)
───────────────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: var(--bg);
    max-width: 100%;
}

.article-card {
    overflow: hidden;
    transition: background 0.2s;
    background: var(--bg);
    border-right: 1px solid #e8dfc8;
    border-bottom: 1px solid #e8dfc8;
}

.article-card:nth-child(3n) { border-right: none; }


.article-card:hover { background: #f2f0ec; }

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 0.5px solid var(--border);
    background: var(--light);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

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

.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.55;
}

.card-body { padding: 22px 28px 26px; }

.card-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 9px;
}

.card-title {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 9px;
    transition: color 0.2s;
}

.article-card:hover .card-title { color: var(--accent); }

.card-excerpt {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 300;
    margin-bottom: 14px;
}

.card-meta {
    font-size: 11px;
    color: #aaa;
    display: flex;
    gap: 14px;
}

/* ─────────────────────────────────────────
   ABOUT STRIP (home)
───────────────────────────────────────── */
.about-strip {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 44px 48px;
    border-top: 0.5px solid var(--border);
    background: var(--light);
    max-width: 100%;
}

.about-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #d4c8a8;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-size: 28px; font-style: italic;
    color: var(--accent);
    flex-shrink: 0;
    border: 1.5px solid rgba(139,105,20,0.25);
    overflow: hidden;
}

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

.about-text h3 {
    font-family: var(--serif);
    font-size: 22px;
    margin-bottom: 8px;
}

.about-text p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    font-weight: 300;
    max-width: 560px;
}

/* ─────────────────────────────────────────
   SINGLE POST — HERO
───────────────────────────────────────── */
.post-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #2a2318, #4a3c28);
}

.post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.post-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(26,26,24,0.5) 100%);
}

.post-hero-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 160px; opacity: 0.5;
}

/* ─────────────────────────────────────────
   SINGLE POST — LAYOUT
───────────────────────────────────────── */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 48px;
}

/* Columna principal */
.post-main {
    padding: 56px 72px 64px 0;
    border-right: 0.5px solid var(--border);
    min-width: 0;
}

.post-breadcrumb {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 30px;
    display: flex; align-items: center; gap: 8px;
}

.post-breadcrumb a { transition: color 0.2s; }
.post-breadcrumb a:hover { color: var(--accent); }
.post-breadcrumb span { color: var(--accent); }

.post-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.post-title {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.14;
    color: var(--ink);
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12.5px;
    color: var(--muted);
    padding-bottom: 32px;
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 48px;
}

.post-author-inline {
    display: flex; align-items: center; gap: 10px;
}

.post-author-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #d4c8a8;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-size: 13px; font-style: italic;
    color: var(--accent);
    border: 1px solid rgba(139,105,20,0.25);
    overflow: hidden;
    flex-shrink: 0;
}

.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-name { font-weight: 500; color: var(--ink); }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(0,0,0,0.2); flex-shrink: 0; }

/* CUERPO DEL ARTÍCULO */
.post-content {
    font-size: 18px;
    line-height: 1.95;
    font-weight: 300;
    color: #2a2a26;
}

.post-content p { margin-bottom: 28px; }

/* letra capitular desactivada */

.post-content h2 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    margin: 52px 0 20px;
    color: var(--ink);
}

.post-content h3 {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 400;
    margin: 36px 0 16px;
}

.post-content blockquote {
    border-left: 2px solid var(--accent);
    padding: 10px 0 10px 32px;
    margin: 44px 0;
    font-family: var(--serif);
    font-size: 24px;
    font-style: italic;
    color: var(--ink);
    line-height: 1.5;
}

.post-content blockquote cite {
    display: block;
    font-size: 13px;
    font-style: normal;
    color: var(--muted);
    margin-top: 12px;
    font-family: var(--sans);
    font-weight: 400;
}

.post-content ul, .post-content ol {
    padding-left: 24px;
    margin-bottom: 28px;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; }

.post-content img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 32px 0;
}

.post-content a {
    color: var(--accent);
    border-bottom: 0.5px solid rgba(139,105,20,0.4);
    transition: border-color 0.2s;
}

.post-content a:hover { border-color: var(--accent); }

/* Separador decorativo */
.post-content hr {
    border: none;
    text-align: center;
    margin: 48px 0;
    color: var(--accent);
    opacity: 0.5;
}

.post-content hr::after { content: '✦'; font-size: 14px; }

/* Tags */
.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 52px;
    padding-top: 32px;
    border-top: 0.5px solid var(--border);
}

.post-tag-pill {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border: 0.5px solid rgba(139,105,20,0.35);
    padding: 5px 15px;
    border-radius: 20px;
    transition: background 0.2s;
}

.post-tag-pill:hover { background: var(--accent-lt); }

/* Compartir */
.post-share {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.share-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.share-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 0.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
}

.share-btn:hover { background: var(--light); color: var(--ink); }

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.post-sidebar {
    padding: 56px 0 64px 40px;
}

.sidebar-sticky { position: sticky; top: 80px; }

.sidebar-widget { margin-bottom: 44px; }

.sidebar-widget-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 0.5px solid var(--border);
}

/* Widget autor */
.sidebar-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.sidebar-author-avatar {
    width: 66px; height: 66px;
    border-radius: 50%;
    background: #d4c8a8;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-size: 22px; font-style: italic;
    color: var(--accent);
    border: 1.5px solid rgba(139,105,20,0.25);
    overflow: hidden;
}

.sidebar-author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-author h4 {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
}

.sidebar-author p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 300;
}

/* Widget artículos relacionados */
.related-post {
    display: flex;
    gap: 13px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 0.5px solid var(--border);
    cursor: pointer;
}

.related-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.related-thumb {
    width: 60px; height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--light);
}

.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}

.related-info { flex: 1; min-width: 0; }

.related-cat {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.related-title {
    font-family: var(--serif);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--ink);
    transition: color 0.2s;
}

.related-post:hover .related-title { color: var(--accent); }

.related-date { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ─────────────────────────────────────────
   POST NAVIGATION
───────────────────────────────────────── */
.posts-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 0.5px solid var(--border);
    max-width: 100%;
}

.nav-prev, .nav-next {
    padding: 32px 48px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-prev { border-right: 0.5px solid var(--border); }
.nav-next { text-align: right; }
.nav-prev:hover, .nav-next:hover { background: #f2f0ec; }

.nav-direction {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.nav-post-title {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    transition: color 0.2s;
}

.nav-prev:hover .nav-post-title,
.nav-next:hover .nav-post-title { color: var(--accent); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
    padding: 26px 48px;
    border-top: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--muted);
}

.footer-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: #b8a878;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
    .post-layout { grid-template-columns: 1fr; padding: 0 32px; }
    .post-main { border-right: none; padding: 44px 0; }
    .post-sidebar { padding: 0 0 44px; border-top: 0.5px solid var(--border); }
    .sidebar-sticky { position: static; }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 24px; }
    .main-navigation { display: none; }
    .hero-carousel { height: auto; }
    .carousel-slide { position: relative; flex-direction: column; }
    .slide-image { width: 100%; height: 240px; }
    .slide-body { padding: 32px 24px; }
    .slide-title { font-size: 26px; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-card { border-right: none; }
    .post-title { font-size: 34px; }
    .post-content { font-size: 17px; }
    .post-content blockquote { font-size: 20px; padding-left: 20px; }
    .posts-navigation { grid-template-columns: 1fr; }
    .nav-prev { border-right: none; border-bottom: 0.5px solid var(--border); }
    .nav-next { text-align: left; }
    .section-header { padding: 30px 24px 20px; }
    .about-strip { flex-direction: column; text-align: center; padding: 36px 24px; }
    .site-footer { flex-direction: column; gap: 8px; text-align: center; padding: 24px; }
}

/* ─────────────────────────────────────────
   BOXED LAYOUT
   Limita el ancho máximo del sitio y centra
   el contenido en pantallas muy anchas.
───────────────────────────────────────── */


.site-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    position: relative;
}

/* ─────────────────────────────────────────
   ARCHIVO — TIMELINE POR AÑO
───────────────────────────────────────── */

.archive-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 48px 80px;
}

.archive-hero {
    padding: 64px 0 48px;
    border-bottom: 0.5px solid var(--border);
    margin-bottom: 56px;
}

.archive-title {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.archive-subtitle {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-weight: 300;
}

/* Bloque por año */
.timeline-year-block {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0 40px;
    margin-bottom: 52px;
}

.timeline-year-label {
    padding-top: 4px;
    text-align: right;
    position: relative;
}

.timeline-year-label::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -21px;
    width: 1px;
    height: calc(100% + 52px);
    background: #e8e4dc;
}

.timeline-year-label span {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--accent);
    display: block;
    line-height: 1;
}

.timeline-year-label small {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

/* Posts del año */
.timeline-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-post {
    display: block;
    padding: 18px 20px 18px 32px;
    position: relative;
    border-radius: 6px;
    transition: background 0.2s;
    text-decoration: none;
    border-bottom: 0.5px solid var(--border);
}

.timeline-post:last-child {
    border-bottom: none;
}

.timeline-post:hover {
    background: #f2f0ec;
}

/* Punto en la línea */
.timeline-dot {
    position: absolute;
    left: -24px;
    top: 24px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e8e4dc;
    border: 1.5px solid var(--bg);
    transition: background 0.2s;
    z-index: 1;
}

.timeline-post:hover .timeline-dot {
    background: var(--accent);
}

.timeline-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.timeline-date {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-weight: 400;
}

.timeline-cat {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.timeline-post-title {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.timeline-post:hover .timeline-post-title {
    color: var(--accent);
}

.timeline-post-excerpt {
    font-size: 13px;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
    .archive-page { padding: 0 24px 60px; }
    .timeline-year-block { grid-template-columns: 60px 1fr; gap: 0 24px; }
    .timeline-year-label span { font-size: 22px; }
    .archive-title { font-size: 36px; }
    .timeline-post { padding-left: 20px; }
    .timeline-dot { left: -16px; }
}

/* ─────────────────────────────────────────
   HEADER — FOTO + NOMBRE EN UNA LÍNEA
───────────────────────────────────────── */

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-brand-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid rgba(139,105,20,0.25);
}

.site-brand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.site-brand .site-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.site-brand .site-title em {
    font-style: italic;
    color: var(--accent);
}


/* ─────────────────────────────────────────
   ARCHIVO — THUMBNAIL EN TIMELINE
───────────────────────────────────────── */

.timeline-post {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px 16px 32px;
    position: relative;
    border-radius: 6px;
    transition: background 0.2s;
    text-decoration: none;
    border-bottom: 0.5px solid var(--border);
}

.timeline-post:last-child { border-bottom: none; }
.timeline-post:hover { background: #f2f0ec; }

.timeline-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--light);
}

.timeline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.timeline-post:hover .timeline-thumb img {
    transform: scale(1.06);
}

.timeline-post-body {
    flex: 1;
    min-width: 0;
}

/* ─────────────────────────────────────────
   PÁGINAS ESTÁTICAS (Bio, Contacto, etc.)
───────────────────────────────────────── */

.page-hero {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #2a2318, #4a3c28);
    position: relative;
    overflow: hidden;
}

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

.page-hero-plain {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--light) 0%, #e8e2d5 100%);
}

.page-layout {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 48px 80px;
}

.page-title {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 400;
    color: var(--ink);
    margin: 52px 0 16px;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.page-divider {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 40px;
}

.page-content {
    font-size: 18px;
    line-height: 1.9;
    font-weight: 300;
    color: #2a2a26;
}

.page-content p { margin-bottom: 26px; }

.page-content p:first-of-type::first-letter {
    font-family: var(--serif);
    font-size: 72px;
    font-weight: 600;
    line-height: 0.76;
    float: left;
    margin: 10px 14px 0 0;
    color: var(--accent);
}

.page-content h2 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 400;
    margin: 44px 0 18px;
    color: var(--ink);
}

.page-content a {
    color: var(--accent);
    border-bottom: 0.5px solid rgba(139,105,20,0.4);
    transition: border-color 0.2s;
}

.page-content a:hover { border-color: var(--accent); }

.page-content img {
    width: 100%;
    border-radius: 4px;
    margin: 32px 0;
}

@media (max-width: 768px) {
    .page-layout { padding: 0 24px 60px; }
    .page-title { font-size: 32px; }
    .page-content { font-size: 16px; }
}

/* ─────────────────────────────────────────
   BÚSQUEDA EN HEADER
───────────────────────────────────────── */
.header-search {
    position: relative;
    flex-shrink: 0;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}

.search-toggle:hover {
    color: var(--ink);
    background: var(--light);
}

.search-box {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #fff;
    border: 0.5px solid var(--border);
    border-radius: var(--border-radius-lg, 12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 10px 14px;
    display: none;
    z-index: 200;
}

.search-box.is-open {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-box input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 300;
    color: var(--ink);
    background: transparent;
    padding: 4px 0;
}

.search-box input[type="search"]::placeholder {
    color: var(--muted);
}

.search-box button[type="submit"] {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}

.search-box button[type="submit"]:hover {
    color: var(--accent);
}

/* ─────────────────────────────────────────
   BARRA DE BÚSQUEDA SUPERIOR
───────────────────────────────────────── */
.top-search-bar {
    background: var(--light);
    border-bottom: 0.5px solid var(--border);
    padding: 10px 48px;
}

.top-search-bar form {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 0.5px solid var(--border);
    border-radius: 30px;
    padding: 10px 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.top-search-bar form:focus-within {
    border-color: rgba(139,105,20,0.4);
    box-shadow: 0 0 0 3px rgba(139,105,20,0.08);
}

.top-search-bar svg {
    color: var(--muted);
    flex-shrink: 0;
}

.top-search-bar input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--ink);
    background: transparent;
    padding: 0;
}

.top-search-bar input[type="search"]::placeholder {
    color: var(--muted);
}

.top-search-bar button[type="submit"] {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.top-search-bar button[type="submit"]:hover {
    background: #6e5010;
}

/* ─────────────────────────────────────────
   BÚSQUEDA — LUPA + PANEL DESPLEGABLE
───────────────────────────────────────── */

/* Quitar barra superior anterior */
.top-search-bar { display: none !important; }

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    padding: 0;
    transition: color 0.2s, background 0.2s;
}
.search-toggle:hover {
    color: var(--ink);
    background: var(--light);
}

/* Panel desplegable */
.search-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-top: 0.5px solid var(--border);
    border-bottom: 2px solid var(--accent);
    z-index: 200;
    padding: 18px 48px;
}

.search-panel.is-open { display: block; }

.search-panel form {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.search-panel svg { color: var(--muted); flex-shrink: 0; }

.search-panel input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
    background: transparent;
    padding: 4px 0;
}

.search-panel input[type="search"]::placeholder {
    color: #c0bbb2;
    font-style: italic;
}

.search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 4px 8px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.search-close:hover { color: var(--ink); }

/* Header necesita position relative para el panel */
.site-header { position: relative; }

/* ─────────────────────────────────────────
   COMENTARIOS
───────────────────────────────────────── */
.post-comments-wrap {
    max-width: 1320px;
    margin: 0 auto;
    border-top: 0.5px solid var(--border);
}

.post-comments-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 48px 72px;
}

.comments-section { width: 100%; }

/* Header de comentarios */
.comments-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
}

.comments-title {
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.comments-line {
    flex: 1;
    height: 0.5px;
    background: #e8e4dc;
}

/* Lista */
.comments-list {
    list-style: none;
    margin: 0 0 52px;
    padding: 0;
}

/* Comentario individual */
.mg-comment {
    padding: 28px 0;
    border-bottom: 0.5px solid var(--border);
}

.mg-comment:last-child { border-bottom: none; }

/* Respuestas anidadas */
.mg-comment .children {
    list-style: none;
    padding-left: 48px;
    margin-top: 24px;
}

.comment-author-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.comment-author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-author-name {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 400;
    color: var(--ink);
}

.comment-date {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.comment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comment-actions a {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s;
}

.comment-actions a:hover { color: var(--accent); }

.comment-text {
    font-size: 16px;
    line-height: 1.8;
    font-weight: 300;
    color: #2a2a26;
    padding-left: 58px;
}

.comment-text p { margin-bottom: 12px; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-awaiting {
    font-size: 13px;
    color: var(--muted);
    padding-left: 58px;
    margin-bottom: 8px;
}

/* ── FORMULARIO ── */
.comment-form-wrap {
    margin-top: 52px;
}

.comment-form-title {
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.comment-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.comment-field-wrap {
    width: 100%;
}

.comment-field-wrap input,
.comment-field-wrap textarea {
    width: 100%;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--ink);
    background: #fff;
    border: 0.5px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}

.comment-field-wrap input:focus,
.comment-field-wrap textarea:focus {
    border-color: rgba(139,105,20,0.5);
    box-shadow: 0 0 0 3px rgba(139,105,20,0.08);
}

.comment-field-wrap input::placeholder,
.comment-field-wrap textarea::placeholder {
    color: #b0aca4;
}

.comment-field-wrap textarea {
    min-height: 130px;
    margin-bottom: 16px;
}

.comment-submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 36px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.comment-submit-btn:hover {
    background: #6e5010;
    transform: translateY(-1px);
}

.comments-closed {
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
    text-align: center;
    padding: 32px 0;
}

@media (max-width: 768px) {
    .post-comments-inner { padding: 40px 24px; }
    .comment-fields-row { grid-template-columns: 1fr; }
    .comment-text { padding-left: 0; margin-top: 12px; }
    .comment-awaiting { padding-left: 0; }
}

/* ─────────────────────────────────────────
   TEXTO JUSTIFICADO EN POSTS Y PÁGINAS
───────────────────────────────────────── */
.post-content,
.post-content p,
.page-content,
.page-content p {
    text-align: justify;
}

/* Justificado para editor de bloques (Gutenberg) */
.post-content .wp-block-paragraph,
.post-content .entry-content p,
.entry-content p,
.wp-block-post-content p {
    text-align: justify;
}
