/*
 * sidebar.css — Duptronics Theme
 * Sidebar layout (2/3 content + 1/3 sidebar) + all widget styles
 * Namespaced: .dt-sidebar, .dt-layout-*
 * Mobile: content first, sidebar stacks below
 * ============================================================
 */

/* ============================================================
   LAYOUT — 2/3 + 1/3 grid
   ============================================================ */

.dt-layout-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}

.dt-layout-wrap-page {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) var(--space-lg);
	border-bottom: 1px solid var(--color-border);
}

.dt-layout-main {
  min-width: 0;
}

.dt-sidebar {
  min-width: 0;
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 1080px) {
  .dt-layout-wrap {
    grid-template-columns: 1fr 280px;
    gap: 28px;
    padding: 40px 20px 64px;
  }
}

@media (max-width: 720px) {
  .dt-layout-wrap {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 28px 16px 56px;
  }

  .dt-sidebar {
    position: static;
  }

  .dt-layout-wrap-page {
    padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-sm);
  }
}

/* ============================================================
   WIDGET SHELL
   ============================================================ */

.dt-sidebar .widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  overflow: hidden;
  transition: box-shadow 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, .11);
}

.dt-sidebar .widget-title,
.dt-sidebar .widgettitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #656d4a;
  padding: 18px 20px 14px;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8faff 0%, #f0f6ff 100%);
}

.dt-sidebar .widget>*:not(.widget-title):not(.widgettitle) {
  padding: 16px 20px;
}

.dt-sidebar .widget ul,
.dt-sidebar .widget ol {
  padding: 0;
  margin: 0;
}

/* ============================================================
   SEARCH WIDGET
   ============================================================ */

.dt-sidebar .widget_search .search-field,
.dt-sidebar .widget_search input[type="search"] {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  background: #f8f9fc;
  min-width: 0;
  transition: border-color 0.26s cubic-bezier(0.4, 0, 0.2, 1), background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_search .search-field:focus,
.dt-sidebar .widget_search input[type="search"]:focus {
  border-color: #656d4a;
  background: #ffffff;
}

.dt-sidebar .widget_search .search-submit,
.dt-sidebar .widget_search button,
.dt-sidebar .widget_search input[type="submit"] {
  background: #656d4a;
  color: #ffffff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_search .search-submit:hover,
.dt-sidebar .widget_search button:hover,
.dt-sidebar .widget_search input[type="submit"]:hover {
  background: #1d4ed8;
}

/* ============================================================
   RECENT POSTS
   ============================================================ */

.dt-sidebar .widget_recent_entries ul {
  list-style: none;
  counter-reset: recent-post;
}

.dt-sidebar .widget_recent_entries ul li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_recent_entries ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_recent_entries ul li:hover {
  background: #eff6ff;
}

.dt-sidebar .widget_recent_entries ul li::before {
  content: counter(recent-post);
  counter-increment: recent-post;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #656d4a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.dt-sidebar .widget_recent_entries ul li a {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.45;
  display: block;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_recent_entries ul li a:hover {
  color: #656d4a;
}

.dt-sidebar .widget_recent_entries .post-date {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

/* ============================================================
   RECENT COMMENTS
   ============================================================ */

.dt-sidebar .widget_recent_comments ul {
  list-style: none;
}

.dt-sidebar .widget_recent_comments ul li {
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dt-sidebar .widget_recent_comments ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_recent_comments ul li::before {
  content: '💬';
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.dt-sidebar .widget_recent_comments ul li a {
  color: #656d4a;
  text-decoration: none;
  font-weight: 600;
}

.dt-sidebar .widget_recent_comments ul li a:hover {
  text-decoration: underline;
}

/* ============================================================
   CATEGORIES & ARCHIVES
   ============================================================ */

.dt-sidebar .widget_categories ul,
.dt-sidebar .widget_archive ul {
  list-style: none;
}

.dt-sidebar .widget_categories ul li,
.dt-sidebar .widget_archive ul li {
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_categories ul li:last-child,
.dt-sidebar .widget_archive ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_categories ul li a,
.dt-sidebar .widget_archive ul li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-size: 13.5px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1), background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_categories ul li a:hover,
.dt-sidebar .widget_archive ul li a:hover {
  color: #656d4a;
  background: #eff6ff;
}

.dt-sidebar .widget_categories ul li a::after {
  content: attr(data-count);
}

.dt-sidebar .widget_categories .cat-item a {
  position: relative;
}

.dt-sidebar .widget_categories .cat-item .cat-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-sidebar .widget_categories .cat-item a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #656d4a;
  flex-shrink: 0;
  opacity: .5;
  margin-right: 4px;
  transition: opacity 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_categories .cat-item a:hover::before {
  opacity: 1;
}

/* ============================================================
   TAG CLOUD
   ============================================================ */

.dt-sidebar .widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 16px 20px;
}

.dt-sidebar .widget_tag_cloud .tagcloud a,
.dt-sidebar .widget_tag_cloud a {
  display: inline-block;
  font-size: 12px !important;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: background 0.26s cubic-bezier(0.4, 0, 0.2, 1), color 0.26s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
}

.dt-sidebar .widget_tag_cloud .tagcloud a:hover,
.dt-sidebar .widget_tag_cloud a:hover {
  background: #eff6ff;
  color: #656d4a;
  border-color: #bfdbfe;
}

/* ============================================================
   CALENDAR WIDGET
   ============================================================ */

.dt-sidebar .widget_calendar {
  overflow: hidden;
}

.dt-sidebar .widget_calendar>*:not(.widget-title):not(.widgettitle) {
  padding: 0;
}

.dt-sidebar .widget_calendar table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.dt-sidebar .widget_calendar caption {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #94a3b8;
  padding: 12px 16px 8px;
  text-align: center;
  caption-side: top;
}

.dt-sidebar .widget_calendar th {
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_calendar td {
  text-align: center;
  padding: 7px 4px;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_calendar td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #656d4a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  transition: background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_calendar td a:hover {
  background: #1d4ed8;
}

.dt-sidebar .widget_calendar #today {
  font-weight: 800;
  color: #656d4a;
}

.dt-sidebar .widget_calendar tfoot td {
  padding: 8px 12px;
  border-bottom: none;
}

.dt-sidebar .widget_calendar tfoot a {
  font-size: 12px;
  color: #656d4a;
  text-decoration: none;
  font-weight: 600;
}

.dt-sidebar .widget_calendar tfoot a:hover {
  text-decoration: underline;
}

.dt-sidebar #calendar_wrap {
  padding: 0 !important;
}

/* ============================================================
   TEXT / HTML WIDGET
   ============================================================ */

.dt-sidebar .widget_text .textwidget,
.dt-sidebar .widget_custom_html .custom-html-widget {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.7;
  padding: 16px 20px;
}

.dt-sidebar .widget_text .textwidget a,
.dt-sidebar .widget_custom_html .custom-html-widget a {
  color: #656d4a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dt-sidebar .widget_text .textwidget p:last-child,
.dt-sidebar .widget_custom_html .custom-html-widget p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   NAVIGATION MENU & PAGES WIDGET
   ============================================================ */

.dt-sidebar .widget_nav_menu ul,
.dt-sidebar .widget_pages ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dt-sidebar .widget_nav_menu ul li,
.dt-sidebar .widget_pages ul li {
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_nav_menu ul li:last-child,
.dt-sidebar .widget_pages ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_nav_menu ul li a,
.dt-sidebar .widget_pages ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1), background 0.26s cubic-bezier(0.4, 0, 0.2, 1), padding-left 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_nav_menu ul li a::before,
.dt-sidebar .widget_pages ul li a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #656d4a;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_nav_menu ul li a:hover,
.dt-sidebar .widget_pages ul li a:hover {
  color: #656d4a;
  background: #eff6ff;
  padding-left: 24px;
}

.dt-sidebar .widget_nav_menu ul li a:hover::before,
.dt-sidebar .widget_pages ul li a:hover::before {
  opacity: 1;
}

.dt-sidebar .widget_nav_menu ul ul,
.dt-sidebar .widget_pages ul ul {
  background: #f8f9fc;
}

.dt-sidebar .widget_nav_menu ul ul li a,
.dt-sidebar .widget_pages ul ul li a {
  padding-left: 32px;
  font-size: 13px;
}

/* ============================================================
   META WIDGET
   ============================================================ */

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

.dt-sidebar .widget_meta ul li {
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_meta ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_meta ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1), background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_meta ul li a:hover {
  color: #656d4a;
  background: #eff6ff;
}

/* ============================================================
   RSS WIDGET
   ============================================================ */

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

.dt-sidebar .widget_rss ul li {
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.dt-sidebar .widget_rss ul li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget_rss ul li a.rsswidget {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget_rss ul li a.rsswidget:hover {
  color: #656d4a;
}

.dt-sidebar .widget_rss .rss-date {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-bottom: 5px;
}

.dt-sidebar .widget_rss .rssSummary {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
}

.dt-sidebar .widget_rss .widget-title a {
  color: #656d4a;
  text-decoration: none;
}

.dt-sidebar .widget_rss .widget-title img {
  display: none;
}

/* ============================================================
   IMAGE WIDGET
   ============================================================ */

.dt-sidebar .widget_media_image img,
.dt-sidebar .widget_image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0 0 14px 14px;
}

.dt-sidebar .widget_media_image>*:not(.widget-title):not(.widgettitle),
.dt-sidebar .widget_image>*:not(.widget-title):not(.widgettitle) {
  padding: 0;
}

/* ============================================================
   BLOCK-BASED WIDGETS (WP 5.8+)
   ============================================================ */

.dt-sidebar .widget .wp-block-group,
.dt-sidebar .widget .wp-block-widget-area {
  padding: 16px 20px;
}

.dt-sidebar .widget .wp-block-search__inside-wrapper {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.dt-sidebar .widget .wp-block-search__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 13px;
  font-size: 13.5px;
  background: #f8f9fc;
}

.dt-sidebar .widget .wp-block-search__button {
  background: #656d4a;
  color: #ffffff;
  border: none;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
}

.dt-sidebar .widget .wp-block-search__button:hover {
  background: #1d4ed8;
}

.dt-sidebar .widget .wp-block-latest-posts {
  padding: 0 !important;
  list-style: none;
  margin: 0;
}

.dt-sidebar .widget .wp-block-latest-posts li {
  padding: 10px 20px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13.5px;
}

.dt-sidebar .widget .wp-block-latest-posts li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget .wp-block-latest-posts a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget .wp-block-latest-posts a:hover {
  color: #656d4a;
}

/* ============================================================
   GENERIC FALLBACK
   ============================================================ */

.dt-sidebar .widget ul:not([class]) {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dt-sidebar .widget ul:not([class]) li {
  padding: 9px 20px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13.5px;
  color: #475569;
}

.dt-sidebar .widget ul:not([class]) li:last-child {
  border-bottom: none;
}

.dt-sidebar .widget ul:not([class]) li a {
  color: #475569;
  text-decoration: none;
  transition: color 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-sidebar .widget ul:not([class]) li a:hover {
  color: #656d4a;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .dt-sidebar .widget,
  .dt-sidebar .widget_categories ul li a,
  .dt-sidebar .widget_archive ul li a,
  .dt-sidebar .widget_nav_menu ul li a,
  .dt-sidebar .widget_tag_cloud .tagcloud a {
    transition: none;
  }

  .dt-sidebar .widget:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  }
}