/* ============================================================
   VÉRTICE — Revista Digital de Ideas
   styles.css — Mobile-first, dark mode, editorial layout
   ============================================================ */

/* ---- CSS VARIABLES ---- */
:root {
  --bg: #fafafa;
  --white: #ffffff;
  --primary: #d62828;
  --secondary: #212121;
  --accent: #f77f00;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e8e8e8;
  --surface: #f3f3f3;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.16);
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --header-height: 110px;
}

[data-theme="dark"] {
  --bg: #111111;
  --white: #1e1e1e;
  --secondary: #e8e8e8;
  --text: #e8e8e8;
  --text-muted: #999;
  --border: #2e2e2e;
  --surface: #1a1a1a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Merriweather', serif;
  line-height: 1.25;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---- SCROLL PROGRESS ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

.header-top { padding: 12px 0; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--primary);
  letter-spacing: -1px;
}

.logo-tagline {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wrapper {
  display: none;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-wrapper:focus-within {
  border-color: var(--primary);
}

.search-input {
  background: none;
  border: none;
  outline: none;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--text);
  width: 180px;
  font-family: inherit;
}

.search-btn {
  padding: 6px 12px;
  color: var(--text-muted);
  transition: color var(--transition);
  font-size: 0.875rem;
}
.search-btn:hover { color: var(--primary); }

.dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition);
}
.dark-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Category nav */
.category-nav {
  border-top: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-list {
  display: flex;
  gap: 0;
  white-space: nowrap;
  padding: 0;
}

.cat-btn {
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  font-family: 'Source Sans 3', sans-serif;
  cursor: pointer;
}
.cat-btn:hover { color: var(--primary); }
.cat-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Mobile category nav hidden until hamburger */
.category-nav.mobile-hidden { display: none; }

/* ============================================================
   HERO / FEATURED ARTICLE
   ============================================================ */
.hero-featured {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 40px;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.5) 50%,
    rgba(0,0,0,0.1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 16px;
  color: #fff;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin: 12px 0;
  max-width: 700px;
  line-height: 1.2;
}

.hero-excerpt {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

.meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.5);
}

.meta-author { font-weight: 600; color: #fff; }
.meta-sep { opacity: 0.5; }
.meta-read i { margin-right: 4px; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.badge-red    { background: var(--primary); color: #fff; }
.badge-tech   { background: #0077b6; color: #fff; }
.badge-society{ background: #5a189a; color: #fff; }
.badge-economy{ background: #2d6a4f; color: #fff; }
.badge-culture{ background: var(--accent); color: #fff; }
.badge-science{ background: #023e8a; color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  font-family: 'Source Sans 3', sans-serif;
}
.btn-primary:hover {
  background: #b71c1c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  font-family: 'Source Sans 3', sans-serif;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-newsletter {
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: 'Source Sans 3', sans-serif;
  cursor: pointer;
}
.btn-newsletter:hover {
  background: #b71c1c;
  transform: translateY(-1px);
}

/* ============================================================
   CONTENT WRAPPER — Grid + Sidebar
   ============================================================ */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

/* Section header */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
}

.section-title.centered { text-align: center; margin-bottom: 32px; }

.section-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   ARTICLES GRID
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Article card */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card.hidden {
  display: none;
}

.article-card.fade-in {
  animation: fadeInUp 0.4s ease both;
}

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

.card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .card-img { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.card-author { font-weight: 600; color: var(--text); }
.card-sep { opacity: 0.4; }
.card-read i { margin-right: 3px; font-size: 0.7rem; }

/* Load more */
.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  display: none; /* Hidden on mobile */
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Source Sans 3', sans-serif;
}
.sidebar-title i { color: var(--primary); }

/* Trending list */
.trending-list { counter-reset: none; }

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }

.trending-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--border);
  font-family: 'Merriweather', serif;
  line-height: 1;
  flex-shrink: 0;
}

.trending-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-link:hover { color: var(--primary); }

/* Social grid */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  transition: opacity var(--transition), transform var(--transition);
}
.social-btn:hover { opacity: 0.85; transform: translateY(-1px); color: #fff; }
.social-btn.twitter   { background: #1a1a1a; }
.social-btn.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-btn.facebook  { background: #1877f2; }
.social-btn.youtube   { background: #ff0000; }

/* Sidebar newsletter */
.sidebar-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
  font-family: inherit;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Ad placeholder */
.sidebar-ad {
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ad-placeholder {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  color: var(--text-muted);
}
.ad-placeholder i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
  color: var(--border);
}
.ad-placeholder p { font-weight: 600; font-size: 0.9rem; }
.ad-placeholder small { font-size: 0.75rem; }

/* ============================================================
   CATEGORIES SECTION
   ============================================================ */
.categories-section {
  background: var(--surface);
  padding: 60px 0;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.cat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cat-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cat-tech    .cat-icon { color: #0077b6; }
.cat-society .cat-icon { color: #5a189a; }
.cat-economy .cat-icon { color: #2d6a4f; }
.cat-culture .cat-icon { color: var(--accent); }
.cat-science .cat-icon { color: #023e8a; }
.cat-all     .cat-icon { color: var(--primary); }

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.newsletter-section {
  background: var(--secondary);
  padding: 70px 0;
  color: #fff;
}

[data-theme="dark"] .newsletter-section {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
}

.newsletter-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.newsletter-text h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.newsletter-text p {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  max-width: 460px;
}
.newsletter-text strong { color: var(--accent); }

.newsletter-form { width: 100%; max-width: 500px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-input-large {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color var(--transition);
  font-family: inherit;
}
.form-input-large::placeholder { color: rgba(255,255,255,0.5); }
.form-input-large:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.15);
}

.form-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
}
.form-disclaimer a { color: rgba(255,255,255,0.7); text-decoration: underline; }

.form-message {
  margin-top: 8px;
  font-size: 0.875rem;
  min-height: 1.2em;
  font-weight: 600;
}
.form-message.success { color: #69f0ae; }
.form-message.error   { color: #ff5252; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0d0d0d;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-text {
  font-size: 1.8rem;
  display: inline-block;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-about {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 340px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col a {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-made i { color: var(--primary); }

/* ============================================================
   ARTICLE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 0;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--white);
  width: 100%;
  max-width: 780px;
  min-height: 100vh;
  position: relative;
  margin: 0 auto;
  transform: translateY(30px);
  transition: transform 0.35s ease;
}

.modal-overlay.open .modal-container {
  transform: translateY(0);
}

.modal-reading-progress {
  position: sticky;
  top: 0;
  height: 4px;
  background: var(--border);
  z-index: 10;
}

.modal-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}

.modal-close {
  position: sticky;
  top: 4px;
  left: 100%;
  float: right;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px;
  transition: all var(--transition);
  z-index: 11;
  cursor: pointer;
}
.modal-close:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.modal-body {
  padding: 0 24px 60px;
  clear: both;
}

/* Modal article content */
.modal-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.modal-cat-badge { margin-bottom: 16px; display: block; }

.modal-title {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

.modal-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.byline-info .byline-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.byline-info .byline-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 20px;
  font-family: 'Source Sans 3', sans-serif;
}

.modal-content p:first-child {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Comments section */
.modal-comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.modal-comments h3 {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.comment {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-bubble {
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 12px 16px;
  flex: 1;
}

.comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Related articles */
.modal-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.modal-related h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.related-card {
  display: flex;
  gap: 14px;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.related-card:hover { background: var(--surface); }

.related-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.related-info .related-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-info .related-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */
@media (min-width: 480px) {
  .hero-title { font-size: 1.9rem; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (min-width: 768px) {
  .logo-text { font-size: 2rem; }

  .search-wrapper { display: flex; }

  .hamburger { display: none; }

  .category-nav.mobile-hidden { display: block !important; }

  .hero-featured { min-height: 540px; }

  .hero-title { font-size: 2.4rem; }

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

  .modal-hero-img { height: 360px; }
  .modal-title { font-size: 2rem; }
  .modal-body { padding: 0 40px 80px; }

  .related-grid { grid-template-columns: repeat(2, 1fr); }

  .form-group { flex-direction: row; }
  .form-input-large { flex: 1; }

  .newsletter-content {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
  }

  .newsletter-text { flex: 1; }
  .newsletter-form { flex: 1; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }

  .sidebar {
    display: block;
    position: sticky;
    top: calc(var(--header-height) + 20px);
  }

  /* Asymmetric grid: 1 large + 2 medium + 5 small */
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }

  .article-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    flex-direction: row;
  }

  .article-card:nth-child(1) .card-image-wrap {
    flex: 1.2;
    aspect-ratio: unset;
    min-height: 280px;
  }

  .article-card:nth-child(1) .card-body {
    flex: 1;
    padding: 24px;
  }

  .article-card:nth-child(1) .card-title {
    font-size: 1.3rem;
    -webkit-line-clamp: 4;
  }

  .article-card:nth-child(1) .card-excerpt {
    -webkit-line-clamp: 4;
  }

  .hero-title { font-size: 2.8rem; }

  .categories-grid { grid-template-columns: repeat(6, 1fr); }

  .modal-container { margin: 40px auto; min-height: auto; border-radius: var(--radius-lg); }
  .modal-overlay { padding: 40px 20px; align-items: flex-start; }
}

/* ============================================================
   SEARCH NO RESULTS
   ============================================================ */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.3;
}
.no-results h3 { font-size: 1.2rem; margin-bottom: 8px; }

/* ============================================================
   UTILITY
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Success animation */
@keyframes successPop {
  0% { transform: scale(0.8); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.success-pop { animation: successPop 0.4s ease both; }
