/* ============================================================
   ontario-blog.css  —  Public blog styles
   ============================================================ */

:root {
    --blog-accent:    #2563eb;
    --blog-theme-red: #2563eb;
    --blog-text:      #111827;
    --blog-muted:     #6b7280;
    --blog-border:    #e5e7eb;
    --blog-radius:    12px;
    --blog-font:      'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Site header ─────────────────────────────────────────── */
.blog-site-header {
    border-bottom: 1px solid var(--blog-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.blog-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.blog-site-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--blog-text);
    text-decoration: none;
    letter-spacing: -0.4px;
    white-space: nowrap;
}
.blog-site-title:hover { color: var(--blog-accent); }

.blog-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.blog-nav-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--blog-muted);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.blog-nav-link:hover,
.blog-nav-link.active {
    color: var(--blog-text);
    background: #f3f4f6;
}

.blog-header-actions { margin-left: auto; }

.blog-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blog-muted);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--blog-border);
    border-radius: 6px;
    transition: all .15s;
}
.blog-admin-link:hover {
    color: var(--blog-accent);
    border-color: var(--blog-accent);
}

/* ── Wrap / layout ───────────────────────────────────────── */
.blog-wrap { background: #fafafa; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.blog-sidebar { padding-top: 4px; }

.blog-sidebar-card {
    background: #fff;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.featured-widget-transparent {
    background: transparent !important;
    border: none !important;
}

.blog-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--blog-muted);
    border-bottom: 1px solid var(--blog-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* featured sidebar post */
.blog-featured-list { display: flex; flex-direction: column; gap: 12px; }

.blog-featured-large {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 16/10;
}
.blog-featured-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.blog-featured-large:hover .blog-featured-large-img { transform: scale(1.03); }

.blog-featured-large-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
}
.blog-featured-large-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}
.blog-featured-large-meta {
    font-size: 11px;
    color: rgba(255,255,255,.7);
}

/* categories list */
.blog-categories-list { padding: 0; margin: 0; }
.blog-categories-list li { border-bottom: 1px solid var(--blog-border); }
.blog-categories-list li:last-child { border-bottom: none; }

.blog-sidebar-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--blog-text);
    text-decoration: none;
    transition: color .15s;
}
.blog-sidebar-cat-link:hover { color: var(--blog-accent); }

/* ── Post grid ───────────────────────────────────────────── */
.gt3_module_blog {}
.gt3_blog_items_wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.blog_post_preview { }
.item_wrapper { height: 100%; }

.blog_content {
    background: #fff;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.blog_content:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

/* post image area */
.blog_post_media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}
.blog_post_media > a { display: block; height: 100%; }
.blog_post_media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.blog_content:hover .blog_post_media img { transform: scale(1.04); }

/* reading time badge */
.gt3_post_time_reading {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    color: var(--blog-text);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

/* category badge */
.post_category {
    position: absolute;
    bottom: 10px;
    left: 10px;
}
.post_category a {
    display: inline-block;
    background: var(--blog-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
}

/* post text content */
.blog_content_wrap {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listing_meta { margin-bottom: 6px; }
.post_date {
    font-size: 11px;
    font-weight: 600;
    color: var(--blog-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.blogpost_title {
    font-family: var(--blog-font);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--blog-text);
}
.blogpost_title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.blogpost_title a:hover { color: var(--blog-accent); }

.excerpt {
    font-size: 13.5px;
    color: var(--blog-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.gt3_module_button_list { margin-top: auto; }
.gt3_module_button_list a {
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--blog-accent);
    text-decoration: none;
    letter-spacing: .02em;
    transition: gap .15s;
    gap: 4px;
}
.gt3_module_button_list a:hover { gap: 8px; }
.gt3_module_button_list a::after { content: '→'; }

/* ── Category description ─────────────────────────────────── */
.blog-category-description {
    font-size: 15px;
    color: var(--blog-muted);
    margin-bottom: 28px;
    max-width: 640px;
}

/* ── Single post ─────────────────────────────────────────── */
.blog-post-single {}
.blog-post-body {}
.blog-post-content {
    font-family: var(--blog-font);
    font-size: 17px;
    line-height: 1.75;
    color: var(--blog-text);
}
.blog-post-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: .75em;
    line-height: 1.25;
}
.blog-post-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: .6em;
}
.blog-post-content p { margin-bottom: 1.4em; }
.blog-post-content ul,
.blog-post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}
.blog-post-content li { margin-bottom: .5em; }
.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5em 0;
}
.blog-post-content figure { margin: 1.5em 0; }
.blog-post-content figure img { margin: 0; }
.blog-post-content a {
    color: var(--blog-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* share sidebar */
.post-share-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--blog-border);
    color: var(--blog-muted);
    text-decoration: none;
    transition: all .15s;
    margin: 0 auto;
}
.post-share-icons a:hover {
    color: var(--blog-accent);
    border-color: var(--blog-accent);
}

/* reading progress ring */
.reading-progress-container { position: relative; }
.reading-progress-ring { display: block; }
.ring-bg { }
.ring-progress {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset .15s linear;
}
.reading-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* single post hero */
.single-post-hero { margin-bottom: 0; }
.single-post-hero-text {}
.single-post-hero-img {}

/* ── Pagination ───────────────────────────────────────────── */
.pagination_wrapper .pagination {
    gap: 4px;
}
.pagination_wrapper .page-link {
    border-radius: 6px !important;
    border-color: var(--blog-border);
    color: var(--blog-text);
    font-size: 13px;
    padding: 6px 12px;
}
.pagination_wrapper .page-item.active .page-link {
    background: var(--blog-accent);
    border-color: var(--blog-accent);
}

/* ── Home page ────────────────────────────────────────────── */
.home-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(37,99,235,.25) 0%, transparent 70%);
}
.home-hero .container { position: relative; }
.home-hero-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.5);
    margin-bottom: 14px;
}
.home-hero-title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.home-hero-desc {
    font-size: 17px;
    color: rgba(255,255,255,.65);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 28px;
}
.home-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.home-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.home-hero-btn-primary {
    background: var(--blog-accent);
    color: #fff;
    border: 2px solid var(--blog-accent);
}
.home-hero-btn-primary:hover { filter: brightness(1.1); color: #fff; }
.home-hero-btn-secondary {
    background: transparent;
    color: rgba(255,255,255,.8);
    border: 2px solid rgba(255,255,255,.2);
}
.home-hero-btn-secondary:hover {
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

/* hero featured card */
.home-hero-card {
    display: block;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s;
}
.home-hero-card:hover { transform: translateY(-3px); }
.home-hero-card-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}
.home-hero-card-body { padding: 20px; }
.home-hero-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.5);
    margin-bottom: 8px;
}
.home-hero-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 6px;
}
.home-hero-card-meta { font-size: 12px; color: rgba(255,255,255,.45); }

/* sections */
.home-section { padding: 60px 0; }
.home-section-alt { background: #f8fafc; }
.home-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
}
.home-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--blog-text);
    letter-spacing: -0.3px;
}
.home-section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--blog-accent);
    text-decoration: none;
}
.home-section-link:hover { text-decoration: underline; }

/* post cards (home) */
.home-post-card {
    background: #fff;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.home-post-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
.home-post-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.home-post-card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 28px;
}
.home-post-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.home-post-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--blog-accent);
    margin-bottom: 6px;
}
.home-post-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--blog-text);
    margin-bottom: 8px;
    flex: 1;
}
.home-post-card-excerpt {
    font-size: 12.5px;
    color: var(--blog-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-post-card-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: auto;
}

/* category grid */
.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.home-cat-card {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all .15s;
}
.home-cat-card:hover {
    border-color: var(--blog-accent);
    box-shadow: 0 4px 16px rgba(37,99,235,.08);
}
.home-cat-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 4px;
}
.home-cat-count {
    font-size: 12px;
    color: var(--blog-muted);
}
