
/*  ####################### CSS section Company history Col-12 #######################  */

.company-history.column-12 {
    position: relative;
    overflow: hidden;
}

.company-history.column-12 .history-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 32px;
}

.company-history.column-12 .comHistorySwiper {
    width: 100%;
    height: 310px;
    /* padding-right: 32px; */
    cursor: grab;
}

/* .company-history.column-12 .comHistorySwiper::before {
    content: '';
    z-index: 2;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 12%;
    height: 310px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFF 100%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
} */

.company-history.column-12 .comHistorySwiper.fade-active::before {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.company-history.column-12 .swiper-slide {
    max-width: 310px;
    background-color: var(--lightgrey);
    /* display: flex; */
        display: flow;
    flex-direction: column;
    padding: 32px;
    gap: 32px;
    border-radius: 24px;
    position: relative;
        text-align: left;
}

.company-history.column-12 .swiper-slide .history-scroll {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.company-history.column-12 .swiper-slide .history-scroll::before {
    content: '';
    z-index: 1;
    position: absolute;
    left: 0;
    width: 100%;
    top: 60px;
    height: 60px;
    background: linear-gradient(to bottom, #FAFBFD 10%, rgba(250, 251, 253, 0.7) 100%);
    filter: blur(8px);
}

.company-history.column-12 .swiper-slide .history-scroll::after {
    content: '';
    z-index: 1;
    position: absolute;
    left: 0;
    width: 100%;
    bottom: 0px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(250, 251, 253, 0.7) 0%, #FAFBFD 100%);
    filter: blur(8px);
}

.company-history.column-12 .swiper-slide .history-scroll::before,
.company-history.column-12 .swiper-slide .history-scroll::after {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.company-history.column-12 .swiper-slide .history-scroll.scrollable::after {
    opacity: 1;
}

.company-history.column-12 .swiper-slide .history-scroll.show-top-fade::before {
    opacity: 1;
}

.company-history.column-12 .swiper-slide .history-scroll.show-bottom-fade::after {
    opacity: 1;
}

.company-history.column-12 .swiper-slide .logo__box {
    width: max-content;
    max-width: 120px;
    max-height: 60px;
    padding: 16px;
    background-color: #F2F2F2;
    border-radius: 8px;
    margin-bottom: 16px;
    margin-top: 30px;
}
.company-history.column-12 .swiper-slide .logo__box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-history.column-12 .pagination-n-btn {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 16px;
}

@media (max-width: 1199px) {
    .company-history.column-12 .history-grid {
        display: flex;
        flex-direction: column;
    }
    .company-history.column-12 .swiper-slide {
        max-width: unset;
    }

    .company-history.column-12 .comHistorySwiper {
        position: static;
        overflow: visible;
        padding-right: 0;
    }

    .company-history.column-12 .pagination-n-btn {
        margin-top: 32px;
    }
}


@media (max-width: 575px) {
    .company-history.column-12 .comHistorySwiper::before {
        display: none;
    }

    .company-history.column-12 .swiper-slide {
        padding: 24px;
    }

    .company-history.column-12 .pagination-n-btn {
        gap: 8px;
        margin-top: 18px;
    }
}


/* ///////////////////////////////////////////// */
.company-history.column-12 .comHistorySwiper {
  position: relative;        /* ต้องเป็น relative เสมอ */
  /* อย่าใช้ position: static ใน breakpoint */
}
@media (max-width: 1199px) {
  .company-history.column-12 .comHistorySwiper {
    /* position: static;  <-- ลบ/ห้ามใส่ */
    overflow: visible;
  }
}

/* ////////////////////////////////////////// */
.company-history.column-12 .swiper-slide {
  width: 310px;       /* ✅ ความกว้างการ์ดคงที่ */
  box-sizing: border-box;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}