/*
Theme Name: Dejora Technologies
Theme URI: https://dejoratechnologies.com/
Author: Dejora Technologies Limited
Author URI: https://dejoratechnologies.com/
Description: Insights theme for Dejora Technologies Limited. Matches the main Dejora website and shows articles, campaigns and e-books in one searchable library. Works with the Dejora Insights plugin. Designed for the WordPress block editor.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dejora
Tags: blog, custom-logo, featured-images, editor-style, wide-blocks
*/

/* Shared styles are in assets/css/site.css. This file holds WordPress-specific styles. */

.container.narrow { width: min(46rem, calc(100% - 44px)); }
@media (max-width: 760px) { .container.narrow { width: min(100% - 32px, 560px); } }

/* ---------- Topic chips, pagination, empty state ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.8rem; }
.chip { padding: 0.45rem 0.95rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 0.97rem; font-weight: 600; }
.chip:hover { border-color: var(--link); }
.chip.is-active { background: var(--btn); border-color: var(--btn); color: #fff; }
.post-meta { display: block; margin: 0.9rem 1.5rem 0; color: var(--muted); font-size: 0.89rem; }
.post-card .more { padding-top: 0.6rem; }
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pagination .page-numbers { padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 1.03rem; }
.pagination .page-numbers.current { background: var(--btn); border-color: var(--btn); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--link); }
.empty { padding: 2.5rem; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.empty h3 { margin-bottom: 0.4rem; }
.empty p { margin: 0; color: var(--muted); }

/* ---------- Article ---------- */
.article-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.crumbs { margin: 0 0 1rem; color: var(--muted); font-size: 0.97rem; font-weight: 600; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.article-head h1 { max-width: none; margin: 0 0 1rem; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.article-dek { color: var(--muted); font-size: 1.42rem; line-height: 1.6; margin: 0 0 1.2rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0; color: var(--muted); font-size: 1.0rem; }
.article-hero { margin-top: 2.2rem; }
.article-hero img { width: 100%; height: auto; border-radius: 18px; }
.article-foot { padding-block: 2rem 4rem; }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.article-tags a { padding: 0.3rem 0.7rem; border-radius: 6px; background: var(--accent-soft); color: var(--link); font-size: 0.91rem; font-weight: 600; }
.author-box { padding: 1.2rem 1.4rem; border-left: 4px solid var(--secondary); background: var(--surface-alt); border-radius: 0 var(--radius) var(--radius) 0; }
.author-box p { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.08rem; }

/* ---------- Article body (block editor content) ---------- */
.entry-content { font-size: 1.3rem; line-height: 1.75; padding-bottom: 1rem; }
.entry-content > * { margin-block: 0 1.4em; }
.entry-content h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin: 2em 0 0.6em; line-height: 1.15; }
.entry-content h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 1.8em 0 0.5em; }
.entry-content h4 { font-size: 1.48rem; margin: 1.6em 0 0.4em; }
.entry-content a { color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; padding-left: 0.2em; }
.entry-content li::marker { color: var(--secondary); }
.entry-content blockquote, .entry-content .wp-block-quote { margin-inline: 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 4px solid var(--secondary); font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.45; }
.entry-content blockquote p { margin: 0 0 0.5em; }
.entry-content cite, .entry-content .wp-block-quote cite { display: block; margin-top: 0.5rem; font-family: var(--font-body); font-size: 0.97rem; font-style: normal; color: var(--muted); }
.entry-content img { height: auto; border-radius: 12px; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: 0.6rem; color: var(--muted); font-size: 0.97rem; line-height: 1.5; text-align: left; }
.entry-content hr, .entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin-block: 2.5rem; }
.entry-content pre { padding: 1.1rem 1.3rem; overflow-x: auto; border-radius: 10px; background: #101e32; color: #e8eefa; font-size: 1.03rem; line-height: 1.6; }
.entry-content :not(pre) > code { padding: 0.1em 0.4em; border-radius: 5px; background: var(--accent-soft); font-size: 0.9em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1.08rem; }
.entry-content th, .entry-content td { padding: 0.7rem 0.9rem; border: 1px solid var(--border); text-align: left; }
.entry-content thead th { background: var(--surface-alt); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .wp-block-button__link { display: inline-block; padding: 0.8rem 1.3rem; border-radius: 9px; background: var(--btn); color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--btn-hover); color: #fff; }
.entry-content .wp-block-embed iframe, .entry-content iframe { max-width: 100%; }
.entry-content .wp-block-pullquote { padding: 1.5rem 0; border-block: 1px solid var(--border); text-align: center; }
.entry-content .alignleft { float: left; margin: 0.3rem 1.4rem 1rem 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: 0.3rem 0 1rem 1.4rem; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignwide { width: min(62rem, calc(100vw - 44px)); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content::after { content: ""; display: block; clear: both; }
.page-links { display: flex; gap: 0.6rem; margin-top: 2rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.post-card .post-thumb img { display: block; }
.section-intro .search-form, .page-hero .newsletter { margin-top: 1.5rem; }
.page-hero .newsletter input[type="search"] { flex: 1 1 14rem; padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 1.08rem; }

/* ---------- Insights library (links instead of buttons) ---------- */
a.lib-tab, a.lib-chip { display: inline-block; text-decoration: none; }
.lib-bar { display: block; margin-bottom: 1.4rem; }
.lib-media.no-img { padding-right: 1rem; }
.lib-media.no-img .lib-title { font-size: 1.4rem; }
.lib-single { list-style: none; margin: 0; padding: 0; }
.lib-slide { min-width: 0; }
.lib-grid { margin-top: 0; }

/* ---------- E-book page ---------- */
.ebook-layout { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; margin-top: 1rem; }
.ebook-cover img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0, 20, 60, .55); }
.ebook-cover-fallback { display: grid; align-content: end; gap: .8rem; aspect-ratio: 3 / 4; padding: 1.4rem; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #1f2937, #373737 55%, #0b4fb3); }
.ebook-cover-fallback svg { width: 2.4rem; height: 2.4rem; }
.ebook-cover-fallback strong { font-size: 1.6rem; font-weight: 500; line-height: 1.15; }
.ebook-get { margin-top: 1.6rem; }
.ebook-get .lib-form { max-width: 28rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }
.notice.is-error { border-color: #b3261e; }
@media (max-width: 760px) { .ebook-layout { grid-template-columns: 1fr; } .ebook-cover { max-width: 16rem; } }

/* ---------- Campaign page ---------- */
.campaign-dates { margin: 1rem 0 0; opacity: .85; }
.campaign .hero .photo-panel { width: min(100%, 24rem); }
.campaign .hero .photo-img { aspect-ratio: 4 / 3; max-height: none; }
.campaign .hero .photo-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
