/* ============================================
   Vertex Template — Dark Joomla-style Theme
   Site: Сканеры вилок и их сравнение
   ============================================ */

/* ---- Base & Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: #c8c9d0;
  background-color: #0f111a;
  min-height: 100dvh;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
  color: #e8e8f0;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.7rem; margin: 1.6rem 0 0.8rem; }
h3 { font-size: 1.35rem; margin: 1.4rem 0 0.7rem; }
h4 { font-size: 1.1rem; margin: 1.2rem 0 0.6rem; }

p {
  margin-bottom: 1rem;
  color: #c8c9d0;
}

a {
  color: #9b8fd4;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c4bce8;
}

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

/* ---- Page Wrapper (sticky footer) ---- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page-main {
  flex-grow: 1;
}

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1628;
  border-bottom: 1px solid #2a2c3e;
  box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.logo::before {
  content: "▸ ";
  color: #9b8fd4;
}

.logo:hover {
  color: #c4bce8;
}

/* ---- Navigation ---- */
.nav {
  display: flex;
  align-items: center;
}

.menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.menu li {
  position: relative;
}

.menu a {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #d0d1d8;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  display: block;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu a:hover,
.menu a.active {
  background: #2d2648;
  color: #c4bce8;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #d0d1d8;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Layout: main + sidebar ---- */
.layout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  gap: 2rem;
}

.main-content {
  flex: 1 1 74%;
  min-width: 0;
}

.sidebar {
  flex: 0 0 22%;
  min-width: 240px;
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #8a8b9a;
}

.breadcrumb ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb li + li::before {
  content: ">";
  margin-right: 0.4rem;
  color: #5d5f75;
}

.breadcrumb a {
  color: #9b8fd4;
}

.breadcrumb a:hover {
  color: #c4bce8;
}

.breadcrumb [aria-current="page"] {
  color: #8a8b9a;
  cursor: default;
}

/* ---- Joomla-style article wrapper ---- */
.item-page {
  background: #181a28;
  border: 1px solid #2a2c3e;
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.item-page h1 {
  margin-bottom: 0.4rem;
}

.item-page .published {
  font-size: 0.85rem;
  color: #8a8b9a;
  margin-bottom: 1.2rem;
  display: block;
}

/* ---- Featured image ---- */
.featured-image {
  margin: 0 auto 1.5rem;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Article body styling ---- */
.article-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #c8c9d0;
}

.article-body h2 {
  font-size: 1.55rem;
  color: #e8e8f0;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #2a2c3e;
}

.article-body h3 {
  font-size: 1.25rem;
  color: #dddde8;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

.article-body h4 {
  font-size: 1.05rem;
  color: #cccce0;
  margin-top: 1.4rem;
  margin-bottom: 0.7rem;
}

.article-body p {
  margin-bottom: 1.1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2rem 1.5rem;
  padding-left: 0.5rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body ul li::marker {
  color: #9b8fd4;
}

.article-body a {
  color: #9b8fd4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: #c4bce8;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.95rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2c3e;
}

.article-body th,
.article-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #2a2c3e;
}

.article-body th {
  background: #1e2035;
  color: #e8e8f0;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.article-body tr:nth-child(even) {
  background: #141621;
}

.article-body tr:hover {
  background: #1c1e30;
}

.article-body td {
  color: #c8c9d0;
}

/* Blockquotes */
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  background: #1a1c2e;
  border-left: 4px solid #7c6fae;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #b8b9c8;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Infobox */
.article-body .infobox {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  background: #1e2035;
  border: 1px solid #3a3c55;
  border-radius: 8px;
  position: relative;
}

.article-body .infobox::before {
  content: "На заметку";
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #b8b0e3;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat block */
.article-body .stat-block {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1e2035 0%, #252742 100%);
  border: 1px solid #3a3c55;
  border-radius: 10px;
  text-align: center;
}

.article-body .stat-block .stat-number {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  color: #b8b0e3;
  line-height: 1;
  display: block;
}

.article-body .stat-block .stat-label {
  font-size: 0.9rem;
  color: #8a8b9a;
  margin-top: 0.4rem;
  display: block;
}

/* Images inside article */
.article-body img,
.featured-image img,
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

.article-body figure {
  margin: 1.5rem 0;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: #8a8b9a;
  margin-top: 0.5rem;
}

/* Drop cap on first paragraph (random decorative) */
.article-body > p:first-of-type::first-letter {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 0.8;
  float: left;
  margin-right: 0.5rem;
  margin-top: 0.15rem;
  color: #b8b0e3;
}

/* ---- Blog / Category List ---- */
.blog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.blog.single-col {
  grid-template-columns: 1fr;
}

.category-list .blog {
  margin-top: 1rem;
}

/* ---- Article Cards ---- */
.card {
  background: #181a28;
  border: 1px solid #2a2c3e;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141621;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: #e8e8f0;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: #c4bce8;
}

.card-excerpt {
  font-size: 0.92rem;
  color: #a0a1b0;
  line-height: 1.55;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.card-date {
  font-size: 0.8rem;
  color: #6e7085;
}

/* ---- Hero Section ---- */
.hero {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1628 0%, #25203a 100%);
  border: 1px solid #2a2c3e;
}

.hero-inner {
  display: flex;
  flex-direction: column;
}

.hero-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #141621;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-content {
  padding: 1.5rem 2rem;
}

.hero-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b8b0e3;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.hero-title a {
  color: inherit;
  text-decoration: none;
}

.hero-title a:hover {
  color: #c4bce8;
}

.hero-excerpt {
  font-size: 1rem;
  color: #b0b1c0;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.hero-date {
  font-size: 0.8rem;
  color: #6e7085;
}

/* ---- Sidebar Widgets ---- */
.moduletable {
  background: #181a28;
  border: 1px solid #2a2c3e;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.module-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  background: #1e2035;
  border-bottom: 1px solid #2a2c3e;
  color: #e8e8f0;
  letter-spacing: 0.5px;
}

.module-body {
  padding: 1rem 1.25rem;
}

.module-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.module-body li {
  border-bottom: 1px solid #232536;
  padding: 0.6rem 0;
}

.module-body li:last-child {
  border-bottom: none;
}

.module-body a {
  color: #b0b1c0;
  font-size: 0.92rem;
  display: block;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.module-body a:hover {
  color: #c4bce8;
  padding-left: 4px;
}

.module-body .post-date {
  display: block;
  font-size: 0.78rem;
  color: #6e7085;
  margin-top: 0.2rem;
}

/* ---- Tags ---- */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

a.tag-link {
  color: #9b8fd4;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.tag-link:hover {
  color: #c4bce8;
  text-decoration: underline;
}

/* Article bottom tags */
.article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2c3e;
}

.article-tags-label {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #8a8b9a;
  margin-right: 0.5rem;
}

/* ---- Related Block ---- */
.related-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2c3e;
}

.related-heading {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #e8e8f0;
  margin-bottom: 1rem;
}

.related-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-links li {
  margin-bottom: 0.5rem;
}

.related-links a {
  color: #9b8fd4;
  font-size: 0.95rem;
  text-decoration: none;
}

.related-links a:hover {
  color: #c4bce8;
  text-decoration: underline;
}

/* ---- Footer ---- */
.footer {
  background: #080a10;
  border-top: 1px solid #1a1c2a;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #e8e8f0;
  margin-bottom: 1rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.2rem;
  list-style: none;
}

.footer-nav a {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #8a8b9a;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #c4bce8;
}

.footer-copy {
  font-size: 0.85rem;
  color: #5d5f75;
}

/* ---- Homepage specific ---- */
.homepage .hero {
  margin-top: 0.5rem;
}

.section-heading {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #e8e8f0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2a2c3e;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
    padding: 1.25rem 1rem;
  }

  .sidebar {
    flex: 1 1 100%;
    min-width: auto;
    order: 2;
  }

  .main-content {
    order: 1;
  }

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

  .header-inner {
    height: 56px;
  }

  .nav-toggle {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #1a1628;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2a2c3e;
    gap: 0.15rem;
  }

  .menu.open {
    display: flex;
  }

  .hero-image {
    aspect-ratio: 16 / 9;
  }

  .hero-content {
    padding: 1.25rem;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .item-page {
    padding: 1.25rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
}

/* Smooth transitions for interactive elements */
button, a {
  transition: all 0.2s ease;
}
