/*
Theme Name: Megacloud
Description: Tema del blog de Megacloud con el mismo diseño del sitio principal (www.megacloud.cl). Usa los estilos de /css/site.css.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: megacloud
*/

/* Only blog-specific styles; header, footer, buttons and colors come from /css/site.css. */

.blog-head { padding-block: 56px; background: var(--tint); border-bottom: 1px solid var(--line); }
.blog-head h1 { font-size: clamp(30px, 4.5vw, 46px); }
.blog-head .lead { color: var(--ink-soft); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.post-card a { text-decoration: none; }
.post-card-img { display: block; aspect-ratio: 16 / 9; background: var(--tint); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.post-meta { color: var(--ink-soft); font-size: 13px; }
.post-meta a { color: var(--brand-dark); font-weight: 600; }
.post-card h2 { margin-top: 8px; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.post-card h2 a:hover { color: var(--brand-dark); }
.post-card p { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }
.read-more { margin-top: auto; padding-top: 14px; color: var(--brand-dark); font-weight: 600; font-size: 15px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--night); border-color: var(--night); color: var(--white); }

/* Single post */
.article { max-width: 760px; margin-inline: auto; }
.article-head { padding-block: 48px 28px; }
.article-head h1 { font-size: clamp(30px, 4.5vw, 44px); overflow-wrap: anywhere; }
.article-head .post-meta { margin-top: 14px; font-size: 14px; }
.article-cover { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.article-cover img { width: 100%; height: auto; }
.prose { font-size: 18px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 28px; line-height: 1.25; }
.prose h3 { margin-top: 1.5em; font-size: 22px; line-height: 1.3; }
.prose a { color: var(--brand-dark); }
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; border-radius: 8px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand); color: var(--ink-soft); }
.prose pre { overflow-x: auto; padding: 16px; background: var(--tint); border-radius: 8px; font-size: 15px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); }
.prose figure { margin: 1.5em 0; }
.prose figcaption { margin-top: 6px; color: var(--ink-soft); font-size: 14px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.article-tags a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; text-decoration: none; }
.article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-nav a { display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow-wrap: anywhere; }
.article-nav a:hover { border-color: var(--brand); }
.article-nav span { display: block; color: var(--ink-soft); font-size: 13px; }
.article-nav .next { text-align: right; }

.blog-cta { margin-top: 56px; padding: 28px; background: var(--night); border-radius: var(--radius); color: var(--white); }
.blog-cta h2 { font-size: 22px; }
.blog-cta p { margin-top: 6px; color: #c6cbd4; }
.blog-cta .actions { margin-top: 18px; }

.wp-block-image img, .wp-post-image { height: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 1000px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .post-grid, .article-nav { grid-template-columns: minmax(0, 1fr); }
    .article-nav .next { text-align: left; }
    .prose { font-size: 17px; }
    .blog-head { padding-block: 40px; }
}
