/* Estilos generales */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  line-height: 1.6;
}

/* Header */

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #0f172a;
  color: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.4rem;
}

.logo span {
  color: #22c55e;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 16px;
  font-size: 0.95rem;
  padding-bottom: 2px;
}

.main-nav a.active,
.main-nav a:hover {
  border-bottom: 2px solid #22c55e;
}

/* Layout principal */

.layout {
  max-width: 1200px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 0 16px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

/* Nota principal */

.featured {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.featured-image {
  position: relative;
  max-height: 320px;
  overflow: hidden;
}

.featured img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.featured-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: #22c55e;
  color: #022c22;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.featured-body {
  padding: 16px 18px 20px 18px;
}

.featured-body h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.featured-body h1 a {
  color: #111827;
  text-decoration: none;
}

.featured-body h1 a:hover {
  text-decoration: underline;
}

.lead {
  color: #4b5563;
  margin-bottom: 10px;
}

.meta {
  font-size: 0.85rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

/* Tarjetas y secciones */

.section {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px 18px 18px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.section h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.related-block .related-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  background: #f9fafb;
  border-radius: 10px;
  overflow: hidden;
}

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

.card-body {
  padding: 10px 12px 10px 4px;
}

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

.card-body h3 a {
  color: #111827;
  text-decoration: none;
}

.card-body h3 a:hover {
  text-decoration: underline;
}

/* Noticias pequeñas */

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

.mini h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.mini h3 a {
  color: #111827;
  text-decoration: none;
}

.mini h3 a:hover {
  text-decoration: underline;
}

.mini p {
  font-size: 0.9rem;
  color: #4b5563;
}

/* Sidebar widgets */

.widget {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 16px 18px 16px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

/* Multimedia */

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 8px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.audio-player {
  width: 100%;
  margin-top: 8px;
}

.caption {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

/* Poll & comment */

.poll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.poll-question {
  font-weight: 600;
  margin-bottom: 4px;
}

.poll label {
  font-size: 0.9rem;
  color: #374151;
}

.poll button {
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  background: #22c55e;
  color: #022c22;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.poll button:hover {
  filter: brightness(0.95);
}

.poll-result {
  font-size: 0.9rem;
  color: #16a34a;
  min-height: 1.2em;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-form textarea {
  resize: vertical;
  min-height: 80px;
  padding: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.comment-form button {
  align-self: flex-end;
  margin-top: 2px;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: #0f172a;
  color: #f9fafb;
  font-size: 0.9rem;
  cursor: pointer;
}

.comment-form button:hover {
  filter: brightness(1.1);
}

/* Tags */

.tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tags-inline a,
.tags-cloud a {
  font-size: 0.8rem;
  text-decoration: none;
  background: #e5f9ed;
  color: #047857;
  padding: 3px 8px;
  border-radius: 999px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.context-links a {
  font-size: 0.85rem;
  color: #2563eb;
}

/* Breves */

.breves {
  list-style: disc;
  margin-left: 18px;
  font-size: 0.9rem;
  color: #374151;
}

/* Footer */

.main-footer {
  text-align: center;
  padding: 18px 16px;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 24px;
}

/* Artículos internos */

.article-body .layout,
.article-main {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 18px;
}

.article {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 20px 20px 20px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.article-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 4px;
}

.article h1 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.article-lead {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 10px;
}

.article p {
  margin-bottom: 10px;
  color: #111827;
}

.article-image {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0 16px 0;
}

.article-tags {
  font-size: 0.9rem;
  margin-top: 8px;
}

.article-tags a {
  margin-left: 4px;
  color: #047857;
  text-decoration: none;
}

.article-tags a:hover {
  text-decoration: underline;
}

.article-links ul {
  margin-left: 18px;
  margin-top: 6px;
  font-size: 0.9rem;
}

.article-links a {
  color: #2563eb;
  text-decoration: none;
}

.article-links a:hover {
  text-decoration: underline;
}

/* Responsive */

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

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

@media (max-width: 640px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 12px;
  }
}
