:root {
    --gold: #C4A574;
    --gold-dark: #B39564;
    --dark: #1a1a2e;
    --text: #444;
    --light-bg: #f9f7f4;
    --border: #e8e0d5;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Lato', sans-serif; color: var(--text); background: #fff; }
h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--dark); }

/* NAVBAR */
.navbar {
    background: white;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
}
.navbar-back {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}
.navbar-back:hover { opacity: 0.7; }


/* HERO BLOG */
.blog-hero {
    background: linear-gradient(135deg, var(--light-bg) 0%, #ede8e0 100%);
    padding: 5rem 2rem;
    text-align: center;
}
.blog-hero-tag {
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}
.blog-hero h1 { font-size: 2.8rem; margin-bottom: 1rem; }
.blog-hero p { color: #777; font-size: 1.1rem; max-width: 550px; margin: 0 auto; }

/* FILTROS */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    flex-wrap: wrap;
    background: white;
    border-bottom: 1px solid var(--border);
}
.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: white;
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

/* GRID DE ARTÍCULOS */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
.blog-count { color: #aaa; margin-bottom: 2rem; font-size: 0.9rem; }
.blog-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
}

/* TARJETA */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: var(--gold);
}
.blog-card-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: var(--light-bg);
    position: relative;
}
.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.blog-card-content { padding: 1.75rem; }
.blog-card-meta { color: #bbb; font-size: 0.85rem; margin-bottom: 0.75rem; }
.blog-card-title { font-size: 1.25rem; margin-bottom: 0.75rem; line-height: 1.4; }
.blog-card-excerpt { color: #777; font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.25rem; }
.blog-card-link {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.blog-loading {
    text-align: center;
    padding: 4rem;
    color: #aaa;
    grid-column: 1/-1;
}

/* ARTÍCULO INDIVIDUAL */
.post-hero {
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center;
    background-color: var(--light-bg);
}
.post-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}
.post-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: opacity 0.3s;
}
.post-back-btn:hover { opacity: 0.7; }
.post-category-badge {
    display: inline-block;
    background: var(--gold);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.post-title { font-size: 2.6rem; line-height: 1.2; margin-bottom: 1rem; }
.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.post-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.post-content { font-size: 1.1rem; line-height: 1.9; color: #555; }
.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.post-content ul, .post-content ol { padding-left: 2rem; margin-bottom: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content strong { color: var(--dark); }

/* CTA Final */
.post-cta {
    background: linear-gradient(135deg, var(--light-bg), #ede8e0);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
    border: 1px solid var(--border);
}
.post-cta h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.post-cta p { color: #777; margin-bottom: 2rem; font-size: 1.05rem; }
.post-cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(196,165,116,0.3);
}
.post-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,165,116,0.4);
}

@media (max-width: 768px) {
    .blog-hero h1 { font-size: 2rem; }
    .blog-articles-grid { grid-template-columns: 1fr; }
    .post-title { font-size: 1.8rem; }
    .post-hero { height: 280px; }
    .post-cta { padding: 2rem; }
}

/* ===== Añadido: artículos estáticos ===== */
a.blog-card { display: block; text-decoration: none; color: inherit; }
.blog-card[hidden] { display: none; }
.post-hero-img {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
    background-color: var(--light-bg);
}
.post-breadcrumb { font-size: 0.85rem; color: #aaa; margin-bottom: 1.5rem; }
.post-breadcrumb a { color: var(--gold); text-decoration: none; font-weight: 600; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-content a { color: var(--gold-dark); }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; }
.post-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 0.5rem 1.5rem;
    margin: 0 0 1.5rem;
    color: #666;
    font-style: italic;
}
.post-related { max-width: 1200px; margin: 0 auto; padding: 0 2rem 5rem; }
.post-related h2 { font-size: 1.8rem; margin-bottom: 2rem; text-align: center; }
.site-footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #999;
}
.site-footer a { color: #888; margin: 0 0.6rem; text-decoration: none; }
.site-footer a:hover { color: var(--gold-dark); }
@media (max-width: 768px) {
    .post-hero-img { height: 260px; }
    .post-container { padding: 2rem 1.25rem 4rem; }
}

.post-cta h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.post-meta { flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.site-footer a { display: inline-block; white-space: nowrap; margin: 0.2rem 0.6rem; }

/* ===== Portada del artículo: encuadrada, sin estirarse a todo el ancho ===== */
.post-hero-img {
    display: block;
    width: calc(100% - 4rem);
    max-width: 1040px;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 520px;
    margin: 2.5rem auto 0;
    object-fit: cover;
    object-position: center 40%;
    border-radius: 18px;
    background-color: var(--light-bg);
}
@media (max-width: 768px) {
    .post-hero-img { width: calc(100% - 2.5rem); height: auto; margin-top: 1.5rem; border-radius: 14px; aspect-ratio: 4 / 3; }
}
/* La portada del artículo llega recortada a 16:9 desde Pexels; centrar sin desplazar */
.post-hero-img { object-position: center; }
