:root {
  /* Brand / accent - Biosynex Pharmaceutical Theme */
  --primary-orange: #e97512;
  --primary-orange-hover: #d16508;
  --accent-teal: #00a0b0;
  --accent-blue: #1a2a4a;
  --accent-blue-light: #2a3a5a;

  /* Legacy aliases for compatibility */
  --primary-green: #e97512;
  --primary-emerald: #d16508;
  --accent-cyan: #00a0b0;

  /* Neutrals */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-500: #64748b;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    "Noto Sans", "Liberation Sans", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.14);
  --shadow-glow: 0 20px 60px rgba(233, 117, 18, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body.news-detail-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--neutral-900);
  background: radial-gradient(1200px 650px at 20% 0%, rgba(6, 182, 212, 0.10), transparent 55%),
    radial-gradient(900px 520px at 90% 10%, rgba(16, 185, 129, 0.10), transparent 52%),
    var(--neutral-50);
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Accessible focus */
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.9);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

/* Header */
.news-header {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 6vw, 5.5rem) var(--spacing-md) clamp(3rem, 5vw, 4.5rem);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(3, 105, 161, 0.92), rgba(16, 185, 129, 0.88));
}

.news-header::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.10), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.20), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(16, 185, 129, 0.18), transparent 50%);
  animation: headerPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.news-header::after {
  /* decorative wave */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 90px;
  background: var(--neutral-50);
  clip-path: polygon(0 50%, 10% 65%, 25% 52%, 40% 72%, 55% 54%, 70% 70%, 85% 54%, 100% 68%, 100% 100%, 0 100%);
  opacity: 0.95;
  pointer-events: none;
}

.header-content {
  position: relative;
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(10px);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.back-button::before {
  content: "←";
  font-weight: 700;
}

.back-button:hover {
  transform: translateX(-2px);
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
}

.news-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(20, 184, 166, 0.95));
  box-shadow: var(--shadow-glow);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 1rem 0 0.9rem;
  animation: fadeInDown 0.6s ease-out both;
}

.news-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-shadow: 0 14px 30px rgba(15, 23, 42, 0.45);
  animation: fadeInUp 0.65s ease-out both;
  animation-delay: 0.05s;
}

.news-subtitle {
  margin: 0 auto 1.25rem;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  line-height: 1.55;
  animation: fadeInUp 0.65s ease-out both;
  animation-delay: 0.12s;
}

.news-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  animation: fadeInUp 0.65s ease-out both;
  animation-delay: 0.18s;
}

.news-meta-item {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.90);
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

/* Main container */
.news-container {
  position: relative;
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
  padding: var(--spacing-2xl) 0 var(--spacing-3xl);
}

/* Loading */
.loading-spinner {
  display: grid;
  place-items: center;
  padding: var(--spacing-3xl) var(--spacing-lg);
  text-align: center;
  color: var(--neutral-700);
}

.spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(100, 116, 139, 0.18);
  border-top-color: var(--primary-green);
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.08);
}

/* Main media */
.news-main-media {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  transform-origin: center;
  animation: scaleIn 0.35s ease-out both;
}

.news-main-media img,
.news-main-media video {
  width: 100%;
  height: auto;
  display: block;
}

.news-main-media video {
  background: #000;
}

/* Content card */
.news-content-card {
  margin-top: var(--spacing-xl);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--neutral-200);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  animation: fadeInUp 0.5s ease-out both;
}

.news-content-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary-green), var(--accent-teal), var(--accent-cyan));
}

.news-content {
  padding: clamp(1.1rem, 2.2vw, 2rem) clamp(1.05rem, 2.1vw, 2.2rem);
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--neutral-800);
}

.news-content p {
  margin: 0 0 1.1rem;
  color: var(--neutral-700);
  text-align: justify;
  text-justify: inter-word;
}

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

/* Optional "drop cap" styling (disabled by default).
   To enable: add `enable-dropcap` to <body> (e.g. class="news-detail-page enable-dropcap") */
body.news-detail-page.enable-dropcap .news-content p:first-child::first-letter {
  float: left;
  font-size: 3.25rem;
  line-height: 1;
  padding: 0.2rem 0.6rem 0 0;
  font-weight: 800;
  color: var(--primary-green);
  text-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
}

.news-content h2,
.news-content h3 {
  margin: 1.9rem 0 0.75rem;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
}

.news-content h2 {
  font-size: 1.35rem;
  position: relative;
  padding-bottom: 0.45rem;
}

.news-content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 86px;
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-green), var(--accent-teal));
  opacity: 0.9;
}

/* Gallery */
.gallery-section {
  margin-top: var(--spacing-2xl);
}

.gallery-title {
  margin: 0 0 var(--spacing-md);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
  min-height: 180px;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 185, 129, 0.35);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 0.9rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.75));
  transform: translateY(10px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.gallery-item:hover .gallery-item-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-item-caption {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.video-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.video-play-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  width: 0;
  height: 0;
  border-left: 14px solid rgba(255, 255, 255, 0.95);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 2rem 1rem;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
  z-index: 9999;
}

.lightbox.active {
  display: grid;
  animation: fadeIn 0.18s ease-out both;
}

.lightbox-content {
  position: relative;
  width: min(1040px, 100%);
  max-height: 90vh;
  display: grid;
  place-items: center;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

#lightbox-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0.25rem;
}

#lightbox-media img,
#lightbox-media video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  background: #000;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(255, 255, 255, 0.95);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.lightbox-close:hover {
  transform: rotate(8deg);
  background: rgba(239, 68, 68, 0.35);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(255, 255, 255, 0.95);
  font-size: 30px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms ease, background 160ms ease;
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(16, 185, 129, 0.25);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

/* Responsiveness */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .news-container {
    padding-top: var(--spacing-xl);
  }

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-item {
    min-height: 210px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Print */
@media print {
  body.news-detail-page {
    background: #ffffff;
  }

  .news-header::before,
  .news-header::after,
  .lightbox,
  .back-button,
  .gallery-section,
  .video-play-icon {
    display: none !important;
  }

  .news-header {
    color: #000;
    background: #fff;
    padding: 0 0 1rem;
  }

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

  .news-content-card,
  .news-main-media {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes headerPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }

  50% {
    transform: translate3d(1.5%, 0.5%, 0) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ============================================
   MAGAZINE STYLE LAYOUT (New Template)
   ============================================ */

/* Body styles for magazine page */
body.magazine-page,
body.article-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--neutral-900);
  background: var(--neutral-50);
}

/* Magazine Header - Biosynex Professional Style */
.magazine-header,
.article-header {
  position: relative;
  overflow: hidden;
  padding: clamp(7rem, 12vw, 10rem) var(--spacing-md) clamp(4rem, 8vw, 6rem);
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 50%, #0f1a2a 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  border-bottom: none;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.magazine-header::before,
.article-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.magazine-header::after,
.article-header::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(233, 117, 18, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  animation: floatUp 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatUp {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.magazine-header-inner {
  position: relative;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  z-index: 1;
}

/* Breadcrumb - Professional Style */
.magazine-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
  padding: 0;
  width: fit-content;
  margin-left: 0;
  margin-right: auto;
  opacity: 0;
  animation: slideInLeft 0.6s ease 0.2s forwards;
}

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

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.breadcrumb-link {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  padding: 0.25rem 0;
  font-weight: 500;
  position: relative;
}

.breadcrumb-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-orange);
  transition: width 0.3s ease;
}

.breadcrumb-link:hover {
  color: var(--primary-orange);
}

.breadcrumb-link:hover::after {
  width: 100%;
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.breadcrumb-current {
  color: var(--primary-orange);
  font-weight: 600;
}

/* Article Meta Header - Biosynex Professional Style */
.article-meta-header {
  text-align: left;
  padding: 0;
  background: transparent;
  border: none;
  margin-top: 0;
  max-width: 900px;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: slideUp 0.8s ease 0.4s forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-hover));
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #ffffff;
  animation: bounceIn 0.6s ease-out both;
  border: none;
  box-shadow: 0 8px 25px rgba(233, 117, 18, 0.4);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.article-heading {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #ffffff;
  animation: fadeInUp 0.7s ease-out both;
  animation-delay: 0.1s;
  font-weight: 700;
  max-width: 900px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  padding-bottom: 0;
}

.article-heading::after {
  display: none;
}

.article-excerpt {
  margin: 0 0 2rem;
  max-width: 800px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  animation: fadeInUp 0.7s ease-out both;
  animation-delay: 0.2s;
  font-weight: 400;
  text-shadow: none;
  font-style: normal;
}

.article-reading-time {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

/* Article Info - Professional Style */
.article-info {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 0;
  border-top: none;
  animation: fadeInUp 0.7s ease-out both;
  animation-delay: 0.3s;
}

.info-item {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  box-shadow: none;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: rgba(233, 117, 18, 0.2);
  border-color: var(--primary-orange);
  transform: translateY(-2px);
}

.info-icon {
  font-size: 1rem;
  opacity: 0.9;
}

/* Hide author information */
#article-author-wrap {
  display: none !important;
}

.info-icon {
  font-size: 1rem;
}

/* Article Actions - Clean Button Style */
.article-actions {
  display: none !important;
  /* Hide action buttons */
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--neutral-200);
  animation: fadeInUp 0.7s ease-out both;
  animation-delay: 0.4s;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-700);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: none;
  box-shadow: none;
  position: relative;
}

.action-btn:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 117, 18, 0.35);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn span {
  font-size: 1rem;
}

.action-feedback {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  min-height: 1.2em;
  display: none;
}

/* Magazine Wrapper */
.magazine-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-3xl);
}

@media (max-width: 900px) {
  .magazine-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Magazine Content */
.magazine-content {
  min-width: 0;
}

.article-main {
  /* Main article content area */
  min-width: 0;
}

.magazine-loading {
  display: grid;
  place-items: center;
  padding: var(--spacing-3xl) var(--spacing-lg);
  text-align: center;
  color: var(--neutral-700);
}

/* Article Media */
.article-media {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  margin-bottom: var(--spacing-xl);
  animation: scaleIn 0.35s ease-out both;
}

.article-media img,
.article-media video {
  width: 100%;
  height: auto;
  display: block;
}

.article-media video {
  background: #000;
}

/* Article Body */
.article-body {
  margin-bottom: var(--spacing-xl);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--neutral-200);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  animation: fadeInUp 0.5s ease-out both;
}

.article-body::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary-orange), var(--accent-teal), var(--accent-blue));
}

.article-text {
  padding: clamp(1.1rem, 2.2vw, 2rem) clamp(1.05rem, 2.1vw, 2.2rem);
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--neutral-800);
}

.article-text p {
  margin: 0 0 1.1rem;
  color: var(--neutral-700);
  text-align: justify;
  text-justify: inter-word;
}

.article-text ol.article-steps {
  margin: 1.5rem 0 2rem;
  padding-left: 1.6rem;
}

.article-text ol.article-steps>li {
  margin: 0 0 1.25rem;
  padding-left: 0.35rem;
}

.article-text ol.article-steps>li::marker {
  color: var(--primary-orange);
  font-weight: 700;
}

.article-text .step-title {
  display: block;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.35rem;
}

.article-text ol.article-steps p {
  margin: 0 0 0.85rem;
  color: var(--neutral-700);
}

.article-text ul.article-bullets {
  margin: 1.25rem 0 2rem;
  padding-left: 1.35rem;
  list-style: disc;
}

.article-text ul.article-bullets>li {
  margin: 0 0 0.95rem;
  padding-left: 0.25rem;
}

.article-text ul.article-bullets>li::marker {
  color: var(--primary-orange);
}

.article-text .bullet-title {
  font-weight: 700;
  color: var(--neutral-900);
  margin-right: 0.35rem;
}

.article-text ul.article-bullets p {
  margin: 0.4rem 0 0.75rem;
  color: var(--neutral-700);
}

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

.article-text h2,
.article-text h3 {
  margin: 1.9rem 0 0.75rem;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
}

.article-text h2 {
  font-size: 1.35rem;
  position: relative;
  padding-bottom: 0.45rem;
}

.article-text h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 86px;
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary-orange), var(--accent-teal));
  opacity: 0.9;
}

/* Article Gallery */
.article-gallery {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-xl);
}

.section-heading {
  margin: 0 0 var(--spacing-md);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

/* Related Articles */
.article-related {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-xl);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Article Navigation */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--neutral-200);
}

.nav-link {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(233, 117, 18, 0.15);
  border-color: var(--primary-orange);
}

.nav-label {
  display: block;
  font-size: 0.85rem;
  color: var(--neutral-500);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.nav-title {
  display: block;
  font-size: 1rem;
  color: var(--neutral-900);
  font-weight: 600;
}

.nav-newer {
  text-align: left;
}

.nav-older {
  text-align: right;
}

/* Magazine Sidebar */
.magazine-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-section {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-heading {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Lightbox Updates */
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.lightbox-container {
  position: relative;
  width: min(1040px, 100%);
  max-height: 90vh;
  display: grid;
  place-items: center;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(255, 255, 255, 0.95);
  font-size: 30px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms ease, background 160ms ease;
  z-index: 10;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(16, 185, 129, 0.25);
}

.lightbox-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0.25rem;
}

/* Responsive adjustments for magazine layout */
@media (max-width: 900px) {
  .magazine-wrapper {
    grid-template-columns: 1fr;
  }

  .magazine-sidebar {
    position: static;
    max-height: none;
  }
}