/* 🌐 General para pantallas <= 768px */
@media screen and (max-width: 768px) {
  .container {
    width:100% !important;
  }

  .body-view {
    width:100%;
  }

  .nav-bar {
    flex-direction: column;
    padding: 10px;
  }

  .nav-bar .container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-bar .container .logo {
    width: 100%;
    margin-bottom: 10px;
  }

  .nav-bar .container .nav-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-bar .container .nav-nav li {
    margin: 5px 10px;
  }

  #last-news-header {
    height:1200px !important;
  }

  .featured-news li a {
    width: 100% !important;
    height: 200px;
  }

  
  .featured-news li a:nth-child(-n+2) {
    width:100%;
}

.featured-news li a:nth-child(n+3) {
    width: 100%;
}

  .recent-news {
    width:100% !important;
    flex-direction: column;
  }

  .row .left-content .new-recent {
    width: 100% !important;
    max-width: 100% !important;
  }

  .recent-news .list-recent {
    width:100% !important;
    flex-direction: column;
    justify-content: center !important;
    margin: 0;
  }

  .list-recent .new {
    width: 100% !important;
    margin-left:-20px;
    margin-bottom:20px;
  }

  .list-recent .new img {
    width:100% !important;
  }

  #news-row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .new {
    width: 100% !important;
    margin:20px 0;
  }
}

/* 📱 iPhones pequeños (SE, 5, 6, 7, 8, 12 mini) */
@media screen and (max-width: 420px) {
  .container {
    width:100% !important;
  }

  .body-view {
    width:100%;
  }

  .nav-bar {
    flex-direction: column;
    padding: 10px;
  }

  .nav-bar .container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-bar .container .logo {
    width: 100%;
    margin-bottom: 10px;
  }

  .nav-bar .container .nav-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-bar .container .nav-nav li {
    margin: 5px 10px;
  }

  #last-news-header {
    height:1200px !important;
  }

  .featured-news li a {
    width: 100% !important;
    height: 200px;
  }

  
  .featured-news li a:nth-child(-n+2) {
    width:100%;
}

.featured-news li a:nth-child(n+3) {
    width: 100%;
}

  .recent-news {
    width:100% !important;
    flex-direction: column;
  }

  .row .left-content .new-recent {
    width: 100% !important;
    max-width: 100% !important;
  }

  .recent-news .list-recent {
    width:100% !important;
    flex-direction: column;
    justify-content: center !important;
    margin: 0;
  }

  .list-recent .new {
    width: 100% !important;
    margin-left:-20px;
    margin-bottom:20px;
  }

  .list-recent .new img {
    width:100% !important;
  }

  #news-row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .new {
    width: 100% !important;
    margin:20px 0;
  }
}

/* 📲 Teléfonos super compactos y muy estrechos */
@media screen and (max-width: 320px) {
  .container {
    width:100% !important;
  }

  .body-view {
    width:100%;
  }

  .nav-bar {
    flex-direction: column;
    padding: 10px;
  }

  .nav-bar .container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-bar .container .logo {
    width: 100%;
    margin-bottom: 10px;
  }

  .nav-bar .container .nav-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-bar .container .nav-nav li {
    margin: 5px 10px;
  }

  #last-news-header {
    height:1200px !important;
  }

  .featured-news li a {
    width: 100% !important;
    height: 200px;
  }

  
  .featured-news li a:nth-child(-n+2) {
    width:100%;
}

.featured-news li a:nth-child(n+3) {
    width: 100%;
}

  .recent-news {
    width:100% !important;
    flex-direction: column;
  }

  .row .left-content .new-recent {
    width: 100% !important;
    max-width: 100% !important;
  }

  .recent-news .list-recent {
    width:100% !important;
    flex-direction: column;
    justify-content: center !important;
    margin: 0;
  }

  .list-recent .new {
    width: 100% !important;
    margin-left:-20px;
    margin-bottom:20px;
  }

  .list-recent .new img {
    width:100% !important;
  }

  #news-row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .row {
    width:100%;
    flex-direction: column !important;
  }

  #news-row .new {
    width: 100% !important;
    margin:20px 0;
  }
}

.noticia-detalle {
  padding: 30px 20px;
  background: #f9fafb;
}

.noticia-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: auto;
  box-sizing: border-box !important;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.noticia-wrapper img {
  width:100% !important;
  height:auto !important;
}

.noticia-contenido {
  flex: 3;
  min-width: 0;
}

.portada {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 20px;
}

.titulo-noticia {
  font-size: 2rem;
  color: #222;
  margin-bottom: 10px;
}

.meta {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.contenido-html {
  font-size: 1rem;
  line-height: 1.7;
}
.contenido-html img {
  max-width: 100%;
  border-radius: 6px;
  margin: 20px 0;
}
.contenido-html h2, .contenido-html h3 {
  margin-top: 1.5em;
  color: #333;
}

.btn-volver {
  display: inline-block;
  margin-top: 30px;
  text-decoration: none;
  font-weight: 600;
  color: #0066cc;
}

.noticia-sidebar {
  flex: 1;
  min-width: 280px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  height: fit-content;
}

.noticia-sidebar img {
  width:60px !important;
  height:60px !important;
}

.noticia-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.lista-relacionadas {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-relacionadas li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.lista-relacionadas img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.lista-relacionadas span {
  font-size: 14px;
  color: #333;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .noticia-wrapper {
    flex-direction: column;
  }

  .titulo-noticia {
    font-size: 1.6rem;
  }

  .meta {
    font-size: 0.85rem;
  }

  .noticia-sidebar {
    margin-top: 40px;
    padding: 15px;
  }

  .lista-relacionadas li {
    gap: 8px;
  }

  .lista-relacionadas img {
    width: 50px;
    height: 50px;
  }
}
