/* ============================================
   EI.CHURCH.LT - Article Page Styles
   Dark & Elegant Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --text-primary: #e8e6e3;
  --text-secondary: #a09c97;
  --text-muted: #6b6762;
  --accent: #c9a962;
  --accent-light: #d4b96e;
  --accent-dark: #b8933e;
  --border-color: rgba(201, 169, 98, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 17px;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Navigation Bar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.navbar .logo:hover {
  color: var(--accent-light);
}

.navbar .nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  list-style: none;
}

.navbar .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.navbar .nav-links a:hover {
  color: var(--accent);
  background: rgba(201, 169, 98, 0.08);
}

.navbar .nav-links a.active {
  color: var(--accent);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---- Article Container ---- */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 2rem 4rem;
  flex: 1;
}

/* ---- Article Header ---- */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.article-header .back-link:hover {
  color: var(--accent-light);
  gap: 0.3rem;
}

.article-header .back-link::before {
  content: '\2190';
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.article-header .back-link:hover::before {
  transform: translateX(-3px);
}

.article-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.article-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Article Content ---- */
.article-content {
  color: var(--text-primary);
}

.article-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.article-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 2rem 0 0.8rem;
  line-height: 1.3;
}

.article-content h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.6rem;
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  line-height: 1.8;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 169, 98, 0.3);
  transition: all 0.3s ease;
}

.article-content a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-primary);
}

.article-content li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
  padding-left: 0.3rem;
}

.article-content ul li::marker {
  color: var(--accent);
}

.article-content ol li::marker {
  color: var(--accent);
  font-weight: 500;
}

/* Blockquotes */
.article-content blockquote,
.article-content .quote {
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(201, 169, 98, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content blockquote p,
.article-content .quote p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.article-content blockquote p:last-child,
.article-content .quote p:last-child {
  margin-bottom: 0;
}

/* Indented text (was MsoBodyTextIndent) */
.article-content .indent {
  margin-left: 2rem;
  padding: 0.8rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
}

.article-content .image-center {
  display: block;
  margin: 2rem auto;
  text-align: center;
}

/* Tables (for data tables in articles) */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.article-content table th,
.article-content table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border: 1px solid var(--border-subtle);
}

.article-content table th {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content table td {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.article-content table tr:hover td {
  background: var(--bg-card);
}

/* Horizontal rules */
.article-content hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 2rem 0;
}

/* Bold / Italic / Strong */
.article-content strong,
.article-content b {
  font-weight: 600;
  color: var(--text-primary);
}

.article-content em,
.article-content i {
  color: var(--text-secondary);
  font-style: italic;
}

/* Small text */
.article-content small {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ---- Article Navigation (Prev/Next) ---- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.article-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 48%;
}

.article-nav a:hover {
  border-color: var(--accent);
  background: rgba(201, 169, 98, 0.05);
  transform: translateY(-2px);
}

.article-nav a .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.article-nav a .nav-title {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
}

.article-nav a.prev {
  align-items: flex-start;
}

.article-nav a.next {
  align-items: flex-end;
  margin-left: auto;
}

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-light);
}

/* ---- Engel Scale (special formatting) ---- */
.engel-scale {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  font-family: 'Inter', monospace;
  font-size: 0.95rem;
  line-height: 1.4;
}

.engel-scale p {
  margin-bottom: 0.3rem !important;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.engel-scale p:last-child {
  border-bottom: none;
}

.engel-scale strong {
  color: var(--accent);
  display: inline-block;
  min-width: 2.5rem;
  text-align: right;
  margin-right: 0.8rem;
}

/* ---- Responsive: Tablet (1024px) ---- */
@media (max-width: 1024px) {
  .article-container {
    padding: 95px 1.8rem 3.5rem;
  }

  .article-header h1 {
    font-size: 2.4rem;
  }

  .article-content h2 {
    font-size: 1.6rem;
  }
}

/* ---- Responsive: Mobile (768px) ---- */
@media (max-width: 768px) {
  .article-container {
    padding: 90px 1.2rem 3rem;
    max-width: 100%;
  }

  .article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .article-header h1 {
    font-size: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .article-header h2 {
    font-size: 1rem;
  }

  .article-header .back-link {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.8rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.6rem;
  }

  .article-content h4 {
    font-size: 1rem;
  }

  .article-content p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .article-content ul,
  .article-content ol {
    margin-left: 1.2rem;
  }

  .article-content li {
    font-size: 0.95rem;
  }

  .article-content blockquote,
  .article-content .quote {
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    font-size: 0.95rem;
  }

  body {
    font-size: 16px;
    line-height: 1.75;
  }

  .navbar {
    padding: 0 1rem;
    height: 60px;
  }

  .navbar .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
  }

  .navbar .nav-links li {
    width: 100%;
  }

  .navbar .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .navbar .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .article-nav {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .article-nav a {
    max-width: 100%;
    padding: 0.85rem 1rem;
  }

  .article-nav a .nav-title {
    font-size: 0.9rem;
  }

  .article-content .indent {
    margin-left: 1rem;
    padding: 0.6rem 0;
  }

  .article-content img {
    margin: 1rem 0;
    border-radius: 6px;
  }

  /* Tables scroll horizontally on mobile */
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .engel-scale {
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
  }

  .engel-scale strong {
    min-width: 2rem;
    margin-right: 0.5rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* ---- Responsive: Small Mobile (480px) ---- */
@media (max-width: 480px) {
  .article-header h1 {
    font-size: 1.65rem;
    line-height: 1.25;
  }

  .article-header h2 {
    font-size: 0.92rem;
  }

  .article-container {
    padding: 80px 0.9rem 2rem;
  }

  .article-content h2 {
    font-size: 1.25rem;
  }

  .article-content h3 {
    font-size: 1.1rem;
  }

  .article-content p {
    font-size: 0.92rem;
  }

  .article-content blockquote,
  .article-content .quote {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .navbar {
    height: 56px;
  }

  .navbar .logo {
    font-size: 1.15rem;
  }

  .navbar .nav-links {
    top: 56px;
  }

  .article-nav a .nav-label {
    font-size: 0.7rem;
  }

  .article-nav a .nav-title {
    font-size: 0.85rem;
  }
}

/* ---- Responsive: Very Small (360px) ---- */
@media (max-width: 360px) {
  .article-container {
    padding: 75px 0.75rem 1.5rem;
  }

  .article-header h1 {
    font-size: 1.45rem;
  }

  .article-content p,
  .article-content li {
    font-size: 0.88rem;
  }
}

/* ---- Print styles ---- */
@media print {
  .navbar, .hamburger, .article-nav, .site-footer {
    display: none !important;
  }

  body {
    background: white;
    color: #333;
    font-size: 12pt;
  }

  .article-container {
    padding: 0;
    max-width: 100%;
  }

  .article-content a {
    color: #333;
    border-bottom: none;
  }

  .article-content a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Touch-friendly improvements ---- */
@media (hover: none) and (pointer: coarse) {
  .article-nav a {
    min-height: 60px;
  }

  .navbar .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .article-content a {
    padding: 2px 0;
  }
}

/* ---- Fade-in Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}
