/*
Theme Name: FileSerial
Theme URI: https://fileserial.com
Author: Mbilawal
Description: Download Windows & Mac Software — Free, Fast, and Always Updated, style — light, card-based layout with dark nav and red accents.
Version: 1.0
Text Domain: fileserial
*/

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   TOKENS
============================================================ */
:root {
  --page-bg:     #e9e9e9;
  --card-bg:     #ffffff;
  --header-bg:   #f4f4f2;
  --nav-bg:      #1c1d22;
  --nav-bg-hov:  #2a2b32;
  --subnav-bg:   #ededed;
  --border:      #dcdcdc;
  --border-dark: #cfcfcf;
  --accent:      #d62828;
  --accent-dark: #b01f1f;
  --text:        #3a3a3a;
  --text-dim:    #8a8a8a;
  --text-head:   #222222;
  --link:        #1a6fb0;
  --radius:      4px;
  --font:        'Helvetica Neue', Arial, sans-serif;
  --maxw:        1180px;
}

body {
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px;
}

/* ============================================================
   TOP PROMO BAR
============================================================ */
.promo-bar {
  background: #2b2b2b;
  color: #cfcfcf;
  font-size: 12px;
  text-align: center;
  padding: 6px 10px;
}
.promo-bar a { color: #f0c419; font-weight: 600; }
.promo-bar a:hover { text-decoration: underline; }

/* ============================================================
   HEADER
============================================================ */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo img { max-height: 56px; }
.site-logo {
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -1px;
}
.site-logo span { color: var(--accent); }

.header-search-form {
  display: flex;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.header-search-form input[type="search"] {
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  width: 220px;
  outline: none;
}
.header-search-form button {
  background: #f0f0f0;
  border: none;
  border-left: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-dim);
}
.header-search-form button:hover { background: #e6e6e6; }

/* Skip link / screen-reader utility */
.screen-reader-text {
  position: absolute !important;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 6px;
  top: 6px;
  width: auto;
  height: auto;
  z-index: 999999;
  background: #fff;
  color: var(--text-head);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Hamburger toggle button (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  background: var(--nav-bg);
  border: none;
  border-radius: var(--radius);
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 0 auto;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   PRIMARY NAV
============================================================ */
.primary-nav {
  background: var(--nav-bg);
}
.primary-nav .container { display: flex; align-items: center; }
.primary-nav ul { display: flex; flex-wrap: wrap; }
.primary-nav a {
  display: block;
  color: #d8d8d8;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 13px 16px;
  transition: background .15s, color .15s;
}
.primary-nav a:hover,
.primary-nav li.current a {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   SUB NAV (category tags row)
============================================================ */
.sub-nav {
  background: var(--subnav-bg);
  border-bottom: 1px solid var(--border);
}
.sub-nav ul { display: flex; flex-wrap: wrap; align-items: center; }
.sub-nav a {
  display: block;
  padding: 7px 13px;
  font-size: 11.5px;
  color: var(--text-dim);
  border-right: 1px solid var(--border);
}
.sub-nav a:hover { background: #e2e2e2; color: var(--text-head); }

/* "More" categories dropdown */
.sub-nav .more-cats {
  position: relative;
}
.sub-nav .more-cats > a {
  cursor: pointer;
  font-weight: 600;
}
.sub-nav .more-cats .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  z-index: 50;
  flex-direction: column;
}
.sub-nav .more-cats:hover .dropdown,
.sub-nav .more-cats.open .dropdown {
  display: flex;
}
.sub-nav .more-cats .dropdown a {
  padding: 8px 14px;
  border-right: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
}
.sub-nav .more-cats .dropdown a:last-child { border-bottom: none; }
.sub-nav .more-cats .dropdown a:hover { background: #f4f4f4; color: var(--accent); }

/* OS filter pills (Windows / Mac) shown alongside categories */
.os-filter { display: flex; gap: 6px; padding: 6px 0; margin-left: auto; padding-right: 6px; }
.os-filter a {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-dark);
  color: var(--text-dim);
}
.os-filter a.active,
.os-filter a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   BREADCRUMB / PAGE TITLE BAR
============================================================ */
.title-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.title-bar--breadcrumb-only {
  padding: 8px 0;
}
.title-bar--breadcrumb-only .breadcrumb {
  margin-top: 0;
}
.title-bar h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-head);
}
.breadcrumb {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 5px; }

/* ============================================================
   LAYOUT
============================================================ */
.layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 16px;
  padding: 16px 0 30px;
}

/* ============================================================
   ARCHIVE / HOME LIST CARDS
============================================================ */
.post-list-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 14px;
  display: flex;
  gap: 14px;
}
.post-list-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  overflow: hidden;
}
.post-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-body { flex: 1; min-width: 0; }
.post-list-body h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.post-list-body h2 a { color: var(--text-head); }
.post-list-body h2 a:hover { color: var(--accent); }
.post-meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-excerpt { font-size: 12.5px; color: var(--text); line-height: 1.6; }
.post-excerpt a { color: var(--link); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text);
}
.pagination a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .current { background: var(--nav-bg); color: #fff; border-color: var(--nav-bg); }

/* ============================================================
   SINGLE POST
============================================================ */
.single-post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.single-post-header { display: flex; gap: 16px; margin-bottom: 14px; }
.single-post-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.single-post-icon img { width: 100%; height: 100%; object-fit: cover; }
.single-post-titleblock h1 { font-size: 19px; font-weight: 700; color: var(--text-head); margin-bottom: 6px; line-height: 1.3; }
.single-post-titleblock .tagline { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }

.social-follow{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin:20px 0;
}

.social-follow .label{
    font-size:18px;
    font-weight:700;
    color:#111;
    margin-right:10px;
}

.social-follow a{
    width:42px;
    height:42px;
    border-radius:4px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff!important;
    text-decoration:none!important;
    font-size:22px;
    font-weight:700;
    transition:.2s;
}

.social-follow a:hover{
    transform:translateY(-2px);
    opacity:.9;
}

.sf-blogger{background:#fda352;}
.sf-diigo{background:#4a8bca;}
.sf-instapaper{background:#1a1a1a;}
.sf-pocket{background:#ee4056;}
.sf-flipboard{background:#cc0000;}
.sf-trello{background:#0079bf;}
.sf-pinterest{background:#e60023;}

.social-follow svg{
    width:22px;
    height:22px;
}

.social-follow-home a{
    width:28px;
    height:28px;
    font-size:14px;
}

.social-follow-home svg{
    width:14px;
    height:14px;
}

.entry-content { font-size: 13.5px; line-height: 1.8; color: var(--text); }
.entry-content p { margin-bottom: 14px; }
.entry-content h2, .entry-content h3 {
  color: var(--text-head);
  margin: 18px 0 10px;
  font-weight: 700;
}
.entry-content h2 { font-size: 15.5px; }
.entry-content h3 { font-size: 14px; }
.entry-content ul, .entry-content ol { margin: 0 0 14px 18px; list-style: disc; }
.entry-content li { margin-bottom: 5px; }
.entry-content a { color: var(--link); }
.entry-content a:hover { text-decoration: underline; }
.entry-content img { display: block; margin: 20px auto; max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* Info / spec box */
.spec-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
}
.spec-box .spec-title {
  background: #f0f0f0;
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-head);
}
.spec-box table { width: 100%; border-collapse: collapse; }
.spec-box td { padding: 7px 14px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.spec-box tr:last-child td { border-bottom: none; }
.spec-box td:first-child { color: var(--text-dim); font-weight: 600; width: 150px; }
.spec-box td:last-child { color: var(--text-head); }

/* Screenshots */
.screenshot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* Center screenshots */
  align-items: center;
  gap: 16px;
  margin: 20px auto;
  text-align: center;
}

.screenshot-grid a {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 320px;
  background: #fff;
}

.screenshot-grid img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Download box */
.download-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
.download-box .notice {
  font-size: 11.5px;
  color: #8a6d1a;
  background: #fff8e1;
  border: 1px solid #f0e0a0;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.download-btn{
    background:#4CAF50;
    border:none;
    color:#fff!important;
    padding:10px 20px;
    font-size:22px;
    font-weight:bold;
    border-radius:8px;

    display:block !important;
    width:fit-content;
    margin:20px auto !important;

    transition:.2s;
}

.download-btn:hover{
    box-shadow:0 8px 14px rgba(0,0,0,.18);
}
.mirror-links { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mirror-links a { color: var(--link); font-size: 12.5px; }
.mirror-links a:hover { text-decoration: underline; }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag-list a {
  background: #f0f0f0;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--text-dim);
}
.tag-list a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Comments */
.comments-area { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.comments-title { font-size: 14px; font-weight: 700; color: var(--text-head); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.comment-list .comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.comment-author { font-weight: 700; font-size: 12.5px; color: var(--text-head); }
.comment-date { font-size: 11px; color: var(--text-dim); margin-left: 6px; }
.comment-text { font-size: 12.5px; margin-top: 4px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 12.5px;
  margin-bottom: 10px;
  font-family: inherit;
}
.comment-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}
.comment-form button:hover { background: var(--accent-dark); }

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.widget-title {
  background: var(--nav-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 9px 14px;
}

.search-widget form { display: flex; padding: 12px; gap: 0; }
.search-widget input { flex: 1; border: 1px solid var(--border); border-right: none; padding: 7px 10px; font-size: 12.5px; border-radius: var(--radius) 0 0 var(--radius); }
.search-widget button { background: var(--accent); color: #fff; border: none; padding: 7px 12px; border-radius: 0 var(--radius) var(--radius) 0; }

.widget-list li {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list .num {
  width: 20px; height: 20px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.widget-list .thumb {
  width: 40px; height: 40px;
  border-radius: 3px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.widget-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-list .info { min-width: 0; }
.widget-list .info a { font-size: 12px; font-weight: 600; color: var(--text-head); display: block; line-height: 1.3; }
.widget-list .info a:hover { color: var(--accent); }
.widget-list .info small { font-size: 10.5px; color: var(--text-dim); }

/* Top games grid (thumb tiles) */
.widget-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
.tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafafa;
}
.tile .tile-img { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.tile .tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile .tile-cap { padding: 6px 8px; font-size: 10.5px; }
.tile .tile-cap a { color: var(--text-head); font-weight: 600; display: block; line-height: 1.3; }
.tile .tile-cap small { color: var(--text-dim); display: block; margin-top: 2px; }

/* Social follow widget */
.widget-social { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.widget-social a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nav-bg);
  color: #fff;
  border-radius: 3px;
}
.widget-social a:hover { background: var(--accent); }

/* Recent comments widget */
.widget-comments li { padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 11.5px; }
.widget-comments li:last-child { border-bottom: none; }
.widget-comments .who { color: var(--text-dim); }
.widget-comments a { color: var(--link); font-weight: 600; }

/* Ad slot */
.ad-slot {
  background: #f4f4f4;
  border: 1px dashed var(--border-dark);
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: var(--text-dim);
  border-radius: var(--radius);
}

/* Tag cloud */
.tagcloud { padding: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a { background: #f0f0f0; border: 1px solid var(--border); padding: 4px 9px; border-radius: 3px; font-size: 11px; color: var(--text-dim); }
.tagcloud a:hover { background: var(--accent); color: #fff; }

/* ============================================================
   404
============================================================ */
.error-404 { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 50px 20px; text-align: center; }
.error-404 h1 { font-size: 60px; color: var(--accent); font-weight: 800; }
.error-404 p { font-size: 14px; color: var(--text-dim); margin: 10px 0 20px; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer { background: var(--nav-bg); color: #b8b8b8; padding: 28px 0 16px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; margin-bottom: 20px; }
.footer-col h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.footer-col p { font-size: 12px; line-height: 1.7; color: #9a9a9a; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col a { font-size: 12px; color: #9a9a9a; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid #33343a; padding-top: 12px; display: flex; justify-content: space-between; font-size: 11px; color: #777; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Show hamburger, hide search width-heavy form a bit */
  .nav-toggle { display: flex; }
  .header-search-form input[type="search"] { width: 140px; }

  /* Primary nav becomes a collapsible slide-down panel */
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav .container { flex-wrap: wrap; padding: 0; }
  .primary-nav ul { flex-direction: column; width: 100%; }
  .primary-nav a { padding: 12px 16px; border-bottom: 1px solid var(--nav-bg-hov); }

  /* Sub-nav (categories) scrolls horizontally instead of wrapping */
  .sub-nav .container { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sub-nav .container::-webkit-scrollbar { display: none; }
  .sub-nav ul { flex-wrap: nowrap; }
  .sub-nav a { white-space: nowrap; }
  .os-filter { flex-shrink: 0; }
}

@media (max-width: 560px) {
  .post-list-card { flex-direction: column; }
  .post-list-thumb { width: 100%; height: 140px; }
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .single-post-header { flex-direction: column; }

  .site-header-inner { flex-wrap: wrap; }
  .header-search-form { order: 3; width: 100%; margin-top: 8px; }
  .header-search-form input[type="search"] { width: 100%; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
