/* ==========================================================
   videos LIBRARY - responsive + alignment fixes
   Breakpoints: 1024px (small laptop), 991px (tablet),
                768px (large phone), 600px (phone)
========================================================== */

:root {
    --rl-navy: rgb(7, 24, 41);
    --rl-blue: #0078c2;
    --rl-blue-dark: #164c73;
    --rl-green: #88c23f;
    --rl-border: #d8dce0;
    --rl-gap: 40px;
}

.videos-filter,
.videos-filter *,
.videos-library,
.videos-library *,
#videos-pagination,
#videos-pagination * {
    box-sizing: border-box;
}


/* ==========================
   WRAPPERS
========================== */

/* Full-bleed breakout: ignores the theme/parent max-width, margin and padding,
   then re-centres the content at 1100px relative to the viewport. */
.videos-container {
    --rc-width: 1100px;
    /* your content width */
    --rc-gutter: 20px;
    /* minimum side space on small screens */
    box-sizing: border-box;
    position: relative;
    width: 100vw;
    /* max-width: 100vw !important; */
    margin: 40px 0 40px calc(50% - 50vw) !important;
    padding: 0 50px !important;
}

.videos-library {
    width: 100%;
    max-width: 100% !important;
    margin: 40px 0 0 !important;
    /* top only, no left/right */
    padding: 0 !important;
}

/* ==========================
   FILTER BAR  (matches design: label | view all | dropdowns ........ search)
========================== */

.videos-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px clamp(20px, 2.5vw, 32px);
    width: 100%;
    position: relative;
    margin-top: 20px;
    font-family: "Poppins", "Noto Sans", Arial, sans-serif;
}

/* "Filter By" label */
.filter-label {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    white-space: nowrap;
}

.filter-by-title {
    font-weight: 600;
    font-size: 20px;
    ;
}

/* View all (radio style) */
.filter-view-all {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rl-navy);
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    white-space: nowrap;
    cursor: pointer;
}

.view-all-circle {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--rl-blue);
    border-radius: 50%;
    position: relative;
    background: #fff;
}

.view-all-circle.active::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--rl-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Dropdown */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    border: 0;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rl-navy);
    font: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    cursor: pointer;
    white-space: nowrap;
}

/* Small blue chevron */
.filter-arrow {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--rl-blue);
    border-bottom: 1.5px solid var(--rl-blue);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.filter-dropdown.active .filter-arrow {
    transform: translateY(2px) rotate(225deg);
}

.filter-dropdown.active .filter-dropdown-btn,
.filter-dropdown-btn:hover {
    color: var(--rl-blue);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    width: 268px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    display: none;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.filter-dropdown.active .filter-dropdown-menu {
    display: block;
}

.filter-dropdown-menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(270deg, rgb(81, 232, 239) 0%, var(--rl-blue) 100%);
}

.filter-dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    color: #333;
    font-size: 15px;
    cursor: pointer;
}

.filter-dropdown-menu input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--rl-blue);
}

/* Search box: rounded, light border, blue icon on the right */
.videos-search {
    margin-left: auto;
    flex: 0 1 383px;
    min-width: 0;
    height: 48px;
    display: flex;
    align-items: center;
    border: 1px solid #8a94a0;
    border-radius: 8px;
    padding-left: 20px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.videos-search:focus-within {
    border-color: var(--rl-blue);
    box-shadow: 0 0 0 3px rgba(16, 121, 191, 0.15);
}

.videos-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--rl-navy);
    background: transparent;
}

.videos-search input::placeholder {
    color: #999;
}

#videos-search-btn {
    flex: 0 0 56px;
    width: 56px;
    height: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Blue magnifier */
.search-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--rl-blue);
    border-radius: 50%;
    position: relative;
    margin: -3px 3px 0 -3px;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: var(--rl-blue);
    right: -7px;
    bottom: -4px;
    transform: rotate(45deg);
    border-radius: 2px;
}


/* ==========================
   LEGACY FILTER BAR (.videos-filters)
   kept in case it is still used in the markup
========================== */

.videos-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 22px;
}

.filter-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 30px;
}

.filter-item {
    position: relative;
    font-size: 15px;
    color: #003b71;
    cursor: pointer;
    white-space: nowrap;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-button {
    width: 28px;
    height: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.search-button::before {
    content: "";
    width: 7px;
    height: 7px;
    border: 2px solid #003b71;
    border-radius: 50%;
    position: absolute;
    left: 7px;
    top: 4px;
}

.search-button::after {
    content: "";
    width: 5px;
    height: 2px;
    background: #003b71;
    position: absolute;
    transform: rotate(45deg);
    left: 15px;
    top: 13px;
}

.right-container {
    margin-left: 15px;
}


/* ==========================
   GRID
========================== */

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* minmax(0) stops long text from blowing out columns */
    gap: var(--rl-gap);
    margin-top: 30px;
    align-items: stretch;
    /* equal-height cards in each row */
}


/* ==========================
   CARD
========================== */

.videos-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* fills the grid row so the link can sit at the bottom */
    min-height: 325px;
    margin: 0;
    /* was 10px: doubled the gap and misaligned the grid edges */
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.res-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.videos-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* consistent ratio at every width */
    overflow: hidden;
}

.blogcard .post-box:hover .post-image.videos-image {
    background-size: 120% 120%;
}

.videos-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}


.videos-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 16px 18px !important;
    height: 280px !important;
}

.videos-type {
    margin-bottom: 12px;
    color: #636d77;
    font-size: 18px;
    font-weight: 400;
}

/* Higher specificity replaces the !important flags and the conflicting duplicates */
.videos-title {
    margin: 0 0 12px;
    font-size: clamp(18px, 2vw, 22px) !important;
    font-weight: 600 !important;
    line-height: 1.3;
    transition: 0.3s ease-out;
    overflow-wrap: anywhere;
}

.blogcard .post-box:hover .post-content h5.videos-title {
    color: #00b8c7;
    text-decoration: none !important;
}

.videos-description {
    margin: 0;
    color: #071829;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    -webkit-line-clamp: var(--excerpt-lines, 4);
    line-clamp: 4;
    margin-bottom: 16px;
    /* minimum gap above the link */
}

.videos-link {
    margin-top: auto;
    /* always pinned to the bottom of the card */
    align-self: flex-start;
    padding-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--rl-blue);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.blogcard .post-box:hover .videos-link {
    color: var(--rl-green);
}

.videos-arrow {
    font-size: 16px;
    line-height: 1;
}

.videos-arrow,
.videos-link img {
    display: inline-block;
    transition: transform 0.25s ease;
}

.blogcard .post-box:hover .videos-link .videos-arrow,
.blogcard .post-box:hover .videos-link img {
    transform: translateX(8px);
    /* change this for more or less space */
    filter: invert(70%) sepia(97%) saturate(600%) hue-rotate(42deg) brightness(96%) contrast(78%)
}

/* ==========================
   PAGINATION  (← 1 2 3 ... 21 →)
========================== */

#videos-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 40px;
    font-family: "Poppins", "Noto Sans", Arial, sans-serif;
}

.videos-pagination-btn {
    background: none;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}

/* Page numbers */
.videos-pagination-page {
    padding: 4px 2px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    color: #94a0ad;
    transition: color 0.2s;
}

/* .videos-pagination-page:hover {
    color: var(--rl-blue);
} */

.videos-pagination-page.active {
    color: var(--rl-blue);
    cursor: default;
}

/* Dots */
.pagination-dots {
    color: #94a0ad;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
}

/* Prev / Next arrows = your images (no hover effect)
   >>> Change the two URLs below. <<<
   - Relative path is from THIS css file, e.g. css in  plugin/assets/css/  and
     images in  plugin/assets/images/  ->  ../images/prev.png
   - Or use a full URL, e.g. https://yoursite.com/wp-content/plugins/my-plugin/assets/images/prev.png */
#videos-pagination {
    --rl-prev-img: url("../img/next.svg");
    --rl-next-img: url("../img/next.svg");
    margin-bottom: 80px
}

.videos-pagination-prev,
.videos-pagination-next {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-size: 0;
    /* hides the "Previous" / "Next" text */
    color: transparent;
    cursor: pointer;
}

.videos-pagination-prev {
    background-image: var(--rl-prev-img);
    transform: rotate(180deg)
}

.videos-pagination-next {
    background-image: var(--rl-next-img);
}

.videos-pagination-prev::before,
.videos-pagination-next::before {
    content: none;
}

/* Keep the arrow exactly the same on hover / focus / active */
.videos-pagination-prev:hover,
.videos-pagination-next:hover,
.videos-pagination-prev:focus,
.videos-pagination-next:focus,
.videos-pagination-prev:active,
.videos-pagination-next:active {
    background-color: transparent;
    box-shadow: none;
    opacity: 1;
    outline: none;
}

/* Faded when there is nowhere to go (e.g. Prev on page 1) */
.videos-pagination-prev:disabled,
.videos-pagination-next:disabled,
.videos-pagination-prev.disabled,
.videos-pagination-next.disabled,
.videos-pagination-prev[aria-disabled="true"],
.videos-pagination-next[aria-disabled="true"] {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* If your markup already has an <img> inside the button, use that instead of the background */
.videos-pagination-prev:has(img),
.videos-pagination-next:has(img) {
    background-image: none;
    width: auto;
    height: auto;
    font-size: inherit;
}

.videos-pagination-prev img,
.videos-pagination-next img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}


/* ==========================
   LOADER + EMPTY STATE
========================== */

.videos-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-height: 300px;
    grid-column: 1 / -1;
    /* centres in the grid when shown inside it */
}

.videos-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top-color: #333;
    border-radius: 50%;
    animation: videos-spin 0.8s linear infinite;
}

@keyframes videos-spin {
    to {
        transform: rotate(360deg);
    }
}

.no-results {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    padding: 40px 20px;
    font-family: "Noto Sans", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}


/* ==========================================================
   RESPONSIVE (desktop-first, largest to smallest)
========================================================== */

/* Small laptop */
@media (max-width: 1024px) {
    .videos-container {
        --rc-gutter: 24px;
    }
}

/* Tablet: 2 columns, search moves to its own full-width row */
@media (max-width: 991px) {
    .videos-container {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
        padding-top: 20px !important;
    }

    .videos-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-top: 20px;
    }

    .videos-card {
        display: flex;
    }

    .videos-filter {
        gap: 16px 32px;
    }

    .videos-library {
        align-items: center;
        margin-left: 0px !important;
    }

    .videos-search {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        order: 5;
    }
}

/* Large phone: filters stack, dropdowns go full width */
@media (max-width: 768px) {
    .videos-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin: 20px 0;
        padding: 0;
    }

    .filter-dropdown {
        width: 100%;
    }

    .filter-dropdown-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 0;
        /* border-bottom: 1px solid var(--rl-border); */
    }

    .filter-dropdown-menu {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        top: calc(100% + 4px);
    }

    .filter-view-all,
    .filter-dropdown-btn {
        font-size: 18px;
    }

    .filter-label {
        font-size: 16px;
    }

    .videos-search {
        order: 0;
        height: 44px;
        /* comfortable touch target */
    }

    .videos-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {

    .videos-search {
        order: 0;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        height: 44px;
        margin: 0;
        padding-left: 14px;
        border: 1px solid #8a94a0;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    .videos-search input,
    .videos-search input[type="search"],
    .videos-search input[type="text"] {
        -webkit-appearance: none;
        appearance: none;
        flex: 1;
        width: 100%;
        min-width: 0;
        height: 50px;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
        font-size: 16px;
        /* stops iPhone zoom on tap */
    }

    .videos-search input[type="search"]::-webkit-search-cancel-button,
    .videos-search input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none;
        display: none;
    }

    #videos-search-btn {
        flex: 0 0 48px;
        width: 48px;
        height: 100%;
    }
}

/* Phone: single column */
@media (max-width: 600px) {
    .videos-container {
        --rc-gutter: 15px;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .videos-library {
        padding: 0;
        margin-top: 20px;
    }

    .videos-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-top: 20px;
    }

    .videos-card {
        min-height: 0;
        width: 100% !important;
    }

    .videos-content {
        padding: 18px 15px;
        height: 304px !important;
    }

    .videos-type {
        font-size: 16px;
    }

    .videos-description {
        font-size: 15px;
        line-height: 24px;
    }

    #videos-pagination {
        margin-top: 30px;
        gap: 8px 10px;
    }

    .no-results {
        min-height: 180px;
        padding: 30px 16px;
        font-size: 17px;
    }
}

/* Respect users who turn animations off */
@media (prefers-reduced-motion: reduce) {
    .videos-card:hover img {
        transform: none;
    }

    .videos-image img,
    .filter-arrow,
    .videos-spinner {
        transition: none;
        animation-duration: 2s;
    }
}

@media (max-width: 1032px) {
    .videos-filter {
        display: flex;
        /* flex-direction: column; */
        align-items: stretch;
        gap: 15px;
    }

    .right-container .videos-search {
        order: -1;
        flex: auto;
        width: 100%;
    }

    .right-container {
        margin-left: 15px;
    }

    .view-all {
        order: 2;
    }

    .filter-dropdown {
        order: 3;
        display: flex;
        flex-direction: row;
        /* width: 100%; */
        gap: 39px;
        align-items: center;
        margin: 9px;
        font-weight: 600;
        /* width: 100%; */
    }

    .filter-dropdown:last-child {
        order: 5;
    }
}

@media (max-width: 768px) {
    #videos-results {
        justify-content: center;
    }

    .videos-card {
        margin-left: auto;
        margin-right: auto;
    }

    .videos-search {
        order: -1;
        width: 100%;
    }

    .view-all {
        order: 3;
    }

    .filter-dropdown {
        order: 4;
        /* margin: 0; */
    }

    .filter-dropdown-btn>span:first-child {
        margin-left: 10px;
        margin-right: 6px;
    }
}

/* ==========================================
   videos Library - Algolia Autocomplete
   Styles for the autocomplete suggestions dropdown.
   Displays matching videos titles below the
   existing search input with hover and active states.
========================================== */
.videos-search {
    position: relative;
}

.videos-autocomplete-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 9;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.videos-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.videos-autocomplete-item:hover,
.videos-autocomplete-item.active {
    background: #f5f5f5;
}

.videos-autocomplete-item:last-child {
    border-bottom: 0;
}



.video-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-popup.active {
    display: flex;
}

.video-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.video-popup-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
}

.video-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.video-popup-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-popup-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-popup-details {
    padding: 25px;
}

.video-popup-details h2 {
    margin: 0 0 12px;
    font-size: 24px;
	 font-weight: 600;
	
}
#v-request-quote-popup .video-popup-details h2 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 50px;
    font-weight: 600;
	text-align: center;
    text-transform: uppercase;
}

.video-popup-details p {
    margin: 0;
    line-height: 1.6;
}

body.video-popup-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .video-popup {
        padding: 12px;
    }

    .video-popup-details {
        padding: 18px;
    }

    .video-popup-details h2 {
        font-size: 20px;
    }
}
.video-popup-quote{
 margin: 20px;
    text-align: center;
}
 .video-popup-quote a{
     background: #34c954 !important;
    color: #ffffff !important;
    border-radius: 30px !important;
    padding: 10px 25px !important;
    font-weight: 500 !important;
 }
 }
}
 .swiper:has(.swiper-slide:only-child) .swiper-pagination {
            display: none !important;
        }
        .new-container .swiper-slide .slide-heading {
            margin: 12px 0;
        }
		.bloglpslider .new-container .blog-slide .slide-left, .bloglpslider .new-container .blog-slide .slide-full {
        	background-color: #0078c2 !important;
        }
