/*
Theme Name: AnimeDiario
Theme URI: https://animediario.com
Description: Tema oscuro estilo portal de noticias anime - magazine grid layout
Author: AnimeDiario
Version: 1.0
Text Domain: animediario
*/

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f4f4f4;
  --bg2:      #ebebeb;
  --bg3:      #e0e0e0;
  --card:     #ffffff;
  --border:   #e0e0e0;
  --red:      #e53935;
  --red-dark: #b71c1c;
  --gold:     #c8860a;
  --text:     #1a1a1a;
  --muted:    #666;
  --white:    #1a1a1a;
  --font:     'Inter', 'Segoe UI', Arial, sans-serif;
  --radius:   6px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--white);
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .site-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── Header ───────────────────────────────────────────────── */
#site-header {
  background: #000;
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 2rem;
}

.site-logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  white-space: nowrap;
}

.site-logo span { color: var(--red); }

/* Nav */
#site-nav ul {
  display: flex;
  gap: 0.25rem;
}

#site-nav a {
  padding: .4rem .85rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #ccc;
  transition: background .2s, color .2s;
}

#site-nav a:hover,
#site-nav .current-menu-item a {
  background: var(--red);
  color: var(--white);
}

/* Search */
.header-search { display: flex; align-items: center; }
.header-search input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .4rem .8rem;
  border-radius: var(--radius);
  font-size: .85rem;
  width: 160px;
  outline: none;
}
.header-search input:focus { border-color: var(--red); }

/* ── Breaking bar ─────────────────────────────────────────── */
.breaking-bar {
  background: var(--red);
  padding: .35rem 0;
  font-size: .78rem;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
}

.breaking-bar .label {
  background: var(--red-dark);
  padding: .35rem .8rem;
  margin-right: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Hero (featured post) ─────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 16/6;
  background: #111;
  border-radius: 8px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .5s ease;
  filter: brightness(.95);
}

.hero:hover img { transform: scale(1.02); filter: brightness(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 45%, transparent 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 2.5rem;
}

.hero-overlay .cat-badge {
  margin-bottom: .7rem;
  align-self: flex-start;
  font-size: .75rem;
}

.hero-overlay h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: .6rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  max-width: 700px;
}

.hero-overlay h2 a { color: #fff; }
.hero-overlay h2 a:hover { color: var(--gold); }

.hero-overlay .meta { color: rgba(255,255,255,.75); font-size: .85rem; }

/* ── Category badge ───────────────────────────────────────── */
.cat-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 3px;
}

.cat-badge.noticias   { background: var(--red); }
.cat-badge.resenas    { background: #1565c0; }
.cat-badge.temporadas { background: #e65100; }
.cat-badge.personajes { background: #2e7d32; }
.cat-badge.guias      { background: #6a1b9a; }
.cat-badge.curiosidades { background: #00695c; }

/* ── Section title ────────────────────────────────────────── */
.section-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--red);
  margin-bottom: 1.25rem;
}

/* ── Article grid ─────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 700px) {
  .articles-grid { grid-template-columns: 1fr; }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Article card ─────────────────────────────────────────── */
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
}

.card-thumb {
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .3s;
  image-rendering: auto;
}

.article-card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--border);
}

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

.card-body h3 {
  font-size: .95rem;
  line-height: 1.35;
  font-weight: 700;
}

.card-body h3 a:hover { color: var(--red); }

.card-meta {
  font-size: .75rem;
  color: var(--muted);
  margin-top: auto;
}

/* ── List article (sidebar / small) ──────────────────────── */
.article-list-item {
  display: flex;
  gap: .8rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.article-list-item:last-child { border-bottom: none; }

.list-thumb {
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg3);
}

.list-thumb img { width: 100%; height: 100%; object-fit: cover; }

.list-body { flex: 1; }
.list-body h4 { font-size: .82rem; line-height: 1.3; margin-bottom: .25rem; }
.list-body h4 a:hover { color: var(--red); }
.list-body .meta { font-size: .72rem; color: var(--muted); }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { padding-top: .25rem; }

.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ── Single post ──────────────────────────────────────────── */
.single-hero {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.single-header { margin-bottom: 1.5rem; }
.single-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: .6rem 0; }
.single-meta { color: var(--muted); font-size: .82rem; }

.entry-content {
  line-height: 1.8;
  font-size: 1rem;
  color: #2a2a2a;
}

.entry-content h2 {
  font-size: 1.35rem;
  margin: 1.8rem 0 .8rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--red);
}

.entry-content h3 {
  font-size: 1.1rem;
  margin: 1.4rem 0 .6rem;
  color: var(--gold);
}

.entry-content p { margin-bottom: 1.1rem; }

.entry-content ul, .entry-content ol {
  margin: 1rem 0 1rem 1.5rem;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li { margin-bottom: .4rem; }

.entry-content strong { color: #111; font-weight: 700; }

.entry-content a { color: var(--red); text-decoration: underline; }

/* Post tags */
.post-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.post-tags a {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: .3rem .7rem;
  border-radius: 20px;
  font-size: .78rem;
  color: var(--muted);
  transition: all .2s;
}
.post-tags a:hover { border-color: var(--red); color: var(--red); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 2rem 0;
}

.pagination a, .pagination span {
  background: var(--card);
  border: 1px solid var(--border);
  padding: .5rem .9rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
}

.pagination a:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.pagination .current { background: var(--red); border-color: var(--red); color: var(--white); }

/* ── Footer ───────────────────────────────────────────────── */
#site-footer {
  background: #000;
  border-top: 3px solid var(--red);
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo { font-size: 1.5rem; font-weight: 900; margin-bottom: .6rem; }
.footer-logo span { color: var(--red); }
.footer-desc { color: var(--muted); font-size: .85rem; line-height: 1.6; }

.footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .8rem;
}

.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul a { color: #aaa; font-size: .85rem; }
.footer-col ul a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Hero pantalla completa (Kudasai style) ──────────────── */
.hero-fullwidth {
  width: 100%;
  min-height: 480px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  margin-bottom: 2rem;
}

.hero-fullwidth-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.45) 40%,
    rgba(0,0,0,.1) 70%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
}

.hero-fullwidth-content {
  padding: 2.5rem 0;
  max-width: 750px;
}

.hero-fullwidth-content .cat-badge {
  font-size: .75rem;
  margin-bottom: .75rem;
  display: inline-block;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: .75rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.hero-title a { color: #fff; }
.hero-title a:hover { color: var(--gold); }

.hero-excerpt {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
  margin-bottom: .75rem;
  max-width: 600px;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.hero-meta {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
}

@media (max-width: 700px) {
  .hero-fullwidth { min-height: 320px; }
  .hero-title { font-size: 1.5rem; }
  .hero-excerpt { display: none; }
}

/* ── Article list (Kudasai style) ────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 0; }

.list-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.list-card:first-child { border-top: 1px solid var(--border); }

.list-card-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 130px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  display: block;
}

.list-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .3s;
}

.list-card:hover .list-card-thumb img { transform: scale(1.04); }

.list-card-thumb .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--border);
}

.list-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

.list-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}

.list-card-body h3 a { color: #111; }
.list-card-body h3 a:hover { color: var(--red); }

.list-card-excerpt {
  font-size: .875rem;
  color: #555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-meta {
  font-size: .775rem;
  color: var(--muted);
  margin-top: .2rem;
}

@media (max-width: 600px) {
  .list-card { flex-direction: column; }
  .list-card-thumb { width: 100%; height: 180px; }
}

/* ── Comentarios ──────────────────────────────────────────── */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px solid var(--red);
}

.comments-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }

.comment {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.comment-author-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--red);
}

.comment-date {
  font-size: .78rem;
  color: var(--muted);
}

.comment-content p {
  font-size: .92rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.comment-reply-link {
  display: inline-block;
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
}

.comment-reply-link:hover { color: var(--red); }

/* Formulario de comentarios */
.comment-form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.comment-form-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.comment-form p { margin-bottom: 1rem; }

.comment-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .3rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  font-size: .92rem;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--red); }

.comment-form textarea { min-height: 130px; resize: vertical; }

.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) { .comment-form .form-row { grid-template-columns: 1fr; } }

.comment-form input[type="submit"] {
  background: var(--red);
  color: #fff;
  border: none;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
}

.comment-form input[type="submit"]:hover { background: var(--red-dark); }

.no-comments {
  color: var(--muted);
  font-size: .9rem;
  padding: 1rem 0;
  font-style: italic;
}
