<?php

if ( class_exists( 'Wp_Travel_Engine' ) ) {
    ?>

  <?php 
    if ( get_theme_mod( 'recommended_activities_display_option', true ) ) {
        $tax = get_theme_mod( 'recommended_activities_category', 'activities' );
        $number = get_theme_mod( 'number_of_recommended_activities', 4 );
        if ( $number <= 0 ) {
            $number = false;
        }
        $title = get_theme_mod( 'recommended_activities_title', '' );
        $terms = get_terms( array(
            'taxonomy'   => $tax,
            'hide_empty' => false,
            'number'     => $number,
        ) );
        set_query_var( 'terms', $terms );
        set_query_var( 'title', $title );
        ?>

    <?php 
        if ( !empty( $terms ) ) {
            ?>
      <?php 
            get_template_part( 'layouts/homepage/slider/slider-layout', 'one' );
            ?>
    
      <style>
        /* Navigation buttons */
        .trip-category .owl-nav .owl-prev, .trip-category .owl-nav .owl-next {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            background: #fff;
            color: #000;
            box-shadow: 0 0 50px 0 rgb(0 0 0 / 15%);
            transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
            transition: all 0.3s ease-in-out;
        }
        .trip-category .owl-nav .owl-prev {
            left: 10px;
        }
        .trip-category .owl-nav .owl-next {
            right: 10px;
        }
        .trip-category .owl-nav .owl-prev span,
        .trip-category .owl-nav .owl-next span {
            height: 26px;
            font-size: 26px;
            line-height: 1;
        }
        .trip-category .owl-nav .owl-prev:hover,
        .trip-category .owl-nav .owl-next:hover {
            background: var(--primary-color);
            color: var(--light-color);
        }
        .trip-category .owl-nav .owl-prev.disabled,
        .trip-category .owl-nav .owl-next.disabled {
            display: none;
            pointer-events: none;
        }
      </style>

    <?php 
        }
        ?>

  <?php 
    }
    ?>

<?php 
}