
       /* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    color: #2c2c2c;
    line-height: 1.6;
}

/* ===== Header ===== */
header {
    background: #b22222;
    color: #fff;
    padding: 10px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
}

header p {
    font-size: 1rem;
    margin-top: 5px;
}

/* ===== Layout ===== */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    justify-content: center;
}

section, aside {
    width: 100%;
    max-width: 800px;
}

/* ===== Artículos ===== */
article {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-left: 6px solid #b22222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0px 4px 10px rgba(178,34,34,0.1);
    transition: transform 0.2s ease;
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0px 6px 15px rgba(178,34,34,0.2);
}

article h2 {
    color: #b22222;
    margin-bottom: 8px;
}

article small {
    display: block;
    margin-bottom: 15px;
    color: #777;
}

article img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
    border: 2px solid #b22222;
    transition: transform 0.2s ease;
}

article img:hover {
    transform: scale(1.02);
}

article p {
    margin-bottom: 10px;
}

/* ===== Sidebar ===== */
aside {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.05);
    text-align: center; /* texto centrado */
}

aside h3 {
    color: #b22222;
    margin-bottom: 15px;
}

aside p {
    text-align: center; /* texto centrado */
    line-height: 1.6;
}

/* ===== Footer ===== */
footer {
    display: flex;
    justify-content: space-around;
    background: #b22222;
    color: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 3px;
}
footer a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.lightbox.active {
    display: flex;
}

/* ===== Responsivo: todo centrado y en columna ===== */
@media (max-width: 768px) {
    main {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
    }

    section, aside {
        width: 100%;
    }

    aside h3, aside p {
        text-align: center;
    }
}