/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #ffffff;
  color: #111111;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.site-header {
  background: #111111;
  color: #ffffff;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header a {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* ===== Footer ===== */
.site-footer {
  background: #111111;
  color: #888888;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: 4rem;
}

/* ===== Homepage ===== */
.home-hero {
  padding: 3rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.home-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.home-hero p {
  color: #555555;
  font-size: 1.05rem;
  max-width: 520px;
}

.comics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.comic-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.comic-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.comic-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  line-height: 1.35;
  color: #111111;
}

/* ===== Comic Page ===== */
.comic-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.comic-wrap h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.comic-cover {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 2rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.comic-content figure {
  margin: 0 0 0.5rem;
}

.comic-content figure img {
  width: 100%;
}

/* ===== Layout con sidebar ===== */
.comic-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .comic-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 72px;
}

.sidebar h2 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888888;
  margin-bottom: 1rem;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-list li a {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.sidebar-list li img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-list li span {
  font-size: 0.825rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.35;
}

/* ===== Related posts abajo ===== */
.related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.related h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.related-grid .comic-card h3 {
  font-size: 0.8rem;
}
