/*
Theme Name: SuperMag WP
Theme URI: https://example.com/supermag-wp
Author: Ported from Templateify SuperMag (Blogger) to WordPress
Author URI: https://www.templateify.com/
Description: A modern magazine / news WordPress theme inspired by the SuperMag Blogger template by Templateify. Features a topbar, sticky white header with menu + dark mode + search, a featured posts area, magazine-style post grid with category labels, sidebar widgets, and a dark footer.
Version: 1.0.1
Requires at least: 5.6
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: supermag-wp
Tags: blog, news, magazine, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, dark-mode
*/

/* ---------------------------------------------------------------
   SuperMag WP - Stylesheet
   Inspired by SuperMag (Blogger) by Templateify
--------------------------------------------------------------- */

/* CSS Variables (Light) */
:root {
  --body-font: 'Rubik', Arial, sans-serif;
  --title-font: 'Rubik', Arial, sans-serif;
  --meta-font: 'Rubik', Arial, sans-serif;
  --text-font: 'Rubik', Arial, sans-serif;

  --body-bg-color: #F6F8FA;
  --outer-bg: #FFFFFF;
  --main-color: #1087FF;
  --main-color-20: rgba(16, 135, 255, .12);
  --title-color: #2F353B;
  --title-hover-color: #1087FF;
  --meta-color: #8995A0;
  --tag-color: #1087FF;
  --text-color: #65656A;
  --excerpt-color: #8995A0;

  --topbar-bg: #FFFFFF;
  --topbar-color: #56626C;
  --topbar-hover-color: #1087FF;
  --topbar-border: #EAEEF2;

  --header-bg: #FFFFFF;
  --header-color: #2F353B;
  --header-hover-color: #1087FF;

  --submenu-bg: #FFFFFF;
  --submenu-color: #2F353B;
  --submenu-hover-color: #1087FF;

  --widget-title-color: #2F353B;
  --post-title-color: #2F353B;
  --post-title-hover-color: #1087FF;
  --post-text-color: #65656A;

  --footer-bg: #242A30;
  --footer-color: #F6F7F8;
  --footer-text-color: #CFD6DA;
  --footer-hover-color: #1087FF;
  --footerbar-bg: #1C2327;
  --footerbar-color: #F6F7F8;
  --footerbar-hover-color: #1087FF;

  --button-bg: #1087FF;
  --button-color: #FFFFFF;
  --button-hover-bg: #3367D6;
  --button-hover-color: #FFFFFF;

  --border-color: #EAEEF2;
  --avatar-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  --button-shadow: 0 1px 4px rgba(0, 0, 0, .06);

  --container-width: 1080px;
  --sidebar-width: 300px;
}

/* Dark Mode */
html.is-dark {
  --body-bg-color: #34393F;
  --outer-bg: #2C3137;
  --title-color: #F6F7F8;
  --post-title-color: #F6F7F8;
  --header-bg: #2C3137;
  --header-color: #F6F7F8;
  --submenu-bg: #2C3137;
  --submenu-color: #F6F7F8;
  --widget-title-color: #F6F7F8;
  --text-color: #CFD6DA;
  --post-text-color: #CFD6DA;
  --excerpt-color: #A6B0BA;
  --meta-color: #A6B0BA;
  --topbar-bg: #242A30;
  --topbar-color: #CFD6DA;
  --topbar-hover-color: #1087FF;
  --topbar-border: #3D4248;
}

/* Reset */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

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

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

a {
  color: var(--main-color);
  text-decoration: none
}

a:hover {
  color: var(--title-hover-color)
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--title-font);
  color: var(--title-color);
  margin: 0 0 .6em;
  line-height: 1.3
}

p {
  margin: 0 0 1em
}

button,
input,
select,
textarea {
  font-family: inherit
}

ul,
ol {
  padding: 0 0 0 18px;
  margin: 0 0 1em
}

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden
}

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

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--main-color);
  z-index: 10000;
  box-shadow: 0 0 10px var(--main-color);
}

#reading-progress {
  transition: width 0.1s ease-out;
}

/* Reading Time */
.reading-time {
  display: inline-flex;
  align-items: center
}

.reading-time i {
  margin-right: 5px;
  color: var(--main-color);
  font-size: 12px;
  opacity: .8
}

/* Sticky Sidebar */
@media (min-width: 901px) {
  .is-sticky-sidebar .sidebar .widget:last-child {
    position: sticky;
    top: 90px;
    z-index: 10;
  }
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px
}

/* ===== Topbar ===== */
.topbar-wrap {
  background: var(--topbar-bg);
  color: var(--topbar-color);
  height: 36px;
  font-size: 11px;
  font-weight: 500;
  border-bottom: 1px solid var(--topbar-border);
  letter-spacing: .2px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 30px
}

.topbar-inner a {
  color: var(--topbar-color);
  transition: color .2s, transform .2s;
}

.topbar-inner a:hover {
  color: var(--topbar-hover-color)
}

.topbar-menu ul,
.topbar-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center
}

.topbar-menu ul {
  gap: 30px
}

.topbar-menu li {
  position: relative;
  display: flex;
  align-items: center
}

.topbar-menu li:not(:last-child):after {
  content: "";
  width: 1px;
  height: 14px;
  background: var(--topbar-border);
  margin-left: 30px;
  opacity: 1;
}

.topbar-menu a {
  padding: 4px 0;
  position: relative
}

.topbar-menu a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--main-color);
  transition: width .3s;
}

.topbar-menu a:hover:after {
  width: 100%
}

.topbar-social ul {
  gap: 16px
}

.topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 13px;
}

.topbar-social a:hover {
  transform: translateY(-1px)
}

.topbar-date {
  opacity: .8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 24px;
  border-right: 1px solid var(--topbar-border);
}

.topbar-date:before {
  content: "\f017";
  font-family: "Font Awesome 5 Free";
  font-weight: 400;
  font-size: 10px;
  color: var(--main-color);
}

@media (max-width:600px) {
  .topbar-date {
    display: none
  }

  .topbar-inner {
    justify-content: center
  }

  .topbar-menu {
    display: none
  }
}

/* ===== Header ===== */
.header-wrap {
  background: var(--header-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  position: sticky;
  top: 0;
  z-index: 50
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px
}

.site-branding .custom-logo {
  max-height: 42px;
  width: auto
}

.site-title {
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 24px;
  color: var(--header-color);
  margin: 0;
  line-height: 1
}

.site-title a {
  color: inherit
}

.site-description {
  font-size: 12px;
  color: var(--meta-color);
  margin: 0
}

/* Primary nav */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: center
}

.primary-nav>div {
  position: relative
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px
}

.primary-nav li {
  position: relative
}

.primary-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--header-color);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2px;
  border-radius: 4px;
}

.primary-nav a:hover,
.primary-nav .current-menu-item>a,
.primary-nav .current-menu-parent>a {
  color: var(--header-hover-color)
}

.primary-nav li.menu-item-has-children>a:after {
  content: "\25BE";
  font-size: 10px;
  margin-left: 6px;
  opacity: .7
}

.primary-nav ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--submenu-bg);
  flex-direction: column;
  align-items: stretch;
  padding: 8px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  border-radius: 6px;
  display: none;
  z-index: 60;
}

.primary-nav li:hover>ul {
  display: flex
}

.primary-nav ul ul li {
  width: 100%
}

.primary-nav ul ul a {
  padding: 8px 16px;
  text-transform: none;
  font-weight: 400;
  color: var(--submenu-color);
  border-radius: 0
}

.primary-nav ul ul a:hover {
  color: var(--submenu-hover-color);
  background: rgba(16, 135, 255, .06)
}

.primary-nav ul ul ul {
  top: 0;
  left: 100%
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--header-color);
  border-radius: 50%;
  transition: background .2s;
  font-size: 15px;
}

.header-icon-btn:hover {
  background: rgba(16, 135, 255, .08);
  color: var(--header-hover-color)
}

.header-search-wrap {
  position: relative
}

.header-search-form {
  display: none;
  position: absolute;
  right: 0;
  top: 46px;
  width: 300px;
  background: var(--outer-bg);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.header-search-form.is-open {
  display: block
}

.header-search-form input[type=search] {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  background: rgba(155, 155, 155, .08);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  outline: none;
}

/* Mobile toggle */
.mobile-toggle {
  display: none
}

@media (max-width:900px) {
  .primary-nav {
    display: none
  }

  .mobile-toggle {
    display: inline-flex
  }
}

/* Mobile menu drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: var(--outer-bg);
  z-index: 200;
  transition: left .3s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, .15);
  overflow-y: auto;
  padding: 20px;
}

.mobile-drawer.is-open {
  left: 0
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto
}

.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0
}

.mobile-drawer li a {
  display: block;
  padding: 10px 4px;
  color: var(--header-color);
  border-bottom: 1px solid var(--border-color)
}

.mobile-drawer .close-drawer {
  float: right;
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--header-color);
  cursor: pointer
}

/* ===== Layout ===== */
#content-wrapper {
  padding: 25px 0
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 25px
}

@media (max-width:900px) {
  .content-grid {
    grid-template-columns: 1fr
  }
}

/* ===== Featured Section ===== */
.featured-wrap {
  margin: 0 0 25px
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 14px;
}

.featured-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #222;
  display: block;
  color: #fff;
}

.featured-item:nth-child(1) {
  grid-row: 1 / span 2
}

.featured-item img,
.featured-item .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.featured-item:hover img {
  transform: scale(1.06)
}

.featured-item:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .85) 100%);
}

.featured-item .featured-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
}

.featured-item .featured-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.featured-item:nth-child(1) .featured-title {
  font-size: 24px
}

.featured-item .featured-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  margin-top: 4px
}

@media (max-width:700px) {
  .featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none
  }

  .featured-item {
    height: 220px
  }

  .featured-item:nth-child(1) {
    grid-row: auto
  }
}

/* ===== Section Title ===== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
}

.section-title .title {
  font-family: var(--title-font);
  font-size: 16px;
  color: var(--widget-title-color);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
  position: relative;
  padding-left: 12px;
}

.section-title .title:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  background: var(--main-color);
  border-radius: 2px;
}

.section-title .more-link {
  font-size: 13px;
  color: var(--meta-color);
  font-weight: 500
}

.section-title .more-link:hover {
  color: var(--main-color)
}

/* ===== Post Layouts (Grid / List) ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px
}

@media (max-width:600px) {
  .posts-grid {
    grid-template-columns: 1fr
  }
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.posts-list .post-card {
  flex-direction: row;
  align-items: stretch
}

.posts-list .post-card .entry-image-wrap {
  flex: 0 0 260px;
  width: 260px;
  height: auto;
  min-height: 180px
}

.posts-list .post-card .entry-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 25px
}

.posts-list .post-card .entry-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

@media (max-width:768px) {
  .posts-list .post-card {
    flex-direction: column
  }

  .posts-list .post-card .entry-image-wrap {
    flex: none;
    width: 100%;
    height: 200px
  }
}

.post-card {
  background: var(--outer-bg);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .07)
}

.post-card .entry-image-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #eee;
}

.post-card .entry-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s
}

.post-card:hover .entry-image-wrap img {
  transform: scale(1.05)
}

.post-card .entry-body {
  padding: 18px
}

.post-card .entry-title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 600;
}

.post-card .entry-title a {
  color: var(--post-title-color)
}

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

.post-card .entry-excerpt {
  color: var(--excerpt-color);
  font-size: 14px;
  margin: 0 0 12px
}

.post-card .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--meta-color);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.post-card .entry-meta a {
  color: var(--meta-color)
}

.post-card .entry-meta a:hover {
  color: var(--main-color)
}

.post-card .author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
}

/* ===== Pagination ===== */
.pagination {
  margin: 30px 0 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--outer-bg);
  color: var(--title-color);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color)
}

/* ===== Single Post ===== */
.item-post {
  background: var(--outer-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.item-post h1.entry-title {
  font-size: 32px;
  font-weight: 700;
  margin: 10px 0 15px
}

.item-post .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--meta-color);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
}

.item-post .entry-meta a {
  color: var(--meta-color)
}

.item-post .entry-meta a:hover {
  color: var(--main-color)
}

.item-post .entry-meta .author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden
}

.item-post .featured-image {
  margin: 0 0 25px;
  border-radius: 6px;
  overflow: hidden
}

.item-post .post-body {
  font-family: var(--text-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--post-text-color)
}

.item-post .post-body h1 {
  font-size: 28px
}

.item-post .post-body h2 {
  font-size: 24px
}

.item-post .post-body h3 {
  font-size: 20px
}

.item-post .post-body h2,
.item-post .post-body h3,
.item-post .post-body h4 {
  margin: 1.4em 0 .6em;
  color: var(--title-color)
}

.item-post .post-body img {
  height: auto;
  border-radius: 6px;
  margin: 1em 0
}

.item-post .post-body blockquote {
  background: rgba(155, 155, 155, .07);
  padding: 18px 22px;
  border-left: 3px solid var(--main-color);
  border-radius: 4px;
  margin: 1em 0;
  color: var(--title-color);
}

.item-post .post-body code {
  background: rgba(155, 155, 155, .12);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: Menlo, Monaco, monospace;
  font-size: .92em
}

.item-post .post-body pre {
  background: #242a30;
  color: #f6f7f8;
  padding: 16px;
  border-radius: 6px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5
}

.item-post .post-body pre code {
  background: transparent;
  padding: 0;
  color: inherit
}

#breadcrumb {
  font-size: 13px;
  color: var(--meta-color);
  margin-bottom: 8px
}

#breadcrumb a {
  color: var(--meta-color)
}

#breadcrumb a:hover {
  color: var(--main-color)
}

#breadcrumb .sep {
  margin: 0 6px;
  opacity: .6
}

.entry-labels {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px
}

.entry-labels .lbl {
  color: var(--title-color);
  font-weight: 600;
  margin-right: 4px
}

.entry-labels a {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 3px;
}

.entry-labels a:hover {
  background: var(--main-color);
  color: #fff
}

.post-share {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.post-share .share-icon {
  font-size: 13px;
  color: var(--title-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.post-share a.s-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
}

.post-share a.s-fb {
  background: #3b5998
}

.post-share a.s-tw {
  background: #1da1f2
}

.post-share a.s-pi {
  background: #bd081c
}

.post-share a.s-wa {
  background: #25d366
}

.post-share a.s-ln {
  background: #0a66c2
}

.post-share a.s-link:hover {
  opacity: .9
}

.about-author {
  margin-top: 30px;
  padding: 20px;
  display: flex;
  gap: 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.about-author .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 64px
}

.about-author .author-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--title-color);
  margin: 0 0 6px
}

.about-author .author-text {
  color: var(--text-color);
  font-size: 14px;
  margin: 0
}

.post-nav {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.post-nav a {
  color: var(--title-color);
  font-weight: 500
}

.post-nav a:hover {
  color: var(--main-color)
}

.post-nav .label {
  display: block;
  font-size: 11px;
  color: var(--meta-color);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 2px
}

/* Related */
.related-wrap {
  margin-top: 30px
}

.related-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

@media (max-width:700px) {
  .related-posts {
    grid-template-columns: repeat(2, 1fr)
  }
}

.related-item .entry-image-wrap {
  display: block;
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-radius: 5px;
  margin-bottom: 8px;
  background: #eee
}

.related-item .entry-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.related-item .entry-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4
}

.related-item .entry-title a {
  color: var(--post-title-color)
}

.related-item .entry-title a:hover {
  color: var(--post-title-hover-color)
}

.related-item .meta {
  font-size: 11px;
  color: var(--meta-color);
  margin-top: 4px
}

/* Comments */
.comments-area {
  background: var(--outer-bg);
  border-radius: 8px;
  padding: 30px;
  margin-top: 25px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.comments-title {
  font-size: 18px;
  color: var(--title-color);
  font-weight: 600;
  margin: 0 0 20px
}

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

.comment-list .comment {
  position: relative;
  padding: 18px;
  margin: 15px 0 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

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

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px
}

.comment-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%
}

.comment-author .fn {
  font-weight: 600;
  color: var(--title-color)
}

.comment-meta {
  font-size: 12px;
  color: var(--meta-color);
  margin-bottom: 6px
}

.comment-content {
  font-size: 14px;
  color: var(--text-color)
}

.comment-reply-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  padding: 3px 10px;
  border-radius: 4px;
}

.comment-reply-link:hover {
  background: var(--main-color);
  color: #fff
}

.comment-respond {
  margin-top: 25px
}

.comment-form label {
  display: block;
  font-size: 13px;
  color: var(--title-color);
  margin: 10px 0 4px;
  font-weight: 500
}

.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(155, 155, 155, .06);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 14px;
}

.comment-form textarea {
  height: 120px;
  padding: 10px 12px;
  resize: vertical
}

.comment-form .submit,
.btn-primary {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-color);
  border: 0;
  padding: 0 22px;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.comment-form .submit:hover,
.btn-primary:hover {
  background: var(--button-hover-bg)
}

/* ===== Sidebar ===== */
.sidebar .widget {
  background: var(--outer-bg);
  padding: 20px;
  border-radius: 8px;
  margin: 0 0 25px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.sidebar .widget-title,
.sidebar h2.widget-title,
.sidebar h3.widget-title {
  font-size: 14px;
  color: var(--widget-title-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 15px;
  position: relative;
  padding-left: 12px;
}

.sidebar .widget-title:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  background: var(--main-color);
  border-radius: 2px;
}

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

.sidebar li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px
}

.sidebar li:last-child {
  border-bottom: 0;
  padding-bottom: 0
}

.sidebar li:first-child {
  padding-top: 0
}

.sidebar a {
  color: var(--title-color)
}

.sidebar a:hover {
  color: var(--main-color)
}

.sidebar .tagcloud a {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 4px 6px 0;
  font-size: 12px !important;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 4px;
}

.sidebar .tagcloud a:hover {
  background: var(--main-color);
  color: #fff
}

.sidebar .search-form {
  display: flex;
  gap: 8px
}

.sidebar .search-form input[type=search] {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  background: rgba(155, 155, 155, .06);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  outline: none;
}

.sidebar .search-form button {
  width: 38px;
  height: 38px;
  background: var(--button-bg);
  color: #fff;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

/* ===== Footer ===== */
#footer-wrapper {
  background: var(--footer-bg);
  color: var(--footer-text-color);
  margin-top: 40px
}

#footer-wrapper a {
  color: var(--footer-text-color)
}

#footer-wrapper a:hover {
  color: var(--footer-hover-color)
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 50px 0;
}

@media (max-width:900px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:560px) {
  .footer-widgets {
    grid-template-columns: 1fr
  }
}

.footer-widgets .widget-title {
  font-size: 14px;
  color: var(--footer-color);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 16px;
  font-weight: 600;
}

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

.footer-widgets li {
  padding: 6px 0;
  font-size: 14px
}

.footerbar {
  background: var(--footerbar-bg);
  color: var(--footerbar-color);
  padding: 18px 0;
  font-size: 13px;
}

.footerbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px
}

.footerbar-inner>* {
  min-width: 0
}

.footerbar .copyright {
  flex: 1 1 auto;
  min-width: 0
}

.footerbar a {
  color: var(--footerbar-color)
}

.footerbar a:hover {
  color: var(--footerbar-hover-color)
}

.footer-menu {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%
}

.footer-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
}

.footer-menu-list li {
  padding: 0
}

.footer-menu-list a {
  display: inline-block;
  padding: 2px 0;
  white-space: nowrap
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

@media (max-width:720px) {
  .footerbar-inner {
    justify-content: center;
    text-align: center
  }

  .footerbar .copyright {
    flex: 1 1 100%;
    text-align: center
  }

  .footer-menu-list {
    justify-content: center
  }

  .footer-social {
    justify-content: center;
    flex: 1 1 100%
  }
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 13px;
}

.footer-social a:hover {
  background: var(--main-color);
  color: #fff
}

/* ===== Page ===== */
.page-header {
  background: var(--outer-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.page-header h1 {
  margin: 0;
  font-size: 26px
}

.page-header .description {
  color: var(--meta-color);
  margin-top: 6px;
  font-size: 14px
}

.no-results {
  background: var(--outer-bg);
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

/* ===== Utils ===== */
.skip-link {
  position: absolute;
  left: -9999px
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  background: #fff;
  padding: 8px;
  z-index: 9999
}

/* Font Awesome fallback (when local FA enqueued) */
.fa,
.fas,
.far,
.fab {
  font-family: "Font Awesome 5 Free";
  font-weight: 900
}

.fab {
  font-family: "Font Awesome 5 Brands";
  font-weight: 400
}

/* Back to Top button */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--main-color);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 135, 255, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, background .15s, visibility .25s;
}

#back-to-top:hover {
  background: var(--button-hover-bg)
}

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

@media (max-width:560px) {
  #back-to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
    font-size: 14px
  }
}

/* Cards spacing on small */
@media (max-width:560px) {

  .item-post,
  .comments-area,
  .page-header {
    padding: 20px
  }

  .item-post h1.entry-title {
    font-size: 24px
  }
}

/* =============================================================
   Advanced Widgets
   ============================================================= */

/* Mini posts (Popular / Recent) */
.supermag-mini-posts {
  list-style: none;
  margin: 0;
  padding: 0
}

.supermag-mini-posts .mini-post {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  border-bottom: 1px dashed var(--border-color);
}

.supermag-mini-posts .mini-post:first-child {
  padding-top: 0
}

.supermag-mini-posts .mini-post:last-child {
  border-bottom: 0;
  padding-bottom: 0
}

.supermag-mini-posts .mini-thumb {
  position: relative;
  flex: 0 0 90px;
  width: 90px;
  height: 70px;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: #eee;
}

.supermag-mini-posts .mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s
}

.supermag-mini-posts .mini-thumb:hover img {
  transform: scale(1.06)
}

.supermag-mini-posts .mini-rank {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--main-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
}

.supermag-mini-posts .mini-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.supermag-mini-posts .mini-title {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  font-weight: 600;
}

.supermag-mini-posts .mini-title a {
  color: var(--title-color)
}

.supermag-mini-posts .mini-title a:hover {
  color: var(--main-color)
}

.supermag-mini-posts .mini-meta {
  font-size: 11px;
  color: var(--meta-color);
  margin-top: 5px
}

.supermag-mini-posts .mini-meta i {
  margin-right: 4px;
  color: var(--main-color)
}

/* Random Posts shuffle button */
.widget-title .supermag-random-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  background: var(--main-color-20);
  color: var(--main-color);
  border-radius: 50%;
  font-size: 11px;
  vertical-align: middle;
  transition: transform .4s, background .15s, color .15s;
}

.widget-title .supermag-random-refresh:hover {
  background: var(--main-color);
  color: #fff;
  transform: rotate(180deg);
}

/* Social counter */
.supermag-social-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.supermag-social-grid li {
  margin: 0;
  padding: 0;
  border: 0
}

.supermag-social-grid a {
  display: flex;
  align-items: center;
  height: 48px;
  color: #fff;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  transition: filter .15s;
}

.supermag-social-grid a:hover {
  filter: brightness(1.08);
  color: #fff
}

.supermag-social-grid .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  background: rgba(0, 0, 0, .12);
  font-size: 16px;
}

.supermag-social-grid .lbl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  line-height: 1.2
}

.supermag-social-grid .lbl strong {
  font-size: 13px;
  font-weight: 600
}

.supermag-social-grid .lbl em {
  font-size: 11px;
  font-style: normal;
  opacity: .85
}

/* About widget */
.supermag-about-widget {
  text-align: center
}

.supermag-about-widget .about-image {
  margin: 0 0 14px
}

.supermag-about-widget .about-image img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.supermag-about-widget .about-name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--title-color);
}

.supermag-about-widget .about-desc {
  font-size: 13px;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0 0 14px;
}

.supermag-about-widget .about-readmore {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--main-color);
  border-bottom: 1px solid var(--main-color);
}

.supermag-about-widget .about-readmore:hover {
  color: var(--button-hover-bg);
  border-color: var(--button-hover-bg)
}

/* Newsletter */
.supermag-newsletter {
  text-align: center;
  padding: 6px 0
}

.supermag-newsletter .nl-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--main-color-20);
  color: var(--main-color);
  border-radius: 50%;
  font-size: 18px;
  margin: 0 0 12px;
}

.supermag-newsletter .nl-text {
  font-size: 13px;
  color: var(--text-color);
  margin: 0 0 14px
}

.supermag-newsletter form {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.supermag-newsletter input[type=email] {
  height: 40px;
  padding: 0 12px;
  background: rgba(155, 155, 155, .06);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  color: var(--text-color);
  outline: none;
}

.supermag-newsletter input[type=email]:focus {
  background: var(--outer-bg);
  border-color: var(--main-color)
}

.supermag-newsletter button {
  height: 40px;
  background: var(--button-bg);
  color: var(--button-color);
  border: 0;
  border-radius: 5px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}

.supermag-newsletter button:hover {
  background: var(--button-hover-bg)
}

/* Categories list with counts */
.supermag-cat-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.supermag-cat-list li {
  padding: 0;
  border-bottom: 1px solid var(--border-color)
}

.supermag-cat-list li:last-child {
  border-bottom: 0
}

.supermag-cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--title-color);
  font-size: 14px;
  font-weight: 500;
}

.supermag-cat-list a:hover {
  color: var(--main-color)
}

.supermag-cat-list a:hover span {
  padding-left: 6px
}

.supermag-cat-list a span {
  transition: padding .2s;
  position: relative
}

.supermag-cat-list a span:before {
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 8px;
  color: var(--main-color);
  font-size: 11px;
}

.supermag-cat-list a em {
  font-style: normal;
  background: var(--main-color-20);
  color: var(--main-color);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

/* =============================================================
   Modern WP Search BLOCK (not the legacy Search widget)
   ============================================================= */
.sidebar .wp-block-search,
.footer-widgets .wp-block-search,
.wp-block-search.supermag-block-search {
  margin: 0;
}

.wp-block-search .wp-block-search__label {
  display: block;
  font-size: 14px;
  color: var(--widget-title-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 12px;
  position: relative;
  padding-left: 12px;
}

.wp-block-search .wp-block-search__label:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  background: var(--main-color);
  border-radius: 2px;
}

.wp-block-search .wp-block-search__inside-wrapper {
  display: flex;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 0;
}

.wp-block-search .wp-block-search__input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  background: rgba(155, 155, 155, .06);
  border: 1px solid var(--border-color) !important;
  border-radius: 5px;
  font-size: 14px;
  color: var(--text-color);
  outline: none;
  font-family: inherit;
}

.wp-block-search .wp-block-search__input:focus {
  background: var(--outer-bg);
  border-color: var(--main-color) !important;
}

.wp-block-search .wp-block-search__button {
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  background: var(--button-bg);
  color: var(--button-color);
  border: 0;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.wp-block-search .wp-block-search__button:hover {
  background: var(--button-hover-bg);
  color: #fff
}

.wp-block-search .wp-block-search__button.has-icon {
  padding: 0 12px
}

.wp-block-search .wp-block-search__button svg {
  fill: currentColor
}

/* Footer-area variants */
.footer-widgets .wp-block-search .wp-block-search__label {
  color: var(--footer-color)
}

.footer-widgets .wp-block-search .wp-block-search__input {
  background: rgba(255, 255, 255, .06);
  color: var(--footer-color);
  border-color: rgba(255, 255, 255, .12) !important;
}

.footer-widgets .wp-block-search .wp-block-search__input::placeholder {
  color: rgba(255, 255, 255, .6)
}