/* ===========================
   Magazine — Base & Layout
=========================== */

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

:root {
  --bg: #F6F4F0;
  --surface: #FFFFFF;
  --text: #1A1816;
  --text-muted: #6E6660;
  --border-color: #DCD6CE;
  --accent-color: #e63946;
  --font-body: 'Inter', DM Sans, system-ui, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --radius: 14px;
  --shadow: 0 8px 22px rgba(0,0,0,0.14);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ===========================
   Top Bar
=========================== */
.top-bar {
  background: var(--accent-color);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.4rem 1.5rem;
}

/* ===========================
   Header / Navigation
=========================== */
#nav-toggle { display: none; }

header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
}

.header-top-inner {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin-inline: auto;
  padding: 0.75rem 1.5rem;
  border-bottom: 3px solid var(--text);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
}

.logo span {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hamburger { display: none; }

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav-menu a:hover {
  border-bottom-color: var(--accent-color);
  text-decoration: none;
}

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  .hamburger:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: 0.2s;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 3px solid var(--text);
    padding: 1rem 1.5rem;
    z-index: 50;
  }

  .nav-menu ul { 
    flex-direction: column; 
    gap: var(--sp-1); 
  }

  .nav-menu ul li a {
    padding: var(--sp-3) var(--sp-4);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  #nav-toggle:checked ~ .nav-menu { display: block; }

  .articles-grid {
    gap: var(--sp-5);
  }

  .articles-grid .card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .articles-grid .card p {
    font-size: 0.9rem;
  }

  /* Larger touch targets */
  input, button, textarea, select {
    font-size: 16px;
  }
}

/* ===========================
   Articles Grid
=========================== */
.articles {
  padding: 2.5rem 0;
}

.articles h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 2rem;
  border-bottom: 4px solid var(--accent-color);
  padding-bottom: 0.6rem;
  display: inline-block;
  letter-spacing: -0.02em;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Featured: first card spans full width */
.articles-grid .card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.articles-grid .card:first-child .card-body { padding: 2rem; }
.articles-grid .card:first-child h3 { font-size: 1.9rem; font-weight: 800; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color, #e0e0e0);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-color);
}

.card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.articles-grid .card:first-child a {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.articles-grid .card:first-child .card-image {
  height: 100%;
  min-height: 300px;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.card-meta { margin-top: auto; padding-top: 0.75rem; }

.card-date, .card time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; }
  .articles-grid .card:first-child { grid-template-columns: 1fr; }
  .articles-grid .card:first-child a { grid-template-columns: 1fr; }
  .articles-grid .card:first-child .card-image { min-height: 200px; }
}

/* ===========================
   About Section (on index)
=========================== */
.about-section, .page-content {
  max-width: 780px;
  margin-inline: auto;
  padding: 2rem 1.5rem 3rem;
}

.about-section h1, .page-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-section h2, .page-content h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
}

.about-section p, .page-content p { margin-bottom: 1rem; color: var(--text-muted); }
.about-section ul, .page-content ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.about-section li, .page-content li { margin-bottom: 0.4rem; }

/* ===========================
   Breadcrumb
=========================== */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--accent-color); font-weight: 600; }

/* ===========================
   Article Page
=========================== */
.article-hero { margin-bottom: 2rem; }

.article-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-hero img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-body { max-width: 780px; margin-inline: auto; padding: 0 1.5rem 2rem; }
.article-body h2 { font-family: var(--font-heading); font-size: 1.5rem; margin: 2rem 0 1rem; }
.article-body p { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.7; }

/* ===========================
   Comments
=========================== */
.comments { padding: 2rem 0; border-top: 2px solid var(--border-color); }
.comments h2 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 1.5rem; }

.comments-list { display: flex; flex-direction: column; gap: 1.25rem; }

.comment {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-color);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.comment-author-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.comment-source-icon { width: 24px; height: 24px; border-radius: 4px; }
.comment-date { font-size: 0.8rem; color: var(--text-muted); }
.comment-content { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }

/* Comments CTA */
.comment-cta {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.comment-cta-text { margin-bottom: 0.75rem; color: var(--text-muted); }

.comment-cta-button {
  display: inline-block;
  padding: 0.6rem 2rem;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
}

/* ===========================
   Auth Page
=========================== */
.auth-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h1 { font-family: var(--font-heading); font-size: 1.8rem; text-align: center; margin-bottom: 0.25rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
}

.auth-submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.auth-social:hover {
  background: var(--bg-alt, #f5f5f5);
}

.auth-social img { width: 20px; height: 20px; border-radius: 4px; }

/* ===========================
   Search Page
=========================== */
.search-form {
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  gap: 0;
}

.search-form input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.search-form button {
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border: 2px solid var(--accent-color);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
  cursor: pointer;
}

/* ===========================
   404 Page
=========================== */
.not-found {
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.not-found a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 2rem;
  background: var(--accent-color);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

/* ===========================
   Footer
=========================== */
footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.7);
  padding: 0;
}

.footer-inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 2rem 1.5rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 1.5rem;
  max-width: 1100px;
  margin-inline: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom .logo span { color: #fff; }

.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  text-decoration: none;
}

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

footer p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===========================
   Scroll Animations
=========================== */

:root {
  --t-fast: 0.12s;
  --t-base: 0.25s;
  --t-slow: 0.4s;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(35px);
}

.animate-on-scroll.is-visible {
  animation: fadeSlideUp 0.5s ease-out forwards;
}

/* Stagger */
.articles-grid .animate-on-scroll.is-visible:nth-child(2) { animation-delay: 0.1s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(3) { animation-delay: 0.15s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(4) { animation-delay: 0.2s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(5) { animation-delay: 0.25s; }
.articles-grid .animate-on-scroll.is-visible:nth-child(6) { animation-delay: 0.3s; }

/* Card hover: bold editorial style */
.card {
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.card-image {
  transition: transform var(--t-base);
}

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

/* Fade-in for lazy-loaded images */
@keyframes imgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

img[loading="lazy"] {
  opacity: 0;
  animation: none;
}

img[loading="lazy"].is-loaded {
  animation: imgFadeIn 0.4s ease-out forwards;
}

/* ===========================
   Cookie Banner
=========================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1a1a1a;
  border-top: 3px solid var(--accent-color, #e63946);
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--t-slow), opacity var(--t-slow);
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner__inner p {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.cookie-banner__btn:hover {
  transform: translateY(-1px);
}

.cookie-banner__btn--accept {
  background: var(--accent-color, #e63946);
  color: #fff;
}

.cookie-banner__btn--accept:hover {
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.cookie-banner__btn--more {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.cookie-banner__btn--more:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

@media (max-width: 600px) {
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================
   Scroll to Top
=========================== */

.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--accent-color, #e63946);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--t-base), visibility var(--t-base), transform var(--t-base), box-shadow var(--t-fast);
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ===========================
   Share Buttons
=========================== */

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  margin-top: 1rem;
  border-top: 2px solid var(--border-color, #e5e5e5);
  flex-wrap: wrap;
}

.share-buttons__label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.85);
  color: #fff;
}

.share-btn svg {
  flex-shrink: 0;
}

.share-btn--vk {
  background: #4680C2;
}

.share-btn--vk:hover {
  box-shadow: 0 4px 15px rgba(70, 128, 194, 0.4);
}

.share-btn--tg {
  background: #0088cc;
}

.share-btn--tg:hover {
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

.share-btn--tw {
  background: #1a1a2e;
}

.share-btn--tw:hover {
  box-shadow: 0 4px 15px rgba(26, 26, 46, 0.4);
}

@media (max-width: 600px) {
  .share-buttons {
    justify-content: center;
  }
  .share-buttons__label {
    width: 100%;
    text-align: center;
  }
}

/* ===========================
   Related Articles
=========================== */

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid var(--accent-color, #e63946);
}

.related-articles__heading {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  border-bottom: 3px solid var(--accent-color, #e63946);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-card {
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface, #fff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

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

.related-card .card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.related-card .card-body {
  padding: 1rem;
}

.related-card h3 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.related-card p {
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .related-articles__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ===========================
   Subscribe Form (Footer)
=========================== */

.footer-subscribe {
  padding: 3rem 1.5rem 2rem;
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
}

.subscribe-block__title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.subscribe-block__text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin: 0 0 1.5rem;
}

.subscribe-form__group {
  display: flex;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subscribe-form__input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: none;
  min-width: 0;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.subscribe-form__input::placeholder {
  color: rgba(255,255,255,0.4);
}

.subscribe-form__input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent-color, #e63946);
}

.subscribe-form__btn {
  padding: 0.75rem 1.5rem;
  background: var(--accent-color, #e63946);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: opacity var(--t-fast);
}

.subscribe-form__btn:hover {
  opacity: 0.9;
}

.subscribe-form__success {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #22c55e;
  font-weight: 700;
}

.subscribe-form__success.is-visible {
  display: block !important;
}

@media (max-width: 600px) {
  .auth-socials {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .subscribe-form__group {
    flex-direction: column;
  }
}

/* ===========================
   Reduced Motion
=========================== */

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  .animate-on-scroll.is-visible {
    animation: none;
  }
  img[loading="lazy"] {
    opacity: 1;
  }
  img[loading="lazy"].is-loaded {
    animation: none;
  }
  .cookie-banner {
    transition: none;
  }
  .scroll-to-top {
    transition: none;
  }
}

/* ===========================
   Accessibility: Skip Link
=========================== */
.skip-link {
  position: fixed;
  top: -100%;
  white-space: nowrap;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===========================
   Reading Progress Bar
=========================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.05);
  z-index: 1000;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  transition: width 0.1s linear;
}

/* ===========================
   Reading Time
=========================== */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.reading-time::before {
  content: "⏱";
  font-size: 0.9em;
}

/* Article Content Typography */
.article-body {
  line-height: 1.75;
}
.article-body h1,
.article-body h2,
.article-body h3 {
  margin-block: 1.5rem 1rem;
}
.article-body p {
  margin-block: 1rem;
}
.article-body ul,
.article-body ol {
  margin-block: 1rem;
  padding-left: 1.5rem;
}
.article-body li {
  margin-block: 0.35rem;
}
.article-body blockquote {
  border-left: 3px solid currentColor;
  padding-left: 1rem;
  margin: 1.5rem 0;
  opacity: 0.85;
  font-style: italic;
}

/* Article Content Images */
.article-body img {
  display: block;
  max-width: min(50%, 620px);
  height: auto;
  margin: 1.5rem auto;
  border-radius: 8px;
}

/* Article Tables */
.article-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.article-body table thead,
.article-body table tbody,
.article-body table tfoot {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.article-body table thead {
  background: rgba(128, 128, 128, 0.15);
  font-weight: 700;
}
.article-body table th,
.article-body table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid rgba(128, 128, 128, 0.2);
  white-space: normal;
  word-break: break-word;
}
.article-body table th {
  font-weight: 700;
  text-align: center;
}
.article-body table tbody tr:nth-child(even) {
  background: rgba(128, 128, 128, 0.05);
}
.article-body table tbody tr:hover {
  background: rgba(128, 128, 128, 0.08);
}
@media (max-width: 768px) {
  .article-body table {
    font-size: 0.85rem;
  }
  .article-body table th,
  .article-body table td {
    padding: 0.5rem;
  }
  .article-body img {
    max-width: 100%;
  }
}

/* Fix: auto-reveal hidden elements that never enter viewport */
.animate-on-scroll:not(.is-visible) {
  animation: aos-fallback-reveal 0.5s ease forwards;
  animation-delay: 1.5s;
}
@keyframes aos-fallback-reveal {
  to { opacity: 1; transform: translateY(0); }
}
