/* =========================
   BASE GENERAL
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
  color: #111827;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* =========================
   CONTENEDORES
========================= */

.container,
.wrap {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   BARRA SUPERIOR
========================= */

.topbar {
  background: #111827;
  color: #fff;
  padding: 7px 16px;
  font-size: 13px;
}

/* =========================
   HEADER PRINCIPAL
========================= */

.header,
.site-header {
  background: #ffffff;
  color: #111827;
  text-align: center;
  border-bottom: none;
}

.header {
  padding: 28px 16px 24px;
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 24px;
  display: block;
  text-align: center;
}

.logo,
.logo-main {
  margin: 0;
  color: #c1121f;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1.5px;
}

.logo a,
.logo-link {
  color: inherit;
  text-decoration: none;
}

.sublogo,
.logo-sub {
  display: block;
  margin-top: 8px;
  color: #374151;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 400;
}

/* =========================
   MENÚ PRINCIPAL
========================= */

.nav {
  background: #c1121f;
  padding: 13px 16px;
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.nav a,
.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  padding: 6px 2px;
  border-radius: 6px;
  transition:
    opacity 0.2s ease,
    background 0.2s ease;
}

.nav a:hover,
.nav-link:hover {
  opacity: 0.85;
  text-decoration: none;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 11px;
}

.nav-admin {
  display: none;
}

/* =========================
   SECCIONES
========================= */

.section-head {
  margin: 28px 0 24px;
  text-align: left;
}

.section-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}

.section-head p {
  margin: 0;
  color: #6b7280;
  font-size: 17px;
}

/* =========================
   HOME / HERO
========================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 22px;
  margin: 28px 0 32px;
}

.grid-side {
  display: grid;
  gap: 22px;
}

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

/* =========================
   TARJETAS DE NOTICIAS
========================= */

.card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  background: #e5e7eb;
}

.card-main img {
  height: 420px;
}

.content,
.card .content {
  padding: 18px;
}

.cat,
.card .cat {
  display: inline-block;
  background: #c1121f;
  color: #ffffff;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 12px;
  text-transform: none;
}

h1,
h2,
h3 {
  color: #0f172a;
}

h2,
h3 {
  margin: 6px 0 10px;
  line-height: 1.12;
}

h2 {
  font-size: clamp(28px, 3vw, 38px);
}

h3 {
  font-size: clamp(20px, 2vw, 25px);
}

.card h3 {
  margin: 0 0 10px;
}

.card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.45;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  text-decoration: underline;
}

.date {
  color: #6b7280;
  font-size: 13px;
}

/* =========================
   NOTICIA INDIVIDUAL
========================= */

.news-detail,
.noticia-detalle,
.article-detail {
  max-width: 900px;
  margin: 28px auto;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.news-detail img,
.noticia-detalle img,
.article-detail img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.news-detail .content,
.noticia-detalle .content,
.article-detail .content {
  padding: clamp(22px, 4vw, 42px);
}

.news-detail h1,
.noticia-detalle h1,
.article-detail h1 {
  margin: 12px 0 16px;
  color: #0f172a;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -1px;
}

.news-detail .bajada,
.noticia-detalle .bajada,
.article-detail .bajada {
  font-size: clamp(18px, 2.3vw, 23px);
  color: #374151;
  line-height: 1.45;
}

.news-detail p,
.noticia-detalle p,
.article-detail p {
  font-size: 18px;
  line-height: 1.7;
  color: #1f2937;
}

/* =========================
   ESTADOS VACÍOS
========================= */

.empty,
.empty-box {
  background: #ffffff;
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  color: #374151;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.empty h2,
.empty-box h2 {
  margin-top: 0;
}

/* =========================
   BOTÓN ADMIN FLOTANTE
========================= */

.admin-link {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  background: #111827;
  color: #ffffff;
  padding: 13px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.admin-link:hover {
  background: #1f2937;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  margin-top: 48px;
  padding: 28px 0;
  background: #111827;
  color: #d1d5db;
  font-size: 14px;
  text-align: center;
}

/* =========================
   RESPONSIVE
========================= */

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

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

  .card-main img {
    height: 340px;
  }
}

@media (max-width: 700px) {
  .container,
  .wrap,
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .header,
  .header-inner {
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .nav {
    padding: 11px 10px;
    gap: 4px 10px;
  }

  .nav a,
  .nav-link {
    font-size: 14px;
  }

  .grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .card img,
  .card-main img {
    height: 240px;
  }

  .news-detail,
  .noticia-detalle,
  .article-detail {
    margin: 18px auto;
    border-radius: 14px;
  }

  .news-detail p,
  .noticia-detalle p,
  .article-detail p {
    font-size: 16px;
  }

  .admin-link {
    right: 12px;
    bottom: 12px;
    padding: 11px 15px;
    font-size: 14px;
  }
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.nav a.active {
  background: #ffffff;
  color: #c91022;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.auth-box,
.comentarios-box {
  max-width: 760px;
  margin: 30px auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.form-auth,
.comentario-form {
  display: grid;
  gap: 12px;
}

.form-auth input,
.comentario-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 15px;
}

.comentario-form textarea {
  resize: vertical;
}

.comentario-item {
  border-top: 1px solid #e5e7eb;
  padding: 16px 0;
}

.comentario-item strong {
  display: block;
  color: #111827;
}

.comentario-item span {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.login-comment-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #f9fafb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.ok {
  background: #dcfce7;
  color: #166534;
}

.reader-name {
  font-weight: 700;
  color: #111827;
}
.nav-user {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 10px 18px;

  border: none;
  border-radius: 999px;

  font-size: 15px;
  font-weight: 700;
  line-height: 1;

  text-decoration: none;
  cursor: pointer;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn-primary {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.25);
}

.btn-primary:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.22);
}
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
}
.comentarios-box {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid #e5e7eb;
}

.comentarios-box h3 {
  margin: 0 0 16px;
  font-size: 24px;
}

.comentario-form {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.comentario-form label {
  font-weight: 700;
  color: #111827;
}

.comentario-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  resize: vertical;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: #dc2626;
  color: #ffffff;
}

.btn-primary:hover {
  background: #b91c1c;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
}

.login-comment-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.login-comment-box p {
  margin: 0;
  font-weight: 600;
  color: #374151;
}

.comentario-item {
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
}

.comentario-item strong {
  display: block;
  color: #111827;
}

.comentario-item span {
  display: block;
  margin: 4px 0 8px;
  font-size: 13px;
  color: #6b7280;
}

.comentario-item p {
  margin: 0;
  line-height: 1.6;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-weight: 600;
}

.alert.ok {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.muted {
  color: #6b7280;
}
.card-main h2 .titulo-noticia-link,
.card-main h2 .titulo-noticia-link:visited,
.card-main h2 .titulo-noticia-link:hover,
.card-main h2 .titulo-noticia-link:focus,
.card-main h2 .titulo-noticia-link:active {
  text-decoration: none !important;
  color: inherit !important;
}

.card-main h2 .titulo-noticia-link {
  display: inline-block;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.card-main h2 .titulo-noticia-link:hover {
  color: #b91c1c !important;
  transform: translateY(-1px);
}
.card-title-link,
.card-title-link:visited,
.card-title-link:hover,
.card-title-link:focus,
.card-title-link:active {
  text-decoration: none !important;
  color: inherit !important;
}

.card-title-link {
  display: inline-block;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.card-title-link:hover {
  color: #b91c1c !important;
  transform: translateY(-1px);
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-logo {
  display: block;
  height: 120px; /* acá lo achicás o agrandás */
  width: auto;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .site-logo {
    height: 48px;
  }
}
