/* ======================
====================================================
   Page Background — controlled via ACF "Page Background Color" field
   ========================================================================== */
body.bg-light-grey {
    background-color: #F9F9F9;
}

/* ==========================================================================
   Insights Heading
   ========================================================================== */

div.insights-heading {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.facetwp-input-wrap {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #999;
}

.insights-heading__description {
    font-family: "MessinaSans", sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 22.5px;
    color: #555;
    margin: 0;
}

/* ==========================================================================
   Insights Listing - Main Layout
   ========================================================================== */

/* Sidebar + Content horizontal layout */
.insights-listing {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 80px;
}

@media (min-width: 1400px) {
    .insights-listing {
        max-width: 1313px;
        padding: 80px 0;
    }
}

/* Sidebar (filters) */
.insights-listing > .wp-block-group:first-child {
    width: 243px;
    min-width: 243px;
    flex-shrink: 0;
}

/* Content area (grid) */
.insights-listing > .facetwp-template {
    flex: 1;
    min-width: 0;
}

/* Mobile: stack vertically */
@media (max-width: 991px) {
    .insights-listing {
        flex-direction: column;
        gap: 30px;
    }

    .insights-listing > .wp-block-group:first-child {
        width: 100%;
        min-width: 100%;
        position: static;
    }

    .insights-listing {
        padding: 40px 0;
    }
}

/* ==========================================================================
   Insights Grid
   ========================================================================== */
.listing-section{
    gap: 0px;
}

.insights-grid,
.facetwp-template[data-name="insights"] {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    margin: 0 0 24px 0;
}

/* ==========================================================================
   Single Tile
   ========================================================================== */

.insights-tile {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    will-change: transform, box-shadow;
}

@media (min-width: 768px) {
    .insights-tile {
        width: calc(50% - 12px);
    }
}

@media (min-width: 992px) {
    .insights-tile {
        width: calc(33.333% - 16px);
    }
}

/* Link wrapper */
.insights-tile__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 0;
    transition: color 0.35s ease;
}

.insights-tile__link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(to left, #9D73EF, #0935E8);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
    pointer-events: none;
}

/* Hover: gradient background, elevated shadow, white text */
.insights-tile__link:hover {
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
}

.insights-tile__link:hover::after {
    opacity: 1;
}

.insights-tile:has(.insights-tile__link:hover) {
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.15);
}

.insights-tile__link:hover .insights-tile__title {
    color: #fff;
}

.insights-tile__link:hover .insights-tile__cta {
    color: #fff;
    text-decoration: underline;
}

.insights-tile__link:hover .insights-tile__play {
    width: 60px;
    height: 60px;
}

.insights-tile__link:hover .insights-tile__play svg {
    width: 26px;
    height: 26px;
}

/* Thumbnail */
.insights-tile__thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 54.5%;
    overflow: hidden;
    background-color: #e9ecef;
    border-radius: 8px 8px 0 0;
}

.insights-tile__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play Button Overlay */
.insights-tile__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

.insights-tile__play svg {
    transition: all 0.3s ease;
}

/* Duration Badge */
.insights-tile__duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: "MessinaSans", sans-serif;
    font-size: 12px;
    line-height: 21px;
    padding: 0 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Content */
.insights-tile__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 20px;
    min-height: 140px;
}

.insights-tile__title {
    transition: color 0.35s ease;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;
    color: #555;
    margin: 0 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: unset;
}

.insights-tile__cta {
    font-family: "MessinaSans", sans-serif;
    font-size: 15px;
    color: #1B68FA;
    text-decoration: none;
    margin-top: auto;
    display: inline-block;
    transition: color 0.35s ease;
}

/* ==========================================================================
   Newsletter Banner (after 6th post)
   ========================================================================== */

.insights-newsletter {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    background-color: #01010A;
    background-image: url('/wp-content/uploads/2026/03/Newsletter-Banner.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.insights-newsletter__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px;
    text-align: center;
}

.insights-newsletter__title {
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    margin: 0;
    line-height: normal;
}

div .insights-newsletter__title {
    font-family: "MessinaSans", sans-serif;
}

@media (min-width: 768px) {
    div .insights-newsletter__title {
        font-size: 32px;
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .insights-newsletter__inner {
        padding: 40px 20px;
        gap: 20px;
    }

    .insights-listing{
        padding: 40px 15px;
    }
}

.insights-newsletter .nf-form-cont,
.insights-newsletter .nf-form-wrap,
.insights-newsletter .nf-form-layout,
.insights-newsletter .nf-form-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.insights-newsletter .nf-form-content {
    padding: 0 !important;
}

.insights-newsletter .nf-before-form-content,
.insights-newsletter .nf-after-form-content,
.insights-newsletter .nf-form-title,
.insights-newsletter .nf-form-fields-required,
.insights-newsletter .nf-error-field-errors,
.insights-newsletter .nf-field-description {
    display: none !important;
}

.insights-newsletter .nf-form-content .nf-row,
.insights-newsletter .nf-field-container {
    margin: 0 !important;
    padding: 0 !important;
}

.insights-newsletter .nf-field-container + .nf-field-container,
.insights-newsletter .nf-form-content .nf-row + .nf-row {
    margin-top: 10px !important;
}

.insights-newsletter .nf-field-container:not(.html-container):not(.checkbox-container) .nf-field-label,
.insights-newsletter .submit-container .nf-field-label {
    display: none !important;
}

.insights-newsletter .nf-field-element input[type="text"],
.insights-newsletter .nf-field-element input[type="email"],
.insights-newsletter .nf-field-element input[type="tel"],
.insights-newsletter .nf-field-element input[type="number"],
.insights-newsletter .nf-field-element textarea,
.insights-newsletter .nf-field-element select,
.insights-newsletter .ninja-forms-field:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]) {
    width: 100% !important;
    height: 45px !important;
    padding: 0 10px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 16px !important;
    color: #9CA3AF;
    font-family: "MessinaSans", sans-serif;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    font-weight: 400;
    line-height: normal;
}

.insights-newsletter .nf-field-element input::placeholder,
.insights-newsletter .nf-field-element textarea::placeholder,
.insights-newsletter .ninja-forms-field::placeholder {
    color: #9ca3af !important;
}

.insights-newsletter .submit-container .nf-field-element {
    display: flex !important;
    justify-content: center !important;
}

.insights-newsletter .submit-container input[type="button"],
.insights-newsletter .submit-container input[type="submit"],
.insights-newsletter .submit-container .ninja-forms-field,
.insights-newsletter .nf-field-element input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 190px !important;
    height: 40px !important;
    padding: 10px 25px !important;
    background: linear-gradient(270deg, #9D73EF 0%, #0935E8 100%) !important;
    color: #fff !important;
    font-family: "MessinaSans", sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    border: none !important;
    border-radius: 62px !important;
    position: relative !important;
    cursor: pointer !important;
    transition: opacity 0.4s ease !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.nf-response-msg{
    color: #ffffff;
}

.insights-newsletter .submit-container input[type="button"]::before,
.insights-newsletter .submit-container input[type="submit"]::before,
.insights-newsletter .submit-container .ninja-forms-field::before,
.insights-newsletter .nf-field-element input[type="submit"]::before {
    content: "";
    position: absolute;
    background: #1B68FA !important;
    opacity: 0;
    transition: all .4s ease;
    z-index: -1;
    width: 100%;
    height: 100%;
    display: block;
    top: 0;
    left: 0;
    border-radius: 62px !important;
}

.insights-newsletter .submit-container input[type="button"]:hover,
.insights-newsletter .submit-container input[type="submit"]:hover,
.insights-newsletter .submit-container .ninja-forms-field:hover,
.insights-newsletter .nf-field-element input[type="submit"]:hover {
    opacity: 0.9;
    color: #fff !important;
    text-decoration: none;
}

.nf-hidden-field{
    display: none;
}

.insights-newsletter .submit-container input[type="button"]:hover::before,
.insights-newsletter .submit-container input[type="submit"]:hover::before,
.insights-newsletter .submit-container .ninja-forms-field:hover::before,
.insights-newsletter .nf-field-element input[type="submit"]:hover::before {
    opacity: 1 !important;
    z-index: -1;
    transition: all .4s ease;
}

.insights-newsletter .html-wrap .nf-field-element,
.insights-newsletter .html-wrap .nf-field-element p {
    font-size: 10px;
    color: #fff;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
    width: 39%;
}

.insights-newsletter .html-wrap .nf-field-element a,
.insights-newsletter .html-wrap .nf-field-element p a {
    color: #fff;
    text-decoration: underline;
}

p.insights-newsletter__disclaimer{
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    opacity: 0.7;
    width: 31%;
}

p.insights-newsletter__disclaimer a{
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

@media (max-width: 767px) {
    .insights-newsletter .html-wrap .nf-field-element,
    .insights-newsletter .html-wrap .nf-field-element p {
        width: 100%;
    }
}

/* ==========================================================================
   FacetWP Filters - Sidebar
   ========================================================================== */

/* Facet spacing */
div.facetwp-facet {
    margin-bottom: 24px;
}

/* Sidebar section spacing */
.insights-listing > .wp-block-group:first-child .wp-block-group__inner-container {
    display: flex;
    flex-direction: column;
}

/* ---- Facet Group Headings ---- */
.insights-listing .wp-block-heading {
    font-size: 20px;
    font-weight: 700;
    color: #01010A;
    margin: 0 0 12px;
    line-height: 1.3;
    font-family: "MessinaSans", sans-serif;
    letter-spacing: unset;
}

.insights-heading .insights-heading__title{
    font-family: "MessinaModern", serif;
    font-size: 36px;
    font-style: normal;
    font-weight: 400;
    line-height: 50.4px; /* 140% */
    letter-spacing: -0.7px;
    margin-bottom: 0px;
}

/* ---- Search Facet ---- */
.facetwp-type-search {
    margin-bottom: 0;
}

.facetwp-type-search .facetwp-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.facetwp-type-search .facetwp-search {
    width: 100%;
    height: 48px;
    padding: 0 12px 0 44px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    color: #01010A;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: "MessinaSans", sans-serif;
}

.facetwp-type-search .facetwp-search:focus {
    border-color: #1B68FA;
}

.facetwp-type-search .facetwp-search::placeholder {
    color: #9ca3af;
}

.facetwp-type-search .facetwp-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    right: auto !important;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 1 !important;
    cursor: default;
}

.facetwp-type-search .facetwp-icon::before,
.facetwp-type-search i.facetwp-icon::before {
    content: '' !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain !important;
    animation: unset;
}

.facetwp-type-search .facetwp-icon::after {
    display: none !important;
}

/* ---- Checkbox Facets ---- */
.facetwp-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.facetwp-type-checkboxes .facetwp-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #01010A;
    transition: all 0.15s ease;
    margin: 0;
}

.facetwp-type-checkboxes .facetwp-checkbox:hover {
    border-color: #D1D5DB;
}

/* Custom checkbox square */
.facetwp-type-checkboxes .facetwp-checkbox::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1px solid #9CA3AF;
    border-radius: 4px;
    background: #fff;
    transition: all 0.15s ease;
}

/* Checked state */
.facetwp-type-checkboxes .facetwp-checkbox.checked {
    border-color: #9D73EF;
    background-image: none;
}

.facetwp-type-checkboxes .facetwp-checkbox.checked::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat,
        linear-gradient(290.37deg, #9D73EF 10.05%, #0935E8 93.03%);
    border-color: #9D73EF;
}

.facetwp-counter{
    display: none;
}

/* Display value */
.facetwp-type-checkboxes .facetwp-display-value {
    flex: 1;
}

/* Counter badge */
.facetwp-type-checkboxes .facetwp-counter {
    font-size: 13px;
    color: #9ca3af;
    margin-left: auto;
}

/* ==========================================================================
   Load More + Result Count
   ========================================================================== */

/* Wrapper: FacetWP load_more pager facet */
div.facetwp-facet-load_more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
    width: 100%;
    margin-bottom: 10px;
}

/* Load More button (FacetWP output) */
.facetwp-facet-load_more .facetwp-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    background: linear-gradient(270deg, #9D73EF 0%, #0935E8 100%);
    color: #fff;
    font-family: 'MessinaSans', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    border: none;
    border-radius: 62px;
    position: relative;
    cursor: pointer;
    transition: opacity 0.4s ease;
    text-decoration: none;
}

.facetwp-facet-load_more .facetwp-load-more::before{
    content: "";
    position: absolute;
    background: #1B68FA !important;
    opacity: 0;
    transition: opacity 0.4s ease;
    transition: all .4s ease;
    z-index: -1;
    width: 100%;
    height: 100%;
    display: block;
    top: 0;
    left: 0;
    border-radius: 62px !important;
}

.facetwp-facet-load_more .facetwp-load-more:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

.facetwp-facet-load_more .facetwp-load-more:hover::before{
    opacity: 1 !important;
    z-index: -1;
    transition: opacity 0.4s ease;
    transition: all .4s ease;
}

/* Disabled state when no more posts */
.facetwp-facet-load_more .facetwp-load-more.facetwp-hidden {
    display: inline-flex;
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* Result count text below button */
.facetwp-counts {
    font-size: 15px;
    line-height: 20.5px;
    color: #555;
    text-align: center;
    margin: 0;
    width: 100%;
}

.insights-tile__thumbnail {
    position: relative;
}

.insights-tile__duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 2;
}

.insights-tile__thumbnail {
    position: relative; /* ensure this is already set */
}

.insights-tile__duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    font-weight: 500;
    pointer-events: none;
}