/* === FUENTE GLOBAL (Roboto) === */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f9f9f9;
  color: #111;
  margin: 0;
  padding: 0;
}

/* === CONTENEDOR GENERAL === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
  box-sizing: border-box;
}

/* === TITULOS === */
h1 {
  text-align: center;
  color: #111;
  margin-bottom: 40px;
}

/* === BLOQUES POR CATEGORÍA === */
.categoria-bloque {
  margin-bottom: 50px;
}

.categoria-bloque h2 {
  border-left: 6px solid #ff3c3c;
  padding-left: 12px;
  color: #ff3c3c;
  font-size: 1.8em;
  margin-bottom: 20px;
}

/* === LISTADO DE NOTICIAS === */
.noticias-bloque {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.noticia-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.noticia-item:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.noticia-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.noticia-texto {
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.noticia-texto h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.noticia-texto h3 a {
  color: #003399;
  text-decoration: none;
}

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

.noticia-texto p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.4;
}

.noticia-meta {
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* === CATEGORÍA === */
.categoria-color,
.categoria-link {
  color: #ff3c3c;
  text-decoration: none;
  font-weight: bold;
}

.categoria-link:hover {
  text-decoration: underline;
}

/* === NOTICIA INDIVIDUAL === */
.noticia-completa {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.noticia-imagen {
  width: 100%;
  margin: 20px auto;
}

.noticia-imagen img {
  width: 100%;
  height: 400px; /* Puedes ajustar a 350px o 300px si prefieres más compacto */
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.noticia-completa h1 {
  text-align: left;
  font-size: 1.6em;
  color: #111;
  margin-bottom: 10px;
}

.noticia-completa h2 {
  text-align: left;
  font-size: 1.3em;
  color: #111;
  margin-bottom: 10px;
}

.noticia-completa h3 {
  text-align: left;
  font-size: 1.0em;
  color: #111;
  margin-bottom: 10px;
}

.noticia-cuerpo {
  font-size: 1.05em;
  line-height: 1.6;
  color: #333;
}

/* === SIDEBAR === */
.layout-articulo {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.noticia-contenido-principal {
  flex: 2;
  min-width: 0;
}

.sidebar {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
  margin-bottom: 20px;
  font-size: 1.2em;
  color: #333;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
}

.sidebar-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.sidebar-noticia {
  display: flex;
  margin-bottom: 20px;
}

.sidebar-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}

.sidebar-info {
  flex: 1;
}

.sidebar-title {
  font-size: 0.9rem;
  margin: 5px 0;
  color: #003399;
}

.sidebar-cat {
  font-weight: bold;
  font-size: 0.8rem;
  color: #c00;
}

.sidebar-fecha {
  font-size: 0.75rem;
  color: #666;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .layout-articulo {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    margin-top: 30px;
  }
}

/* === BOTONES === */
.ver-mas,
.volver-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
}

.ver-mas {
  background-color: #003399;
  color: #fff;
  transition: background 0.3s ease;
}

.ver-mas:hover {
  background-color: #001f66;
}

.volver-btn {
  color: #003399;
}

.volver-btn:hover {
  text-decoration: underline;
}

/* === NAVBAR === */
nav {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo img {
  max-height: 40px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #003399;
  font-weight: bold;
  font-size: 1rem;
}

.nav-menu li a:hover {
  text-decoration: underline;
}

.search-form {
  display: flex;
  gap: 6px;
}

.search-form input {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.search-form button {
  padding: 6px 10px;
  background-color: #003399;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-form button:hover {
  background-color: #001f66;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    display: none;
  }

  .nav-right.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .search-form {
    width: 100%;
  }

  .search-form input {
    flex: 1;
    width: 100%;
  }

  .search-form button {
    width: auto;
  }
}

@media (max-width: 768px) {
 .nav-menu li a {
  padding: 12px 0; /* aumenta el espacio vertical */
  display: block;
  width: 100%;
  font-size: 1.2rem;
  border-bottom: 1px solid #eee; /* opcional: separador visual */
  text-align: center;
 }
}

/* === FOOTER === */
.footer {
  background-color: #1A1A1A;
  color: #fff;
  font-size: 14px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-section {
  flex: 1 1 200px;
}

.footer-logo {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: bold;
}

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #fff;
  padding-bottom: 5px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding: 15px;
  background-color: #b30000;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* === FOOTER REDES SOCIALES === */
.footer-redes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.footer-redes .red-social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #666;
  transition: background 0.3s ease;
  text-decoration: none;
}

.footer-redes svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.footer-redes .facebook:hover   { background: #3b5998; }
.footer-redes .twitter:hover    { background: #1da1f2; }
.footer-redes .instagram:hover  { background: #e1306c; }
.footer-redes .telegram:hover   { background: #0088cc; }

/* === LIMPIEZA === */
.noticia-contenido figure:empty,
.noticia-contenido p:empty,
.noticia-contenido div:empty {
  display: none;
}

.noticia-contenido br + br {
  display: none;
}

.noticia-contenido img[src=""],
.noticia-contenido img:not([src]) {
  display: none;
}

img.extraida {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: 6px;
}

.resumen-noticia {
  font-size: 0.9em;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: 30px;
  padding-top: 15px;
  text-align: justify;
}

@media (max-width: 768px) {
  .layout-articulo {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar {
    width: 100%;
    margin-top: 30px;
    box-sizing: border-box;
    padding: 20px;
    border-top: 1px solid #ddd;
    box-shadow: none;
    border-radius: 0;
  }

  .sidebar-noticia {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }

  .sidebar-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
  }

  .sidebar-info {
    flex: 1;
    min-width: 0;
  }

  .sidebar-title {
    font-size: 0.95rem;
    margin: 0 0 6px 0;
  }

  .sidebar-cat, .sidebar-fecha {
    font-size: 0.75rem;
    color: #777;
  }

  .container {
    padding: 20px;
    box-sizing: border-box;
  }

  .noticia-contenido-principal,
  .sidebar {
    width: 100%;
  }
}

/* === BOTONES DE COMPARTIR === */
.compartir-redes {
  margin-top: 30px;
  padding: 15px 0;
  border-top: 1px solid #ddd;
  text-align: center;
}

.compartir-redes h3 {
  margin-bottom: 10px;
  text-align: center;
}

.botones-redes {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-share {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  transition: transform 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-share svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.btn-share:hover {
  transform: scale(1.1);
}

.btn-share.facebook { background: #3b5998; }
.btn-share.twitter  { background: #1da1f2; }
.btn-share.whatsapp { background: #25D366; }
.btn-share.copiar   { background: #555; }

/* === ARTÍCULO RELACIONADO === */
.relacionado-articulo {
  background: #f8f8f8;
  padding: 15px 20px;
  margin: 30px 0;
  border-left: 4px solid #c00;
  border-radius: 6px;
  font-size: 1rem;
}

.relacionado-articulo a.relacionado-enlace {
  color: #003399;
  font-weight: bold;
  text-decoration: none;
}

.relacionado-articulo a.relacionado-enlace:hover {
  text-decoration: underline;
}

/* Limita el tamaño de la imagen destacada solo en móviles */
@media (max-width: 768px) {
  .noticia-imagen img {
    max-height: 250px;        /* Puedes ajustar el valor: 200px, 300px, etc. */
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
  }
}

