/*
Theme Name: ITBlogNote Clean
Author: Codex
Description: Clean WordPress blog theme with an ITBLOGNOTE-like skeleton: topbar, logo ads, category nav, ticker, hot posts, post list, sidebar widgets, and footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: itblognote-clean
*/

:root {
  --page: #eef1f4;
  --panel: #ffffff;
  --text: #222832;
  --muted: #6b7280;
  --border: #d7dde5;
  --dark: #2f363d;
  --darker: #252b33;
  --brand: #07858b;
  --brand-dark: #05666b;
  --accent: #d33f32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

.wrap {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
}

.topbar {
  background: var(--dark);
  color: #dbe1e8;
  font-size: 12px;
}

.topbar-inner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-links,
.social-links,
.main-menu,
.main-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-links,
.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar a {
  color: #eef2f7;
}

.social-links a {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-weight: 700;
}

.brand-area {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.brand-inner {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(320px, 728px);
  gap: 24px;
  align-items: center;
  min-height: 118px;
  padding: 20px 0;
}

.site-title {
  margin: 0;
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.site-title a {
  color: var(--darker);
}

.site-title span {
  color: var(--brand);
}

.site-tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.header-ad {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(7, 133, 139, 0.08), rgba(211, 63, 50, 0.08)), #fff;
  color: #7a8491;
  text-align: center;
  text-transform: uppercase;
}

.header-ad strong {
  display: block;
  color: #4b5563;
}

.nav-bar {
  background: var(--brand);
  border-bottom: 3px solid var(--brand-dark);
}

.nav-inner {
	max-width: 960px !important;
    margin: 0 auto !important;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 0 14px;
  min-height: 43px;
  font-weight: 700;
  cursor: pointer;
}

.main-menu {
  display: flex;
  flex-wrap: wrap;
}

.main-menu li {
  position: relative;
}

.main-menu a {
  display: block;
  padding: 13px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
  background: var(--brand-dark);
  color: #fff;
}

.main-menu ul {
  position: absolute;
  z-index: 30;
  left: 0;
  top: 100%;
  min-width: 210px;
  background: var(--darker);
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
  transition: 140ms ease;
}

.main-menu li:hover > ul {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.main-menu ul a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: none;
  font-weight: 700;
	
}

.nav-search {
  display: flex;
  align-items: center;
  min-width: 230px;
  padding: 6px 0;
}

.nav-search form {
  display: flex;
  width: 100%;
}

.nav-search input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 8px 10px;
}

.nav-search button {
  border: 0;
  background: var(--darker);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
}

.ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.ticker-label {
  display: flex;
  align-items: center;
  background: var(--darker);
  color: #fff;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ticker-list {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  overflow: hidden;
  list-style: none;
  white-space: nowrap;
}

.hot-widget {
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 2px solid var(--brand);
  color: var(--darker);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.hot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.hot-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.hot-thumb,
.post-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark), var(--brand));
}

.hot-thumb {
  aspect-ratio: 16 / 10;
}

.hot-thumb img,
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.35;
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}

.content-panel,
.widget {
  background: var(--panel);
  border: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.section-head .block-title {
  border-bottom: 0;
}

.section-head a {
  margin-right: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-list {
  padding: 0 16px 16px;
}

.post-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.post-card:last-child {
  border-bottom: 0;
}

.post-thumb {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}

.thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 42px;
  font-weight: 800;
}

.post-label {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.entry-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.entry-title a {
  color: var(--darker);
}

.entry-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.entry-summary {
  margin: 0 0 12px;
  color: #3d4450;
}

.read-more {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 12px;
  background: var(--darker);
  color: #fff;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.read-more:hover {
  background: var(--brand);
  color: #fff;
}

.sidebar {
  display: grid;
  gap: 16px;
}

.widget {
  padding-bottom: 12px;
}

.widget-title,
.widget h2,
.widget .wp-block-heading {
  margin: 0 0 12px;
  padding: 11px 14px;
  border-bottom: 2px solid var(--brand);
  color: var(--darker);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.widget > *:not(.widget-title):not(h2):not(.wp-block-heading) {
  margin-left: 14px;
  margin-right: 14px;
}

.widget ul,
.widget .wp-block-latest-posts,
.widget .wp-block-latest-comments {
  margin: 0 14px;
  padding: 0;
  list-style: none;
}

.widget li,
.widget .wp-block-latest-posts li,
.widget .wp-block-latest-comments li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.widget li:last-child,
.widget .wp-block-latest-posts li:last-child,
.widget .wp-block-latest-comments li:last-child {
  border-bottom: 0;
}

.widget form,
.widget .wp-block-search {
  margin: 0 14px;
}

.widget .search-form,
.widget .wp-block-search__inside-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.widget input[type="search"],
.widget .wp-block-search__input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #9ca3af;
  padding: 8px 10px;
  font: inherit;
}

.widget button,
.widget .wp-block-search__button {
  min-height: 44px;
  border: 0;
  background: var(--darker);
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.widget-placeholder {
  display: grid;
  place-items: center;
  min-height: 68px;
  border: 1px dashed #c5ced9;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.social-widget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-widget li {
  padding: 0;
  border-bottom: 0;
}

.social-widget a {
  display: block;
  padding: 8px 10px;
  background: #eef7f8;
  border: 1px solid #c9e3e6;
  color: var(--brand-dark);
  text-align: center;
  font-weight: 800;
}

.tagcloud a {
  display: inline-block;
  margin: 4px 3px;
  padding: 4px 8px;
  background: #eef7f8;
  border: 1px solid #c9e3e6;
  color: var(--brand-dark);
  font-size: 13px !important;
}

.article {
  padding: 18px;
}

.article .entry-title {
  font-size: 30px;
}

.entry-content p {
  margin: 0 0 1em;
}

.pagination,
.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
}

.page-numbers,
.nav-links a,
.nav-links span {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 7px 11px;
}

.page-numbers.current {
  background: var(--brand);
  color: #fff;
}

.site-footer {
  margin-top: 34px;
  padding: 28px 0;
  background: var(--darker);
  color: #d8dde5;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-menu a {
  color: #eef2f7;
  font-size: 13px;
}

.copyright {
  margin-top: 16px;
  color: #b8c0cc;
  font-size: 13px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 940px) {
  .brand-inner,
  .site-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .main-menu {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .main-menu ul {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    background: var(--brand-dark);
  }

  .main-menu a {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 0;
  }

  .site-title {
    font-size: 30px;
  }

  .ticker {
    grid-template-columns: 1fr;
  }

  .ticker-label {
    min-height: 34px;
  }

  .hot-grid,
  .post-card {
    grid-template-columns: 1fr;
  }
}
