/* ==========================================================
   Site Theme — Auto-generated from database settings.
   Do not edit this file directly; use the admin theme editor.
   ========================================================== */

:root {
    /* Colors */
    --theme-primary: #3b82f6;
    --theme-secondary: #6b7280;
    --theme-accent: #f59e0b;
    --theme-bg: #ffffff;
    --theme-text: #000000;
    --theme-link: #000000;

    /* Typography */
    --theme-heading-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    --theme-body-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    --theme-base-font-size: 1.100rem;
    --theme-line-height: 1.600;

    /* Heading sizes (computed from base × scale ratio) */
    --theme-h1-size: 3.357rem;
    --theme-h2-size: 2.686rem;
    --theme-h3-size: 2.148rem;
    --theme-h4-size: 1.719rem;
    --theme-h5-size: 1.375rem;
    --theme-h6-size: 1.100rem;

    /* Layout */
    --theme-content-max-width: 800px;
    --theme-site-margin: 1rem;
    --theme-block-gap: 2rem;

    /* Buttons */
    --theme-btn-radius: 0.375rem;
    --theme-btn-padding-x: 1.5rem;
    --theme-btn-padding-y: 0.5rem;

    /* Header */
    --theme-header-bg: #eeeeee;
    --theme-header-link: #ffffff;

    /* Footer */
    --theme-footer-bg: #ffffff;
    --theme-footer-text: #8a8a8a;

    /* Bootstrap variable overrides — these make Bootstrap's own
       utility classes (bg-dark, text-muted, btn-primary, etc.)
       pick up the theme colors automatically. */
    --bs-primary: #3b82f6;
    --bs-secondary: #6b7280;
    --bs-body-bg: #ffffff;
    --bs-body-color: #000000;
    --bs-link-color: #000000;
    --bs-link-hover-color: #000000;
    --bs-body-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    --bs-body-font-size: 1.100rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.600;
}

/* ---- Base Typography ---- */

body {
    font-family: var(--theme-body-font);
    font-size: var(--theme-base-font-size);
    font-weight: 400;
    line-height: var(--theme-line-height);
    color: var(--theme-text);
    background-color: var(--theme-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--theme-heading-font);
    color: var(--theme-text);
    margin-bottom: 0.5em;
}

h1 { font-size: var(--theme-h1-size); }
h2 { font-size: var(--theme-h2-size); }
h3 { font-size: var(--theme-h3-size); }
h4 { font-size: var(--theme-h4-size); }
h5 { font-size: var(--theme-h5-size); }
h6 { font-size: var(--theme-h6-size); }

/* ---- Links ---- */

a {
    color: var(--theme-link);
}

a:hover {
    color: var(--theme-link);
    opacity: 0.8;
}

/* ---- Layout ---- */

.container {
    max-width: var(--theme-content-max-width);
    padding-left: var(--theme-site-margin);
    padding-right: var(--theme-site-margin);
}

.container.my-4 {
    margin-top: var(--theme-block-gap) !important;
    margin-bottom: var(--theme-block-gap) !important;
}

/* ---- Buttons ---- */

.btn-primary {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    border-radius: var(--theme-btn-radius);
    padding: var(--theme-btn-padding-y) var(--theme-btn-padding-x);
}

.btn-primary:hover {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--theme-secondary);
    border-color: var(--theme-secondary);
    border-radius: var(--theme-btn-radius);
    padding: var(--theme-btn-padding-y) var(--theme-btn-padding-x);
}

.btn-outline-primary {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
    border-radius: var(--theme-btn-radius);
    padding: var(--theme-btn-padding-y) var(--theme-btn-padding-x);
}

.btn-outline-primary:hover {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}

/* ---- Header / Navbar ---- */

.navbar {
    background-color: var(--theme-header-bg) !important;

}

.navbar-brand,
.navbar .nav-link {
    color: var(--theme-header-link) !important;
}

.navbar .nav-link:hover {
    color: var(--theme-header-link) !important;
    opacity: 0.8;
}

/* Centered nav layout — only on desktop so it doesn't
   interfere with the mobile collapse/hamburger behavior */
@media (min-width: 992px) {
    .navbar .container {
        flex-direction: column;
        align-items: center;
    }

    .navbar-brand {
        margin-bottom: 0.5rem;
    }
}

/* ---- Footer ---- */

footer {
    background-color: var(--theme-footer-bg) !important;
    color: var(--theme-footer-text);
}

footer .text-muted {
    color: var(--theme-footer-text) !important;
}

/* ---- Header Background Image ---- */

.navbar {
    background-image: url('https://img-archive.nyc3.digitaloceanspaces.com/kenlaws/new-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 200px;
}

/* ---- Content ---- */

.post-content img, .page-content img {
    max-width: 100%;
    height: auto;
}

.post-content, .page-content {
    line-height: var(--theme-line-height);
}

/* ---- Responsive Video Embeds ---- */

/* Wrapper produced by TinyMCE's media plugin for embedded videos.
   Uses intrinsic aspect-ratio so the iframe scales responsively. */
.post-content iframe,
.page-content iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 1em auto;
}

/* ---- Responsive Overrides ---- */

/* Tablet: slightly reduce large headings for medium screens */
@media (min-width: 768px) and (max-width: 991.98px) {
    :root {
        --theme-h1-size: 3.021rem;
        --theme-h2-size: 2.417rem;
    }
}

/* Phone: scale down headings, tighten spacing for small screens */
@media (max-width: 767.98px) {
    :root {
        --theme-h1-size: 2.518rem;
        --theme-h2-size: 2.148rem;
        --theme-h3-size: 1.826rem;
        --theme-h4-size: 1.547rem;
        --theme-site-margin: 0.75rem;
        --theme-block-gap: 1.5rem;
    }

    /* Prevent long words/URLs from overflowing content area */
    .post-content, .page-content {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}

/* ---- Custom CSS ---- */

/* Klog custom styles */

blockquote {
    background: #f9f9f9;
    border-left: 10px solid #ccc;
    margin: 1.5em 10px;
    padding: 1em 10px 0.1em 10px;
}

figure {
    margin: 1em 0 1.5em 0;
    width: 100%;
    text-align: center;
}

figcaption {
    font-size: 88%;
    padding: 0.2em 4em 0 4em;
    color: gray;
    text-align: center;
    line-height: 1em;
}

.navbar-brand {
    font-size: 2.5em !important;
    font-weight: bold;
    text-shadow: 1px 1px 0 black;
}

.post-content img, .page-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

article ul {
    margin-bottom: 10px;
}

/* Blog card grid */
.blog-card {
    background-color: #eee;
    border-radius: 20px;
    padding-bottom: 3rem !important;
}

.blog-card-thumb {
    max-width: 100px;
    max-height: 100px;
    float: right;
    margin-left: 8px;
    margin-bottom: 8px;
    object-fit: cover;
}

.blog-card-category {
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.blog-card-date {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.8em;
}

@media (prefers-color-scheme: dark) {
    .blog-card {
        background-color: #333;
    }
}