/* =========================
   ARTICLE PREVIEW - MODERN DESIGN
   Inter font + smooth animations + FIXED MOBILE LAYOUT
   ========================= */

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInPreview {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmerBackground {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ===== CONTAINER ===== */
#container_preview {
  width: 100vw;
  min-height: 75vh;
  background:
    linear-gradient(135deg, 
      rgba(15, 23, 42, 0.95) 0%, 
      rgba(30, 41, 59, 0.85) 50%,
      rgba(15, 23, 42, 0.90) 100%
    ),
    var(--preview-bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 80px 24px;
  color: #ffffff;
  position: relative;
  margin-left: calc(50% - 50vw);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#container_preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
  animation: shimmerBackground 20s ease-in-out infinite alternate;
}

/* ===== BACK BUTTON ===== */
#block_for_back {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1000;
  animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#block_for_back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
              0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #0f172a;
}

#block_for_back a:hover {
  transform: translateX(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2),
              0 4px 8px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
}

#block_for_back a:active {
  transform: translateX(-2px) scale(0.98);
}

#block_for_back svg {
  width: 24px;
  height: 24px;
}

/* ===== MAIN CARD ===== */
.header-card {
  width: min(1200px, 94vw);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  position: relative;
  z-index: 1;
  animation: fadeInPreview 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 32px 80px rgba(0, 0, 0, 0.4),
    0 12px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ===== LEFT COLUMN ===== */
.header-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideInFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* Category Badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Translation Badge */
.translation-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 16px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.translation-badge:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.translation-badge i {
  font-size: 14px;
}

body.dark-mode .translation-badge {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
}

.category-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.category-badge i {
  font-size: 16px;
}

/* Title */
#show_article_title {
  font-family: 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#show_article_title::after {
  display: none;
}

/* Preview Text */
#article_tagline {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 400;
}

/* Meta Info */
#meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.meta-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.meta-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  opacity: 0.95;
}

/* Share Section */
#share_article {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.share-label {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.01em;
}

.share-buttons {
  display: flex;
  gap: 12px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-btn:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.share-btn.telegram:hover {
  background: #0088cc;
  border-color: #0088cc;
}

.share-btn.email:hover {
  background: #ea4335;
  border-color: #ea4335;
}

.share-btn.copy:hover {
  background: #10b981;
  border-color: #10b981;
}

/* ===== RIGHT COLUMN - AUTHOR CARD ===== */
.header-right {
  animation: slideInFromRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

#author_info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: sticky;
  top: 24px;
}

#author_info:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Author Card Header */
.author-card-header {
  width: 100%;
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.author-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Author Avatar */
.author-avatar-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.author_avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.1);
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 0 0 8px rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.author_avatar:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 0 12px rgba(255, 255, 255, 0.08);
}

/* Status borders */
.author_avatar.user {
  border-color: #10b981;
  box-shadow: 
    0 8px 24px rgba(16, 185, 129, 0.3),
    0 0 0 8px rgba(16, 185, 129, 0.1);
}

.author_avatar.admin {
  border-color: #f59e0b;
  box-shadow: 
    0 8px 24px rgba(245, 158, 11, 0.3),
    0 0 0 8px rgba(245, 158, 11, 0.1);
}

.author_avatar.publisher {
  border-color: #3b82f6;
  box-shadow: 
    0 8px 24px rgba(59, 130, 246, 0.3),
    0 0 0 8px rgba(59, 130, 246, 0.1);
}

/* Author Details */
.author_details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.author_name {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

.author_course,
.author_university,
.author_specialization {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.author_course i,
.author_university i,
.author_specialization i {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* Profile Link */
.profile_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 14px 28px;
  border-radius: 50px;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile_link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.profile_link:active {
  transform: translateY(0);
}

.profile_link i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.profile_link:hover i {
  transform: translateX(4px);
}

/* ===== COPY NOTIFICATION ===== */
.copy-notification {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.copy-notification i {
  font-size: 18px;
}

/* ===== DARK MODE ===== */
body.dark-mode #container_preview {
  background:
    linear-gradient(135deg, 
      rgba(0, 0, 0, 0.95) 0%, 
      rgba(15, 23, 42, 0.90) 50%,
      rgba(0, 0, 0, 0.92) 100%
    ),
    var(--preview-bg);
}

body.dark-mode #container_preview::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

body.dark-mode .header-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .header-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 32px 80px rgba(0, 0, 0, 0.7),
    0 12px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode #block_for_back a {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

body.dark-mode #block_for_back a:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .meta-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .meta-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .share-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode #author_info {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #author_info:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ===== RESPONSIVE - КРИТИЧНО ВАЖЛИВО ===== */

/* Desktop medium */
@media (max-width: 1024px) {
  .header-card {
    grid-template-columns: 1fr 320px;
    gap: 32px;
  }
}

/* ПЕРЕХІД НА MOBILE LAYOUT */
@media (max-width: 900px) {
  #container_preview {
    padding: 60px 20px;
    min-height: auto;
  }

  /* КРИТИЧНО: Вимикаємо grid, вмикаємо flex */
  .header-card {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 32px;
    padding: 32px 28px;
  }

  #show_article_title {
    font-size: 38px;
  }

  /* Обидва блоки на всю ширину */
  .header-left,
  .header-right {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Скасовуємо sticky */
  #author_info {
    position: static !important;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  #container_preview {
    padding: 50px 16px;
  }

  .header-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 28px 24px;
    border-radius: 24px;
    gap: 28px;
  }

  #show_article_title {
    font-size: 32px;
  }

  #article_tagline {
    font-size: 16px;
  }

  .meta-item {
    font-size: 14px;
    padding: 8px 14px;
  }

  .author_avatar {
    width: 100px;
    height: 100px;
  }

  #block_for_back {
    top: 16px;
    left: 16px;
  }

  #block_for_back a {
    width: 48px;
    height: 48px;
  }

  #block_for_back svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 640px) {
  #container_preview {
    padding: 40px 12px;
    min-height: auto;
  }

  .header-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 20px;
    border-radius: 20px;
    gap: 24px;
  }

  #show_article_title {
    font-size: 26px;
    line-height: 1.2;
  }

  .category-badge {
    font-size: 11px;
    padding: 8px 16px;
  }

  #meta-info {
    gap: 8px;
  }

  .meta-item {
    font-size: 13px;
    padding: 8px 14px;
  }

  .share-buttons {
    justify-content: flex-start;
  }

  .share-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  #author_info {
    padding: 24px 20px;
  }

  .author_avatar {
    width: 90px;
    height: 90px;
  }

  .author_name {
    font-size: 18px;
  }

  .author_course,
  .author_university,
  .author_specialization {
    font-size: 13px;
  }

  .copy-notification {
    bottom: 20px;
    right: 20px;
    left: 20px;
    font-size: 14px;
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  #container_preview {
    padding: 32px 8px;
  }

  .header-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px 16px;
    gap: 20px;
  }

  #show_article_title {
    font-size: 22px;
  }

  #article_tagline {
    font-size: 15px;
  }

  .profile_link {
    font-size: 14px;
    padding: 12px 24px;
  }

  #block_for_back a {
    width: 44px;
    height: 44px;
  }

  #block_for_back svg {
    width: 18px;
    height: 18px;
  }
}

/* ========================================
   MOBILE PERFORMANCE - ARTICLE PREVIEW
   ======================================== */

@media (max-width: 900px) {
  /* Відключити backdrop-filter для performance */
  #container_preview,
  .header-card,
  .category-badge,
  .translation-badge,
  .meta-item,
  .share-btn,
  #author_info,
  #block_for_back a {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Відключити fixed background - важко для GPU */
  #container_preview {
    background-attachment: scroll !important;
  }

  /* ПРИБРАТИ ВСІ ТІНІ */
  #container_preview,
  .header-card,
  #block_for_back a,
  .category-badge,
  .translation-badge,
  .meta-item,
  .share-btn,
  #author_info,
  .author_avatar,
  .author_avatar.user,
  .author_avatar.admin,
  .author_avatar.publisher,
  .profile_link,
  .copy-notification {
    box-shadow: none !important;
  }

  /* Прибрати hover тіні */
  .header-card:hover,
  #block_for_back a:hover,
  .category-badge:hover,
  #author_info:hover,
  .author_avatar:hover,
  .profile_link:hover,
  .share-btn:hover,
  .share-btn.telegram:hover,
  .share-btn.email:hover,
  .share-btn.copy:hover {
    box-shadow: none !important;
  }

  /* Прибрати text-shadow на заголовку */
  #show_article_title {
    text-shadow: none !important;
  }

  /* Прибрати декоративні ::before та ::after */
  #container_preview::before,
  #show_article_title::after {
    display: none !important;
  }

  /* Відключити анімації */
  #container_preview,
  .header-card,
  .header-left,
  .header-right,
  #block_for_back {
    animation: none !important;
  }

  /* Спростити transitions */
  .header-card,
  #block_for_back a,
  .category-badge,
  .translation-badge,
  .meta-item,
  .share-btn,
  #author_info,
  .author_avatar,
  .profile_link {
    transition-duration: 0.15s !important;
  }

  /* Відключити hover transforms (залишити тільки active) */
  .header-card:hover,
  #block_for_back a:hover,
  .category-badge:hover,
  .translation-badge:hover,
  .meta-item:hover,
  .share-btn:hover,
  #author_info:hover,
  .author_avatar:hover,
  .profile_link:hover {
    transform: none !important;
  }

  /* Залишити active states для UX */
  #block_for_back a:active {
    transform: scale(0.95) !important;
  }

  .profile_link:active {
    transform: scale(0.98) !important;
  }

  /* Відключити icon transform на profile link */
  .profile_link:hover i {
    transform: none !important;
  }

  /* Спростити gradient text на заголовку */
  #show_article_title {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: #ffffff !important;
  }

  body.dark-mode #show_article_title {
    color: #ffffff !important;
  }
}

/* Для дуже слабких пристроїв */
@media (max-width: 480px) and (max-height: 800px) {
  /* Відключити всі анімації та transitions */
  * {
    animation: none !important;
    transition: none !important;
  }

  /* Зменшити padding для економії місця */
  #container_preview {
    padding: 24px 8px !important;
  }

  .header-card {
    padding: 16px 12px !important;
  }

  #author_info {
    padding: 20px 16px !important;
  }

  /* Відключити opacity transitions */
  .copy-notification {
    opacity: 1 !important;
  }

  .copy-notification.show {
    transform: translateY(0) !important;
  }
}

/* Для вузьких екранів з малою висотою */
@media (max-width: 640px) and (max-height: 667px) {
  #container_preview {
    padding: 32px 12px !important;
    min-height: auto !important;
  }

  .header-card {
    padding: 20px 16px !important;
  }

  .author_avatar {
    width: 80px !important;
    height: 80px !important;
  }
}

/* =====================================================================
   COMPACT / MINIMALIST PREVIEW OVERRIDES (2026 redesign)
   Додано в КІНЕЦЬ навмисно (виграє за порядком у файлі).
   Мета: легший, нижчий «hero», менше падінгів, менший заголовок —
   щоб шапка статті не з'їдала весь перший екран, особливо на телефоні.
   ===================================================================== */

#container_preview {
  min-height: auto;
  padding: 40px 20px;
  background-attachment: scroll;   /* без fixed — спокійніше і швидше на моб. */
}

.header-card {
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 28px 32px;
  border-radius: 20px;
}
.header-card:hover { transform: none; }   /* прибрати «стрибок» картки */

.header-left { gap: 14px; }

#show_article_title {
  font-size: 32px;
  line-height: 1.2;
  text-shadow: none;
}

#article_tagline { font-size: 15.5px; line-height: 1.6; }

.category-badge { font-size: 12px; padding: 7px 14px; }

#meta-info { gap: 8px; margin-top: 4px; }
.meta-item { font-size: 13.5px; padding: 7px 14px; }

#share_article { margin-top: 8px; padding-top: 18px; gap: 12px; }
.share-btn { width: 42px; height: 42px; font-size: 18px; }

/* author card — компактніше */
#author_info { gap: 14px; padding: 22px 20px; border-radius: 18px; }
.author_avatar { width: 84px; height: 84px; border-width: 3px; }
.author_name { font-size: 18px; }
.author_details { gap: 8px; }
.profile_link { font-size: 14px; padding: 11px 22px; }

/* ----- телефон ----- */
@media (max-width: 768px) {
  #container_preview { padding: 26px 14px; }
  .header-card { padding: 22px 18px; border-radius: 18px; gap: 22px; }
  #show_article_title { font-size: 24px; }
  #article_tagline { font-size: 14.5px; }
  .meta-item { font-size: 13px; padding: 6px 12px; }
  #author_info { padding: 20px 16px; }
  .author_avatar { width: 76px; height: 76px; }
}

@media (max-width: 480px) {
  #container_preview { padding: 20px 10px; }
  .header-card { padding: 18px 14px; gap: 18px; }
  #show_article_title { font-size: 21px; }
  .author_avatar { width: 70px; height: 70px; }
}