/* TIFERET TV SUITE - CSS CON BUSCADOR MEJORADO */
.tiferet-wrapper {
    direction: rtl;
    text-align: right;
    font-family: 'Heebo', sans-serif;
    max-width: 1400px;
    margin: 40px auto;
}

/* Buscador con botón de limpiar */
.search-section {
    margin-bottom: 30px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.tiferet-search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    /* Espacio para la X a la derecha en RTL */
    border-radius: 25px;
    border: 2px solid #eee;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.clear-search {
    position: absolute;
    top: 50%;
    right: 15px;
    /* Lado derecho para RTL */
    transform: translateY(-50%);
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.clear-search:hover {
    color: #221c19;
}

/* Historial */
.recent-searches span {
    font-size: 0.8rem;
    color: #888;
}

.chips-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.chip {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
}

.chip:hover {
    background: #221c19;
    color: #fff;
}

/* Grid y Tarjetas */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.video-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #eee;
    overflow: hidden;
    transition: 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.video-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.info h3 {
    font-size: 1rem;
    margin: 0 0 15px;
    height: 2.8em;
    overflow: hidden;
    line-height: 1.4;
}

.watch-btn {
    margin-top: auto;
    background: #221c19;
    color: #fff !important;
    padding: 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
}

/* Modal Pop-up */
.jm-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.jm-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: auto;
}

.jm-close-modal {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

.jm-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.jm-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Load More Button */
.jm-hidden {
    display: none !important;
}

.jm-load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background: #fff;
    color: #221c19;
    border: 2px solid #221c19;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.jm-load-more-btn:hover {
    background: #221c19;
    color: #fff;
}