/*
Theme Name: Firmware Theme
Theme URI: https://yourwebsite.com
Author: Your Name
Author URI: https://yourwebsite.com
Description: A custom WordPress theme for firmware and ROM downloads using default posts
Version: 4.0.0
License: GPL v2 or later
Text Domain: firmware-theme
*/

/* ==========================================================================
   1. Design Tokens
   Colors can be overridden from Appearance → Firmware Settings
   (theme-settings.php prints :root overrides for --ft-accent etc.)
   ========================================================================== */
:root {
    /* Brand */
    --ft-accent: #4f46e5;          /* indigo */
    --ft-accent-dark: #3730a3;
    --ft-accent-soft: #eef2ff;
    --ft-success: #059669;         /* download / primary CTA */
    --ft-success-dark: #047857;

    /* Surfaces */
    --ft-page-bg: #eef1f6;
    --ft-surface: #ffffff;
    --ft-surface-alt: #f8fafc;
    --ft-surface-raised: #fdfdfe;

    /* Text */
    --ft-text: #1e293b;
    --ft-text-soft: #475569;
    --ft-text-faint: #94a3b8;
    --ft-heading: #0f172a;

    /* Borders & shadows */
    --ft-border: #e2e8f0;
    --ft-border-soft: #edf1f7;
    --ft-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --ft-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --ft-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);

    /* Shape & rhythm */
    --ft-radius-sm: 6px;
    --ft-radius: 10px;
    --ft-radius-lg: 14px;
    --ft-gap: 24px;

    /* Type */
    --ft-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --ft-font-mono: ui-monospace, "SFMono-Regular", Consolas,
        "Liberation Mono", Menlo, monospace;
}

/* ==========================================================================
   2. Base / Reset (list-safe: padding restored in content areas below)
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    background: var(--ft-page-bg);
    font-family: var(--ft-font);
    font-size: 15px;
    line-height: 1.75;
    color: var(--ft-text);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--ft-accent-dark);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 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 !important;
    width: 1px;
    overflow-wrap: normal !important;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 8px;
    z-index: 100000;
    background: var(--ft-heading);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 0 0 var(--ft-radius-sm) var(--ft-radius-sm);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--ft-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   3. Layout Wrapper
   ========================================================================== */
#fwrapper {
    background: var(--ft-page-bg);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

@media (min-width: 1240px) {
    #fwrapper {
        margin: 20px auto;
        border-radius: var(--ft-radius-lg);
        overflow: hidden;
        box-shadow: var(--ft-shadow-md);
    }
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.pheader {
    position: relative;
    background: var(--ft-surface);
    padding: 14px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 3px solid var(--ft-accent);
}

#plogo a {
    display: inline-block;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ft-heading);
    line-height: 1.3;
}

#plogo a::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin-top: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--ft-accent), var(--ft-success));
}

.site-description {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    overflow: hidden;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Search form (header + inline pages) */
.firmware-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

#psform #psf,
.firmware-search-form #psf {
    border: 1px solid var(--ft-border);
    border-radius: 999px;
    padding: 0 16px;
    height: 36px;
    background: var(--ft-surface-alt);
    color: var(--ft-text);
    font-size: 14px;
    font-family: inherit;
    outline: 0;
    width: 200px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#psform #psf:focus,
.firmware-search-form #psf:focus {
    border-color: var(--ft-accent);
    background: var(--ft-surface);
}

.firmware-search-form #searchsubmit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ft-accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.firmware-search-form #searchsubmit:hover {
    background: var(--ft-accent-dark);
}

.search-page-form {
    margin-top: 15px;
    max-width: 380px;
}

.search-page-form .firmware-search-form #psf {
    width: 100%;
}

/* ==========================================================================
   5. Navigation - Fixed Alignment
   ========================================================================== */

ul.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
    background: var(--ft-surface, #fff);
    border-bottom: 1px solid var(--ft-border, #e7e7e7);
    list-style: none;
}

ul.topnav li {
    list-style: none;
    margin: 0;
}

ul.topnav li a {
    display: inline-block;
    padding: 12px 20px;
    color: var(--ft-text-soft, #333);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}

ul.topnav li a:hover,
ul.topnav li.current-menu-item > a,
ul.topnav li.current_page_item > a {
    color: var(--ft-accent, #415fff);
    border-bottom-color: var(--ft-accent, #415fff);
}

/* ==========================================================================
   Navigation - Right Side Items (Search, etc.)
   ========================================================================== */

ul.topnav .menu-item-has-children {
    position: relative;
}

ul.topnav .menu-item-has-children > a::after {
    content: '▾';
    margin-left: 5px;
    font-size: 10px;
}

/* Dropdown Submenu */
ul.topnav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--ft-surface, #fff);
    border: 1px solid var(--ft-border, #ddd);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    z-index: 999;
}

ul.topnav .menu-item-has-children:hover .sub-menu {
    display: block;
}

ul.topnav .sub-menu li {
    display: block;
}

ul.topnav .sub-menu li a {
    display: block;
    padding: 8px 20px;
    border-bottom: none;
    font-size: 13px;
    font-weight: 400;
}

ul.topnav .sub-menu li a:hover {
    background: var(--ft-accent, #415fff);
    color: #fff;
    border-bottom: none;
}

/* ==========================================================================
   Navigation - Mobile Icon
   ========================================================================== */

ul.topnav li.icon {
    display: none;
    margin-left: auto;
}

#navicon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 18px;
    font-size: 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--ft-text-soft, #333);
    transition: color 0.15s ease;
}

#navicon:hover {
    color: var(--ft-accent, #415fff);
}

/* ==========================================================================
   Responsive - Tablet and Mobile
   ========================================================================== */

@media screen and (max-width: 768px) {
    ul.topnav {
        flex-wrap: wrap;
        padding: 0;
    }
    
    ul.topnav li:not(.icon) {
        display: none;
        width: 100%;
    }
    
    ul.topnav.responsive li:not(.icon) {
        display: block;
    }
    
    ul.topnav li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid var(--ft-border, #f0f0f0);
    }
    
    ul.topnav li a:hover {
        background: var(--ft-accent, #415fff);
        color: #fff;
        border-bottom-color: var(--ft-accent, #415fff);
    }
    
    ul.topnav li.icon {
        display: block;
        margin-left: auto;
    }
    
    /* Dropdown on mobile */
    ul.topnav .sub-menu {
        position: static;
        border: none;
        box-shadow: none;
        padding-left: 20px;
        background: transparent;
    }
    
    ul.topnav .sub-menu li a {
        padding: 8px 20px;
        font-size: 13px;
        border-bottom: 1px solid var(--ft-border, #f0f0f0);
    }
    
    ul.topnav .sub-menu li a:hover {
        background: var(--ft-accent, #415fff);
        color: #fff;
    }
}

/* ==========================================================================
   Responsive - Small Mobile
   ========================================================================== */

@media screen and (max-width: 480px) {
    ul.topnav li a {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    #navicon {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   Search Form in Navigation
   ========================================================================== */

ul.topnav .nav-search {
    margin-left: auto;
    padding: 8px 15px;
}

ul.topnav .nav-search form {
    display: flex;
    align-items: center;
    gap: 5px;
}

ul.topnav .nav-search input[type="search"] {
    padding: 6px 12px;
    border: 1px solid var(--ft-border, #ddd);
    border-radius: 4px;
    font-size: 13px;
    background: #f8f8f8;
    transition: all 0.15s ease;
}

ul.topnav .nav-search input[type="search"]:focus {
    border-color: var(--ft-accent, #415fff);
    outline: none;
    background: #fff;
}

ul.topnav .nav-search button {
    padding: 6px 14px;
    background: var(--ft-accent, #415fff);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s ease;
}

ul.topnav .nav-search button:hover {
    background: #000;
}

/* ==========================================================================
   6. Main Layout (content + sidebar)
   ========================================================================== */
#front-list {
    padding: var(--ft-gap) 25px;
}

@media (min-width: 900px) {
    #front-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 30px;
        align-items: start;
    }
}

.frontleft {
    min-width: 0;
}

.frontright {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .frontright {
        position: sticky;
        top: 20px;
    }
}

/* ==========================================================================
   7. Card Grid (categories / archives / search)
   ========================================================================== */
.fa-grid-post {
    display: block;
}

.fa-grid-post-column {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    width: 100%;
}

.fa-grid-post-column-bg {
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    overflow: hidden;
    box-shadow: var(--ft-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fa-grid-post-column-bg:hover {
    transform: translateY(-4px);
    border-color: var(--ft-accent);
    box-shadow: var(--ft-shadow-lg);
}

.fa-grid-post-column-bg a {
    color: var(--ft-heading);
    display: block;
    height: 100%;
}

.fa-grid-post-column-bg img {
    display: block;
    width: 100%;
    aspect-ratio: 350 / 219;
    object-fit: cover;
    border-bottom: 1px solid var(--ft-border-soft);
    background: var(--ft-surface-alt);
}

.fa-grid-post-heading,
h3.fa-grid-post-column {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    padding: 12px 10px 14px;
}

/* Archive intro spans the full grid width */
.archive-description {
    grid-column: 1 / -1;
    margin: 0 0 4px;
}

.archive-description p {
    margin-bottom: 12px;
    color: var(--ft-text-soft);
}

.archive-description h2 {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--ft-heading);
    margin: 6px 0 4px;
}

.archive-title {
    font-size: 1.55em;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--ft-heading);
    margin: 0 0 12px;
}

.archive-title span {
    color: var(--ft-accent);
}

/* ==========================================================================
   8. Single Post
   ========================================================================== */
.article-head h1 {
    color: var(--ft-heading);
    line-height: 1.35;
    margin: 0 0 12px;
    font-size: 1.55em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Breadcrumbs */
#breadcrumbs {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 96px 4px 14px;
    font-size: 12px;
    color: var(--ft-text-faint);
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius-sm);
    margin-bottom: 4px;
}

#breadcrumbs a {
    color: var(--ft-text-soft);
}

#breadcrumbs a:hover {
    color: var(--ft-accent);
}

.breadcrumb_last {
    color: var(--ft-text-faint);
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Share buttons (X / Facebook) inside the breadcrumb bar */
#tbuk,
#fbuk {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ft-accent-soft);
    transition: background 0.15s ease;
}

#fbuk {
    right: 8px;
}

#tbuk {
    right: 46px;
}

#tbuk a,
#fbuk a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    text-indent: -1000em;
}

#tbuk a::before,
#fbuk a::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    text-indent: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#fbuk a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234f46e5'%3E%3Cpath d='M22 12.07C22 6.51 17.52 2 12 2S2 6.51 2 12.07c0 5 3.66 9.15 8.44 9.93v-7.03H7.9v-2.9h2.54V9.85c0-2.5 1.49-3.89 3.78-3.89 1.1 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56v1.88h2.78l-.44 2.9h-2.34V22c4.78-.78 8.44-4.93 8.44-9.93z'/%3E%3C/svg%3E");
}

#tbuk a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234f46e5'%3E%3Cpath d='M18.9 2H22l-7.6 8.7L23 22h-6.9l-5.4-6.6L4.5 22H1.4l8.1-9.3L1 2h7l4.9 6.1L18.9 2zm-1.2 18h1.9L7.4 4h-2l12.3 16z'/%3E%3C/svg%3E");
}

#tbuk:hover,
#fbuk:hover {
    background: var(--ft-accent);
}

#fbuk:hover a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M22 12.07C22 6.51 17.52 2 12 2S2 6.51 2 12.07c0 5 3.66 9.15 8.44 9.93v-7.03H7.9v-2.9h2.54V9.85c0-2.5 1.49-3.89 3.78-3.89 1.1 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56v1.88h2.78l-.44 2.9h-2.34V22c4.78-.78 8.44-4.93 8.44-9.93z'/%3E%3C/svg%3E");
}

#tbuk:hover a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M18.9 2H22l-7.6 8.7L23 22h-6.9l-5.4-6.6L4.5 22H1.4l8.1-9.3L1 2h7l4.9 6.1L18.9 2zm-1.2 18h1.9L7.4 4h-2l12.3 16z'/%3E%3C/svg%3E");
}

/* Featured image, floated beside the intro */
#entry-image {
    float: right;
    width: 200px;
    margin: 6px 0 10px 14px;
}

#entry-image img {
    border-radius: var(--ft-radius-sm);
    border: 1px solid var(--ft-border);
    background: var(--ft-surface);
    padding: 4px;
}

/* ==========================================================================
   9. Entry Content — global typography for post/page body
   (This is where Gutenberg / wp-block-* markup gets its styling back
   after the global reset, including .wp-block-list li)
   ========================================================================== */
.entry-content {
    color: var(--ft-text);
    word-wrap: break-word;
}

.entry-content > p,
.entry-content > .wp-block-paragraph {
    margin: 0 0 18px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
    color: var(--ft-heading);
    font-weight: 600;
    line-height: 1.4;
    margin: 24px 0 10px;
}

.entry-content h2 { font-size: 1.35em; }
.entry-content h3 { font-size: 1.18em; }
.entry-content h4 { font-size: 1.05em; }

/* Lists — covers plain ul/ol AND Gutenberg .wp-block-list at any depth */
.entry-content ul,
.entry-content ol,
.entry-content .wp-block-list,
.article-block ul,
.article-block ol,
.article-block .wp-block-list {
    margin: 0 0 18px;
    padding-left: 26px;
}

.entry-content ul li,
.entry-content .wp-block-list li,
.article-block ul li,
.article-block ul.wp-block-list li {
    list-style-type: disc;
    list-style-position: outside;
    padding: 4px 0;
}

.entry-content ol li,
.entry-content ol.wp-block-list li,
.article-block ol li,
.article-block ol.wp-block-list li {
    list-style-type: decimal;
    list-style-position: outside;
    padding: 4px 0;
}

.entry-content li::marker,
.article-block li::marker {
    color: var(--ft-accent);
    font-weight: 600;
}

/* Nested lists */
.entry-content li > ul,
.entry-content li > ol,
.article-block li > ul,
.article-block li > ol {
    margin: 6px 0 0;
    padding-left: 22px;
}

.entry-content ul ul li,
.article-block ul ul li {
    list-style-type: circle;
}

.entry-content ul ul ul li,
.article-block ul ul ul li {
    list-style-type: square;
}

/* Images & figures inside content */
.entry-content img {
    border-radius: var(--ft-radius-sm);
}

.entry-content figure,
.entry-content .wp-block-image {
    margin: 0 0 18px;
}

.entry-content figcaption {
    font-size: 13px;
    color: var(--ft-text-faint);
    text-align: center;
    margin-top: 6px;
}

/* ==========================================================================
   10. Article Blocks (firmware details / specs / guides)
   ========================================================================== */
.article-block {
    position: relative;
    margin: 20px 0;
    padding: 20px 22px;
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-left: 4px solid var(--ft-accent);
    border-radius: var(--ft-radius);
    box-shadow: var(--ft-shadow-sm);
    overflow: hidden;
    word-break: break-word;
}

.article-block h2 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 600;
    color: var(--ft-heading);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ft-border-soft);
}

.article-block h3 {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ft-heading);
    margin: 16px 0 8px;
}

.article-block h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 12px 0 6px;
}

.article-block p {
    margin: 0 0 16px;
}

.article-block p:last-child {
    margin-bottom: 0;
}

/* Code / pre inside guides */
.article-block code,
.entry-content code {
    display: inline-block;
    background: #0f172a;
    color: #86efac;
    padding: 2px 10px;
    border-radius: 5px;
    font-family: var(--ft-font-mono);
    font-size: 13px;
    line-height: 1.7;
    margin: 2px 0;
}

.article-block pre,
.entry-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--ft-radius-sm);
    overflow-x: auto;
    font-family: var(--ft-font-mono);
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 18px;
}

.article-block pre code,
.entry-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    margin: 0;
    display: inline;
}

/* Blockquotes */
.article-block blockquote,
.entry-content blockquote {
    margin: 0 0 18px;
    padding: 14px 20px;
    background: var(--ft-accent-soft);
    border-left: 4px solid var(--ft-accent);
    border-radius: 0 var(--ft-radius-sm) var(--ft-radius-sm) 0;
    font-style: italic;
    color: var(--ft-text-soft);
}

.article-block blockquote p,
.entry-content blockquote p {
    margin: 0;
}

/* Tables (generic + specs) */
.article-block table,
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 14px;
}

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

.article-block table th,
.entry-content table th {
    background: var(--ft-surface-alt);
    font-weight: 600;
    color: var(--ft-heading);
}

.article-block table tr:nth-child(even),
.entry-content table tr:nth-child(even) {
    background: var(--ft-surface-alt);
}

.firmware-specs-table th {
    width: 40%;
    color: var(--ft-text-soft);
}

.firmware-specs-table td {
    width: 60%;
}

/* Notice boxes */
.warning-box,
.success-box,
.info-box {
    padding: 14px 18px;
    margin: 0 0 18px;
    border-radius: var(--ft-radius-sm);
    border-left: 4px solid;
}

.warning-box {
    background: #fffbeb;
    border-color: #f59e0b;
}

.warning-box strong {
    color: #92400e;
}

.success-box {
    background: #ecfdf5;
    border-color: var(--ft-success);
}

.info-box {
    background: #eff6ff;
    border-color: #3b82f6;
}

.warning-box p,
.success-box p,
.info-box p {
    margin: 0;
}

/* ==========================================================================
   11. Download Buttons
   ========================================================================== */
a.zip-one,
a.zip-two {
    display: inline-block;
    text-align: center;
    padding: 10px 0;
    width: 49.2%;
    border-radius: var(--ft-radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    box-shadow: var(--ft-shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

a.zip-one {
    background: linear-gradient(135deg, var(--ft-success), var(--ft-success-dark));
    margin-right: 5px;
}

a.zip-two {
    background: linear-gradient(135deg, var(--ft-accent), var(--ft-accent-dark));
}

a.zip-one:hover,
a.zip-two:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--ft-shadow-md);
    filter: brightness(1.06);
}

.gappug {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    background: var(--ft-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    height: 40px;
    line-height: 40px;
    border-radius: var(--ft-radius-sm);
    transition: background 0.15s ease;
}

.gappug:hover {
    background: var(--ft-accent-dark);
    color: #fff;
}

/* ==========================================================================
   12. Pagination
   ========================================================================== */
.navigation {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.navigation .nav-links,
.wp-pagenavi {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.navigation .page-numbers,
.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 50%;
    border: 1px solid var(--ft-border);
    background: var(--ft-surface);
    color: var(--ft-text-soft);
    font-size: 14px;
    transition: all 0.15s ease;
}

.navigation .page-numbers.current,
.navigation .page-numbers:hover,
.wp-pagenavi a:hover,
.wp-pagenavi span.current {
    background: var(--ft-accent);
    border-color: var(--ft-accent);
    color: #fff;
}

/* ==========================================================================
   13. Sidebar
   ========================================================================== */
.frontright .widget,
.sidebar-box {
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: var(--ft-shadow-sm);
}

.widget-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ft-heading);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ft-accent-soft);
}

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

.frontright .widget li {
    padding: 6px 0;
    border-bottom: 1px solid var(--ft-border-soft);
    font-size: 14px;
}

.frontright .widget li:last-child {
    border-bottom: 0;
}

#spon {
    background: var(--ft-surface-alt);
    border: 1px dashed var(--ft-border);
    border-radius: var(--ft-radius);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#spon a {
    display: block;
    width: 100%;
    padding: 12px;
    color: var(--ft-text-faint);
    font-size: 13px;
}

/* ==========================================================================
   14. Ad slots (real units drop in without layout shift styling hacks)
   ========================================================================== */
.top-ad-unit,
.ad-unit {
    text-align: center;
    clear: both;
}

.top-ad-unit {
    padding: 20px 25px 0;
}

.top-ad-unit:empty,
.ad-unit:empty {
    display: none;
}

.ad-unit {
    margin: 22px auto;
}

/* ==========================================================================
   15. 404
   ========================================================================== */
.firmware-404 {
    text-align: center;
    padding: 50px 20px;
    background: var(--ft-surface);
    border: 1px solid var(--ft-border);
    border-radius: var(--ft-radius);
}

.firmware-404 h1 {
    font-size: 4.5em;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--ft-accent), var(--ft-success));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.firmware-404 h2 {
    font-weight: 600;
    color: var(--ft-heading);
    margin-bottom: 10px;
}

.firmware-404 .search-page-form {
    margin: 25px auto;
}

.firmware-404 .archive-description {
    text-align: left;
    margin-top: 30px;
}

/* ==========================================================================
   16. Footer
   ========================================================================== */
.mainfoots {
    background: var(--ft-heading);
    color: #cbd5e1;
    margin-top: 10px;
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
}

.mainfoots .wrap {
    padding: 32px 25px 24px;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-widget {
    font-size: 14px;
    line-height: 1.7;
}

.footer-heading {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
    margin-bottom: 10px;
}

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

.footer-widget li {
    padding: 4px 0;
}

.footer-widget a {
    color: #cbd5e1;
}

.footer-widget a:hover {
    color: #fff;
}

.footercc {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: #94a3b8;
}

.footercc a {
    color: #cbd5e1;
}

.footercc a:hover {
    color: #fff;
}

.footercc .footer-disclaimer {
    padding-top: 14px;
    font-size: 12.5px;
    line-height: 1.7;
}

/* ==========================================================================
   17. Back to top
   ========================================================================== */
#firmware-back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--ft-accent);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--ft-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s ease;
    z-index: 999;
}

#firmware-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#firmware-back-to-top:hover {
    background: var(--ft-accent-dark);
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */
@media (max-width: 899px) {
    .frontright {
        margin-top: 26px;
    }
}

@media screen and (max-width: 750px) {
    ul.topnav {
        position: relative;
        padding: 0;
    }

    ul.topnav li:not(.icon) {
        display: none;
        width: 100%;
    }

    ul.topnav li.icon {
        display: block;
        margin-left: auto;
    }

    ul.topnav.responsive {
        flex-direction: column;
        align-items: stretch;
    }

    ul.topnav.responsive li:not(.icon) {
        display: block;
    }

    ul.topnav.responsive li a {
        display: block;
        text-align: left;
        padding: 12px 20px;
        border-bottom: 1px solid var(--ft-border-soft);
    }

    ul.topnav.responsive li.icon {
        position: absolute;
        right: 0;
        top: 0;
    }
}

@media (max-width: 620px) {
    .pheader {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
    }

    #plogo a::after {
        margin-left: auto;
        margin-right: auto;
    }

    #psform #psf {
        width: min(74vw, 280px);
    }

    #front-list {
        padding: 18px 14px;
    }

    .article-block {
        padding: 16px;
    }

    .entry-content ul,
    .entry-content ol,
    .entry-content .wp-block-list,
    .article-block ul,
    .article-block ol,
    .article-block .wp-block-list {
        padding-left: 22px;
    }

    .breadcrumb_last {
        max-width: 34vw;
    }

    a.zip-one,
    a.zip-two {
        width: 100%;
        margin-right: 0;
    }

    a.zip-one {
        margin-bottom: 10px;
    }

    .article-block table th,
    .article-block table td,
    .entry-content table th,
    .entry-content table td {
        padding: 8px 10px;
        font-size: 13.5px;
    }
}

/* ==========================================================================
   19. Print
   ========================================================================== */
@media print {
    .pheader,
    .topnav,
    .frontright,
    .mainfoots,
    #firmware-back-to-top,
    .top-ad-unit,
    .ad-unit,
    #tbuk,
    #fbuk,
    .skip-link {
        display: none !important;
    }

    .article-block {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
}
/* ==========================================================================
   COMMENTS STYLES
   ========================================================================== */

.comments-area {
    margin: 30px 0 40px;
    padding: 0 25px;
}

.comments-title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

/* ==========================================================================
   LOAD COMMENTS BUTTON
   ========================================================================== */

#load-comments-container {
    text-align: center;
    margin: 20px 0;
}

.load-comments-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 35px;
    background: #415fff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(65, 95, 255, 0.3);
    font-family: inherit;
}

.load-comments-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(65, 95, 255, 0.4);
}

.load-comments-btn .btn-icon {
    font-size: 18px;
}

.load-comments-btn .comment-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.load-comments-btn .btn-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.load-comments-btn.loaded .btn-arrow {
    transform: rotate(180deg);
}

/* ==========================================================================
   COMMENT LIST
   ========================================================================== */

.comment-list {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.comment-list .comment:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-list .comment-body {
    position: relative;
}

/* Children comments */
.comment-list .children {
    list-style: none;
    margin: 15px 0 0 30px;
    padding: 0;
}

.comment-list .children .comment {
    background: #f8fafd;
    border-color: #e8edf5;
}

.comment-list .children .comment:hover {
    border-color: #d0d8e5;
}

/* ==========================================================================
   COMMENT META
   ========================================================================== */

.comment-meta {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

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

.comment-author {
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.comment-author-url {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-top: 2px;
}

.comment-metadata {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.comment-metadata a {
    color: #999;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #415fff;
}

.comment-awaiting-moderation {
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff8e1;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

/* ==========================================================================
   COMMENT CONTENT
   ========================================================================== */

.comment-content {
    margin: 10px 0 12px 0;
    padding-left: 0;
    color: #444;
    line-height: 1.7;
}

.comment-content p {
    padding: 0 0 10px;
}

.comment-content ul,
.comment-content ol {
    padding: 0 0 10px 20px;
}

.comment-content blockquote {
    margin: 10px 0;
    padding: 10px 20px;
    border-left: 3px solid #415fff;
    background: #f5f7fc;
    font-style: italic;
}

/* ==========================================================================
   COMMENT REPLY
   ========================================================================== */

.comment-reply {
    margin-top: 10px;
    text-align: right;
}

.comment-reply a {
    display: inline-block;
    padding: 4px 15px;
    background: #f0f4f9;
    color: #333;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.comment-reply a:hover {
    background: #415fff;
    color: #fff;
}

/* ==========================================================================
   COMMENT FORM
   ========================================================================== */

#comment-form-container {
    margin: 30px 0;
    padding: 0;
}

.comment-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.comment-reply-title small {
    font-size: 14px;
    font-weight: 400;
}

.comment-reply-title small a {
    color: #999;
    text-decoration: none;
}

.comment-reply-title small a:hover {
    color: #dc3232;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.comment-form p {
    margin: 0;
    padding: 0;
}

.comment-form .comment-form-comment {
    grid-column: 1 / -1;
}

.comment-form .form-submit {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.comment-form .required {
    color: #dc3232;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: #415fff;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(65, 95, 255, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .comment-form-cookies-consent {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form .comment-form-cookies-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.comment-form .comment-form-cookies-consent label {
    display: inline;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
}

.comment-form .comment-notes {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #999;
    padding: 0;
    margin-bottom: 5px;
}

.comment-form .form-submit {
    grid-column: 1 / -1;
}

.comment-submit-btn {
    display: inline-block;
    padding: 12px 40px;
    background: #415fff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.comment-submit-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 95, 255, 0.3);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   COMMENT PAGINATION
   ========================================================================== */

.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 10px 0;
}

.comment-navigation a {
    color: #415fff;
    text-decoration: none;
}

.comment-navigation a:hover {
    color: #000;
}

/* ==========================================================================
   NO COMMENTS
   ========================================================================== */

.no-comments {
    padding: 15px 0;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .comments-area {
        padding: 0 15px;
    }
    
    .comment-form {
        grid-template-columns: 1fr;
    }
    
    .comment-form .comment-form-comment,
    .comment-form .form-submit,
    .comment-form .comment-notes,
    .comment-form .comment-form-cookies-consent {
        grid-column: 1;
    }
    
    .comment-form-wrapper {
        padding: 20px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-list .children {
        margin-left: 15px;
    }
    
    .load-comments-btn {
        padding: 12px 25px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .comments-area {
        padding: 0 10px;
    }
    
    .comment-list .comment {
        padding: 15px;
    }
    
    .comment-form-wrapper {
        padding: 15px;
    }
    
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .comment-submit-btn {
        padding: 10px 30px;
        font-size: 15px;
        width: 100%;
    }
}
/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.mainfoots {
    background: #fff;
    position: relative;
    width: 100%;
    margin: 0 auto;
    border-top: 1px solid #e7e7e7;
}

.mainfoots .wrap {
    padding: 25px 25px 10px;
}

/* Footer Widgets Layout */
.footer-widgets-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer1,
.footer2,
.footer3 {
    min-width: 0; /* stops long links/text from forcing the column wide and breaking the grid */
}

.footer-widget {
    font-size: 15px;
    line-height: 1.6em;
}

/* Keeps multiple widgets inside one column from visually running together */
.footer-widget-item + .footer-widget-item {
    margin-top: 18px;
}

.footer-heading {
    font-weight: 400;
    color: #000;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

/* Footer Menus */
.footer-widget ul,
.footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-widget ul li,
.footer-menu li {
    padding: 5px 0;
    list-style: none;
}

.footer-widget ul li a,
.footer-menu li a {
    color: #000;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover,
.footer-menu li a:hover {
    color: #415fff;
}

/* Footer Inline Menu */
.footer-menu-inline {
    display: inline;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu-inline li {
    display: inline;
    padding: 0 5px;
}

.footer-menu-inline li:not(:last-child)::after {
    content: ' | ';
}

.footer-menu-inline li a {
    color: #000;
    text-decoration: underline;
}

.footer-menu-inline li a:hover {
    color: #415fff;
}

/* Social Links (optional — use if you add a Custom HTML/Text widget with
   this markup to a footer column; not output automatically) */
.footer-social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #415fff;
}

.social-link svg {
    flex-shrink: 0;
}

.social-link span {
    font-size: 14px;
}

/* Copyright */
.footercc {
    margin: 20px 0 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.footercc p {
    padding: 0 0 10px;
    margin: 0;
}

.footercc a {
    color: #000;
    text-decoration: underline;
}

.footercc a:hover {
    color: #415fff;
}

.footer-disclaimer {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    padding-top: 10px !important;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

#firmware-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #415fff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#firmware-back-to-top:hover {
    background: #000;
    transform: translateY(-3px);
}

#firmware-back-to-top.visible {
    display: block;
}

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

@media (max-width: 906px) {
    .footer-widgets-wrapper {
        grid-template-columns: 1fr; /* stack on tablet/mobile */
        gap: 20px;
    }

    .footer-heading {
        border-bottom: 1px solid #bbb;
        padding-bottom: 10px;
    }

    .footer-widget ul li,
    .footer-menu li {
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .mainfoots .wrap {
        padding: 20px 15px 10px;
    }

    .footer-menu-inline li {
        display: block;
        padding: 3px 0;
    }

    .footer-menu-inline li:not(:last-child)::after {
        content: '';
    }

    #firmware-back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
}
/* ==========================================================================
   RELATED POSTS - "Explore More" Section
   ========================================================================== */

#jp-relatedposts {
    margin: 30px 0 20px;
    padding: 0;
    clear: both;
}

#jp-relatedposts h3.jp-relatedposts-headline {
    display: block;
    text-align: center;
    z-index: 0;
    text-transform: uppercase;
    font-size: 12px;
    position: relative;
    padding: 6px 0;
    margin: 15px 0;
}

#jp-relatedposts h3.jp-relatedposts-headline em {
    background: #415fff;
    color: #fff;
    font-style: normal !important;
    font-weight: 400;
    padding: 7px 15px;
    border-radius: 8px;
}

#jp-relatedposts h3.jp-relatedposts-headline:before {
    border-top: 1px solid #f4f6ff;
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
}

/* Related Posts Grid */
.jp-relatedposts-grid {
    display: grid;
    grid-gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
    float: none;
    margin-left: auto;
    margin-right: auto;
}

.jp-relatedposts-post {
    background: #fff;
    border: 1px solid #e7e7e7;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 4px;
}

.jp-relatedposts-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.jp-relatedposts-post-a {
    color: #000 !important;
    text-decoration: none !important;
}

.jp-relatedposts-post-img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(45deg, #000 25%, rgba(0, 0, 0, 0.2) 50%, #000 75%);
    mask-image: linear-gradient(45deg, #000 25%, rgba(0, 0, 0, 0.2) 50%, #000 75%);
    -webkit-mask-size: 800%;
    mask-size: 800%;
    -webkit-mask-position: 0;
    mask-position: 0;
    border-bottom: 1px solid #e7e7e7;
    transition: all 0.5s ease;
}

.jp-relatedposts-post-img:hover {
    -webkit-mask-position: 120%;
    mask-position: 120%;
    opacity: 1;
}

h4.jp-relatedposts-post-title {
    font-size: 15px;
    font-weight: 400;
    margin: 0 10px 5px;
    text-align: center;
    color: #000;
    line-height: 1.4;
    padding: 8px 0;
}

h4.jp-relatedposts-post-title a {
    color: #000;
    text-decoration: none;
}

h4.jp-relatedposts-post-title a:hover {
    color: #415fff;
}

/* Hide excerpt and other meta */
.jp-relatedposts-post-context,
.jp-relatedposts-post-date,
.jp-relatedposts-post-excerpt {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE RELATED POSTS
   ========================================================================== */

@media (max-width: 768px) {
    .jp-relatedposts-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .jp-relatedposts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #jp-relatedposts {
        margin: 20px 0 15px;
    }
}

@media (max-width: 360px) {
    .jp-relatedposts-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   VERSION DIVIDER
   ========================================================================== */

hr.version-divider {
    border-top: 2px dashed #dde3eb;
    border-bottom: transparent;
    margin: 25px 0;
    clear: both;
}