/* ============================= */
/* 🔵 FRONT-PAGE PERSONALIZADO 🔵 */
/* ============================= */

/* Fondo global */
body {
  background-color: #0f0f0f;
  color: #ffffff;
  box-sizing: border-box;
}

/* Banner principal */
.banner-principal img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  margin-bottom: 20px;
}

/* Contenedor principal */
.contenido-principal {
  max-width: 1400px;
  margin: 30px auto;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.65);
  border-radius: 20px;
}

/* Títulos de sección */
.contenido-principal h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #fff;
  border-left: 5px solid #f0c040;
  padding-left: 10px;
}

/* Grids */
.grid-ultimos,
.grid-donghua,
.grid-anime,
.grid-manhwa,
.grid-dorama,
.grid-pelicula,
.grid-gallery,
.grid-musica_ost {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: flex-start;
}

/* Tarjetas individuales */
.episode-item,
.donghua-item,
.anime-item,
.manhwa-item,
.dorama-item,
.pelicula-item {
  background-color: rgba(30, 30, 30, 0.95);
  padding: 10px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
  width: 250px;
  box-sizing: border-box;
}

/* Hover */
.episode-item:hover,
.donghua-item:hover,
.anime-item:hover,
.manhwa-item:hover,
.dorama-item:hover,
.pelicula-item:hover {
  transform: scale(1.02);
}

/* Imagenes (encajan perfectamente en la tarjeta sin sobresalirse) */
.episode-item img,
.donghua-item img,
.anime-item img,
.manhwa-item img,
.dorama-item img,
.pelicula-item img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

/* Título de cada item */
.episode-item h3,
.donghua-item h3,
.anime-item h3,
.manhwa-item h3,
.dorama-item h3,
.pelicula-item h3,
.gallery-item h3,
.musica_ost-item h3 {
  font-size: 18px !important;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.3;
}


/* Botón ACTUALIZADO */
.episode-item .estado,
.donghua-item .estado,
.anime-item .estado,
.manhwa-item .estado,
.dorama-item .estado,
.pelicula-item .estado {
  display: inline-block;
  background-color: #f1c40f;
  color: #222;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  margin-top: 5px;
}

/* Nuevos tipos: Gallery y Música OST */
.gallery-item,
.musica_ost-item {
  background-color: rgba(30, 30, 30, 0.95);
  padding: 10px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.2s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
  width: 250px;
  box-sizing: border-box;
}

.gallery-item:hover,
.musica_ost-item:hover {
  transform: scale(1.02);
}

.gallery-item img,
.musica_ost-item img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

.gallery-item h3,
.musica_ost-item h3 {
  font-size: 14px;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.3;
}

/* 🔹 === SIDEBAR Y DISTRIBUCIÓN DE COLUMNA === */

/* === SIDEBAR Y DISTRIBUCIÓN DE COLUMNA === */
.contenedor-con-sidebar {
  display: flex;
  gap: 30px;
  align-items: stretch;
  max-width: 1600px;
  margin: 30px auto;
  padding: 0 30px;
}

.contenido-principal {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.65);
  border-radius: 20px;
}

/* Solo en front-page.php */
.sidebar-anuncios-front {
  width: 300px;
  position: sticky;
  top: 20px;
  margin-top: 30px;
}

.bloque-anuncio-front {
  background-color: rgba(30, 30, 30, 0.95);
  padding: 15px;
  margin-bottom: 30px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  color: white;
}

/* Adaptabilidad en pantallas pequeñas */
@media screen and (max-width: 1024px) {
  .contenedor-con-sidebar {
    flex-direction: column;
  }

  .sidebar-anuncios-front {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .bloque-anuncio-front {
    padding: 15px;
    margin: 0 auto 30px auto;
    max-width: 100%;
  }
}

/* AJUSTES MÓVILES */
@media screen and (max-width: 768px) {
  .contenedor-con-sidebar {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .contenido-principal,
  .sidebar-anuncios-front {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .grid-ultimos,
  .grid-donghua,
  .grid-anime,
  .grid-manhwa,
  .grid-dorama,
  .grid-pelicula,
  .grid-gallery,
  .grid-musica_ost {
    justify-content: center;
  }

  .episode-item,
  .donghua-item,
  .anime-item,
  .manhwa-item,
  .dorama-item,
  .pelicula-item,
  .gallery-item,
  .musica_ost-item {
    width: 100%;
    max-width: 250px;
  }
}

/* 🔹 Asegura que el título sea clickeable y tenga estilo de enlace */
.episode-item a h3,
.donghua-item a h3,
.anime-item a h3,
.manhwa-item a h3,
.dorama-item a h3,
.pelicula-item a h3,
.gallery-item a h3,
.musica_ost-item a h3 {
  color: #ffffff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.2s ease;
}

.episode-item a:hover h3,
.donghua-item a:hover h3,
.anime-item a:hover h3,
.manhwa-item a:hover h3,
.dorama-item a:hover h3,
.pelicula-item a:hover h3,
.gallery-item a:hover h3,
.musica_ost-item a:hover h3 {
  color: #f0c040;
  text-decoration: none; /* ✅ Sin subrayado */
}

.titulo-post,
.titulo-post a {
  text-decoration: none !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* 🔹======== Tipo de contenido (BADGE) ========*/

/* 🔹 Contenedor relativo */
.post-item a,
.episode-item a,
.donghua-item a,
.anime-item a,
.manhwa-item a,
.dorama-item a,
.pelicula-item a,
.gallery-item a,
.musica_ost-item a {
    position: relative;
    display: block;
}

/* 🔹 Badge tipo (abajo izquierda) */
.post-type-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    text-transform: uppercase;

    /* 🔥 ESTILO PRO */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    z-index: 20;
}

/* 🎨 COLORES */
.post-item.donghua-item .post-type-badge { background-color: #ff5722; }
.post-item.anime-item .post-type-badge { background-color: #2196f3; }
.post-item.manhwa-item .post-type-badge { background-color: #9c27b0; }
.post-item.dorama-item .post-type-badge { background-color: #e91e63; }
.post-item.pelicula-item .post-type-badge { background-color: #4caf50; }
.post-item.gallery-item .post-type-badge { background-color: #ff9800; }
.post-item.musica_ost-item .post-type-badge { background-color: #3f51b5; }

/* ✨ Hover */
.post-item:hover .post-type-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ============================= */
/* 🔵 ÚLTIMO EPISODIO 🔵 */
/* ============================= */

.episode-item .ultimo-episodio {
    display: block;
    font-size: 13px;
    color: #f0c040;
    margin-top: 6px;
    font-weight: bold;
    text-align: center;

    /* 🔥 PRO */
    background: linear-gradient(135deg, rgba(255,196,64,0.25), rgba(255,196,64,0.1));
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

/* ============================= */
/* 🔵 BADGE ESTADO 🔵 */
/* ============================= */

.post-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 6px;

    /* 🔥 PRO */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    z-index: 20;
}

/* 🎨 Estados */
.estado-en_emision { background-color: #4caf50; }
.estado-finalizado { background-color: #f44336; }
.estado-proximamente { background-color: #ff9800; }

/* ✨ Hover */
.post-item:hover .post-status-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ============================= */
/* 🔞 BADGE CENSURA */
/* ============================= */

.post-censura-badge {
    position: absolute;
    bottom: 10px;
    right: 10px; /* 👈 lado contrario al tipo */
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 6px;

    /* 🔥 PRO */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    z-index: 20;
}

/* 🔴 Sin censura */
.censura-sin {
    background-color: #e91e63;
}

/* ✨ Hover */
.post-item:hover .post-censura-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ============================= */
/* 🟣 FORMATO (OVA / ONA / PV) */
/* ============================= */

.post-format-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 6px;

    /* 🔥 PRO */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    z-index: 20;
}

/* 🎨 Colores */
.formato-ova { background-color: #9c27b0; }
.formato-ona { background-color: #009688; }
.formato-pv { background-color: #ff5722; }

/* 🔵 Anime con estilo PRO */
.formato-anime {
    background: linear-gradient(135deg, #2196f3, #64b5f6);
    box-shadow: 0 0 8px rgba(33,150,243,0.6);
}

/* ✨ Hover */
.post-item:hover .post-format-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}