/* ===========================
   BLOG — ESTILOS GENERALES
   =========================== */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #222;
}

/* Contenedor global */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ===========================
   HEADER
   =========================== */
.blog-header-bar {
    background: #222085;
    padding: 18px;
    color: #fff;
}

.blog-header-bar .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-header-bar h1 {
    margin: 0;
    font-size: 24px;
}

.blog-header-bar nav a {
    color: #fff;
    margin-left: 20px;
    text-decoration: none;
}
.blog-header-bar nav a:hover {
    text-decoration: underline;
}

/* ===========================
   SECCIÓN PRINCIPAL
   =========================== */
.blog-header {
    text-align: center;
    padding: 40px 20px;
}

.blog-header h1 {
    font-size: 36px;
    color: #222085;
}
.blog-header p {
    font-size: 18px;
    color: #333;
    margin-top: 10px;
}

/* ===========================
   GRID DE POSTS
   =========================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 25px;
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
}

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: transform .2s;
}
.card:hover {
    transform: translateY(-6px);
}

.card a {
    text-decoration: none;
    color: inherit;
}

.card-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card h2 {
    padding: 15px 15px 0;
    font-size: 22px;
    color: #222085;
}

.card p {
    padding: 0 15px;
    color: #555;
}

.card .meta {
    padding: 10px 15px 15px;
    color: #777;
    font-size: 14px;
}

/* ===========================
   PAGINACIÓN
   =========================== */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination a {
    padding: 10px 18px;
    background: #222085;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    margin: 0 8px;
}

.pagination span {
    font-weight: bold;
}

/* ===========================
   POST INDIVIDUAL
   =========================== */
.post-container {
    width: 90%;
    max-width: 850px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
}

.post-title {
    font-size: 32px;
    color: #222085;
    margin: 0;
}

.post-subtitle {
    font-size: 20px;
    color: #444;
    margin-top: 8px;
}

.post-meta {
    margin-top: 12px;
    color: #777;
}

/* Galería */
.post-gallery {
    margin: 25px 0;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.post-gallery img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.post-content {
    margin-top: 25px;
    line-height: 1.7;
    font-size: 17px;
}

/* Botón volver */
.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 18px;
    background: #222085;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}
.back-btn:hover {
    background: #1a1870;
}

/* ===========================
   FOOTER
   =========================== */
.blog-footer {
    background: #222085;
    color: #fff;
    padding: 30px;
    text-align: center;
    margin-top: 50px;
}

.blog-footer p {
    margin: 0;
    font-size: 15px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 28px;
    }

    .post-title {
        font-size: 26px;
    }
}
