/**
 * Insight Posts Listing - Stylesheet
 * Editorial-inspired design with refined typography and modern aesthetics
 */

/* ============================================
   CSS Variables & Root Styles
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.insight-post-featured {
    display: flex;
    gap: 120px;
    margin-bottom: 70px;
}

.insight-posts-grid .insight-post-grid{
    gap: 32px;
    padding: 40px 0 9px;
}

.insight-post-featured .insight-post-thumbnail {
    flex: 0 0 calc(50% - 120px / 2);
    width: calc(50% - 120px / 2);
}
.insight-post-featured .insight-post-thumbnail a{
    display: flex;
}
.insight-post-featured .insight-post-content {
    flex: 1;
}

.insight-post-featured .insight-post-thumbnail img {
    height: 459px;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    object-fit: cover;
    width: auto;
}

.insight-post-featured .insight-post-content .insight-post-title {
    margin-bottom: 24px;
    font-size: var(--e-global-typography-ce5bb60-font-size);
    line-height: var(--e-global-typography-ce5bb60-line-height);
    color: var(--e-global-color-primary);
}

.insight-post-featured .insight-post-content .insight-post-excerpt {
    margin-bottom: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.insight-post-featured .insight-post-content .insight-post-title a {
    color: var(--e-global-color-primary);
}
.insight-post-featured .insight-post-content .insight-read-more svg {
    height: 14px;
    transform: scale(1.5) translateY(-1px);
}
.insight-posts-grid {
    gap: 0 120px;   
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.insight-posts-grid .insight-post-grid {
    padding: 32px 0;
    flex: 0 0 calc(50% - 120px/2);
    width: calc(50% - 120px/2);
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--e-global-color-8acbc55);
}
.insight-posts-grid .insight-post-grid:first-child, .insight-posts-grid .insight-post-grid:nth-child(2) {
    border-top: 1px solid var(--e-global-color-8acbc55) !important          ;
}

.insight-posts-grid .insight-post-grid .insight-post-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.insight-posts-grid .insight-post-grid .insight-post-content .insight-post-title {
    margin-bottom: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: var(--e-global-typography-d4b154c-font-size);
    line-height: var(--e-global-typography-d4b154c-line-height);
    color: var(--e-global-color-primary);
}

.insight-posts-grid .insight-post-grid .insight-post-content .insight-post-excerpt {
    margin-bottom: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    font-size: var(--e-global-typography-a0afab5-font-size);
    line-height: var(--e-global-typography-a0afab5-line-height);
    font-family: var(--e-global-typography-8d587e8-font-family);
    font-weight: 300;
    color: var(--e-global-color-text);
}

.insight-posts-grid .insight-post-grid .insight-post-content .insight-read-more {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: max-content;
    margin-left: auto;
    margin-top: auto;
}

.insight-posts-grid .insight-post-grid:hover .insight-post-content .insight-read-more svg path {
    stroke: var(--e-global-color-primary);
}

.insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
    height: 186px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
}

.insight-posts-grid .insight-post-grid .insight-post-thumbnail {
    flex: 0 0 186px;
    width: 186px;
}

.insight-posts-grid .insight-post-grid .insight-post-content .insight-post-title a {
    color: var(--e-global-color-primary);
}

.insight-load-more-wrapper {
    justify-content: center;
}
.insight-load-more-wrapper button svg {
    rotate: 90deg;
    transform: translateX(2px);
}

.insight-posts-header, .investments-filter-header {
    display: flex;
    border: 1px solid var(--e-global-color-8acbc55);
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    padding: 12px 120px 12px 12px;
    background: #F5F5F5;
    margin-bottom: 70px;
    position: relative;
    min-height: 94px;
    align-items: center;
}
.insight-posts-header-wrapper, .investments-filter-wrapper{
    overflow: hidden;
}

.insight-posts-header .insight-tabs, .investments-filter-header .investments-tabs {
    flex: 1;
    display: flex;
    justify-content: space-between;
    white-space: nowrap;
    overflow: auto;
}

.insight-posts-header .insight-tabs::-webkit-scrollbar,
.investments-filter-header .investments-tabs::-webkit-scrollbar {
    display: none;
}


.insight-posts-header .insight-tabs .insight-tab,
.investments-filter-header .investments-tabs .tab-btn {
    padding: 20px 58px;
    color: #343A40;
    background: transparent;
    border: 0;
    position: relative;
    z-index: 1;
    font-size: var(--e-global-typography-8d587e8-font-size);
    line-height: var(--e-global-typography-8d587e8-line-height);
    flex: 1;
}
.insight-posts-header .insight-tabs .insight-tab:hover,
.investments-filter-header .investments-tabs .tab-btn:hover {
    color: #343A40;
}

.insight-posts-header .insight-tabs .insight-tab.active,
.investments-filter-header .investments-tabs .tab-btn.active {
    color: #FFFFFF;
}

.insight-search-wrapper, .search-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    right: 12px;
    width: 70px;
    height: 70px;
    justify-content: end;
    background: #EDEDED;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    z-index: 5;
    cursor: pointer;
}
.insight-search-wrapper .insight-search-icon,
.search-box .search-btn svg{
    width: 32px;
    height: 32px;
}

.insight-posts-grid .insight-post-grid .insight-post-content .insight-read-more svg {
    width: 8px !important;
    height: 14px !important;
}

.insight-search-wrapper .search-btn:focus svg path {
    stroke: #859099;
}

.insight-search-wrapper.active, .search-box.active {
    width: 500px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 1;
    opacity: 1;
}

.insight-search-wrapper .insight-search-input,
.search-box .search-input {
    width: 0;
    opacity: 0;
    border: 1px solid var(--e-global-color-8acbc55);
    padding: 0 40px 0 70px;
    height: 100%;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    transition: width 0.6s ease, opacity 0.6s ease;
    background: #EDEDED;
    outline: none;
    position: absolute;
    z-index: -1;
    font-family: var( --e-global-typography-8d587e8-font-family ), Sans-serif;
    color: var( --e-global-color-5eb75c4 );
    font-size: 22px;
    line-height: 28px;
}

.insight-search-wrapper .insight-search-input::-webkit-search-cancel-button,
.search-box .search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }
  
  /* Safari (extra safe) */
  .insight-search-wrapper .insight-search-input::-webkit-search-decoration,
  .search-box .search-input::-webkit-search-decoration {
    display: none;
  }
  
  /* Firefox (no clear icon, but just in case) */
  .insight-search-wrapper .insight-search-input,
  .search-box .search-input {
    appearance: textfield;
  }

.insight-search-wrapper.active .insight-search-input,
.search-box.active .search-input {
    width: 100%;
    opacity: 1;
}

.insight-search-wrapper #closeBtn,
.search-box #closeBtn {
    position: absolute;
    right: 20px;
    z-index: -1;
    cursor: pointer;
}

.insight-search-wrapper .search-btn,
.search-box .search-btn {
    width: 68px;
    height: 68px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    background: none;
    padding: 0;
    position: absolute;
    left: 1px;
    z-index: 0;
    background: #EDEDED;
    color: #859099;
}
.insight-search-wrapper .search-btn:hover, .insight-search-wrapper .search-btn:focus,
.search-box .search-btn:hover, .search-box .search-btn:focus {
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    color: #859099;
    background: #EDEDED;
}
.insight-posts-wrapper .insight-load-more-btn.hidden {
    display: none !important;
}

@media (min-width: 1920px) {
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-read-more svg {
        width: 9px !important;
        height: 14px !important;
        fill: none !important;
    }
    .insight-post-featured .insight-post-thumbnail img {
        height: 470px;
        width: auto;
    }
    .insight-post-featured{
        gap: 138px;
        margin-bottom: 80px;
    }
    .insight-posts-grid{
        gap: 0 138px;
        margin-bottom: 80px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
        height: 212px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail {
        flex: 0 0 212px;
        width: 212px;
    }
    .insight-posts-grid .insight-post-grid{
        gap: 32px;
        padding: 34px 0 40px;
        flex: 0 0 calc(50% - 138px / 2);
        width: calc(50% - 176px / 2);
    }
    .insight-post-featured .insight-post-thumbnail {
        flex: 0 0 45.932%;
        width: 45.932%;
    }
    .insight-posts-header .insight-tabs .insight-tab,
    .investments-filter-header .investments-tabs .tab-btn {
        padding: 20px 82px;
    }
}

@media (max-width: 1366px) {
    .insight-post-featured .insight-post-thumbnail img {
        height: 420px;
    }
    .insight-post-featured{
        gap: 100px; 
        margin-bottom: 60px;
    }
    .insight-posts-grid{
        gap: 0 100px;
        margin-bottom: 40px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
        height: 152px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail {
        flex: 0 0 152px;
        width: 152px;
    }
    .insight-posts-grid .insight-post-grid{
        gap: 30px;
        padding: 32px 0 12px;
        flex: 0 0 calc(50% - 100px / 2);
        width: calc(50% - 120px / 2);
    }
    .insight-posts-header, .investments-filter-header {
        margin-bottom: 60px;
        padding: 8px 120px 8px 8px;
        min-height: 80px;
    }
    .insight-search-wrapper, .search-box{
        right: 9px;
        width: 62px;
        height: 62px;
    }
    .insight-search-wrapper .search-btn,
    .search-box .search-btn {
        width: 60px;
        height: 60px;
    }
    .insight-post-featured .insight-post-thumbnail {
        flex: 0 0 calc(50% - 100px / 2);
        width: calc(50% - 120px / 2);
    }
    .insight-post-featured .insight-post-content .insight-post-title {
        margin-bottom: 20px;
    }
    .insight-posts-header .insight-tabs .insight-tab,
    .investments-filter-header .investments-tabs .tab-btn {
        padding: 18px 65px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-post-title{
        margin-bottom: 6px;
    }
    .insight-search-wrapper .insight-search-icon,
    .search-box .search-btn svg {
        width: 24px;
        height: 24px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-read-more svg {
        width: 7px !important;
        height: 13px !important;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-post-excerpt {
        -webkit-line-clamp: 2;
    }
}

@media (min-width: 1024px) {
    .insight-posts-grid .insight-post-grid{
        transition: 0.5s all ease-in-out;
    }
    .insight-posts-grid .insight-post-grid:hover{
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 1024px) {
    .insight-post-featured .insight-post-thumbnail img {
        height: 333px;
    }
    .insight-post-featured{
        gap: 75px;
        margin-bottom: 60px;
    }
    .insight-posts-grid{
        gap: 0 75px;
        margin-bottom: 30px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
        height: 114px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail {
        flex: 0 0 114px;
        width: 114px;
    }
    .insight-posts-grid .insight-post-grid{
        gap: 22px;
        padding: 24px 0 9px;
        flex: 0 0 calc(50% - 75px / 2);
        width: calc(50% - 75px / 2);
    }
    .insight-post-featured .insight-post-thumbnail {
        flex: 0 0 calc(50% - 75px / 2);
        width: calc(50% - 75px / 2);
    }
    .insight-post-featured .insight-post-content .insight-post-excerpt{
        margin-bottom: 30px;
    }
    .insight-posts-header .insight-tabs .insight-tab,
    .investments-filter-header .investments-tabs .tab-btn {
        padding: 12px 32px;
    }
    .investments-filter-header {
        margin-bottom: 40px;
        padding: 7px 120px 7px 7px;
        min-height: 60px;
    }
    .insight-posts-header {
        margin-bottom: 60px;
        padding: 7px 120px 7px 7px;
        min-height: 60px;
    }
    .insight-search-wrapper, .search-box{
        right: 7px;
        width: 47px;
        height: 47px;
    }
    .insight-search-wrapper .search-btn,
    .search-box .search-btn {
        width: 45px;
        height: 45px;
    }
    .insight-posts-header .insight-tabs .insight-tab,
    .investments-filter-header .investments-tabs .tab-btn {
        padding: 10.5px 33px;
    }
    
}

@media (max-width: 880px) {
    .insight-post-featured .insight-post-thumbnail img {
        height: 313px;
    }
    .insight-tabs .active-bg {
        border-radius: 4px;
         -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
    }
    .insight-post-featured{
        gap: 50px;
        margin-bottom: 50px;  
    }
    .insight-posts-header {
        padding: 8px 9px;
        min-height: 50px;
        margin-bottom: 71px;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
    }
    .investments-filter-header {
        padding: 8px 60px 8px 9px;
        min-height: 50px;
        margin-bottom: 16px;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
    }
    .insight-post-featured .insight-post-thumbnail {
        flex: 0 0 calc(50% - 50px / 2);
        width: calc(50% - 50px / 2);
    }
    .insight-posts-grid{
        gap: 0 48px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
        height: 99px;
        width: 87px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail {
        flex: 0 0 87px;
        width: 87px;
    }
    .insight-posts-grid .insight-post-grid{
        gap: 17px;
        padding: 18px 0 7px;
    }
    .insight-posts-header .insight-tabs .insight-tab,
    .investments-filter-header .investments-tabs .tab-btn {
        padding: 4px 12px;
    }
    .insight-search-wrapper, .insight-search-wrapper.active {
        width: 100%;
        left: 0;
        right: 0;
        transform: translateY(calc(100% + 8px));
        opacity: 1;
        box-shadow: none;
        border: 0;
        height: 32px;
        background: #F5F5F5;
    }
    
    .insight-search-wrapper .insight-search-input,
    .insight-search-wrapper.active .insight-search-input {
        height: 32px;
        font-size: 14px;
        border-radius: 4px;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border: 1px solid var(--e-global-color-8acbc55);
        padding: 6px 40px 4px 9px;
        background: #F5F5F5;
        opacity: 1;
        width: 100%;
    }
    
    .insight-search-wrapper #closeBtn {
        display: none;
    }
    
    .insight-search-wrapper .search-btn,
    .search-box .search-btn {
        height: 26px;
        width: 26px;
        right: 3px;
        left: unset;
        border-radius: 2px;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
    }
    
    .insight-search-wrapper .insight-search-icon,
    .search-box .search-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 767px) {
    .insight-post-featured{
        gap: 24px;
        margin-bottom: 24px;  
        flex-direction: column;
    }
    .insight-posts-grid .insight-post-grid:nth-child(2) {
        border-top: 0 !important;
    }

    .insight-post-featured .insight-post-thumbnail img {
        border-radius: 10px;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
        height: 193px;
    }
    .insight-post-featured .insight-post-content .insight-post-excerpt{
        margin-bottom: 30px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
    }
    .insight-posts-grid{
        gap: 0;
        flex-direction: column;
        margin-bottom: 24px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail img {
        width: 100px;
        height: 100px;
        border-radius: 10px;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-thumbnail {
        flex: 0 0 100px;
        width: 100px;
    }
    .insight-posts-grid .insight-post-grid{
        gap: 12px;
        padding: 24px 0;
        width: 100%;
        flex: 0 0 100%;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-post-title{
        margin-bottom: 4px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-post-excerpt{
        -webkit-line-clamp: 2;
        margin-bottom: 4px;
    }
    .insight-post-featured .insight-post-thumbnail{
        width: 100%;
        flex: 0 0 auto;
    }
    .insight-posts-grid .insight-post-grid:nth-child(2){
        border-top: 0;
    }
    .insight-post-featured .insight-post-content .insight-post-title{
        margin-bottom: 16px;
    }
    .insight-post-featured .insight-post-content .insight-post-excerpt{
        margin-bottom: 24px;
    }
    .insight-posts-grid .insight-post-grid .insight-post-content .insight-read-more svg {
        transform: translateY(0px);
        margin-left: 0;
        width: 6px !important;
        height: 10px !important;
    }
    .investments-filter-wrapper .search-box{
        display: none;
    }
}
