:root {
    --cm-primary: #207daf;
    --cm-primary-hover: #18648c;
    --cm-gray: #888888;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
    color: #3f3f46;
    font-size: 16px;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    line-height: 1.8;
    background: #fff;
    min-height: 100vh;
}
#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--cm-primary); text-decoration: none; }
a:hover { color: var(--cm-primary-hover); }
img { max-width: 100%; height: auto; border: 0; }

.cm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

.cm-chrome {
    position: sticky;
    top: 0;
    z-index: 40;
}
.cm-main-header {
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.cm-header-main-row { padding: 12px 0; }
.cm-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
}
.cm-brand:hover { color: inherit; }
.cm-site-branding img,
.cm-brand img {
    height: 64px;
    width: auto;
    display: block;
    border-radius: 50%;
}
.cm-brand-text { min-width: 0; }
.cm-site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.cm-site-title a,
.cm-brand .cm-site-title { color: var(--cm-primary); }
.cm-site-description {
    margin: 2px 0 0;
    color: var(--cm-gray);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: var(--cm-primary);
    color: #fff;
    font-size: 22px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.cm-nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.cm-primary-nav { background: var(--cm-primary); }
.cm-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}
.cm-primary-menu a {
    display: block;
    color: #fff;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.cm-primary-menu a:hover,
.cm-primary-menu a.is-active {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
}

.cm-content { padding: 24px 0 48px; flex: 1; }

.cm-archivo {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
}

.cm-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .cm-posts { grid-template-columns: 1fr 1fr; }
}
.cm-posts .post.destacado { grid-column: 1 / -1; }

.post {
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.cm-featured-image {
    display: block;
    position: relative;
    background: #e4e4e7;
    aspect-ratio: 800 / 445;
    overflow: hidden;
}
.cm-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cm-featured-image.es-vacio {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--cm-primary), #0c2941);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.cm-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    display: inline-block;
    padding: 4px 8px;
    background: var(--cm-primary);
    color: #fff !important;
    font-size: 10px;
    text-transform: uppercase;
    border-radius: 2px;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.cm-post-content { padding: 14px 16px 18px; }
.cm-post-categories { margin-bottom: 8px; }
.cm-post-categories a {
    display: inline-block;
    padding: 4px 8px;
    background: var(--cm-primary);
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    border-radius: 2px;
    line-height: 1.8;
    letter-spacing: 0.04em;
    font-weight: 700;
}
.cm-post-categories a:hover { color: #fff; opacity: 0.9; }
.cm-entry-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.post.destacado .cm-entry-title { font-size: 28px; }
.cm-entry-title a { color: inherit; }
.cm-entry-title a:hover { color: var(--cm-primary); }
.cm-below-entry-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--cm-gray);
    font-size: 13px;
    margin-bottom: 8px;
}
.cm-below-entry-meta svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    vertical-align: -2px;
    margin-right: 4px;
}
.cm-entry-summary { margin: 0; color: #52525b; font-size: 15px; }
.cm-vacio { color: var(--cm-gray); }

.cm-layout-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 960px) {
    .cm-layout-single { grid-template-columns: minmax(0, 1fr) 300px; }
}
.cm-pieza .cm-entry-title { font-size: 32px; margin-bottom: 10px; }
.cm-pieza .cm-featured-image { margin-bottom: 16px; border-radius: 6px; }
.cm-cuerpo { font-size: 17px; }
.cm-cuerpo p { margin: 0 0 16px; }
.cm-cuerpo a { text-decoration: underline; }
.cm-cuerpo .fuente { color: var(--cm-gray); font-size: 14px; }
.cm-cuerpo .fuente a { text-decoration: none; font-weight: 600; }
.cm-secondary .cm-widget-title {
    margin: 0 0 12px;
    font-size: 16px;
    border-bottom: 2px solid var(--cm-primary);
}
.cm-secondary .cm-widget-title span {
    display: inline-block;
    padding: 6px 12px;
    color: #fff;
    background: var(--cm-primary);
    font-weight: 700;
}
.cm-mini { list-style: none; margin: 0; padding: 0; }
.cm-mini li { border-bottom: 1px solid #e4e4e7; padding: 10px 0; }
.cm-mini a { color: inherit; font-weight: 600; font-size: 14px; line-height: 1.4; }
.cm-mini a:hover { color: var(--cm-primary); }

.cm-footer {
    background: #f4f4f5;
    color: var(--cm-gray);
    font-size: 14px;
    padding: 18px 0;
}
.cm-footer a { color: inherit; }

body.dark-skin { background: #151515; color: #cccccc; }
body.dark-skin .cm-main-header,
body.dark-skin .cm-chrome,
body.dark-skin #page { background: #0d0d0d; }
body.dark-skin .cm-main-header { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
body.dark-skin .cm-site-title a,
body.dark-skin .cm-brand .cm-site-title { color: #fff; }
body.dark-skin .cm-site-description { color: #9aa0a6; }
body.dark-skin h1, body.dark-skin h2, body.dark-skin h3 { color: #fff; }
body.dark-skin .cm-content { background: #0d0d0d; }
body.dark-skin .post {
    background: #151515;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
body.dark-skin .post:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); }
body.dark-skin .cm-entry-title a { color: #fff; }
body.dark-skin .cm-entry-title a:hover { color: #9bc8da; }
body.dark-skin .cm-entry-summary { color: #c5c5c5; }
body.dark-skin .cm-footer { background: #111; color: #888; }
body.dark-skin .cm-mini li { border-color: #2a2a2a; }
body.dark-skin .cm-mini a { color: #fff; }
body.dark-skin .cm-cuerpo { color: #d4d4d4; }

@media (max-width: 900px) {
    .cm-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .cm-primary-nav { display: none; }
    .cm-nav-toggle:checked + .cm-primary-nav { display: block; }
    .cm-primary-menu {
        flex-direction: column;
        flex-wrap: wrap;
        overflow: visible;
    }
    .cm-primary-menu a { padding: 12px 16px; font-size: 15px; }
    .cm-site-title { font-size: 20px; }
    .cm-site-branding img,
    .cm-brand img { height: 48px; }
    .cm-site-description { display: none; }
    .post.destacado .cm-entry-title,
    .cm-pieza .cm-entry-title { font-size: 22px; }
    .cm-cuerpo { font-size: 16px; }
}
