/* Blog-specific stylesheet for RogLab */

/* Inherits colors and settings from main styles.css, but operates independently */
:root {
  --blog-max-width: 800px;
  --blog-bg-card: #ffffff;
  --blog-shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.05);
  --blog-shadow-hover: 0 12px 30px rgba(18, 207, 207, 0.15);
  --blog-border-radius: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
}

/* Container */
.blog-container {
  width: min(var(--max), calc(100vw - 44px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* Article Reading Layout */
.article-wrapper {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 20px 0;
}

.article-header {
  margin-bottom: 40px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
}

.article-title {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.15;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.article-content {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.65;
  color: #2d3748;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 48px 0 20px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 2px solid rgba(18, 207, 207, 0.1);
  padding-bottom: 8px;
}

.article-content h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 32px 0 16px;
  font-weight: 700;
  color: var(--text);
}

.article-content ul, 
.article-content ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

/* GEO Block: Direct Answer (Answer-First) */
.geo-lead-box {
  background: linear-gradient(135deg, rgba(18, 207, 207, 0.04) 0%, rgba(7, 159, 164, 0.08) 100%);
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
  padding: 24px 28px;
  margin: 32px 0 40px;
  box-shadow: 0 4px 15px rgba(18, 207, 207, 0.03);
  position: relative;
}

.geo-lead-box::before {
  content: "ИИ-СВОДКА / СУТЬ СТАТЬИ";
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-dark);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.geo-lead-text {
  font-weight: 500;
  color: var(--text);
  font-size: 1.05em;
  margin: 0 !important;
  line-height: 1.6;
}

/* GEO Block: Styled Data Tables */
.geo-table-wrapper {
  overflow-x: auto;
  margin: 32px 0 40px;
  border-radius: var(--blog-border-radius);
  box-shadow: var(--blog-shadow-subtle);
  border: 1px solid var(--line);
}

.geo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}

.geo-table th {
  background-color: var(--dark);
  color: #ffffff;
  font-weight: 600;
  padding: 14px 18px;
}

.geo-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background-color: #ffffff;
}

.geo-table tr:last-child td {
  border-bottom: none;
}

.geo-table tr:nth-child(even) td {
  background-color: #f7f9fa;
}

/* GEO Block: FAQ Accordions (using native <details>) */
.faq-section-title {
  margin-top: 50px !important;
}

.faq-accordion {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-accordion[open] {
  border-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(18, 207, 207, 0.05);
}

.faq-accordion summary {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-accordion[open] summary::after {
  content: "−";
  color: var(--accent-dark);
}

.faq-accordion-content {
  padding: 0 22px 20px;
  color: #4a5568;
  font-size: 16px;
  line-height: 1.6;
}

.faq-accordion-content p:last-child {
  margin-bottom: 0;
}

/* Blog Homepage Card Grid */
.blog-hero-section {
  text-align: center;
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 50px;
}

.blog-hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.blog-hero-subtitle {
  color: var(--muted);
  font-size: clamp(16px, 1.2vw, 22px);
  max-width: 600px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.blog-card {
  background: var(--blog-bg-card);
  border-radius: var(--blog-border-radius);
  border: 1px solid var(--line);
  box-shadow: var(--blog-shadow-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--blog-shadow-hover);
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}

.blog-card-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.blog-card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-card-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-link::after {
  transform: translateX(4px);
}

/* Article CTA Box */
.article-cta {
  background: var(--dark);
  color: #ffffff;
  border-radius: var(--blog-border-radius);
  padding: 40px;
  margin: 60px 0 40px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.article-cta h3 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 800;
}

.article-cta p {
  color: #a0aec0;
  max-width: 550px;
  margin: 0 auto 28px;
  font-size: 16px;
}

.article-cta .button {
  margin-top: 10px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs span::after {
  content: "/";
  margin-left: 8px;
}

.breadcrumbs span:last-child::after {
  content: "";
}

/* Responsive fixes */
@media (max-width: 768px) {
  .blog-container {
    padding: 20px 0 50px;
  }
  .article-header {
    margin-bottom: 24px;
  }
  .geo-lead-box {
    padding: 18px 20px;
    margin: 24px 0;
  }
  .article-cta {
    padding: 30px 20px;
  }
}
