/*
Theme Name: Где Долги Portal
Theme URI: https://gdedolgi.ru/
Author: ChatGPT for gdedolgi.ru
Author URI: https://gdedolgi.ru/
Description: Чистая адаптивная тема WordPress для информационного портала о долгах, кредитах, приставах, банкротстве и финансовой безопасности. Без лид-форм и без позиционирования как услуги.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gdedolgi-portal
Tags: blog, news, custom-logo, custom-menu, featured-images, right-sidebar, responsive-layout, accessibility-ready
*/

:root {
  --gd-navy: #10213f;
  --gd-navy-2: #162b50;
  --gd-blue: #2563eb;
  --gd-green: #14845f;
  --gd-red: #c43d3d;
  --gd-yellow: #f5b942;
  --gd-ink: #172033;
  --gd-muted: #667085;
  --gd-border: #e6ebf2;
  --gd-soft: #f5f7fb;
  --gd-white: #ffffff;
  --gd-radius: 18px;
  --gd-shadow: 0 16px 45px rgba(16, 33, 63, .10);
  --gd-shadow-soft: 0 10px 25px rgba(16, 33, 63, .07);
  --gd-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gd-ink);
  background: var(--gd-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--gd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 14px; }
button, input, textarea, select { font: inherit; }

.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 !important;
  width: 1px;
  word-wrap: normal !important;
}

.gd-container {
  max-width: var(--gd-container);
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.gd-topline {
  background: #0b1830;
  color: rgba(255,255,255,.85);
  font-size: 14px;
}
.gd-topline-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gd-topline a { color: #fff; }
.gd-site-header {
  background: var(--gd-white);
  border-bottom: 1px solid var(--gd-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(16, 33, 63, .04);
}
.admin-bar .gd-site-header { top: 32px; }
.gd-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.gd-brand { display: flex; align-items: center; gap: 12px; color: var(--gd-navy); }
.gd-brand:hover { text-decoration: none; }
.gd-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gd-navy), var(--gd-blue));
  color: #fff;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: var(--gd-shadow-soft);
}
.gd-logo-img img { max-height: 48px; width: auto; border-radius: 0; }
.gd-brand-title { display: block; font-size: 25px; font-weight: 850; line-height: 1.05; letter-spacing: -.4px; }
.gd-brand-tagline { display: block; color: var(--gd-muted); font-size: 13px; line-height: 1.2; margin-top: 4px; }

.gd-nav-wrap { display: flex; align-items: center; gap: 16px; }
.gd-menu-toggle {
  display: none;
  border: 1px solid var(--gd-border);
  background: #fff;
  color: var(--gd-navy);
  padding: 10px 13px;
  border-radius: 12px;
  cursor: pointer;
}
.gd-primary-menu { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 4px; }
.gd-primary-menu li { position: relative; }
.gd-primary-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--gd-ink);
  font-weight: 650;
  font-size: 15px;
  border-radius: 12px;
}
.gd-primary-menu a:hover,
.gd-primary-menu .current-menu-item > a,
.gd-primary-menu .current-menu-ancestor > a {
  background: #eef4ff;
  color: var(--gd-blue);
  text-decoration: none;
}
.gd-primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 14px;
  box-shadow: var(--gd-shadow);
}
.gd-primary-menu li:hover > .sub-menu { display: block; }
.gd-header-search {
  color: var(--gd-navy);
  border: 1px solid var(--gd-border);
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.gd-header-search:hover { text-decoration: none; background: var(--gd-soft); }

/* Hero */
.gd-hero {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 36%),
    linear-gradient(135deg, #0d1b35 0%, #17345e 100%);
  color: #fff;
  padding: 58px 0 42px;
}
.gd-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.gd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.gd-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -1.4px;
}
.gd-hero p {
  margin: 18px 0 0;
  max-width: 720px;
  color: rgba(255,255,255,.86);
  font-size: 20px;
}
.gd-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.gd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}
.gd-btn:hover { text-decoration: none; transform: translateY(-1px); }
.gd-btn-primary { background: var(--gd-green); color: #fff; box-shadow: 0 14px 28px rgba(20,132,95,.25); }
.gd-btn-secondary { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.24); color: #fff; }
.gd-hero-card {
  background: rgba(255,255,255,.96);
  color: var(--gd-ink);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--gd-shadow);
}
.gd-hero-card h2 { margin: 0 0 12px; font-size: 22px; color: var(--gd-navy); line-height: 1.25; }
.gd-check-list { margin: 0; padding: 0; list-style: none; }
.gd-check-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gd-border); }
.gd-check-list li:last-child { border-bottom: 0; }
.gd-check-list span { color: var(--gd-green); font-weight: 900; }

/* Sections */
.gd-section { padding: 48px 0; }
.gd-section-tight { padding: 30px 0; }
.gd-section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.gd-section-title { margin: 0; color: var(--gd-navy); font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.6px; }
.gd-section-desc { margin: 8px 0 0; color: var(--gd-muted); max-width: 720px; }
.gd-view-all { font-weight: 800; color: var(--gd-blue); white-space: nowrap; }

.gd-situation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gd-situation-card,
.gd-post-card,
.gd-info-card,
.gd-widget,
.gd-content-card {
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  box-shadow: var(--gd-shadow-soft);
}
.gd-situation-card {
  min-height: 172px;
  padding: 20px;
  color: var(--gd-ink);
  display: flex;
  flex-direction: column;
}
.gd-situation-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--gd-shadow); }
.gd-card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #eef4ff;
  color: var(--gd-blue);
  font-size: 22px;
  margin-bottom: 14px;
}
.gd-situation-card h3 { margin: 0 0 6px; color: var(--gd-navy); font-size: 18px; line-height: 1.25; }
.gd-situation-card p { margin: 0; color: var(--gd-muted); font-size: 14px; line-height: 1.45; }
.gd-card-link { margin-top: auto; padding-top: 14px; color: var(--gd-blue); font-size: 14px; font-weight: 850; }

.gd-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gd-post-card { overflow: hidden; display: flex; flex-direction: column; min-height: 100%; }
.gd-post-thumb { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dce7fb, #fff); overflow: hidden; border-radius: 18px 18px 0 0; }
.gd-post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .25s ease; }
.gd-post-card:hover .gd-post-thumb img { transform: scale(1.035); }
.gd-post-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.gd-post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--gd-muted); font-size: 13px; margin-bottom: 9px; }
.gd-post-meta a { color: var(--gd-muted); font-weight: 700; }
.gd-post-title { margin: 0; font-size: 20px; line-height: 1.28; }
.gd-post-title a { color: var(--gd-navy); }
.gd-post-excerpt { color: var(--gd-muted); font-size: 15px; margin: 10px 0 0; }
.gd-read-more { margin-top: auto; padding-top: 12px; font-weight: 850; }

.gd-info-band {
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: 22px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}
.gd-info-band .gd-info-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #fff;
  color: #a66a00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.gd-info-band h2 { margin: 0 0 5px; color: #7a4d00; font-size: 22px; }
.gd-info-band p { margin: 0; color: #614407; }

.gd-category-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gd-category-pill {
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--gd-navy);
  font-weight: 850;
  box-shadow: var(--gd-shadow-soft);
}
.gd-category-pill:hover { text-decoration: none; background: #eef4ff; }

/* Layout */
.gd-main { padding: 42px 0; }
.gd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.gd-content-card { padding: clamp(20px, 4vw, 42px); }
.gd-page-header { margin-bottom: 24px; }
.gd-page-title, .gd-entry-title { margin: 0; color: var(--gd-navy); font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -.9px; }
.gd-archive-desc { margin-top: 10px; color: var(--gd-muted); }
.gd-entry-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; color: var(--gd-muted); font-size: 14px; }
.gd-entry-meta a { color: var(--gd-muted); font-weight: 700; }

.gd-entry-content { font-size: 18px; }
.gd-entry-content h2, .gd-entry-content h3, .gd-entry-content h4 { color: var(--gd-navy); line-height: 1.2; margin-top: 1.7em; margin-bottom: .6em; }
.gd-entry-content h2 { font-size: 30px; }
.gd-entry-content h3 { font-size: 24px; }
.gd-entry-content p { margin: 0 0 1.05em; }
.gd-entry-content ul, .gd-entry-content ol { padding-left: 1.25em; }
.gd-entry-content blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 5px solid var(--gd-blue);
  background: #f1f6ff;
  border-radius: 0 16px 16px 0;
  color: var(--gd-navy);
  font-weight: 650;
}
.gd-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--gd-border);
}
.gd-entry-content th, .gd-entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--gd-border); vertical-align: top; }
.gd-entry-content th { background: #eef4ff; color: var(--gd-navy); text-align: left; }
.gd-entry-content .wp-block-image { margin: 24px 0; }

.gd-summary-box,
.gd-warning-box,
.gd-source-box {
  border-radius: 18px;
  padding: 18px 20px;
  margin: 24px 0;
  border: 1px solid var(--gd-border);
}
.gd-summary-box { background: #eefaf5; border-color: #c8eee0; }
.gd-warning-box { background: #fff2f2; border-color: #ffd2d2; }
.gd-source-box { background: #f6f8fc; }
.gd-summary-box strong, .gd-warning-box strong, .gd-source-box strong { color: var(--gd-navy); }

.gd-post-nav { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gd-post-nav a {
  display: block;
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 16px;
  padding: 15px;
  color: var(--gd-navy);
  font-weight: 800;
}
.gd-post-nav a:hover { text-decoration: none; background: #eef4ff; }

/* Sidebar */
.gd-sidebar { position: sticky; top: 110px; }
.admin-bar .gd-sidebar { top: 142px; }
.gd-widget { padding: 20px; margin-bottom: 18px; }
.gd-widget-title { margin: 0 0 14px; color: var(--gd-navy); font-size: 19px; }
.gd-widget ul { margin: 0; padding: 0; list-style: none; }
.gd-widget li { padding: 9px 0; border-bottom: 1px solid var(--gd-border); }
.gd-widget li:last-child { border-bottom: 0; }
.gd-widget a { color: var(--gd-ink); font-weight: 650; }
.gd-search-form { display: flex; gap: 8px; }
.gd-search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--gd-border);
  border-radius: 13px;
  padding: 11px 12px;
  background: #fff;
}
.gd-search-form button {
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: var(--gd-blue);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

/* Footer */
.gd-footer {
  background: #0b1830;
  color: rgba(255,255,255,.78);
  padding: 38px 0 26px;
}
.gd-footer a { color: #fff; }
.gd-footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 28px; }
.gd-footer h2, .gd-footer h3 { color: #fff; margin: 0 0 12px; }
.gd-footer p { margin: 0 0 12px; }
.gd-footer-menu { margin: 0; padding: 0; list-style: none; }
.gd-footer-menu li { margin-bottom: 8px; }
.gd-footer-bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 28px; padding-top: 18px; font-size: 14px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* Pagination */
.gd-pagination { margin-top: 28px; }
.gd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 12px;
  color: var(--gd-navy);
  font-weight: 800;
}
.gd-pagination .current { background: var(--gd-blue); color: #fff; border-color: var(--gd-blue); }

/* WordPress defaults */
.alignleft { float: left; margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; color: var(--gd-muted); font-size: 14px; }
.wp-caption-text { margin-top: 6px; }
.sticky, .bypostauthor { display: block; }

/* Responsive */
@media (max-width: 1024px) {
  .gd-hero-grid { grid-template-columns: 1fr; }
  .gd-situation-grid { grid-template-columns: repeat(2, 1fr); }
  .gd-post-grid { grid-template-columns: repeat(2, 1fr); }
  .gd-category-strip { grid-template-columns: repeat(2, 1fr); }
  .gd-layout { grid-template-columns: 1fr; }
  .gd-sidebar { position: static; }
  .gd-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .gd-menu-toggle { display: inline-flex; }
  .gd-primary-menu {
    display: none;
    position: absolute;
    left: 22px;
    right: 22px;
    top: 78px;
    background: #fff;
    border: 1px solid var(--gd-border);
    border-radius: 18px;
    padding: 10px;
    box-shadow: var(--gd-shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .gd-primary-menu.is-open { display: flex; }
  .gd-primary-menu .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .gd-header-search { display: none; }
  .admin-bar .gd-site-header { top: 46px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .gd-container { padding: 0 16px; }
  .gd-topline-inner { align-items: flex-start; flex-direction: column; padding: 8px 0; gap: 2px; }
  .gd-header-inner { min-height: 72px; }
  .gd-brand-tagline { display: none; }
  .gd-brand-title { font-size: 22px; }
  .gd-hero { padding: 42px 0 30px; }
  .gd-hero p { font-size: 17px; }
  .gd-hero-actions { flex-direction: column; }
  .gd-btn { width: 100%; }
  .gd-situation-grid,
  .gd-post-grid,
  .gd-category-strip { grid-template-columns: 1fr; }
  .gd-section-head { display: block; }
  .gd-view-all { display: inline-block; margin-top: 8px; }
  .gd-info-band { grid-template-columns: 1fr; }
  .gd-post-nav { grid-template-columns: 1fr; }
  .gd-entry-content { font-size: 17px; }
  .gd-footer-bottom { display: block; }
}
