/*
Theme Name: Masterbluray Theme
Theme URI: http://www.masterbluray.com
Author: AAD
Author URI: http://www.masterbluray.com
Description: Tema moderno para catálogo de películas estilo plataforma streaming.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Masterbluray Theme
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #eee;
    margin: 0;
    padding: 0;
}

a {
    color: #1db954;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #17a44d;
}

body.admin-bar .site-header.sticky-header {
    top: 32px; /* Ajusta si la barra admin es más alta */
}

@media screen and (min-width: 782px) {
    body.admin-bar .site-header.sticky-header {
        top: 32px;
    }
}

@media screen and (max-width: 781px) {
    body.admin-bar .site-header.sticky-header {
        top: 46px; /* Altura barra admin en móviles */
    }
}
/* Contenedor principal con sidebar al lado del catálogo */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Wrapper para catálogo y sidebar lado a lado */
.catalog-sidebar-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    color: #eee;
}

/* Contenido principal (catálogo) */
.main-content {
    flex: 1 1 700px;
    max-width: 840px;
    min-width: 300px;
}

/* Sidebar */
.widget-area {
    flex: 0 0 300px;
    background: rgba(30, 30, 30, 0.85);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(29,185,84,0.5);
    color: #cde9d8;
    flex-shrink: 0;

    max-height: 80vh; /* Máximo 80% de la altura de la ventana */
    overflow-y: auto; /* Scroll vertical cuando sea necesario */
    padding-right: 10px; /* Para evitar que el scroll tape contenido */
    scrollbar-width: thin; /* Firefox: scrollbar delgada */
    scrollbar-color: #1db954 #121212; /* Firefox: color del scrollbar */
}

/* Scrollbar para Webkit (Chrome, Edge, Safari) */
.widget-area::-webkit-scrollbar {
    width: 8px;
}

.widget-area::-webkit-scrollbar-track {
    background: #121212;
    border-radius: 10px;
}

.widget-area::-webkit-scrollbar-thumb {
    background-color: #1db954;
    border-radius: 10px;
    border: 2px solid #121212;
}

/* Estilo general para cada widget dentro del sidebar */
.widget-area .widget,
.widget-area section.widget,
.widget-area .mwidget {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.5);
    color: #eee;
}

/* Títulos de widgets */
.widget-area .widget-title,
.widgetitulo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1db954;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 6px rgba(29, 185, 84, 0.8);
}

/* Ajustes para enlaces dentro de widgets */
.widget-area a {
    color: #a0d9a1;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.widget-area a:hover {
    color: #1db954;
    text-shadow: 0 0 8px #1db954;
}

/* Ajustes para imágenes dentro de mwidget */
.widget-area .mwidget img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.7);
}

/* Centrar contenido en mwidget */
.widget-area .mwidget {
    text-align: center;
}

/* Opcional: separar enlaces dentro de mwidget */
.widget-area .mwidget a {
    display: block;
    margin-bottom: 15px;
}

/* Resto de tus estilos existentes para header, nav, búsqueda, grid, películas, etc. */
/* ... (mantén el resto de tu CSS sin cambios) ... */

.site-header {
    background-color: #181818;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.site-logo a {
    color: #1db954;
    font-weight: 700;
    font-size: 1.8rem;
    text-decoration: none;
}

.site-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.site-nav a {
    color: #eee;
    text-decoration: none;
    font-weight: 600;
}

.site-nav a:hover {
    color: #1db954;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #eee;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Estilos para el formulario de búsqueda */
.site-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.site-search-form input[type="search"] {
    padding: 8px 12px 8px 35px;
    border-radius: 20px;
    border: 1px solid #1db954;
    background-color: #121212;
    color: #eee;
    font-size: 0.9rem;
    width: 180px;
    transition: width 0.3s ease;
}

.site-search-form input[type="search"]::placeholder {
    color: #666;
}

.site-search-form input[type="search"]:focus {
    outline: none;
    width: 220px;
    border-color: #17a44d;
    box-shadow: 0 0 8px #1db954;
}

.site-search-form button {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: #1db954;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 991px) {
    .catalog-sidebar-wrapper {
        flex-wrap: wrap;
    }
    .widget-area {
        width: 100%;
        margin-top: 30px;
        flex: none;
    }
    .main-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .site-nav ul {
        display: none;
        flex-direction: column;
        background-color: #181818;
        position: absolute;
        top: 60px;
        right: 30px;
        width: 200px;
        border: 1px solid #333;
        border-radius: 5px;
        z-index: 9999;
    }
    .site-nav ul.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .site-search-form input[type="search"] {
        width: 140px;
    }
    .site-search-form input[type="search"]:focus {
        width: 180px;
    }
}

.hero-featured {
    position: relative;
    height: 480px;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.7);
    animation: fadeInHero 1.5s ease forwards;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-end;
    color: white;
}

@keyframes fadeInHero {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(18,18,18,0.85) 40%, rgba(29,185,84,0.6) 100%);
    padding: 40px;
    width: 100%;
    border-radius: 0 0 15px 15px;
    color: #e0f7e9;
    text-shadow: 0 0 8px rgba(29,185,84,0.8);
}

.hero-title {
    font-size: 3rem;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(29,185,84,0.9);
}

.hero-year {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.hero-excerpt {
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #1db954;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 700;
    color: #121212;
    text-decoration: none;
    box-shadow: 0 0 8px #1db954;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #17a44d;
    box-shadow: 0 0 20px #17a44d;
}

.movies-grid-section {
    margin: 40px auto 50px;
    max-width: 1200px;
    padding: 0 20px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
    border-bottom: 2px solid #1db954;
    padding-bottom: 10px;
    color: #1db954;
}

/* Aquí ajustamos para 4 cartas por fila */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 991px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.movie-card {
    background-color: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
    min-height: 360px;
}

.movie-card:nth-child(1) { animation-delay: 0.1s; }
.movie-card:nth-child(2) { animation-delay: 0.2s; }
.movie-card:nth-child(3) { animation-delay: 0.3s; }
.movie-card:nth-child(4) { animation-delay: 0.4s; }
.movie-card:nth-child(5) { animation-delay: 0.5s; }
.movie-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(29, 185, 84, 0.8);
}

.movie-poster img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: filter 0.4s ease;
}

.movie-card:hover .movie-poster img {
    filter: brightness(1.1) saturate(1.2);
}

.movie-info {
    padding: 20px;
}

.movie-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(29,185,84,0.9);
}

.movie-year {
    font-size: 1rem;
    color: #1db954;
    margin-bottom: 12px;
}

.movie-info p {
    font-size: 1rem;
    color: #ccc;
    margin: 0;
}

/* Resto de estilos sin cambios... */

.pagination-wrapper {
    text-align: center;
    margin-top: 40px;
}

.pagination-wrapper ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination-wrapper li {
    display: inline-block;
}

.pagination-wrapper li a,
.pagination-wrapper li span {
    color: #eee;
    padding: 10px 16px;
    background-color: #1e1e1e;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(29, 185, 84, 0.4);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-wrapper li a:hover {
    background-color: #1db954;
    color: #121212;
    box-shadow: 0 0 15px #1db954;
}

.pagination-wrapper li .current {
    background-color: #1db954;
    color: #121212;
    box-shadow: 0 0 15px #1db954;
    cursor: default;
}

.pagination-wrapper li .dots {
    cursor: default;
    color: #666;
    padding: 10px 8px;
    background: transparent;
    box-shadow: none;
}

.featured-carousel-section {
    margin: 40px auto 50px;
    max-width: 1200px;
    position: relative;
    color: #eee;
    width: 100%;
}

.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}

.carousel-card {
    min-width: 280px;
    background: #1e1e1e;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(29, 185, 84, 0.8);
}

.carousel-poster {
    height: 420px;
    overflow: hidden;
}

.carousel-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.carousel-card:hover .carousel-poster img {
    filter: brightness(1.1) saturate(1.2);
}

.carousel-info {
    padding: 15px;
}

.carousel-info h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    text-shadow: 0 0 8px rgba(29,185,84,0.9);
}

.carousel-info span {
    color: #1db954;
    font-weight: 600;
}

/* Botones de navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    background: rgba(29,185,84,0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #121212;
    font-size: 1.5rem;
    box-shadow: 0 0 10px #1db954;
    transform: translateY(-50%);
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: #17a44d;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Responsive: sidebar debajo en pantallas pequeñas */
@media (max-width: 991px) {
    .catalog-sidebar-wrapper {
        flex-wrap: wrap;
    }
    .widget-area {
        width: 100%;
        margin-top: 30px;
    }
}

.movie-hover-excerpt {
    display: none;
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: #1db954;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
    box-shadow: 0 0 10px #1db954;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.movie-card {
    position: relative;
    overflow: hidden;
}

.movie-card:hover .movie-hover-excerpt {
    display: block;
    opacity: 1;
}

.post-content-styled [style] {
    background-color: #000000 !important;
    border: 2px solid #1db954 !important;
    color: #ffffff !important;
    padding: 15px !important;
    border-radius: 8px !important;
    font-family: monospace !important;
    margin-bottom: 20px !important;
}

.post-content-styled [style] p strong {
    color: #1db954 !important;
}

./* Estilos para el sidebar y widgets con estilo similar a la imagen */

.widget-area {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    color: #eee;
    max-width: 300px;
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.widget-title {
    color: #1db954;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.widget_site_stats > div {
    display: flex;
    gap: 15px;
    background: #1e1e2f;
    padding: 15px;
    border-radius: 10px;
}

.widget_site_stats > div > div {
    flex: 1;
    background: #2a2a3f;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #ff6b6b;
}

.widget_site_stats > div > div div:first-child {
    font-size: 2.5rem;
    font-weight: 700;
}

.widget_site_stats > div > div div:last-child {
    font-size: 1rem;
    color: #ccc;
}

.widget_popular_movies ul,
.widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_popular_movies ul li,
.widget_recent_entries ul li {
    margin-bottom: 10px;
}

.widget_popular_movies ul li a,
.widget_recent_entries ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget_popular_movies ul li a:hover,
.widget_recent_entries ul li a:hover {
    color: #1db954;
}

.widget_popular_movies ul li span {
    color: #1db954;
    font-weight: 600;
    margin-left: 5px;
}

.popular-movies-list li {
    display: flex;
    align-items: center;
}

.popular-movies-list li a {
    flex: 1;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-movies-list li a:hover {
    color: #1db954;
}

.popular-movies-list li span {
    color: #1db954;
    font-weight: 600;
    margin-left: 10px;
}

/* Estilos para el header con logo y texto juntos */
.site-header {
    background-color: #181818;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.site-logo-text {
    font-weight: 700;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1db954;
}

.site-logo-text a {
    color: inherit;
    text-decoration: none;
}

.site-logo-text img {
    height: 40px;
    width: auto;
    display: block;
}

.site-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.site-nav a {
    color: #eee;
    text-decoration: none;
    font-weight: 600;
}

.site-nav a:hover {
    color: #1db954;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #eee;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Estilos para el formulario de búsqueda */
.site-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.site-search-form input[type="search"] {
    padding: 8px 12px 8px 35px;
    border-radius: 20px;
    border: 1px solid #1db954;
    background-color: #121212;
    color: #eee;
    font-size: 0.9rem;
    width: 180px;
    transition: width 0.3s ease;
}

.site-search-form input[type="search"]::placeholder {
    color: #666;
}

.site-search-form input[type="search"]:focus {
    outline: none;
    width: 220px;
    border-color: #17a44d;
    box-shadow: 0 0 8px #1db954;
}

.site-search-form button {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: #1db954;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 991px) {
    .catalog-sidebar-wrapper {
        flex-wrap: wrap;
    }
    .widget-area {
        width: 100%;
        margin-top: 30px;
    }
    .main-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .site-nav ul {
        display: none;
        flex-direction: column;
        background-color: #181818;
        position: absolute;
        top: 60px;
        right: 30px;
        width: 200px;
        border: 1px solid #333;
        border-radius: 5px;
        z-index: 9999;
    }
    .site-nav ul.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .site-search-form input[type="search"] {
        width: 140px;
    }
    .site-search-form input[type="search"]:focus {
        width: 180px;
    }
}

/* Estilos para widgets y sidebar (ya existentes) */
.widget-area {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    color: #eee;
    max-width: 300px;
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.widget-title {
    color: #1db954;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.widget_site_stats > div {
    display: flex;
    gap: 15px;
    background: #1e1e2f;
    padding: 15px;
    border-radius: 10px;
}

.widget_site_stats > div > div {
    flex: 1;
    background: #2a2a3f;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #ff6b6b;
}

.widget_site_stats > div > div div:first-child {
    font-size: 2.5rem;
    font-weight: 700;
}

.widget_site_stats > div > div div:last-child {
    font-size: 1rem;
    color: #ccc;
}

.widget_popular_movies ul,
.widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_popular_movies ul li,
.widget_recent_entries ul li {
    margin-bottom: 10px;
}

.widget_popular_movies ul li a,
.widget_recent_entries ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget_popular_movies ul li a:hover,
.widget_recent_entries ul li a:hover {
    color: #1db954;
}

.widget_popular_movies ul li span {
    color: #1db954;
    font-weight: 600;
    margin-left: 5px;
}

.popular-movies-list li {
    display: flex;
    align-items: center;
}

.popular-movies-list li a {
    flex: 1;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-movies-list li a:hover {
    color: #1db954;
}

.popular-movies-list li span {
    color: #1db954;
    font-weight: 600;
    margin-left: 10px;
}

/* Aplica al contenedor del menú o barra de navegación */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background-color: #181818;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.carousel-poster {
    position: relative;
}

.label-featured {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #1db954;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 0 5px rgba(29, 185, 84, 0.7);
    pointer-events: none;
    user-select: none;
}