/* =========================================================================
   MANUSCRIPTOS OLVIDADOS - HOJA DE ESTILOS PRINCIPAL
   =========================================================================
   Diseño: Clásico, editorial, elegante, académico.
   Paleta de Colores:
   - Fondo pergamino: #faf8f5 (o #f5f1ea para variaciones)
   - Texto sépia/oscuro: #2c221e
   - Acento Rubí/Vino: #5c1d1d
   - Acento Oro viejo: #c2a649
   - Bordes y líneas: #d6cfc2
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* 1. CONFIGURACIÓN GENERAL */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #faf8f5;
    color: #2c221e;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 2rem;
}

/* Tipografías elegantes */
h1, h2, h3, h4, .font-editorial {
    font-family: 'Cinzel', 'Playfair Display', serif;
    font-weight: 600;
    color: #2c221e;
}

a {
    color: #5c1d1d;
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: #c2a649;
}

/* 2. ESTRUCTURA Y CONTENEDORES */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Encabezado Principal */
.main-header {
    border-bottom: 3px double #d6cfc2;
    padding: 2.5rem 0 1.5rem 0;
    text-align: center;
    background-color: #f7f3eb;
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #5c1d1d;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
}

.brand-slogan {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #705b50;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Menú de Navegación */
.nav-bar {
    border-top: 1px solid #d6cfc2;
    border-bottom: 1px solid #d6cfc2;
    padding: 0.8rem 0;
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.2rem 0.5rem;
}

.nav-links a.active {
    border-bottom: 2px solid #5c1d1d;
    color: #5c1d1d;
}

/* Héroe o Sección de Presentación */
.hero-section {
    text-align: center;
    padding: 4rem 1.5rem;
    background: radial-gradient(circle, #fcfbf9 60%, #f4eee2 100%);
    border-bottom: 1px solid #d6cfc2;
    margin-bottom: 3rem;
    position: relative;
}

.hero-section::after {
    content: "❦";
    display: block;
    font-size: 1.8rem;
    color: #5c1d1d;
    margin-top: 1.5rem;
}

.hero-title {
    font-size: 2.2rem;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    line-height: 1.3;
}

.hero-desc {
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: #5c504a;
    font-style: italic;
}

/* 3. FILTROS Y BÚSQUEDA (Panel de Control) */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: #f7f3eb;
    border: 1px solid #d6cfc2;
    border-radius: 2px;
}

@media(min-width: 768px) {
    .controls-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    font-family: 'Lora', serif;
    background-color: #faf8f5;
    border: 1px solid #d6cfc2;
    color: #2c221e;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #5c1d1d;
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #705b50;
    font-size: 0.95rem;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid #d6cfc2;
    color: #2c221e;
    padding: 0.4rem 1.1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #5c1d1d;
    border-color: #5c1d1d;
    color: #faf8f5;
}

/* 4. REJILLA DE ARTÍCULOS (GRID) */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

@media(min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Artículos del Grid */
.post-card {
    background-color: #fdfcfb;
    border: 1px solid #e8e3d9;
    border-radius: 1px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(44, 34, 30, 0.03);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(92, 29, 29, 0.08);
    border-color: #d0c2b2;
}

.post-img-container {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #ebdcb9; /* color de relleno pergamino oscuro */
    overflow: hidden;
    border-bottom: 1px solid #e8e3d9;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

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

/* Sello o ilustración simulada en SVG para evitar enlaces rotos */
.post-placeholder-svg {
    width: 60%;
    height: 60%;
    opacity: 0.8;
}

.post-meta-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #5c1d1d;
    color: #faf8f5;
    padding: 0.3rem 0.8rem;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-date {
    font-size: 0.85rem;
    color: #705b50;
    margin-bottom: 0.5rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-card-title {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-card-title a {
    color: #2c221e;
}

.post-card-title a:hover {
    color: #5c1d1d;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #5c504a;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-readmore {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #5c1d1d;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid transparent;
    align-self: flex-start;
}

.post-readmore:hover {
    color: #c2a649;
    border-bottom-color: #c2a649;
}

/* Estado Vacío de Búsqueda */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    border: 1px dashed #d6cfc2;
    background-color: #fcfbf9;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: #705b50;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: #705b50;
    font-style: italic;
}

/* 5. DISEÑO DE LA PÁGINA DE CONTACTO Y FORMULARIOS */
.contact-section {
    max-width: 800px;
    margin: 3rem auto;
    background-color: #fdfcfb;
    border: 1px solid #d6cfc2;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-title {
    font-size: 2.2rem;
    color: #5c1d1d;
    margin-bottom: 0.8rem;
}

.contact-subtitle {
    font-style: italic;
    color: #705b50;
}

/* Formulario */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c221e;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: 'Lora', serif;
    font-size: 1rem;
    background-color: #faf8f5;
    border: 1px solid #d6cfc2;
    color: #2c221e;
    outline: none;
    transition: all 0.3s;
    border-radius: 1px;
}

.form-control:focus {
    border-color: #5c1d1d;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(92, 29, 29, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background-color: #5c1d1d;
    color: #faf8f5;
    border: 1px solid #5c1d1d;
    padding: 0.9rem 2rem;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    align-self: center;
    transition: all 0.3s ease;
    margin-top: 1rem;
    border-radius: 1px;
}

.submit-btn:hover {
    background-color: #2c221e;
    border-color: #2c221e;
    color: #faf8f5;
}

/* 6. PIE DE PÁGINA (FOOTER) */
.main-footer {
    border-top: 3px double #d6cfc2;
    padding: 3rem 0;
    margin-top: 5rem;
    background-color: #f7f3eb;
    text-align: center;
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #5c1d1d;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.footer-slogan {
    font-style: italic;
    font-size: 0.95rem;
    color: #705b50;
    margin-bottom: 1.5rem;
}

.footer-divider {
    max-width: 150px;
    height: 1px;
    background-color: #d6cfc2;
    margin: 1rem auto;
}

.footer-credit {
    font-size: 0.9rem;
    color: #705b50;
    margin-top: 1.5rem;
}

.footer-credit a {
    font-weight: 600;
}
