/* RustWP Professional Theme
   Visual redesign for desktop, tablet and mobile.
   No dependency on external fonts or frameworks.
*/
:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #667085;
    --border: #e5eaf1;
    --primary: #1769aa;
    --primary-dark: #0f4f83;
    --accent: #16a085;
    --shadow: 0 8px 28px rgba(16, 24, 40, .07);
    --radius: 12px;
    --content-width: 1160px;
    --reading-width: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
button, input { font: inherit; }
.clear { clear: both; }

#content {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 24px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

#heading {
    min-height: 126px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}
.head-info { flex: 1 1 auto; min-width: 0; }
.site-logo a { display: inline-block; }
.logo-image {
    display: block;
    width: auto;
    max-width: min(420px, 100%);
    height: 88px;
    object-fit: contain;
    object-position: left center;
}

#header-search { flex: 0 1 360px; }
#header-search form { display: flex; gap: 8px; }
#header-search input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d6dde8;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    outline: none;
}
#header-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 105, 170, .12);
}
#header-search button {
    height: 44px;
    padding: 0 17px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
#header-search button:hover { background: var(--primary-dark); }

#navigation {
    background: #172b4d;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
#nav-list {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: stretch;
    list-style: none;
}
#nav-list li { position: relative; }
#nav-list li > a {
    min-height: 48px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #eef5ff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}
#nav-list li > a:hover,
#nav-list li.active > a { background: rgba(255,255,255,.10); color: #fff; }
.dropdown-content {
    display: none;
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    min-width: 210px;
    max-height: 65vh;
    overflow-y: auto;
    padding: 7px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,.14);
}
.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content { display: block; }
.dropdown-content a {
    display: block;
    padding: 9px 11px;
    color: var(--text);
    border-radius: 7px;
    line-height: 1.4;
}
.dropdown-content a:hover { background: #f1f6fb; color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; }

#left-content {
    float: left;
    width: calc(100% - 320px);
    padding: 30px 30px 42px;
}
#right-content {
    float: right;
    width: 320px;
    padding: 30px 26px 42px 0;
}

.welcome-box {
    margin: 0 0 22px;
    padding: 22px 24px;
    border-left: 5px solid var(--accent);
    border-radius: 10px;
    background: linear-gradient(135deg, #f1faf8, #f7fbff);
}
.welcome-title {
    margin: 0;
    color: #16324f;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.25;
}

.article-card {
    margin: 0 0 24px;
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 12px rgba(16,24,40,.035);
    overflow: hidden;
}
.article-card:last-child { margin-bottom: 0; }
.post-title {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--primary); }
.postmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin: 0 0 17px;
    color: var(--muted);
    font-size: .88rem;
}
.entry { max-width: var(--reading-width); }
.entry p { margin: 0 0 1.05em; }
.entry p:last-child { margin-bottom: 0; }
.entry h2, .entry h3, .entry h4 { color: #17324d; line-height: 1.4; }
.entry h2 { font-size: 1.45rem; margin-top: 1.7em; }
.entry h3 { font-size: 1.2rem; margin-top: 1.5em; }
.entry ul, .entry ol { padding-left: 1.5em; }
.entry blockquote {
    margin: 1.4em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--accent);
    background: var(--surface-soft);
    color: #475467;
}
.entry pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 15px 17px;
    border-radius: 9px;
    background: #111827;
    color: #e5e7eb;
    font-size: .9rem;
    line-height: 1.55;
}
.entry code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef2f6;
    font-size: .9em;
}
.entry pre code { padding: 0; background: transparent; }
.post-thumbnail { margin: 0 0 18px; }
.post-thumbnail img { display: block; width: 100%; max-height: 390px; object-fit: cover; border-radius: 9px; }

.read-more-wrap { margin-top: 18px; }
.read-more-btn {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid #cdd9e6;
    border-radius: 8px;
    background: #f7fafc;
    color: var(--primary);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}
.read-more-btn:hover { background: #eaf3fa; text-decoration: none; }
.postinfo {
    margin-top: 20px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    font-size: .88rem;
}
.postinfo a { font-weight: 600; }

.custom-pagination-wrap {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}
.custom-pagination-wrap a {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
}
.breadcrumb-trail {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: .88rem;
    overflow-wrap: anywhere;
}
.breadcrumb-trail .sep { padding: 0 6px; color: #98a2b3; }
.current-crumb { color: #667085; }

.widgets { display: flex; flex-direction: column; gap: 18px; }
.widget-content {
    padding: 19px 19px 17px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}
.widget-content h2 {
    margin: 0 0 11px;
    padding-bottom: 9px;
    border-bottom: 2px solid #dbe5ef;
    color: #172b4d;
    font-size: 1.05rem;
}
.widget-content ul { margin: 0; padding: 0; list-style: none; }
.widget-content li {
    padding: 8px 0;
    border-bottom: 1px solid #e8edf3;
    line-height: 1.5;
}
.widget-content li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget-content a { overflow-wrap: anywhere; }

#comments { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--border); }
.comments-title { margin: 0 0 17px; color: #172b4d; }
.commentlist { padding-left: 0; list-style: none; }
.commentlist li { margin: 0 0 15px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfe; }
#comments input[type="text"], #comments input[type="email"], #comments input[type="url"], #comments textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #fff;
}
#comments textarea { min-height: 130px; resize: vertical; }
#comments input:focus, #comments textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,105,170,.1); }

#footer {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 18px auto 30px;
    padding: 22px 16px;
    color: #667085;
    text-align: center;
    font-size: .9rem;
}
#footer strong { color: #344054; }
#footer a { margin: 0 7px; }


/* Accessibility and semantic reading improvements */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
#comments label { display: block; margin: 0 0 6px; font-weight: 600; color: #344054; }
#comments #comment-website {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.single-article { min-width: 0; }
.entry, .posts-content { overflow-wrap: anywhere; }

@media (max-width: 900px) {
    #left-content { width: 100%; padding: 25px; }
    #right-content { float: none; width: 100%; padding: 0 25px 28px; }
    .widgets { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 700px) {
    body { font-size: 15px; }
    #content { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
    #heading { min-height: auto; padding: 15px; flex-direction: column; align-items: stretch; gap: 13px; }
    .logo-image { height: 68px; max-width: 100%; margin: 0 auto; object-position: center; }
    #header-search { width: 100%; flex-basis: auto; }
    #navigation { position: relative; }
    .nav-toggle {
        display: block;
        width: 100%;
        min-height: 46px;
        padding: 0 15px;
        border: 0;
        background: transparent;
        color: #fff;
        text-align: left;
        font-weight: 700;
        cursor: pointer;
    }
    #nav-list { display: none; flex-direction: column; padding: 0 10px 10px; }
    #nav-list li > a { min-height: 44px; padding: 0 12px; }
    .dropdown-content { position: static; max-height: 40vh; border-radius: 8px; box-shadow: none; }
    #left-content { padding: 18px 15px 28px; }
    #right-content { padding: 0 15px 24px; }
    .article-card {
        padding: 18px 0;
        margin-bottom: 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .article-card + .article-card { border-top: 1px solid #e7edf3; }
    .single-article { padding: 0; }
    .posts-content { border: 0; box-shadow: none; }
    .entry { max-width: none; }
    .welcome-box { padding: 18px; margin-bottom: 17px; }
    .post-title { font-size: 1.3rem; }
    .entry pre { margin-left: -3px; margin-right: -3px; border-radius: 7px; font-size: .82rem; }
    .widgets { grid-template-columns: 1fr; }
    #footer { width: 100%; margin: 0; padding: 20px 15px 28px; }
}

@media (max-width: 420px) {
    #header-search form { flex-direction: column; }
    #header-search button { width: 100%; }
    .custom-pagination-wrap { flex-direction: column; }
    .custom-pagination-wrap a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}
