/*
Theme Name: Runmie Core SEO
Author: Runmie
Description: Maximum SEO semantic code theme built for 2026. Zero bloat, instant loading, Layout Plan B.
Version: 1.0.0
Text Domain: runmie
*/

:root {
    --primary-color: #0f172a;
    --link-color: #2563eb;
    --text-color: #374151;
    --bg-color: #ffffff;
    --border-color: #f1f5f9;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    color: var(--text-color);
    background-color: #f8fafc;
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img.alignnone.size-full.wp-image-42 {
    max-width: 100%;
    height: auto;
}
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.entry-content a{color:var(--link-color);text-decoration:none;transition:color .2s ease}
.entry-content a:hover{color:#1d4ed8;text-decoration:underline;text-underline-offset:2px}
.entry-content a:active{color:#1e3a8a;opacity:.7}
.entry-content a:visited{color:#7c3aed}
/* ==================== HEADER ==================== */

.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    width: 100%;
    position: relative;
    contain-intrinsic-size: auto 110px;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 0.75rem;
}

.site-branding {
    width: 35%;
    flex-shrink: 0;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-title a {
    color: var(--primary-color);
}

.main-navigation {
    width: 100%;
    order: 3;
    max-width: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0.25rem;
}

.main-navigation::-webkit-scrollbar {
    display: none;
}

.main-navigation ul {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    white-space: nowrap;
}

.main-navigation a {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.25rem 0;
    display: inline-block;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-post-ancestor > a,
.main-navigation .current-menu-parent > a,
.main-navigation .current-post-parent > a {
    color: var(--link-color);
    border-bottom-color: var(--link-color);
}

/* ==================== SEARCH ==================== */

.header-search {
    width: 60%;
    flex-shrink: 0;
}

.search-form {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.search-field {
    flex-grow: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--primary-color);
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    width: 100%;
}

.search-field::placeholder {
    color: #94a3b8;
}

.search-field:focus {
    background-color: var(--bg-color);
    border-color: var(--link-color);
}

.search-field:focus + .search-submit {
    border-color: var(--link-color);
    background-color: var(--link-color);
}

.search-submit {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: var(--bg-color);
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.search-submit:hover {
    background-color: var(--link-color);
    border-color: var(--link-color);
}

/* ==================== LAYOUT & FEED ==================== */

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.loop-post-card,
.entry-content-box,
.related-posts-section,.archive-header {
    background: var(--bg-color);
    padding: 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.entry-title,
.loop-post-card .entry-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.loop-post-card .entry-title a {
    color: var(--primary-color);
    font-weight: 700;
}

.loop-post-card .entry-title a:hover {
    color: var(--link-color);
}

.entry-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.entry-summary,
.entry-content {
    font-size: 0.95rem;
    color: #475569;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* ==================== ARTICLE TABLE ==================== */

.entry-content table {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: var(--bg-color);
    font-size: 0.95rem;
}

.entry-content table th,
.entry-content table td {
    padding: 0.75rem 0.85rem;
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: middle;
    line-height: 1.6;
}

.entry-content table th {
    background-color: #f1f5f9;
    color: var(--primary-color);
    font-weight: 700;
}

.entry-content table td {
    color: #475569;
}

.entry-content table tr:nth-child(even) td {
    background-color: #f8fafc;
}

.entry-content table tr:hover td {
    background-color: #eff6ff;
}

/* ==================== BREADCRUMBS ==================== */

.rank-math-breadcrumb {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #777;
}

.rank-math-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.rank-math-breadcrumb a:hover {
    color: #1a73e8;
}

.rank-math-breadcrumb .separator {
    margin: 0 8px;
    color: #aaa;
}

/* ==================== SIDEBAR ==================== */

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.default-widget ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.default-widget li a {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
}

.default-widget li a:hover {
    color: var(--link-color);
}

/* ==================== AUTHOR BIO BOX ==================== */

.author-bio-box {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background-color: #f8fafc;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.author-avatar img {
    border-radius: 50%;
    display: block;
    background-color: #cbd5e1;
}

.author-info {
    flex-grow: 1;
}

.author-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.author-description {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

/* ==================== RELATED POSTS & NAVIGATION ==================== */

.entry-tags {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.entry-tags a {
    color: var(--link-color);
    font-weight: 600;
}

.entry-tags a:hover {
    text-decoration: underline;
}

.entry-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.related-posts-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.related-posts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-posts-list li a {
    font-size: 0.95rem;
    color: var(--link-color);
    font-weight: 600;
}

.related-posts-list li a:hover {
    text-decoration: underline;
}

.nav-links-split {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    width: 100%;
}

@media (min-width: 640px) {
    .nav-links-split {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-previous,
    .nav-next {
        max-width: 48%;
    }

    .nav-next {
        text-align: right;
    }
}

/* ==================== FOOTER ==================== */

.site-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.site-info {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ==================== DESKTOP ==================== */

@media (min-width: 768px) {
    .site-header {
        padding: 1rem 0 0.75rem 0;
    }

    .header-container {
        flex-wrap: wrap;
        row-gap: 1.25rem;
        padding: 0 1.5rem;
    }

    .site-branding {
        width: auto;
    }

    .site-title {
        font-size: 1.35rem;
    }

    .header-search {
        width: 280px;
        margin-left: auto;
    }

    .main-navigation {
        order: 3;
        width: 100%;
        max-width: none;
        overflow: visible;
        display: flex;
        justify-content: flex-start;
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
    }

    .main-navigation ul {
        gap: 2.5rem;
    }
}

@media (min-width: 960px) {
    .content-container {
        grid-template-columns: 2.2fr 1fr;
    }
	.entry-content-box{grid-area:1/1}
	.related-posts-section{grid-area:2/1}
	.widget-area{grid-area:1/2/3/3}
}

/* ==================== ACCESSIBILITY ==================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ==================== MOBILE FULL WIDTH & TABLE OPTIMIZATION ==================== */

@media (max-width: 767px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .content-container {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    .loop-post-card,
    .entry-content-box,
    .related-posts-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* ==================== MOBILE ARTICLE ==================== */

    .entry-content-box {
        padding: 1rem;
        overflow: hidden;
    }

    .entry-content,
    .entry-summary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* ==================== MOBILE BREADCRUMBS ==================== */

    .rank-math-breadcrumb {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .rank-math-breadcrumb .separator {
        margin: 0 5px;
    }

    /* ==================== MOBILE AUTHOR BIO ==================== */

    .author-bio-box {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .author-avatar {
        width: auto;
        flex-shrink: 0;
    }

    .author-avatar img {
        display: block;
        margin: 0 auto;
    }

    .author-info {
        width: 100%;
        flex-grow: 0;
    }

    .author-name {
        margin-bottom: 0.35rem;
    }

    .author-description {
        text-align: center;
    }

    /* ==================== MOBILE TABLE ==================== */

    .entry-content table {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
        border-spacing: 0;
        margin: 1.25rem 0 1.5rem;
        white-space: nowrap;
        background-color: var(--bg-color);
    }

    .entry-content table th,
    .entry-content table td {
        border: 1px solid #cbd5e1;
        padding: 0.7rem 0.8rem;
        min-width: 140px;
        white-space: nowrap;
        vertical-align: middle;
    }

    .entry-content table th {
        background-color: #f1f5f9;
        color: var(--primary-color);
        font-weight: 700;
        border: 1px solid #94a3b8;
    }

    .entry-content table tr:nth-child(even) td {
        background-color: #f8fafc;
    }

    /* ==================== PREVENT LONG TEXT OVERFLOW ==================== */

    .entry-content p,
    .entry-content li,
    .entry-content a,
    .entry-content h2,
    .entry-content h3 {
        overflow-wrap: anywhere;
        word-break: normal;
    }
}
