/* =============================================
   Digituskh WordPress Theme — Main Stylesheet
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #e30613;
  --dark: #1a1a2e;
  --dark2: #2d2d44;
  --white: #ffffff;
  --gray-light: #f4f4f4;
  --gray-mid: #eeeeee;
  --gray-text: #999999;
  --text: #1a1a2e;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --container: 1120px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--gray-light); color: var(--text); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.screen-reader-text { position: absolute; left: -9999px; }

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

/* ── Topbar ── */
#topbar { background: var(--dark); color: #aaa; font-size: 11px; padding: 5px 0; border-bottom: 1px solid #333; }
#topbar .topbar-inner { display: flex; justify-content: space-between; align-items: center; }
#topbar a { color: #aaa; margin: 0 8px; transition: color .2s; }
#topbar a:hover { color: #fff; }
#topbar .topbar-date { color: #666; }
#topbar .topbar-social a { margin: 0 4px; }

/* ── Site Header ── */
#masthead {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow);
}
#masthead .header-inner { display: flex; align-items: center; gap: 16px; padding: 8px 0; }

.site-branding .site-title { margin: 0; }
.site-branding .site-title a {
  font-size: 24px; font-weight: 800; color: var(--red);
  letter-spacing: -1px; white-space: nowrap;
}
.site-branding .site-title a span { color: var(--dark); }
.site-branding .site-description { display: none; }

/* ── Navigation ── */
#site-navigation { flex: 1; overflow: hidden; }
#primary-menu { display: flex; gap: 0; overflow-x: auto; }
#primary-menu li a {
  font-size: 12px; font-weight: 600; padding: 6px 11px;
  color: #444; white-space: nowrap;
  border-bottom: 3px solid transparent;
  display: block; transition: color .2s, border-color .2s;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item > a,
#primary-menu li.current_page_item > a { color: var(--red); border-bottom-color: var(--red); }
#primary-menu li ul { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-search {
  background: var(--red); color: #fff; border: none;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: background .2s;
}
.btn-search:hover { background: #c0000f; }
.btn-dark {
  background: none; border: 1px solid #ddd;
  padding: 6px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; line-height: 1;
  transition: background .2s;
}
.btn-dark:hover { background: #f0f0f0; }

/* ── Trending Bar ── */
#trending-bar {
  background: var(--dark); color: #fff;
  padding: 7px 0; overflow: hidden;
}
#trending-bar .trending-inner { display: flex; align-items: center; overflow-x: auto; gap: 0; }
.trending-label {
  background: var(--red); font-size: 10px; font-weight: 700;
  padding: 3px 12px; border-radius: var(--radius-sm);
  white-space: nowrap; margin-right: 12px; flex-shrink: 0;
}
#trending-bar a {
  color: #ccc; font-size: 11px; white-space: nowrap;
  padding: 0 12px; border-right: 1px solid #444; transition: color .2s;
}
#trending-bar a:last-child { border-right: none; }
#trending-bar a:hover { color: #fff; }

/* ── Hero ── */
#hero { background: var(--dark); padding: 16px 0; }
#hero .hero-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hero-main {
  grid-column: 1 / 3;
  background: var(--dark2); border-radius: var(--radius);
  min-height: 240px; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 20px; position: relative; overflow: hidden;
}
.hero-main .hero-thumbnail {
  position: absolute; inset: 0;
  object-fit: cover; width: 100%; height: 100%; opacity: .45;
}
.hero-main .hero-no-image {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,#2d2d44,#1a1a2e);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}
.hero-main .hero-content { position: relative; z-index: 2; }
.hero-main .hero-content::before {
  content:''; position: absolute; inset: -80px -20px -20px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
  z-index: -1; border-radius: var(--radius);
}
.cat-tag {
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 8px;
  border-radius: 3px; display: inline-block; margin-bottom: 8px; text-transform: uppercase;
}
.hero-main h2 { font-size: 20px; font-weight: 700; line-height: 1.3; color: #fff; margin-bottom: 6px; }
.hero-main h2 a { color: #fff; }
.hero-main h2 a:hover { color: #ffcdd2; }
.hero-main .post-meta { font-size: 11px; color: #aaa; }

.hero-side { display: flex; flex-direction: column; gap: 8px; }
.hero-side-item {
  background: var(--dark2); border-radius: var(--radius);
  padding: 12px; flex: 1; transition: background .2s; cursor: pointer;
}
.hero-side-item:hover { background: #3a3a54; }
.hero-side-item .cat-tag { background: #3a3a54; color: #ccc; }
.hero-side-item h4 { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.35; }
.hero-side-item h4 a { color: #fff; }
.hero-side-item h4 a:hover { color: #ffcdd2; }

/* ── Page Layout ── */
#primary-content { padding: 18px 0; }
.content-area-inner {
  display: grid; grid-template-columns: 1fr 290px; gap: 18px;
}

/* ── Cards & Sections ── */
.section-card {
  background: var(--white); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; border: 1px solid var(--gray-mid);
}
.section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--red);
  border-bottom: 2px solid var(--red); padding-bottom: 8px; margin-bottom: 14px;
}

/* ── Featured Grid ── */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.feat-card {
  border: 1px solid var(--gray-mid); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: box-shadow .2s, transform .15s;
  display: block;
}
.feat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feat-card .feat-thumb {
  height: 110px; width: 100%; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.feat-card-body { padding: 10px 12px; }
.feat-card-cat { font-size: 9px; font-weight: 700; color: var(--red); text-transform: uppercase; margin-bottom: 4px; }
.feat-card-title { font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text); }
.feat-card:hover .feat-card-title { color: var(--red); }

/* ── Article Rows ── */
.article-list { display: flex; flex-direction: column; }
.article-row {
  display: grid; grid-template-columns: 95px 1fr;
  gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--gray-mid); align-items: start;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: #fafafa; padding: 12px 4px; margin: 0 -4px; border-radius: 4px; }
.article-row .art-thumb {
  width: 95px; height: 63px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
  display: block; background: #eee;
}
.art-cat { font-size: 9px; font-weight: 700; color: var(--red); text-transform: uppercase; margin-bottom: 3px; }
.art-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 5px; display: block; }
.art-title:hover { color: var(--red); }
.art-meta { font-size: 10px; color: var(--gray-text); }
.art-meta span { margin-right: 8px; }
.post-format-badge {
  display: inline-block; font-size: 8px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
  vertical-align: middle; text-transform: uppercase;
}
.badge-new { background: #27ae60; color: #fff; }
.badge-hot { background: var(--red); color: #fff; }
.badge-deal { background: #f39c12; color: #fff; }
.badge-review { background: #8e44ad; color: #fff; }

/* ── Sidebar ── */
.sidebar-widget {
  background: var(--white); border: 1px solid var(--gray-mid);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.widget-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--red);
  border-bottom: 2px solid var(--red); padding-bottom: 8px; margin-bottom: 12px;
}

/* Recent Posts Widget */
.sidebar-post-item {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 8px; padding: 7px 0;
  border-bottom: 1px solid #f5f5f5; align-items: center;
}
.sidebar-post-item:last-child { border-bottom: none; }
.sidebar-post-item img { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; }
.sidebar-post-item .no-thumb { width: 56px; height: 40px; border-radius: 4px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sidebar-post-title { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 2px; display: block; }
.sidebar-post-title:hover { color: var(--red); }
.stars { font-size: 10px; color: var(--red); }

/* Deals Widget */
.deal-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #f5f5f5; font-size: 11px;
}
.deal-item:last-child { border-bottom: none; }
.deal-name { color: var(--text); font-weight: 500; }
.deal-price { font-weight: 700; color: var(--red); }
.deal-old { color: #bbb; text-decoration: line-through; font-size: 10px; margin-left: 5px; }

/* Tags Widget */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag-pill {
  background: #f0f0f0; color: #555; font-size: 10px;
  padding: 3px 10px; border-radius: 12px; cursor: pointer;
  transition: background .2s, color .2s;
}
.tag-pill:hover { background: var(--red); color: #fff; }

/* Newsletter Widget */
.newsletter-widget { background: var(--dark); border-color: #333; }
.newsletter-widget .widget-title { color: #fff; }
.newsletter-widget p { font-size: 11px; color: #aaa; margin-bottom: 10px; }
.newsletter-input {
  width: 100%; padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid #444; background: var(--dark2);
  color: #fff; font-size: 11px; margin-bottom: 7px; outline: none;
  transition: border-color .2s;
}
.newsletter-input:focus { border-color: var(--red); }
.btn-subscribe {
  width: 100%; background: var(--red); color: #fff; border: none;
  padding: 8px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; cursor: pointer; transition: background .2s;
}
.btn-subscribe:hover { background: #c0000f; }

/* More link */
.more-link { font-size: 11px; color: var(--red); font-weight: 600; display: inline-block; margin-top: 8px; }
.more-link:hover { text-decoration: underline; }

/* ── Single Post ── */
.single-article { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--gray-mid); }
.article-breadcrumb { font-size: 11px; color: #999; margin-bottom: 12px; }
.article-breadcrumb a { color: #999; }
.article-breadcrumb a:hover { color: var(--red); }
.article-cat { font-size: 10px; font-weight: 700; color: var(--red); text-transform: uppercase; margin-bottom: 8px; }
.entry-title { font-size: 28px; font-weight: 800; line-height: 1.25; color: var(--dark); margin-bottom: 12px; }
.article-deck { font-size: 16px; color: #555; line-height: 1.55; margin-bottom: 16px; border-left: 3px solid var(--red); padding-left: 14px; }
.article-meta-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 18px; }
.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 13px; font-weight: 600; }
.article-date { font-size: 11px; color: #999; }
.share-btns { display: flex; gap: 6px; }
.share-btn { background: #f5f5f5; border: 1px solid #ddd; width: 32px; height: 32px; border-radius: 4px; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.share-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.entry-featured-image { border-radius: 8px; overflow: hidden; margin-bottom: 8px; max-height: 420px; }
.entry-featured-image img { width: 100%; height: 420px; object-fit: cover; }
.img-caption { font-size: 11px; color: #999; text-align: center; margin-bottom: 20px; font-style: italic; }
.entry-content p { font-size: 15px; line-height: 1.75; color: #2a2a2a; margin-bottom: 16px; }
.entry-content h2 { font-size: 20px; font-weight: 700; color: var(--dark); margin: 24px 0 12px; }
.entry-content h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin: 20px 0 10px; }
.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 16px; font-size: 15px; line-height: 1.75; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote { border-left: 4px solid var(--red); padding: 12px 18px; margin: 20px 0; font-size: 17px; font-style: italic; color: #444; background: #fafafa; border-radius: 0 6px 6px 0; }
.entry-content img { border-radius: 6px; margin: 16px 0; }
.entry-content a { color: var(--red); text-decoration: underline; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; padding-top: 16px; border-top: 1px solid #eee; }
.author-box { display: flex; align-items: flex-start; gap: 14px; background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; padding: 16px; margin-top: 20px; }
.author-box-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.author-box-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.author-box-bio { font-size: 12px; color: #666; line-height: 1.6; }

/* Comments */
.comments-area { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--gray-mid); margin-top: 16px; }
.comments-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.comment-list { padding: 0; }
.comment { list-style: none; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.comment:last-child { border-bottom: none; }
.comment-author .fn { font-size: 13px; font-weight: 600; }
.comment-meta { font-size: 11px; color: #999; margin-bottom: 8px; }
.comment-content p { font-size: 13px; line-height: 1.65; color: #333; }
.comment-reply-link { font-size: 11px; color: var(--red); }
.comment-form label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #ddd;
  border-radius: 6px; font-size: 13px; outline: none;
  font-family: var(--font); transition: border-color .2s; margin-bottom: 10px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); }
.comment-form textarea { resize: vertical; min-height: 100px; }
.submit { background: var(--red); color: #fff; border: none; padding: 9px 22px; border-radius: 4px; font-size: 13px; font-weight: 700; cursor: pointer; }
.submit:hover { background: #c0000f; }

/* ── Category Archive ── */
.archive-header { background: var(--dark); color: #fff; padding: 28px 0 20px; margin-bottom: 0; }
.archive-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.archive-description { color: #aaa; font-size: 14px; }
.archive-emoji { font-size: 40px; margin-bottom: 8px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 20px 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 4px;
  border: 1px solid #ddd; font-size: 13px; font-weight: 600; color: var(--text);
  transition: background .2s, color .2s;
}
.pagination .current, .pagination a:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Search Results ── */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 999;
  align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-box {
  background: #fff; border-radius: var(--radius); padding: 20px;
  width: 560px; max-width: 90vw; box-shadow: 0 8px 40px rgba(0,0,0,.3);
}
.search-box input[type="search"] {
  width: 100%; padding: 10px 14px; border: 2px solid var(--red);
  border-radius: var(--radius-sm); font-size: 15px; outline: none; margin-bottom: 10px;
}
.search-close { float: right; background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }
.search-results-heading { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: var(--dark); }
.no-results { text-align: center; padding: 40px 0; color: #999; font-size: 15px; }

/* ── Footer ── */
#colophon { background: var(--dark); color: #aaa; padding: 32px 0 0; margin-top: 24px; }
.footer-widgets { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer-brand .logo { font-size: 20px; font-weight: 800; color: var(--red); display: block; margin-bottom: 10px; letter-spacing: -1px; }
.footer-brand .logo span { color: #fff; }
.footer-brand p { font-size: 11px; color: #666; line-height: 1.6; margin-bottom: 12px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 30px; height: 30px; background: #2d2d44; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #aaa; transition: background .2s, color .2s; }
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-widget-title { color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .4px; }
.footer-widget-nav a { display: block; font-size: 11px; color: #888; margin-bottom: 5px; transition: color .2s; }
.footer-widget-nav a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid #2a2a3e; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #555; }

/* ── Dark Mode ── */
[data-theme="dark"] {
  --white: #13132a; --gray-light: #0f0f1a; --gray-mid: #2a2a3e;
  --gray-text: #888; --text: #e8e8f0;
}
[data-theme="dark"] body { background: var(--gray-light); color: var(--text); }
[data-theme="dark"] #masthead { background: #13132a; }
[data-theme="dark"] .section-card,
[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .single-article,
[data-theme="dark"] .comments-area { background: #13132a; border-color: #2a2a3e; }
[data-theme="dark"] .feat-card { background: #1e1e30; border-color: #2a2a3e; }
[data-theme="dark"] .feat-card-title,
[data-theme="dark"] .art-title,
[data-theme="dark"] .entry-title { color: #e0e0f0; }
[data-theme="dark"] .entry-content p { color: #ccc; }
[data-theme="dark"] .tag-pill { background: #2a2a3e; color: #ccc; }
[data-theme="dark"] .search-box { background: #13132a; }
[data-theme="dark"] .search-box input { background: #1e1e30; color: #eee; }
[data-theme="dark"] .author-box { background: #1e1e30; border-color: #2a2a3e; }
[data-theme="dark"] .main-nav a { color: #ccc; }
[data-theme="dark"] .btn-dark { border-color: #444; color: #ccc; background: #1e1e30; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-area-inner { grid-template-columns: 1fr; }
  #hero .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-main { grid-column: 1/3; }
  .hero-side { flex-direction: row; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  #hero .hero-grid { grid-template-columns: 1fr; }
  .hero-main { grid-column: auto; min-height: 180px; }
  .hero-side { flex-direction: column; }
  .featured-grid { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
  #primary-menu { display: none; }
  .entry-title { font-size: 22px; }
}
