/*
Theme Name: Help4 Blank
Theme URI: https://help4wordpress.com/help4-blank/
Author: Help4 Network
Author URI: https://help4network.com/
Description: A clean, performance-first starter theme for Help4 Builder Suite and custom WordPress builds.
Version: 1.0.39
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: help4-blank
*/

:root {
    --h4-bg: #f8fafc;
    --h4-surface: #ffffff;
    --h4-surface-soft: #f1f5f9;
    --h4-text: #111827;
    --h4-muted: #4b5563;
    --h4-border: #d8dee8;
    --h4-accent: #2563eb;
    --h4-accent-contrast: #ffffff;
    --h4-accent-alt: #15803d;
    --h4-radius: 8px;
    --h4-content-max: 1120px;
    --h4-wide-max: 1440px;
    --h4-viewport-max: 100vw;
    --h4-space: clamp(1rem, 2vw, 1.5rem);
    --h4-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --h4-font-serif: Georgia, "Times New Roman", serif;
}

@supports (width: 100dvw) {
    :root {
        --h4-viewport-max: 100dvw;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    color: var(--h4-text);
    background: var(--h4-bg);
    font-family: var(--h4-font-sans);
    line-height: 1.65;
}

#page,
.site,
.site-content,
.wp-site-blocks,
.entry-content,
.site-main,
.content-panel {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--h4-accent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
    color: var(--h4-accent-alt);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    top: 1rem;
    left: 1rem;
    z-index: 100000;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    clip: auto;
    color: var(--h4-accent-contrast);
    background: var(--h4-accent);
    border-radius: var(--h4-radius);
}

.site-header,
.site-footer {
    background: var(--h4-surface);
    border-color: var(--h4-border);
}

.site-header {
    border-bottom: 1px solid var(--h4-border);
}

.site-footer {
    margin-top: clamp(2rem, 5vw, 4rem);
    border-top: 1px solid var(--h4-border);
}

.site-shell {
    width: min(100% - 2rem, var(--h4-content-max));
    margin-inline: auto;
    padding-block: 1rem;
    min-width: 0;
}

.brand-lockup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--h4-space);
}

.site-branding {
    min-width: 0;
}

.site-title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.2;
}

.site-title a {
    color: var(--h4-text);
    text-decoration: none;
}

.site-description {
    margin: 0.25rem 0 0;
    color: var(--h4-muted);
    font-size: 0.95rem;
}

.site-nav ul,
.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

.site-nav a,
.site-footer a {
    color: var(--h4-text);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--h4-accent);
}

.site-nav .sub-menu {
    display: block;
    margin-top: 0.35rem;
    padding-left: 1rem;
}

.site-main {
    width: min(100% - 2rem, var(--h4-content-max));
    margin-inline: auto;
    padding-block: clamp(1.5rem, 4vw, 3rem);
    min-width: 0;
}

body.h4bs-page-layout-full_width .site-main,
body.h4bs-page-layout-canvas .site-main {
    width: 100%;
    max-width: none;
    padding: 0;
}

body.h4bs-page-layout-canvas .site-header,
body.h4bs-page-layout-canvas .site-footer {
    display: none;
}

.content-panel {
    width: 100%;
    min-width: 0;
    padding: clamp(1rem, 3vw, 2rem);
    background: var(--h4-surface);
    border: 1px solid var(--h4-border);
    border-radius: var(--h4-radius);
}

body.h4bs-page-layout-full_width .content-panel,
body.h4bs-page-layout-canvas .content-panel {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.7em;
    color: var(--h4-text);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p,
ul,
ol,
figure,
blockquote,
table,
form {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

p,
li,
label,
input,
textarea,
select {
    color: var(--h4-muted);
}

blockquote {
    padding: 0.25rem 0 0.25rem 1rem;
    color: var(--h4-muted);
    border-left: 4px solid var(--h4-border);
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--h4-border);
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.8rem;
    color: var(--h4-text);
    background: var(--h4-surface);
    border: 1px solid var(--h4-border);
    border-radius: var(--h4-radius);
}

button,
.button,
.wp-block-button__link,
input[type="button"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 2.6rem;
    padding: 0.7rem 1rem;
    color: var(--h4-accent-contrast);
    background: var(--h4-accent);
    border: 1px solid var(--h4-accent);
    border-radius: var(--h4-radius);
    text-decoration: none;
    cursor: pointer;
}

button:hover,
button:focus-visible,
.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
input[type="button"]:hover,
input[type="button"]:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    color: var(--h4-accent-contrast);
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.alignwide {
    width: min(calc(var(--h4-viewport-max) - 2rem), var(--h4-wide-max));
    max-width: var(--h4-wide-max);
    margin-inline: calc(50% - min(calc(var(--h4-viewport-max) / 2 - 1rem), calc(var(--h4-wide-max) / 2)));
}

.alignfull {
    width: var(--h4-viewport-max);
    max-width: var(--h4-viewport-max);
    margin-inline: calc(50% - var(--h4-viewport-max) / 2);
}

.wp-caption,
.gallery-caption,
figcaption {
    color: var(--h4-muted);
    font-size: 0.9rem;
}

.post,
.page {
    max-width: 100%;
}

.entry-content > *,
.wp-block-group,
.wp-block-cover,
.wp-block-columns,
.wp-block-media-text,
.wp-block-table,
.wp-block-embed,
.wp-block-image,
.wp-block-video {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.entry-meta {
    color: var(--h4-muted);
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.nav-links a,
.nav-links span {
    padding: 0.5rem 0.75rem;
    background: var(--h4-surface);
    border: 1px solid var(--h4-border);
    border-radius: var(--h4-radius);
    text-decoration: none;
}

.site-footer .site-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 760px) {
    .brand-lockup,
    .site-footer .site-shell {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav ul,
    .site-footer ul {
        align-items: flex-start;
        flex-direction: column;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    .site-main,
    .site-shell {
        width: min(100% - 1rem, var(--h4-content-max));
    }

    .alignwide,
    .alignfull {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    [style*="width:100vw"],
    [style*="width: 100vw"],
    [style*="min-width:100vw"],
    [style*="min-width: 100vw"],
    [style*="max-width:100vw"],
    [style*="max-width: 100vw"] {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    table,
    pre {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    h1,
    h2,
    h3,
    .site-title,
    .site-description {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}
