/* ============ VARIABLES Y ESTILOS GLOBALES ============ */
:root {
    --color-oro: #FFD700;
    --color-gris-oscuro: #121212;
    --color-texto: rgba(255, 255, 255, 0.9);
    --sombra-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --fuente-principal: 'Helvetica Neue', sans-serif;
    --fuente-titulo: 'Merriweather', serif;
}

body {
    margin: 0;
    font-family: var(--fuente-principal);
    background-color: #0f0f0f;
    color: var(--color-texto);
    line-height: 1.6;
}

/* ============ HEADER DEL BLOG ============ */
.blog-header {
    padding: 100px 0 40px;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), 
    url('/images/bg-blog.jpg') center/cover;
    color: white;
    margin-bottom: 40px;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-family: var(--fuente-titulo);
    border-bottom: 1px solid var(--color-oro);
    display: inline-block;
    padding-bottom: 8px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.blog-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0;
}

/* ============ CONTENEDOR GENERAL ============ */
.blog-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.grid-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.grid-posts .post-content h2 {
    color: white !important;
}

/* ============ TARJETAS DE POST (OPTIMIZADAS) ============ */
.post-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30,30,30,0.95), rgba(18,18,18,0.95));
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.3);
}

.post-image img {
    filter: brightness(0.9);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
    filter: brightness(1);
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-oro);
    margin: 0.5rem 0 1.2rem;
}

.meta-divider {
    position: relative;
    color: var(--color-oro);
    animation: shine 2s infinite linear;
}

@keyframes shine {
    0% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 6px var(--color-oro); }
    100% { opacity: 0.4; }
}


.calendar-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--color-oro);
    color: var(--color-oro);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 6px;
}

.post-author, .post-date {
    font-size: 0.8rem;
}

.post-content {
    padding: 1.2rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.post-content h2 {
    font-size: 1.6rem;
    font-family: var(--fuente-titulo);
    color: var(--color-oro);
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.post-excerpt {
    color: var(--color-texto);
    font-size: 1rem;
    text-align: center;
    line-height: 1.6;
}

.btn-leer-mas {
    background: var(--color-oro);
    color: #121212;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 40px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    background: #e6b800;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* ============ META DE POST ============ */
.post-meta {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    color: var(--color-oro);
    border: 2px solid var(--color-oro);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.calendar-icon {
    width: 50px;
    height: 50px;
    margin: 15px auto 10px;
    background: var(--color-gris-oscuro);
    color: var(--color-oro);
    border: 2px solid var(--color-oro);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-author,
.post-date {
    color: var(--color-oro);
    font-size: 0.85rem;
    display: block;
    line-height: 1.4;
}

/* ============ CONTENIDO DE LA TARJETA ============ */
.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.post-content h2 {
    font-family: var(--fuente-titulo);
    color: white;
    font-size: 1.3rem;
    text-align: center;
    margin: 0;
}

.post-excerpt {
    color: var(--color-texto);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    max-width: 90%;
}

.btn-leer-mas {
    margin-top: auto;
    background: transparent;
    color: var(--color-oro);
    border: 1px solid var(--color-oro);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* ============ PAGINACIÓN ============ */
.paginacion {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 20px 0;
}

.paginacion a {
    color: var(--color-oro);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid var(--color-oro);
    border-radius: 4px;
    transition: all 0.3s;
}

.paginacion a:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* ============ ESTILOS PARA POST INDIVIDUAL ============ */
.single-post {
    max-width: 900px;
    margin: 2rem auto;
    background: var(--color-gris-oscuro);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.post-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.post-header h1 {
    color: var(--color-blanco);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: var(--fuente-titulo);
}

.post-meta {
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.9rem;
}

.post-content {
    padding: 2rem;
    line-height: 1.8;
}

.post-content h2, 
.post-content h3 {
    color: var(--color-oro);
    margin: 1.5rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.post-content ul, 
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ===================== COMENTARIOS ===================== */
.comentarios,
.formulario-comentario {
    margin-top: 40px;
    padding: 20px;
    background-color: #121212;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: var(--color-blanco);
}

.comentarios h3,
.formulario-comentario h3 {
    text-align: center;
    color: var(--color-oro);
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.formulario-comentario h3 {
    color:var(--color-blanco);
}

.comentario {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #1a1a1a;
    border-left: 3px solid var(--color-oro);
    border-radius: 6px;
}

.comentario strong {
    color: var(--color-oro);
    display: block;
    margin-bottom: 5px;
}

.comentario em {
    font-size: 0.9em;
    color: #888;
    display: block;
    margin-bottom: 10px;
}

.comentario p {
    margin: 0;
    color: #ddd;
}

/* Estilos del formulario */
.formulario-comentario form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.formulario-comentario label {
    font-weight: bold;
    color: var(--color-oro);
}

.formulario-comentario input,
.formulario-comentario textarea {
    padding: 10px;
    background-color: #0f0f0f;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    width: 100%;
}

.formulario-comentario textarea {
    resize: vertical;
    min-height: 100px;
}

.formulario-comentario button {
    align-self: flex-start;
    padding: 10px 20px;
    background-color: var(--color-oro);
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.formulario-comentario button:hover {
    background-color: #e6c200;
}

/* Mensajes */
.mensaje-exito,
.mensaje-error {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
    font-weight: bold;
}

.mensaje-exito {
    background-color: #2e7d32;
    color: #fff;
}

.mensaje-error {
    background-color: #c62828;
    color: #fff;
}
/* ============ PIE DE PÁGINA ============ */
footer {
    background: #121212;
    color: var(--color-texto);
    text-align: center;
    padding: 1.5rem;
    margin-top: 40px;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-oro);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* ============ ESTILOS DEL BUSCADOR ============ */
.search-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.search-container input[type="text"] {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid var(--color-oro);
    border-radius: 25px 0 0 25px;
    outline: none;
    background-color: #1a1a1a;
    color: var(--color-texto);
    width: 300px;
}

.search-container button {
    padding: 10px 20px;
    background-color: var(--color-oro);
    border: none;
    border-radius: 0 25px 25px 0;
    color: #121212;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background-color: #e6b800;
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

.post-card {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}
.single-post .post-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 0.3s;
}
.btn-leer-mas i,
.formulario-comentario button i,
.formulario-buscar button i {
    margin-right: 8px;
}
/* Animación de entrada para post */
.animate {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

.animate:nth-child(1) { animation-delay: 0.2s; }
.animate:nth-child(2) { animation-delay: 0.4s; }
.animate:nth-child(3) { animation-delay: 0.6s; }

.post-hero-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) blur(2px);
    transition: filter 0.4s ease;
}
