/*
Theme Name: Impact Websites
Theme URI: https://impactwebsites.co.nz
Author: Impact Websites
Author URI: https://impactwebsites.co.nz
Description: Ultra-lightweight theme for Impact Websites builds. All content is managed via the Impact Websites Core plugin.
Version: 1.2.4
Tested up to: 6.8
License: GPL-2.0-or-later
Text Domain: impact-websites
*/

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { overflow-x: hidden; }

/* ----------------------------------------------------------------
   Single post — single.php (#iw-post). Editorial reading column:
   title + meta at the top, an optional featured lead image, then the
   body at a comfortable 720px measure. Fonts/colours come from the
   ClientDesk --iw-* picker variables (published site-wide via the
   global header). Pages are NOT affected — their layout comes from
   the ClientDesk body code.
------------------------------------------------------------------ */

#iw-post {
    font-family: var(--iw-font-body);
    line-height: 1.75;
}

/* Built-in default template — used only when no ClientDesk Post Template is set.
   Custom templates own all of their own spacing; the #iw-post wrapper adds none,
   so full-bleed banners sit flush under the header with no compensation needed. */
#iw-post .impact-websites-post {
    padding: clamp(2rem, 5vw, 3.5rem) 20px;
    font-size: 1.05rem;
}

#iw-post .entry-title {
    margin: 0;
    font-family: var(--iw-font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
}

#iw-post .entry-meta {
    margin: 0.9rem 0 0;
    font-size: 0.85rem;
    opacity: 0.65;
}

#iw-post .impact-websites-post-featured { margin: clamp(1.75rem, 4vw, 2.5rem) 0 0; }
#iw-post .impact-websites-post-featured img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

#iw-post .entry-content { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
#iw-post .entry-content > * { margin-top: 0; }
#iw-post .entry-content > * + * { margin-top: 1.25rem; }

#iw-post .entry-content h2,
#iw-post .entry-content h3 {
    font-family: var(--iw-font-heading);
    line-height: 1.2;
    margin-top: 2.25rem;
}
#iw-post .entry-content h2 { font-size: 1.7rem; }
#iw-post .entry-content h3 { font-size: 1.3rem; }

#iw-post .entry-content a { color: var(--iw-colour-link); }

#iw-post .entry-content img,
#iw-post .entry-content iframe,
#iw-post .entry-content video {
    max-width: 100%;
    height: auto;
}
#iw-post .entry-content img { display: block; border-radius: 8px; }

#iw-post .entry-content figure { margin: 2rem auto; }
#iw-post .entry-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.65;
    margin-top: 0.5rem;
}

#iw-post .entry-content blockquote {
    margin: 2rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--iw-colour-primary);
    font-size: 1.15rem;
    line-height: 1.5;
}

#iw-post .entry-content ul,
#iw-post .entry-content ol { padding-left: 1.4rem; }
#iw-post .entry-content li + li { margin-top: 0.4rem; }

#iw-post .entry-content hr {
    border: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    margin: 2.5rem 0;
}

/* Archive / category / tag listing — stays a centred, readable column */
#iw-archive {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 40px);
    line-height: 1.7;
}
#iw-archive a { color: var(--iw-colour-link, var(--iw-brand, currentColor)); }
#iw-archive .archive-header { margin-bottom: 32px; }
#iw-archive .post-list { list-style: none; margin: 0; padding: 0; }
#iw-archive .post-list__item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
#iw-archive .post-list__item:last-child { border-bottom: 0; padding-bottom: 0; }
#iw-archive .post-list__item a { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
#iw-archive .post-list__item time { display: block; font-size: 0.8rem; opacity: 0.6; margin: 4px 0 8px; }

/* ----------------------------------------------------------------
   Built-in 404 fallback (404.php). Only used when no ClientDesk 404
   page is configured; a configured page brings its own body code.
------------------------------------------------------------------ */
.impact-websites-404 {
    max-width: 720px;
    margin-inline: auto;
    padding: clamp(3rem, 10vw, 6rem) 1.25rem;
    text-align: center;
    font-family: var(--iw-font-body);
}
.impact-websites-404 h1 {
    margin: 0 0 1rem;
    font-family: var(--iw-font-heading);
    font-size: clamp(2rem, 6vw, 3.25rem);
    line-height: 1.1;
}
.impact-websites-404 p { margin: 0 0 1.25rem; font-size: 1.05rem; line-height: 1.6; }
.impact-websites-404-home { color: var(--iw-colour-link); font-weight: 600; }
