/* =============================================
   OK SALUD - Estilo Revista / Diario
   Compatible con AdSense
   ============================================= */

/* ---------- REVISTA HOME CONTAINER ---------- */
.revista-home {
  width: 1113px;
  margin: 90px auto 0 auto;
  padding: 0;
}

/* ---------- HERO: Articulo destacado ---------- */
.revista-hero {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.hero-link {
  display: block;
  text-decoration: none;
  color: #fff;
}
.hero-image {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 12px;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.hero-image:hover img {
  transform: scale(1.03);
}
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 35px 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
}
.hero-cat {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 3px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin: 8px 0;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  margin: 6px 0 0;
  max-width: 700px;
}
.hero-date {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  display: block;
}
.hero-no-thumb {
  width: 100%;
  height: 480px;
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
}

/* ---------- ADSENSE ZONES ---------- */
.adsense-zone {
  text-align: center;
  margin: 20px 0;
  padding: 10px 0;
  clear: both;
}
.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.ad-placeholder {
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 20px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-placeholder-text {
  color: #bbb;
  font-size: 13px;
  font-weight: 500;
}
/* Ocultar placeholder styling cuando hay anuncio real */
.ad-placeholder:has(.adsbygoogle) {
  background: transparent;
  border: none;
  padding: 0;
  min-height: auto;
}
.ad-placeholder:has(.adsbygoogle) .ad-placeholder-text {
  display: none;
}
.adsense-top .ad-placeholder {
  min-height: 90px;
}
.adsense-sidebar .ad-placeholder {
  min-height: 250px;
}
.adsense-sticky {
  position: sticky;
  top: 90px;
}

/* ---------- REVISTA BODY: Main + Sidebar ---------- */
.revista-body {
  display: flex;
  gap: 30px;
  margin-top: 10px;
}
.revista-main {
  flex: 1;
  min-width: 0;
}
.revista-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* ---------- SUB-DESTACADOS: 3 cards ---------- */
.revista-sub-destacados {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}
.sub-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.sub-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.sub-card a {
  text-decoration: none;
  color: inherit;
}
.sub-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.sub-card:hover .sub-thumb img {
  transform: scale(1.05);
}
.sub-info {
  padding: 14px 16px;
}
.sub-cat {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.sub-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px 0;
  color: #1a1a1a;
}
.sub-date {
  font-size: 12px;
  color: #999;
}

/* ---------- SECCIONES POR CATEGORIA ---------- */
.revista-seccion {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}
.seccion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid #e74c3c;
}
.seccion-titulo {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a1a1a;
  margin: 0;
}
.seccion-ver-mas {
  font-size: 13px;
  font-weight: 600;
  color: #e74c3c;
  text-decoration: none;
  white-space: nowrap;
}
.seccion-ver-mas:hover {
  text-decoration: underline;
  color: #c0392b;
}

/* Seccion grid: 1 grande + 3 pequenas */
.seccion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.seccion-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}
.seccion-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.seccion-card a {
  display: flex;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.seccion-card-featured {
  grid-row: 1 / 3;
}
.seccion-card-featured a {
  flex-direction: column;
}
.seccion-card-featured .seccion-thumb {
  width: 100%;
  height: 220px;
}
.seccion-card:not(.seccion-card-featured) a {
  flex-direction: row;
}
.seccion-card:not(.seccion-card-featured) .seccion-thumb {
  width: 130px;
  min-width: 130px;
  height: 100px;
}
.seccion-thumb {
  overflow: hidden;
}
.seccion-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.seccion-card:hover .seccion-thumb img {
  transform: scale(1.05);
}
.seccion-card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.seccion-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 5px 0;
  color: #1a1a1a;
}
.seccion-card-featured .seccion-card-title {
  font-size: 18px;
}
.seccion-card-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 5px 0;
}
.seccion-card-date {
  font-size: 11px;
  color: #aaa;
}

/* ---------- ULTIMOS ARTICULOS ---------- */
.revista-ultimos {
  border-bottom: none;
}
.ultimos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.ultimos-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.ultimos-card:hover {
  box-shadow: 0 5px 18px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.ultimos-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.ultimos-thumb {
  width: 100%;
  height: 130px;
  overflow: hidden;
}
.ultimos-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.ultimos-card:hover .ultimos-thumb img {
  transform: scale(1.05);
}
.ultimos-info {
  padding: 12px;
}
.ultimos-cat {
  display: inline-block;
  background: #3498db;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ultimos-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 5px 0;
  color: #1a1a1a;
}
.ultimos-date {
  font-size: 11px;
  color: #aaa;
}

/* ---------- SIDEBAR ---------- */
.sidebar-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a1a1a;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 3px solid #e74c3c;
}
.sidebar-post {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-post:last-child {
  border-bottom: none;
}
.sidebar-rank {
  font-size: 28px;
  font-weight: 800;
  color: #e0e0e0;
  line-height: 1;
  min-width: 30px;
}
.sidebar-post-info {
  flex: 1;
}
.sidebar-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px 0;
  color: #1a1a1a;
}
.sidebar-post-title:hover {
  color: #e74c3c;
}
.sidebar-post-info a {
  text-decoration: none;
  color: inherit;
}
.sidebar-post-date {
  font-size: 11px;
  color: #aaa;
}

/* Sidebar categorias */
.sidebar-cats {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-cats li {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}
.sidebar-cats li:last-child {
  border-bottom: none;
}
.sidebar-cats li a {
  font-size: 14px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.sidebar-cats li a:hover {
  color: #e74c3c;
}

/* ---------- NO-THUMB fallback ---------- */
.no-thumb {
  background: #f1f1f1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1150px) {
  .revista-home {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }
}
@media (max-width: 960px) {
  .revista-body {
    flex-direction: column;
  }
  .revista-sidebar {
    width: 100%;
  }
  .hero-image {
    height: 360px;
  }
  .hero-title {
    font-size: 26px;
  }
  .ultimos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .revista-sub-destacados {
    grid-template-columns: 1fr;
  }
  .seccion-grid {
    grid-template-columns: 1fr;
  }
  .seccion-card-featured {
    grid-row: auto;
  }
  .seccion-card:not(.seccion-card-featured) a {
    flex-direction: column;
  }
  .seccion-card:not(.seccion-card-featured) .seccion-thumb {
    width: 100%;
    height: 160px;
  }
  .hero-image {
    height: 280px;
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-overlay {
    padding: 20px 18px 18px;
  }
  .ultimos-grid {
    grid-template-columns: 1fr;
  }
  .adsense-sticky {
    position: static;
  }
}
