/*
Theme Name: GetIntoPC Ultra Pro
Theme URI: https://example.com/getintopc-ultra-pro
Author: M.Fahad Manzoor (Niazi)
Author URI: https://example.com
Description: Ultra-lightweight, SEO-first, Core Web Vitals optimized WordPress theme modeled after the classic GetIntoPC layout. Zero jQuery, built-in SoftwareApplication JSON-LD schema, Yoast/Rank Math/AMP compatible, Theme Control Panel, custom download meta box, dark mode toggle, and widgetized sidebar & footer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: getintopc-ultra
Tags: custom-logo, custom-menu, featured-images, theme-options, two-columns, right-sidebar, translation-ready
*/

/* Base Reset & System Typography */
:root {
    --bg-body: #1c2833;
    --bg-container: #ffffff;
    --bg-card: #ffffff;
    --bg-meta-strip: #f2f2f2;
    --bg-nav-top: #f7f7f7;
    --bg-nav-bot: #dedede;
    --bg-nav-hover: #222222;
    --bg-footer: #e9e9e9;
    --border-card: #555555;
    --border-light: #d6d6d6;
    --text-main: #222222;
    --text-muted: #555555;
    --text-heading: #222222;
    --accent-green: #6b8e23;
    --accent-lime: #8db600;
    --accent-lime-dark: #759900;
    --accent-blue: #0099e5;
    --accent-blue-hover: #007bb8;
    --accent-red: #b80000;
    --badge-bg: #555555;
    --shadow-container: 0 0 18px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] {
    --bg-body: #0f1419;
    --bg-container: #181c20;
    --bg-card: #1f2429;
    --bg-meta-strip: #2a3036;
    --bg-nav-top: #2c3238;
    --bg-nav-bot: #1f2428;
    --bg-nav-hover: #6b8e23;
    --bg-footer: #14171a;
    --border-card: #3f4750;
    --border-light: #343b42;
    --text-main: #e2e6ea;
    --text-muted: #a4adb6;
    --text-heading: #f1f4f8;
    --accent-green: #8cc63f;
    --accent-lime: #8db600;
    --accent-lime-dark: #759900;
    --badge-bg: #3a4149;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-main);
    background-color: var(--bg-body);
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    overflow-x: hidden;
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.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;
}

/* Main Wrapper */
.site-wrapper {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Area (Transparent over dark textured background) */
.site-header {
    padding: 22px 0 0 0;
    position: relative;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.site-logo-link img {
    max-height: 58px;
    width: auto;
}

.site-title-text {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.05;
    text-transform: uppercase;
    font-family: "Arial Black", "Segoe UI", Impact, sans-serif;
}

.site-title-text .brand-part-1 {
    color: #ffffff;
}

.site-title-text .brand-part-2 {
    color: #8cc63f;
}

.site-tagline {
    margin: 4px 0 0 0;
    font-size: 13px;
    font-style: italic;
    color: #e6e6e6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Classic Glossy Navigation Bar */
.main-nav-bar {
    background: linear-gradient(to bottom, var(--bg-nav-top) 0%, var(--bg-nav-bot) 100%);
    border-top: 1px solid #ffffff;
    border-bottom: 2px solid #999999;
    border-radius: 3px 3px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 38px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.nav-menu-wrap {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 13px;
    background: #222222;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 12.5px;
    text-decoration: none !important;
    border-radius: 2px 0 0 0;
}

.nav-home-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.primary-menu > li {
    position: relative;
    border-right: 1px solid rgba(0,0,0,0.08);
}

.primary-menu > li > a {
    display: block;
    padding: 9px 11px;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

[data-theme="dark"] .primary-menu > li > a {
    color: #f0f2f5;
}

.primary-menu > li:hover > a,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a {
    background: var(--bg-nav-hover);
    color: #ffffff;
}

/* Dropdown Submenu */
.primary-menu li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-container);
    border: 1px solid var(--border-card);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 999;
}

.primary-menu li:hover > ul.sub-menu,
.primary-menu li:focus-within > ul.sub-menu {
    display: block;
}

.primary-menu li ul.sub-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
}

.primary-menu li ul.sub-menu li a:hover {
    background: var(--accent-green);
    color: #ffffff;
}

/* Header Social Icons on Right of Nav Bar */
.nav-social-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}

.nav-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 3px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.soc-fb { background: #3b5998; }
.soc-tw { background: #1da1f2; }
.soc-yt { background: #ff0000; }
.soc-tg { background: #0088cc; }
.soc-rss { background: #f26522; }

.mobile-menu-toggle {
    display: none;
    background: #222222;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* Boxed White Content Container */
.site-main-box {
    background: var(--bg-container);
    box-shadow: var(--shadow-container);
    padding: 16px 16px 20px 16px;
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
}

.content-sidebar-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px;
    align-items: start;
}

.content-sidebar-grid.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

/* Breadcrumb */
.gipc-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

.gipc-breadcrumb a {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: underline;
}

/* Homepage / Archive Post Card (Exact GetIntoPC Box Style) */
.post-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gipc-post-card {
    display: flex;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 12px;
    transition: border-color 0.15s ease;
}

.gipc-post-card:hover {
    border-color: var(--accent-green);
}

.gipc-card-thumb {
    flex: 0 0 116px;
    width: 116px;
    height: 116px;
    border: 1px solid var(--border-light);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.gipc-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gipc-card-body {
    flex: 1;
    min-width: 0;
}

.gipc-card-title {
    margin: 0 0 6px 0;
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.25;
}

.gipc-card-title a {
    color: var(--accent-green);
    text-decoration: none;
}

.gipc-card-title a:hover {
    text-decoration: underline;
}

/* Meta Strip: Dark Time Badge + Grey Category Strip */
.gipc-card-meta-bar {
    display: flex;
    align-items: center;
    background: var(--bg-meta-strip);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
    min-height: 24px;
    font-size: 11.5px;
}

.gipc-time-badge {
    background: var(--badge-bg);
    color: #ffffff;
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.gipc-cat-links {
    padding: 2px 8px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gipc-cat-links a {
    color: var(--text-muted);
    text-decoration: underline;
}

.gipc-cat-links a:hover {
    color: var(--accent-green);
}

.gipc-card-excerpt {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-main);
    line-height: 1.5;
}

.gipc-more-tag {
    display: inline-block;
    background: var(--bg-meta-strip);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Pagination (Exact Boxed Numbered Pagination) */
.gipc-pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.gipc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.gipc-pagination .page-numbers:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.gipc-pagination .page-numbers.current {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

/* Sidebar Widgets */
.site-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-widget {
    background: var(--bg-card);
}

.widget-title-bar {
    background: linear-gradient(to bottom, #9ec900 0%, #82a800 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 3px;
    margin: 0 0 10px 0;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

/* Custom Search Box matching screenshot */
.gipc-search-form {
    display: flex;
    align-items: stretch;
    border: 1px solid #cccccc;
    border-radius: 3px;
    overflow: hidden;
    background: #ffffff;
}

.gipc-search-input {
    flex: 1;
    border: none;
    padding: 8px 10px;
    font-size: 13px;
    color: #222222;
    outline: none;
    min-width: 0;
}

.gipc-search-submit {
    background: linear-gradient(to bottom, #9ec900 0%, #82a800 100%);
    color: #ffffff;
    border: none;
    padding: 0 14px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
}

.gipc-search-submit:hover {
    background: var(--accent-lime-dark);
}

.sidebar-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-light);
}

.sidebar-widget ul li {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

/* Single Post Box (Exact GetIntoPC Single Article Container) */
.single-post-box {
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    padding: 16px 18px;
}

.single-post-title {
    margin: 0 0 10px 0;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-heading);
}

.entry-content {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-main);
    word-wrap: break-word;
}

.entry-content h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 20px 0 8px 0;
}

.entry-content h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 16px 0 6px 0;
}

.entry-content p {
    margin: 0 0 12px 0;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 14px 20px;
    padding: 0;
}

.entry-content li {
    margin-bottom: 4px;
}

.entry-content img.aligncenter,
.entry-content .wp-block-image.aligncenter {
    display: block;
    margin: 14px auto;
}

.entry-content img.alignleft {
    float: left;
    margin: 4px 14px 10px 0;
}

.entry-content img.alignright {
    float: right;
    margin: 4px 0 10px 14px;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
}

.entry-content table th,
.entry-content table td {
    border: 1px solid var(--border-light);
    padding: 8px 10px;
    text-align: left;
}

.entry-content table th {
    background: var(--bg-meta-strip);
    font-weight: 700;
}

/* Custom Download Info Box & CTA */
.gipc-download-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
    border: 1px solid var(--border-light);
}

.gipc-download-specs-table th {
    width: 34%;
    background: var(--bg-meta-strip);
    color: var(--text-heading);
    font-weight: 700;
    padding: 8px 12px;
    text-align: left;
    border: 1px solid var(--border-light);
}

.gipc-download-specs-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.gipc-download-cta-wrap {
    text-align: center;
    margin: 22px 0 16px 0;
}

.gipc-download-btn {
    display: inline-block;
    min-width: 290px;
    max-width: 100%;
    background: var(--accent-blue);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 5px;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0, 153, 229, 0.35);
    transition: background-color 0.15s ease, transform 0.1s ease;
    margin: 6px;
}

.gipc-download-btn:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.gipc-download-btn.mirror-btn {
    background: #2e7d32;
}

.gipc-download-btn.mirror-btn:hover {
    background: #1b5e20;
}

.gipc-password-box {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #cc0000;
}

/* Related Posts (Exact Numbered Green List) */
.gipc-related-posts {
    margin-top: 18px;
}

.gipc-related-posts h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
}

.gipc-related-posts ol {
    margin: 0 0 14px 18px;
    padding: 0;
    font-size: 13px;
}

.gipc-related-posts ol li {
    margin-bottom: 3px;
}

.gipc-related-posts ol li a {
    color: var(--accent-green);
    font-weight: 600;
}

.gipc-last-updated {
    font-size: 15.5px;
    font-weight: 700;
    color: #008000;
    margin: 12px 0 0 0;
}

[data-theme="dark"] .gipc-last-updated {
    color: #66bb6a;
}

/* Collapsible Comments Section (Exact Screenshot Style) */
.gipc-comments-section {
    margin-top: 22px;
}

.gipc-comments-bar {
    border-bottom: 5px solid #444444;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.gipc-comments-tab {
    background: #444444;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 4px 4px 0 0;
}

.gipc-show-comments-wrap {
    text-align: center;
    margin: 14px 0;
}

.gipc-show-comments-btn {
    background: var(--accent-blue);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 12px 28px;
    min-width: 280px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.gipc-show-comments-btn:hover {
    background: var(--accent-blue-hover);
}

.gipc-comments-container.is-hidden {
    display: none;
}

/* Footer Area (Widgetized + Classic Bottom Links + Copyright) */
.site-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border-light);
    padding: 16px 16px 20px 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.footer-widget h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-heading);
    border-bottom: 2px solid var(--accent-lime);
    display: inline-block;
    padding-bottom: 2px;
}

.footer-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 4px;
}

.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-nav-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.footer-nav-links ul li a {
    display: inline-block;
    padding: 3px 9px;
    color: var(--text-main);
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
}

.footer-nav-links ul li:first-child a,
.footer-nav-links ul li.current-menu-item a {
    background: var(--accent-lime);
    color: #ffffff;
}

.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Back to top button */
.gipc-back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    background: #ffffff;
    color: #222222;
    border: 1px solid #cccccc;
    border-radius: 14px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    display: none;
    z-index: 999;
}

.gipc-back-to-top.is-visible {
    display: inline-block;
}

/* Responsive Mobile-First Adjustments */
@media (max-width: 860px) {
    .content-sidebar-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mobile-menu-toggle {
        display: inline-block;
    }

    .primary-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: var(--bg-container);
        border-top: 1px solid var(--border-light);
    }

    .primary-menu.is-open {
        display: flex;
    }

    .nav-menu-wrap {
        flex-wrap: wrap;
    }

    .primary-menu li ul.sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 14px;
    }
}

@media (max-width: 540px) {
    .gipc-post-card {
        flex-direction: column;
    }

    .gipc-card-thumb {
        width: 100%;
        height: 150px;
        flex: none;
    }

    .site-title-text {
        font-size: 26px;
    }

    .gipc-download-btn {
        min-width: 100%;
        margin: 6px 0;
    }
}
