/*
Theme Name: DataCare Insights
Theme URI: https://dcareug.com
Author: Data Care Uganda
Author URI: https://dcareug.com
Description: Custom WordPress theme for the DataCare Insights blog, served from /blog/ alongside the main ASP.NET Core website. Matches DataCare branding (dark blue #162063 / #1E156A, green #79BF41, Mulish & Livvic fonts).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: datacare-insights
*/

/* ============ Base ============ */
:root {
    --dc-blue: #162063;
    --dc-blue-dark: #1e156a;
    --dc-green: #79BF41;
    --dc-text: #828187;
    --dc-light-blue: #dce6ef;
    --dc-border: #e6e6e6;
}

* { box-sizing: border-box; }

body {
    font-family: "Mulish", sans-serif;
    color: var(--dc-text);
    font-size: 16px;
    line-height: 26px;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Livvic", sans-serif;
    color: #000;
    margin: 0 0 15px;
}

a { color: var(--dc-blue-dark); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--dc-green); }

img { max-width: 100%; height: auto; }

.dc-container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }

.dc-btn {
    display: inline-block;
    background: var(--dc-blue-dark);
    color: #fff;
    border: 2px solid #fff;
    padding: .6em 1.6em .4em;
    font-weight: 700;
    transition: background .3s ease, color .3s ease;
}
.dc-btn:hover { background: var(--dc-green); color: #fff; }

/* ============ Header ============ */
.dc-header {
    background: #fff;
    border-bottom: 1px solid var(--dc-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.dc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    max-width: 1140px;
    margin: 0 auto;
}
.dc-header-logo img { height: 60px; width: auto; }

.dc-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.dc-nav a { color: var(--dc-blue-dark); font-weight: 600; }
.dc-nav a:hover, .dc-nav li.current-menu-item > a { color: var(--dc-green); }
.dc-nav a[aria-current="page"] { display:inline-block; padding:8px 11px; border-radius:7px; background:#267007; color:#fff; }
.dc-nav a[aria-current="page"]:hover { background:#1f6107; color:#fff; }
.dc-nav a:focus-visible { outline:3px solid #79bf41; outline-offset:3px; }

/* pure-CSS mobile menu */
.dc-nav-toggle { display: none; }
.dc-nav-burger { display: none; cursor: pointer; font-size: 26px; color: var(--dc-blue-dark); }
@media (max-width: 900px) {
    .dc-nav-burger { display: block; }
    .dc-nav { display: none; width: 100%; }
    .dc-nav ul { flex-direction: column; gap: 12px; padding: 15px 0; }
    .dc-nav-toggle:checked ~ .dc-nav { display: block; }
    .dc-header-inner { flex-wrap: wrap; }
}

/* ============ Hero strip ============ */
.dc-hero-strip {
    background: var(--dc-blue-dark);
    color: #fff;
    padding: 70px 0;
    text-align: center;
}
.dc-hero-strip h1 { color: #fff; font-size: 45px; margin: 0; }
.dc-hero-strip p { color: rgba(255,255,255,.8); margin: 10px 0 0; }

/* ============ Insights hero ============ */
.dc-insights-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 430px;
    padding: 34px 0;
    text-align: left;
    background:
        radial-gradient(ellipse at 82% 56%, rgba(26, 116, 137, .42), transparent 36%),
        linear-gradient(112deg, #111b49 0%, #182d60 54%, #104d5d 100%);
}
.dc-insights-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}
.dc-insights-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    align-items: center;
    gap: clamp(20px, 5vw, 72px);
    min-height: 360px;
}
.dc-insights-hero-copy { position: relative; z-index: 2; max-width: 600px; padding: 30px 0; }
.dc-insights-eyebrow { display: inline-block; margin-bottom: 17px; color: #a8e954; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.dc-insights-hero h1 { max-width: 650px; color: #fff; font-size: clamp(42px, 5.3vw, 68px); line-height: 1.04; letter-spacing: -.035em; }
.dc-insights-hero-copy > p { max-width: 540px; margin: 18px 0 0; color: rgba(245,249,255,.82); font-size: clamp(16px, 1.45vw, 19px); line-height: 1.7; }
.dc-insights-hero-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; color: #fff; font-size: 15px; font-weight: 700; }
.dc-insights-hero-link span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; color: #b7f34b; transition: transform .25s ease, background .25s ease; }
.dc-insights-hero-link:hover { color: #b7f34b; }
.dc-insights-hero-link:hover span { transform: translateY(3px); background: rgba(255,255,255,.1); }
.dc-insights-hero-art { position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: center; }
.dc-insights-orb-fallback { position: absolute; inset: 8%; border: 1px solid rgba(186,222,245,.22); border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(183,243,75,.1), transparent 30%), radial-gradient(circle at 50% 50%, rgba(117,190,230,.08), transparent 68%); box-shadow: inset 0 0 54px rgba(133,202,241,.08), 0 0 80px rgba(99,190,203,.1); }
.dc-insights-orb-fallback::before, .dc-insights-orb-fallback::after { position: absolute; inset: 13%; border: 1px solid rgba(183,243,75,.18); border-radius: 50%; content: ""; transform: rotate(-28deg) scaleX(.48); }
.dc-insights-orb-fallback::after { transform: rotate(48deg) scaleX(.48); border-color: rgba(160,215,242,.24); }
.dc-insights-hero-art canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.dc-insights-orb-label { position: absolute; top: 50%; left: 50%; display: grid; gap: 7px; min-width: 126px; min-height: 126px; place-content: center; border: 1px solid rgba(205,228,246,.48); border-radius: 50%; background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.13), rgba(15,31,67,.86) 72%); box-shadow: 0 0 34px rgba(161,218,247,.12), inset 0 0 24px rgba(255,255,255,.05); text-align: center; transform: translate(-50%, -50%); }
.dc-insights-orb-label span { color: #b7f34b; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.dc-insights-orb-label strong { max-width: 98px; color: #f5f9ff; font-size: 12px; line-height: 1.3; }
@media (max-width: 760px) {
    .dc-insights-hero { min-height: 0; padding: 30px 0 26px; }
    .dc-insights-hero-inner { grid-template-columns: 1fr; gap: 4px; min-height: 0; }
    .dc-insights-hero-copy { padding: 28px 0 0; }
    .dc-insights-hero h1 { font-size: clamp(38px, 10vw, 54px); }
    .dc-insights-hero-art { width: min(84vw, 340px); margin: -4px auto -14px; }
}
@media (prefers-reduced-motion: reduce) {
    .dc-insights-hero-link span { transition: none; }
}


/* ============ Blog grid ============ */
.dc-main { padding: 60px 0; }
.dc-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.dc-posts-grid-single {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}
@media (max-width: 991px) { .dc-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .dc-posts-grid { grid-template-columns: 1fr; } }

.dc-card {
    background: #fff;
    border: 1px solid var(--dc-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}
.dc-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.dc-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--dc-light-blue); }
.dc-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dc-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.dc-card-meta { font-size: 13px; color: var(--dc-green); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.dc-card-title { font-size: 22px; line-height: 1.3; margin-bottom: 10px; }
.dc-card-title a { color: #000; }
.dc-card-title a:hover { color: var(--dc-green); }
.dc-card-excerpt { flex: 1; }
.dc-readmore { font-weight: 700; color: var(--dc-blue-dark); margin-top: 12px; }
.dc-readmore:hover { color: var(--dc-green); }

/* ============ Single post ============ */
.dc-single { max-width: 800px; margin: 0 auto; }
.dc-single .dc-card-meta { font-size: 14px; }
.dc-single-thumb { margin: 25px 0; border-radius: 8px; overflow: hidden; }
.dc-single-content { font-size: 17px; line-height: 1.8; }
.dc-single-content h2, .dc-single-content h3 { margin-top: 30px; }
.dc-single-content img, .dc-single-content video { max-width: 100%; height: auto; }
.dc-single-content figure.media { margin: 28px 0; }
.dc-single-content figure.media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.dc-single-content video { display: block; margin: 24px 0; }
.dc-post-nav { display: flex; justify-content: space-between; gap: 20px; margin: 50px 0; flex-wrap: wrap; }

/* ============ Sidebar ============ */
.dc-with-sidebar { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; }
@media (max-width: 900px) { .dc-with-sidebar { grid-template-columns: 1fr; } }
.dc-sidebar .widget { background: #f9f9f9; border-radius: 8px; padding: 22px; margin-bottom: 25px; }
.dc-sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.dc-sidebar .widget li { padding: 6px 0; border-bottom: 1px solid var(--dc-border); }
.dc-sidebar .widget li:last-child { border-bottom: 0; }
.dc-sidebar .widgettitle { font-size: 20px; margin-bottom: 15px; }

/* ============ Pagination ============ */
.dc-pagination { margin-top: 45px; text-align: center; }
.dc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--dc-border);
    border-radius: 4px;
    color: var(--dc-blue-dark);
    font-weight: 600;
}
.dc-pagination .page-numbers.current,
.dc-pagination .page-numbers:hover { background: var(--dc-blue-dark); color: #fff; border-color: var(--dc-blue-dark); }

/* ============ Footer ============ */
.dc-footer { background: var(--dc-light-blue); padding: 60px 0 30px; margin-top: 40px; }
.dc-footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 900px) { .dc-footer-grid { grid-template-columns: 1fr; } }
.dc-footer h3 { color: var(--dc-blue); font-size: 20px; }
.dc-footer ul { list-style: none; margin: 0; padding: 0; }
.dc-footer li { margin-bottom: 8px; }
.dc-footer a { color: var(--dc-blue); }
.dc-footer a:hover { color: var(--dc-green); }
.dc-footer-logo img { height: 50px; width: auto; margin-bottom: 15px; }
.dc-footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(22,32,99,.15); font-size: 14px; }

/* ============ Misc / WP core classes ============ */
.dc-search-form { display: flex; gap: 8px; }
.dc-search-form input[type="search"] { flex: 1; padding: 8px 12px; border: 1px solid var(--dc-border); border-radius: 4px; }
.alignnone { margin: 15px 0; }
.aligncenter { display: block; margin: 15px auto; }
.alignright { float: right; margin: 15px 0 15px 15px; }
.alignleft { float: left; margin: 15px 15px 15px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; font-style: italic; text-align: center; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.sticky .dc-card-body { border-top: 3px solid var(--dc-green); }
.bypostauthor { font-weight: 600; }
.dc-comments { margin-top: 36px; }
.dc-comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.dc-comment { border-bottom: 1px solid var(--dc-border); padding: 18px 0; }
.dc-comment-meta { color: #666; font-size: 14px; }
.dc-comment-form input, .dc-comment-form textarea { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid var(--dc-border); border-radius: 4px; font: inherit; }
.dc-comment-form label { display: block; margin-bottom: 6px; font-weight: 700; }
.dc-comment-note, .dc-comment-notice { color: #666; font-size: 14px; }
.dc-comment-error { color: #a52834; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
