/*
Theme Name: XXXFILE
Theme URI: https://xxxfile.org
Author: XXXFILE
Author URI: https://xxxfile.org
Description: Dark adult file listing theme matching XXXFILE.ORG design. Responsive for PC and mobile. Based on original xxxfile theme structure.
Version: 1.12.1
License: GNU General Public License v2 or later
Text Domain: xxxfile
Tags: dark, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #1a1a1a;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  color: #959595 !important;
  word-break: break-word;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: #4a9eff;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7ab8ff;
  text-decoration: none !important;
}

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

ul, ol {
  list-style: none;
}

/* ==================== LAYOUT ==================== */
#wrapper,
.site-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background-color: rgb(41, 42, 42);
  border: 1px solid #363534;
  border-top: 0;
  border-bottom: 0;
  box-shadow: rgb(36, 37, 37) 0px 0px 0px 1px inset;
  min-height: 100vh;
}

/* ==================== HEADER ==================== */
#header,
.site-header {
  padding: 15px 0 20px 0;
  text-align: center;
  background-color: rgb(41, 42, 42);
  position: relative;
}

#site-title img,
.site-logo img {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.site-logo a {
  display: inline-block;
  text-decoration: none;
}

.site-logo .logo-text {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow:
    0 0 2px #1a3a6a,
    0 0 8px #2a5a9a,
    2px 2px 0 #0a1a3a,
    -1px -1px 0 #3a7aba;
  -webkit-text-stroke: 1px #1a4a8a;
}

.site-logo .logo-org {
  color: #c0d8f0;
}

/* Burger (mobile) */
.top__burger {
  display: none;
  position: absolute;
  right: 15px;
  top: 20px;
  width: 32px;
  height: 28px;
  cursor: pointer;
  z-index: 100;
}

.top__burger span,
.top__burger span:before,
.top__burger span:after {
  display: block;
  width: 28px;
  height: 3px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: 0.2s;
}

.top__burger span {
  top: 12px;
}

.top__burger span:before {
  content: "";
  top: -9px;
}

.top__burger span:after {
  content: "";
  top: 9px;
}

.top__burger.is-active span {
  background: transparent;
}

.top__burger.is-active span:before {
  top: 0;
  transform: rotate(45deg);
}

.top__burger.is-active span:after {
  top: 0;
  transform: rotate(-45deg);
}

/* Primary Navigation */
#menu.top,
.main-nav {
  padding: 0 !important;
  margin: 10px 0 5px;
}

.top__links ul,
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

.top .top__links ul:not(.dropdown) > li,
.main-nav li {
  /* inactive: muted — only real current uses brand blue */
  background-color: #3a3a4a;
  margin-right: 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  list-style: none;
}

.top .top__links ul:not(.dropdown) > li:hover,
.main-nav li:hover {
  background-color: #4a4a5c;
}

/* Active / current: brand blue — only ONE item should have this class */
.top .top__links ul:not(.dropdown) > li.current-menu-item,
.top .top__links ul:not(.dropdown) > li.current_page_item,
.main-nav li.current-menu-item,
.main-nav li.current_page_item {
  background-color: #13288c;
}

.top .top__links ul:not(.dropdown) > li.current-menu-item:hover,
.main-nav li.current-menu-item:hover {
  background-color: #001b3a;
}

.top .top__links ul:not(.dropdown) > li a,
.main-nav li a {
  display: block;
  padding: 7px 14px;
  color: #FFF !important;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
}

.top .top__links ul:not(.dropdown) > li a:hover,
.main-nav li a:hover {
  text-decoration: none !important;
}

/* Search Form */
#search_wrap,
.search-form-wrap {
  width: 100%;
  max-width: 600px;
  margin: 12px auto 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.search-form-wrap form,
#search_wrap form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.search-form-wrap input[type="search"],
#search_wrap input[type="search"],
.search-form-wrap input[type="text"] {
  flex: 1 1 auto;
  min-width: 0; /* critical: allow shrink on mobile */
  width: 100%;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 3px 0 0 3px;
  background: #fff;
  color: #333;
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  line-height: 40px;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* Remove default search clear button quirks on WebKit */
.search-form-wrap input[type="search"]::-webkit-search-decoration,
.search-form-wrap input[type="search"]::-webkit-search-cancel-button,
.search-form-wrap input[type="search"]::-webkit-search-results-button,
.search-form-wrap input[type="search"]::-webkit-search-results-decoration,
#search_wrap input[type="search"]::-webkit-search-decoration,
#search_wrap input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-form-wrap button,
#search_wrap button,
.button.is-primary {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 16px;
  background-color: #13288c;
  color: #fff;
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 40px;
  white-space: nowrap;
  transition: background 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.search-form-wrap button:hover,
.button.is-primary:hover {
  background-color: #001b3a;
}

/* ==================== MAIN CONTENT ==================== */
.site-main,
#content {
  padding: 0;
}

/* ==================== POST LIST - GRID (matches original) ==================== */
.grid-wrap {
  width: 100%;
}

/* Header row (Category / Title / Date) */
.grid.info {
  display: flex;
  background-color: #13288c;
  border: 1px solid #363534;
  border-left: 0;
  border-right: 0;
  box-shadow: rgb(36 37 37) 0px 0px 0px 1px inset;
  color: #FFF;
  font-weight: 600;
  font-size: 0.9rem;
}

.grid.info .column {
  padding: 8px 12px 8px 25px !important;
  border-right: 1px solid #363534;
  box-shadow: rgb(36 37 37) 0px 0px 0px 1px inset;
}

.grid.info .column:last-child {
  border-right: none;
}

.grid.info .is-one-fifth {
  width: 18%;
  flex: 0 0 18%;
}

.grid.info .is-three-fifths {
  width: 62%;
  flex: 0 0 62%;
}

.grid.info .is-one-fifth.date-col {
  width: 20%;
  flex: 0 0 20%;
  text-align: right;
  padding-right: 20px !important;
}

/* Data rows */
.grid.data {
  display: flex;
  background: #242525;
  border-bottom: 1px solid rgb(63, 65, 65);
  box-shadow: rgb(36, 37, 37) 0px 1px 0px 0px;
  transition: background 0.15s;
}

.grid.data:nth-child(even) {
  background-color: rgb(41, 41, 40);
}

.grid.data:hover {
  background-color: #2e2e2e;
}

.grid.data .column {
  padding: 8px 12px 8px 25px !important;
  border-right: 1px solid #363534;
  box-shadow: rgb(32 32 32) 0px 0px 0px 1px inset;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: rgb(181, 173, 161);
}

.grid.data .column:last-child {
  border-right: none;
}

.grid.data .is-one-fifth {
  width: 18%;
  flex: 0 0 18%;
}

.grid.data .is-three-fifths {
  width: 62%;
  flex: 0 0 62%;
}

.grid.data .is-one-fifth.date-col {
  width: 20%;
  flex: 0 0 20%;
  justify-content: flex-end;
  padding-right: 20px !important;
  color: #959595;
}

.grid.data .column a {
  color: rgb(181, 173, 161);
  font-size: 12px;
  font-weight: normal;
  text-decoration: none !important;
  display: block;
}

.grid.data .column a:hover {
  color: #c8c0b4;
  text-decoration: none !important;
}

.grid.data .column p,
.grid.data .column h2 {
  color: rgb(181, 173, 161);
  font-size: 12px;
  font-weight: normal;
  margin: 0;
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: block !important;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0 10px;
}

.page-numbers,
.pagination a,
.pagination span {
  display: inline-block !important;
  padding: 0.3125rem 0.9375rem;
  margin: 0 4px;
  border-radius: 4px;
  color: #FFF !important;
  background-color: #13288c;
  text-decoration: none !important;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.page-numbers.current,
.pagination .current {
  background-color: #001b3a;
  color: #FFF !important;
}

.page-numbers:hover,
.pagination a:hover {
  background-color: #001b3a;
  text-decoration: none !important;
}

.prev.page-numbers,
.next.page-numbers {
  padding: 0.3125rem 0.9375rem;
}

/* ==================== SIDEBAR / WIDGETS ==================== */
#sidebar,
.site-sidebar {
  color: #FFF;
  padding: 20px 20px 30px;
  background-color: rgb(41, 42, 42);
}

#sidebar ul,
.site-sidebar ul {
  margin: 0;
  padding: 0;
}

#sidebar ul li,
.site-sidebar ul li {
  list-style: none;
}

.widget {
  margin-bottom: 25px;
}

.widget-title {
  font-size: 1.15rem;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.widget select {
  width: 100%;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #555;
  border-radius: 3px;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Tag Cloud */
.tagcloud {
  text-align: center;
  line-height: 1.85;
  padding: 5px 0;
}

.tagcloud a {
  display: inline;
  margin: 0 3px;
  color: #4a9eff;
  font-size: 0.85rem !important;
  transition: color 0.2s;
  text-decoration: none !important;
  border-bottom: none !important;
}

.tagcloud a:hover {
  color: #7ab8ff;
  text-decoration: none !important;
}

.tagcloud a.tag-link-count-high {
  font-size: 1.2rem !important;
  font-weight: 700;
  color: #5ab0ff;
}

/* ==================== SINGLE POST ==================== */
.single-title {
  display: flex;
  border: 1px solid #363534;
  border-left: 0;
  border-right: 0;
  box-shadow: rgb(36 37 37) 0px 0px 0px 1px inset;
}

.single-title .column {
  background-color: #13288c;
  color: #FFF;
  padding: 8px 12px 8px 25px !important;
  border-right: 1px solid #363534;
  box-shadow: rgb(36 37 37) 0px 0px 0px 1px inset;
}

.single-title .column:last-child {
  border-right: none;
}

.single-title .label-col {
  width: 100px;
  flex: 0 0 100px;
  font-weight: 600;
  font-size: 1rem; /* same as title text */
}

.single-title .value-col {
  flex: 1;
  font-size: 1rem;
  font-weight: normal;
}

.single-title h1 {
  margin: 0;
  font-size: 1rem; /* same as "Title" label */
  font-weight: normal;
  color: #fff;
  line-height: 1.4;
}

/* Meta rows (Category / Date) */
.single-data {
  display: flex;
  background: #242525;
  border-bottom: 1px solid rgb(63, 65, 65);
  box-shadow: rgb(36, 37, 37) 0px 1px 0px 0px;
}

.single-data:nth-child(even) {
  background-color: rgb(41, 41, 40);
}

.single-data .column {
  padding: 8px 12px 8px 25px !important;
  border-right: 1px solid #363534;
  box-shadow: rgb(32 32 32) 0px 0px 0px 1px inset;
  font-size: 0.9rem;
  color: rgb(181, 173, 161);
  display: flex;
  align-items: center;
}

.single-data .column:last-child {
  border-right: none;
}

.single-data .label-col {
  width: 100px;
  flex: 0 0 100px;
  color: #aaa;
}

.single-data .value-col {
  flex: 1;
}

.single-data a {
  color: #4a9eff;
  font-weight: normal;
}

/* Content area */
.content-single,
.entry-content {
  padding: 20px !important;
  text-align: center !important;
  background-color: rgb(41, 42, 42);
}

.content-single img,
.entry-content img {
  display: inline-block;
  margin: 8px auto;
  border-radius: 2px;
}

.content-single blockquote,
.entry-content blockquote,
blockquote {
  background: rgb(45, 46, 46) !important;
  border-left: 2px solid #444646;
  margin: 15px auto;
  padding: 12px 18px;
  max-width: 520px;
  text-align: left;
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.7;
}

.entry-content .file-info {
  background: rgb(45, 46, 46);
  padding: 15px 20px;
  border-radius: 4px;
  margin: 20px auto;
  max-width: 480px;
  text-align: center;
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.8;
  border-left: 2px solid #444646;
}

.entry-content .download-links {
  margin: 25px 0;
  text-align: center;
}

.entry-content .download-links a {
  display: block;
  margin: 6px 0;
  color: #4a9eff;
  word-break: break-all;
  font-size: 0.9rem;
}

.entry-content .download-links .dl-label {
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 2px;
  display: block;
}

.entry-content .screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin: 20px auto;
  max-width: 700px;
}

.entry-content .screenshot-grid img {
  width: 100%;
  border-radius: 2px;
  border: 1px solid #333;
}

/* Tags on single */
.single-tags {
  padding: 12px 20px;
  background: #242525;
  border-top: 1px solid #363534;
  border-bottom: 1px solid #363534;
  font-size: 0.9rem;
  text-align: left;
}

.single-tags .tags-label {
  color: #aaa;
  margin-right: 8px;
  font-weight: 600;
}

.single-tags a {
  color: #4a9eff;
  margin-right: 4px;
}

/* ==================== COMMENTS ==================== */
#comments,
.comments-area {
  padding: 20px;
  background-color: rgb(41, 42, 42);
}

.comments-title {
  font-size: 22px;
  margin-bottom: 10px;
  color: #ddd;
}

.comment-notes {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 15px;
}

#comments textarea,
#comments input,
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  background-color: rgb(39, 40, 39);
  border: 1px solid rgb(68, 70, 70);
  color: rgb(229, 224, 216);
  box-shadow: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: 3px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 10px;
}

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

.comment-form textarea:focus,
.comment-form input:focus {
  outline: none;
  border-color: #13288c;
}

.comment-form label {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
  color: #bbb;
  font-size: 0.9rem;
}

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

.comment-form input[type="submit"],
.comment-form .submit {
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s;
}

.comment-form input[type="submit"]:hover,
.comment-form .submit:hover {
  background-color: #444;
}

/* Slide to verify visual */
.slide-verify {
  display: flex;
  align-items: center;
  margin: 15px 0;
  background: rgb(39, 40, 39);
  border: 1px solid rgb(68, 70, 70);
  border-radius: 3px;
  overflow: hidden;
  max-width: 320px;
}

.slide-verify .slide-btn {
  width: 48px;
  height: 42px;
  background: #13288c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.slide-verify .slide-text {
  flex: 1;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* Comment list */
.comments ul,
.comment-list {
  border: 1px solid rgb(68, 70, 70);
  background-color: rgb(39, 40, 39);
  color: rgb(229, 224, 216);
  list-style: none;
  margin-left: 0;
  margin-bottom: 20px;
  padding: 15px;
}

.comment-body {
  margin-left: 0;
  padding: 10px 0;
  border-bottom: 1px solid #333;
}

.comment-author {
  font-weight: 600;
  color: #ddd;
}

.comment-meta {
  color: #666;
  font-size: 12px;
  margin-bottom: 6px;
}

.comment-content {
  color: #bbb;
  font-size: 0.9rem;
}

/* Post Navigation */
.post-navigation {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  padding: 16px 20px 20px;
  margin-top: 10px;
  border-top: 1px solid #363534;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 1 1 50%;
  max-width: 50%;
  min-width: 0; /* allow ellipsis inside flex */
}
.post-navigation .nav-next {
  text-align: right;
}
.post-navigation a {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: #4a9eff;
  text-decoration: none;
  font-size: 0.95rem;
  overflow: hidden;
}
.post-navigation .nav-next a {
  justify-content: flex-end;
}
.post-navigation .nav-title {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.post-navigation .nav-arrow {
  flex-shrink: 0;
}
.post-navigation a:hover {
  color: #7ab8ff;
  text-decoration: none !important;
}
.post-navigation a:hover .nav-title {
  text-decoration: none !important;
}

/* ==================== FOOTER ==================== */
#footer,
.site-footer {
  color: #FFF;
  background-color: rgb(39, 40, 39);
  border: 1px solid #363534;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  box-shadow: rgb(36 37 37) 0px 0px 0px 1px inset;
  padding: 15px 20px;
  text-align: center;
  font-size: 0.85rem;
}

#footer .menu li,
.site-footer a {
  display: inline-block;
  margin: 0 8px;
  color: #4a9eff;
}

.site-footer .copyright {
  margin-top: 10px;
  color: #777;
}

/* ==================== 404 / PAGE ==================== */
.for-o-for,
.entry-content.page-content {
  padding: 20px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 922px) {
  .main-nav ul,
  .top__links ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav li,
  .top .top__links ul:not(.dropdown) > li {
    margin-right: 0;
    border-radius: 0;
  }

  .top__burger {
    display: block;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  /* Tablet search */
  #search_wrap,
  .search-form-wrap {
    max-width: 100%;
    padding: 0 16px;
  }
}


@media (max-width: 767px) {
  .xxxfile-hover-tip {
    display: none !important;
    visibility: hidden !important;
  }

  #wrapper,
  .site-wrapper {
    max-width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .site-logo .logo-text {
    font-size: 1.9rem;
  }
  /* Mobile search bar - adaptive */
  #header,
  .site-header {
    padding: 12px 0 14px;
  }

  #search_wrap,
  .search-form-wrap {
    max-width: 100%;
    width: 100%;
    padding: 0 12px;
    margin: 10px auto 0;
  }

  .search-form-wrap form,
  #search_wrap form {
    width: 100%;
  }

  .search-form-wrap input[type="search"],
  #search_wrap input[type="search"],
  .search-form-wrap input[type="text"] {
    height: 42px;
    line-height: 42px;
    font-size: 16px;
    padding: 0 10px;
    border-radius: 4px 0 0 4px;
  }

  .search-form-wrap button,
  #search_wrap button,
  .button.is-primary {
    height: 42px;
    line-height: 42px;
    padding: 0 14px;
    font-size: 0.85rem;
    border-radius: 0 4px 4px 0;
  }

  .site-logo img,
  .site-logo .custom-logo-link img,
  .site-logo img.custom-logo {
    max-width: min(90vw, 320px);
    max-height: 64px;
  }


  .grid.info {
    display: none; /* hide header row on mobile like original */
  }

  .grid.data {
    flex-wrap: wrap;
  }

  .grid.data .is-three-fifths {
    width: 100%;
    flex: 0 0 100%;
    order: 1;
    border-right: none;
    border-bottom: 1px solid #363534;
    padding: 10px 15px !important;
  }

  .grid.data .is-one-fifth {
    width: 50%;
    flex: 0 0 50%;
    order: 2;
  }

  .grid.data .is-one-fifth.date-col {
    width: 50%;
    flex: 0 0 50%;
    order: 3;
    justify-content: flex-end;
  }

  .grid.data .column a {
    font-size: 13px;
  }

  .single-title {
    flex-wrap: wrap;
  }

  .single-title .label-col {
    width: 80px;
    flex: 0 0 80px;
    font-size: 0.95rem;
  }

  .single-title .value-col {
    font-size: 0.95rem;
  }

  .single-title h1 {
    font-size: 0.95rem;
  }

  .single-data .label-col {
    width: 80px;
    flex: 0 0 80px;
  }

  .content-single,
  .entry-content {
    padding: 15px 10px !important;
  }

  .entry-content .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .post-navigation {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 12px 16px;
  }
  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    flex: 1 1 50%;
    max-width: 50%;
  }
  .post-navigation a {
    font-size: 0.85rem;
  }

  .pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row !important;
  }
}

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

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==================== SIDEBAR DROPDOWNS 50/50 ==================== */
.sidebar-dropdowns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 25px;
}

.sidebar-dropdowns .dropdown-half {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
  margin-bottom: 0;
}

.sidebar-dropdowns .dropdown-half .widget-title {
  margin-bottom: 8px;
}

.sidebar-dropdowns .dropdown-half select {
  width: 100%;
}

/* Category link in list */
.grid.data .column a.cat-link,
.grid.data .column .cat-link {
  color: rgb(181, 173, 161);
  font-size: 12px;
  text-decoration: none !important;
  border-bottom: none !important;
}

.grid.data .column a.cat-link:hover {
  color: #4a9eff;
  text-decoration: none !important;
}

/* Custom logo image sizing */
.site-logo .custom-logo-link img,
.site-logo img.custom-logo {
  max-width: 400px;
  width: auto;
  height: auto;
  max-height: 100px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .sidebar-dropdowns {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar-dropdowns .dropdown-half {
    flex: 1 1 100%;
    width: 100%;
  }
}


/* ==================== HOVER THUMBNAIL PREVIEW ==================== */
.xxxfile-hover-tip {
  position: fixed;
  z-index: 99999;
  display: none;
  pointer-events: none;
  max-width: 300px;
  background: #1a1a1a;
  border: 1px solid #555;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  padding: 4px;
  line-height: 0;
}

.xxxfile-hover-tip.is-visible {
  display: block;
}

.xxxfile-hover-tip img {
  display: block;
  max-width: 300px;
  width: auto;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 2px;
}

/* Title link cursor */
a.post-title-link[data-thumb] {
  cursor: pointer;
}

/* ==================== SINGLE CONTENT FIXED WIDTH + WRAP ==================== */
.content-single,
.entry-content {
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
}

.content-single a,
.entry-content a,
.content-single p,
.entry-content p,
.content-single li,
.entry-content li,
.content-single pre,
.entry-content pre,
.content-single code,
.entry-content code,
.content-single blockquote,
.entry-content blockquote {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.content-single pre,
.entry-content pre {
  white-space: pre-wrap;
  overflow-x: auto;
}

.content-single img,
.entry-content img {
  max-width: 100% !important;
  height: auto !important;
}

.content-single table,
.entry-content table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

.content-single iframe,
.entry-content iframe,
.content-single video,
.entry-content video,
.content-single embed,
.entry-content embed {
  max-width: 100%;
}

/* Download links / long URLs */
.entry-content .download-links a,
.content-single .download-links a {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Single article container stays within wrapper */
.single-view article,
.single article {
  max-width: 100%;
  overflow: hidden;
}

/* ==================== TBUI-SB (bottom-right up) ==================== */
.tbui-sb {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 2147483000 !important;
  /* visibility controlled by JS (scroll > 200px) */
}
.tbui-sb-up {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  line-height: 48px !important;
  text-align: center !important;
  color: #fff !important;
  background: #13288c !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-size: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  cursor: pointer !important;
}
.tbui-sb-up:hover {
  background: #001b3a !important;
  color: #fff !important;
  text-decoration: none !important;
}
@media (max-width: 767px) {
  .tbui-sb {
    right: 12px !important;
    bottom: 14px !important;
  }
  .tbui-sb-up {
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
  }
}

/* ==================== NO LINK UNDERLINES (force) ==================== */
a,
a:link,
a:visited,
a:hover,
a:focus,
a:active,
.grid.data .column a,
.grid.data .column a:hover,
.grid.data .column a.cat-link,
.grid.data .column a.cat-link:hover,
a.post-title-link,
a.post-title-link:hover,
a.post-title-link:focus,
.tagcloud a,
.tagcloud a:hover,
.tagcloud a:focus,
#footer a,
#footer a:hover,
.site-footer a,
.site-footer a:hover,
.sidebar a,
.sidebar a:hover,
.content-single a,
.content-single a:hover,
.entry-content a,
.entry-content a:hover,
.single-data a,
.single-data a:hover,
.pagination a,
.pagination a:hover {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* ==================== IMAGE LIGHTBOX ==================== */
.content-single img,
.entry-content img {
  cursor: zoom-in;
  max-width: 100%;
  height: auto;
}

.xxxfile-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  align-items: center;
  justify-content: center;
}

.xxxfile-lightbox.is-open {
  display: flex;
}

.xxxfile-lightbox .xlb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.xxxfile-lightbox .xlb-stage {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xxxfile-lightbox .xlb-img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
  border-radius: 2px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.xxxfile-lightbox .xlb-close,
.xxxfile-lightbox .xlb-prev,
.xxxfile-lightbox .xlb-next {
  position: absolute;
  z-index: 3;
  border: none;
  background: rgba(30, 30, 30, 0.75);
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.xxxfile-lightbox .xlb-close:hover,
.xxxfile-lightbox .xlb-prev:hover,
.xxxfile-lightbox .xlb-next:hover {
  background: #13288c;
}

.xxxfile-lightbox .xlb-close {
  top: 16px;
  right: 16px;
  font-size: 32px;
}

.xxxfile-lightbox .xlb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.xxxfile-lightbox .xlb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.xxxfile-lightbox .xlb-counter {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #ccc;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 12px;
}

body.xlb-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .xxxfile-lightbox .xlb-prev,
  .xxxfile-lightbox .xlb-next {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .xxxfile-lightbox .xlb-prev { left: 8px; }
  .xxxfile-lightbox .xlb-next { right: 8px; }
}

/* ==================== PAGE TEMPLATES ==================== */
.page-blank-content {
  padding: 20px 15px;
  min-height: 120px;
}

.page-tags-block {
  padding: 16px 12px 24px;
}

.page-tags-block .value-col {
  text-align: left;
}

.page-tags-block .xxxfile-tagcloud-all {
  text-align: left;
  line-height: 1.9;
  padding: 8px 0;
}

.page-tags-block .xxxfile-tagcloud-all a {
  margin: 0 6px 4px 0;
  display: inline-block;
  text-decoration: none !important;
}

.xxxfile-no-tags {
  color: #888;
  padding: 12px 0;
}

/* ==================== STICKY POST IN LIST ==================== */
.grid.data.is-sticky-row {
  background-color: rgba(19, 40, 140, 0.12);
}

a.post-title-link.is-sticky-title {
  font-weight: 700 !important;
  color: #ff6b4a !important;
}

a.post-title-link.is-sticky-title:hover {
  color: #ff8f75 !important;
}

.sticky-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background: #e53935;
  border-radius: 2px;
  vertical-align: middle;
  letter-spacing: 0;
}
