/* Великий Великан Максименко — Deep Purple Theme */

:root {
  --color-primary: #7c3aed;
  --color-secondary: #6d28d9;
  --color-accent: #10b981;
  --color-bg: #faf5ff;
  --color-text: #1e1b4b;
  --color-header-bg: #7c3aed;
  --color-footer-bg: #1e1b4b;
  --color-link: #7c3aed;
  --color-link-hover: #6d28d9;
  --color-card-bg: #ffffff;
  --color-border: #ede9fe;
  --font-serif: 'PT Serif', serif;
  --font-sans: 'PT Sans', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

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

/* ===== LAYOUT ===== */
.layout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout-with-sidebar {
  display: flex;
  gap: 30px;
  padding: 30px 0;
  align-items: flex-start;
}

.region-sidebar-first {
  width: 29%;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
}

.region-content {
  width: 71%;
  flex-grow: 1;
  min-width: 0;
}

/* ===== HEADER ===== */
#header {
  background: var(--color-header-bg);
  color: #fff;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-branding:hover { text-decoration: none; }

.site-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.main-nav a {
  color: rgba(255,255,255,0.9);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
}

.nav-mobile-toggle {
  display: none;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

/* ===== FOOTER ===== */
#footer {
  background: var(--color-footer-bg);
  color: rgba(255,255,255,0.75);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-inner { text-align: center; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 24px;
}

.footer-nav a {
  color: rgba(255,255,255,0.75);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 7px 16px;
  position: relative;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-nav a:hover::after { transform: scaleX(1); }

.footer-desc {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 4px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb-nav {
  font-size: 13px;
  color: #999;
  margin-bottom: 22px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.breadcrumb-nav a { color: var(--color-link); }
.breadcrumb-nav a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 7px; color: #bbb; font-style: normal; }

/* ===== HERO ===== */
.hero-block {
  background: linear-gradient(135deg, #7c3aed 0%, #1e1b4b 100%);
  color: #fff;
  padding: 70px 0 60px;
  margin-bottom: 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-badge {
  display: inline-block;
  background: rgba(16,185,129,0.25);
  border: 1px solid var(--color-accent);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-block h1 {
  font-size: 2.6rem;
  margin-bottom: 16px;
  color: #fff;
  line-height: 1.15;
  max-width: 720px;
}

.hero-block p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 580px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 7px;
  font-size: 15px;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.hero-btn:hover {
  background: #0ea271;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-author {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-family: var(--font-serif);
  color: #fff;
  font-weight: 700;
}

.hero-author-info { font-size: 13px; opacity: 0.8; }
.hero-author-info strong { display: block; font-size: 15px; opacity: 1; color: #fff; }

/* ===== STATS PANEL ===== */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.stat-card {
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid var(--color-border);
}
.stat-card:last-child { border-right: none; }

.stat-card .stat-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
}
.section-title a:hover { text-decoration: underline; }

.main-content-area {
  padding: 40px 0 20px;
}

/* ===== ARTICLE GRID (3 columns) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: 0 8px 24px rgba(124,58,237,0.14);
  transform: translateY(-3px);
}

.article-card .card-image {
  width: 100%;
  height: 175px;
  object-fit: cover;
}

.article-card .card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .card-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.article-card .card-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  flex: 1;
}

.article-card .card-title a {
  color: var(--color-text);
  text-decoration: none;
}
.article-card .card-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.article-card .card-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin-bottom: 12px;
}

.article-card .card-date {
  font-size: 11px;
  color: #aaa;
  margin-top: auto;
}

/* ===== RATING BLOCK ===== */
.rating-block {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
}

.rating-header {
  background: var(--color-primary);
  color: #fff;
  padding: 14px 20px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
}
.rating-row:last-child { border-bottom: none; }

.rating-pos {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.rating-info {
  flex: 1;
  min-width: 0;
}
.rating-match {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rating-date { font-size: 11px; color: #bbb; }
.rating-bar {
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.rating-bar-fill { height: 100%; background: var(--color-accent); border-radius: 3px; }
.rating-score {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ===== ARTICLE PAGE ===== */
.node.node--type-article {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 34px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.node--type-article h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--color-text);
  line-height: 1.25;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.article-date {
  font-size: 13px;
  color: #aaa;
}

.article-cat-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
}
.article-cat-badge:hover { background: var(--color-secondary); color: #fff; text-decoration: none; }

.article-main-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 28px;
}

/* Article body content styles */
.field--name-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
}

.field--name-body p { margin-bottom: 18px; }

.field--name-body h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.field--name-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 24px 0 12px;
}

.field--name-body ul,
.field--name-body ol {
  margin: 16px 0 16px 26px;
}

.field--name-body li {
  margin-bottom: 7px;
  line-height: 1.7;
}

.field--name-body ul li::marker { color: var(--color-primary); }
.field--name-body ol li::marker { color: var(--color-primary); font-weight: 700; }

.field--name-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.field--name-body th {
  background: var(--color-primary);
  color: #fff;
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
}

.field--name-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.field--name-body tbody tr:nth-child(even) { background: #f8f4ff; }
.field--name-body tbody tr:hover { background: #ede9fe; }

.field--name-body blockquote {
  border-left: 4px solid var(--color-primary);
  background: #f3f0ff;
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #444;
  position: relative;
}
.field--name-body blockquote::before {
  content: '\201C';
  font-size: 3rem;
  color: var(--color-primary);
  line-height: 0;
  vertical-align: -0.5em;
  margin-right: 8px;
  opacity: 0.5;
}

.field--name-body .infobox {
  background: #ecfdf5;
  border: 1px solid #10b981;
  border-left: 4px solid #10b981;
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 15px;
}

.field--name-body .stat-block {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  border-radius: 10px;
  padding: 22px 28px;
  margin: 26px 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.field--name-body a {
  color: var(--color-link);
  text-decoration: underline;
}
.field--name-body a:hover { color: var(--color-link-hover); }

.field--name-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 22px 0;
}

/* ===== ARTICLE TAGS ===== */
.article-tags-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.tags-label {
  font-size: 13px;
  color: #999;
  font-weight: 700;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

a.tag-pill {
  display: inline-block;
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  color: var(--color-primary) !important;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
  font-family: var(--font-sans);
  font-weight: 700;
}
a.tag-pill:hover {
  background: var(--color-primary);
  color: #fff !important;
  text-decoration: none !important;
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.sidebar-widget h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}

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

.recent-posts-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.recent-posts-list li:last-child { border-bottom: none; }

.recent-posts-list .rp-title {
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 400;
  line-height: 1.5;
  display: block;
}
.recent-posts-list .rp-title:hover { color: var(--color-primary); text-decoration: underline; }

.recent-posts-list .rp-date {
  font-size: 11px;
  color: #bbb;
  display: block;
  margin-top: 2px;
}

.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.categories-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.categories-list li:last-child { border-bottom: none; }
.categories-list a {
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
}
.categories-list a:hover { color: var(--color-primary); }
.categories-list .cat-count {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-about {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

.sidebar-about strong { color: var(--color-primary); }

/* ===== BLOG INDEX / CATEGORY PAGES ===== */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--color-primary);
}
.page-header h1 {
  font-size: 2rem;
  color: var(--color-text);
}
.page-header p {
  font-size: 14px;
  color: #888;
  margin-top: 6px;
}

.blog-listing {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 30px;
}

.blog-listing-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  gap: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.blog-listing-card:hover {
  box-shadow: 0 6px 18px rgba(124,58,237,0.12);
}

.blog-listing-card .card-thumb {
  width: 200px;
  min-height: 130px;
  object-fit: cover;
  flex-shrink: 0;
}

.blog-listing-card .card-info {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-listing-card .card-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.blog-listing-card .card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}
.blog-listing-card .card-title a { color: var(--color-text); text-decoration: none; }
.blog-listing-card .card-title a:hover { color: var(--color-primary); }

.blog-listing-card .card-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.55;
  margin-bottom: 10px;
}

.blog-listing-card .card-date {
  font-size: 12px;
  color: #bbb;
}

/* ===== VIEW / DRUPAL ELEMENTS ===== */
.view { margin-bottom: 30px; }
.view-content { }
.views-row { margin-bottom: 24px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .layout-with-sidebar {
    flex-direction: column;
  }
  .region-sidebar-first {
    width: 100%;
    order: 2;
    position: static;
  }
  .region-content {
    width: 100%;
    order: 1;
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-nav { display: none; }
  .nav-mobile-toggle { display: block; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-secondary); padding: 12px 20px; z-index: 200; }
  #header { position: relative; }
  .hero-block { padding: 44px 0; }
  .hero-block h1 { font-size: 1.7rem; }
  .node--type-article { padding: 20px; }
  .node--type-article h1 { font-size: 1.5rem; }
  .article-main-image { height: 220px; }
  .blog-listing-card .card-thumb { width: 120px; min-height: 90px; }
  .section-title { font-size: 1.25rem; }
}
