/* BIVACO HOME PRODUCTS - extracted from Blade */

.project-action-buttons{display:flex!important;gap:14px!important;flex-wrap:wrap!important;align-items:center}
.project-action-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-height:48px!important;padding:0 22px!important;border-radius:999px!important;text-decoration:none!important;font-weight:700!important}
.project-action-btn svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;flex:0 0 auto}
.project-action-btn.btn-featured-primary{background:linear-gradient(135deg,#17b8e8,#43c8ec)!important;color:#fff!important;border:1px solid transparent!important}
.project-action-btn.btn-featured-secondary{background:#fff!important;color:#111!important;border:1px solid rgba(16,33,55,.08)!important}
.project-action-btn:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(16,168,220,.18)}
.featured-info-grid .info-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ==================================================
   BIVACO - KHỐI DỰ ÁN NỔI BẬT THEO MẪU
================================================== */

.featured-project-section{
    position:relative;
    overflow:hidden;
    padding:70px 0 52px !important;
    background:
        radial-gradient(circle at 86% 34%, rgba(197,221,255,.68), transparent 34%),
        linear-gradient(110deg,#ffffff 0%,#ffffff 49%,#eef6ff 100%) !important;
}

/* Ẩn tiêu đề khối phía trên để bố cục giống mẫu */
.featured-project-section > .ctnr > .sec-title-box{
    display:none !important;
}
.featured-project-section .ctnr{
    position:relative;
    z-index:2;
}
  
/* ==================================================
   DỰ ÁN NỔI BẬT - LAYOUT CHUẨN DEMO
================================================== */

.featured-project-wrapper{
    display:grid!important;
    grid-template-columns:minmax(0,60%) minmax(0,40%)!important;
    column-gap:0!important;
    align-items:center!important;

    width:100%!important;
    max-width:1360px!important;
    min-height:560px!important;

    margin:0 auto!important;
    padding:0!important;
}


/* ==============================
   CỘT ẢNH - 60%
============================== */

.featured-project-media{
    position:relative!important;

    width:100%!important;
    min-width:0!important;
    min-height:540px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;

    padding:0!important;
    margin:0!important;

    overflow:visible!important;
}


.featured-media-glow{
    position:absolute!important;

    width:76%!important;
    max-width:700px!important;
    aspect-ratio:1/1!important;

    right:4%!important;
    top:50%!important;

    transform:translateY(-50%)!important;

    border-radius:50%!important;

    background:
        radial-gradient(
            circle,
            rgba(112,215,255,.26) 0%,
            rgba(207,240,255,.18) 45%,
            transparent 72%
        )!important;

    z-index:0!important;
}


/*
 * Box ảnh nằm sát mép phải cột 60%.
 * Ảnh nhỏ vẫn tự căn giữa bên trong box.
 */
.featured-media-box{
    position:relative!important;
    z-index:2!important;

    width:100%!important;
    height:560px!important;

    margin:0!important;
    padding:0!important;

    background:transparent!important;
    border:0!important;
    box-shadow:none!important;

    overflow:visible!important;
}

.featured-media-box img{
    position:absolute!important;

     top:50%!important;
    left:50%!important;
    right:auto!important;

    width:175%!important;
    height:auto!important;

    max-width:none!important;
    max-height:none!important;

    margin:0!important;

    transform:translate(-18%,-50%)!important;
    transform-origin:center center!important;
    object-fit:initial!important;
}
/* ==============================
   CỘT NỘI DUNG - 40%
============================== */

.featured-project-content{
    width:100%!important;
    max-width:590px!important;
    min-width:0!important;

    justify-self:start!important;

    margin:0!important;

    /*
     * Chỉ tạo một khoảng thở nhỏ,
     * không tạo khoảng trắng lớn.
     */
    padding:12px 0 12px 18px!important;
}
.featured-badge-pill{
    display:inline-flex !important;
    align-items:center !important;
    min-height:38px;
    margin-bottom:26px !important;
    padding:0 !important;
    overflow:hidden;
    border-radius:999px !important;
    background:#dce8fb !important;
    box-shadow:none !important;
}

.featured-badge-pill .badge-num{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 20px;
    border-radius:999px;
    background:linear-gradient(135deg,#22b7e8,#34caeb);
    color:#fff !important;
    font-size:14px !important;
    font-weight:600 !important;
}

.featured-badge-pill .badge-text{
    padding:0 22px;
    color:#111827 !important;
    font-size:14px !important;
    font-weight:600 !important;
}

.featured-project-title{
    margin:0 0 8px !important;
    color:#08a7df !important;
    font-size:27px !important;
    font-weight:700 !important;
    line-height:1.25 !important;
    text-transform:uppercase;
}

.featured-project-subtitle{
    margin:0 0 18px !important;
    color:#151515 !important;
    font-size:16px !important;
    font-weight:600 !important;
    line-height:1.45 !important;
}

.featured-project-desc{
   max-width:100% !important;
    margin:0 0 26px !important;
    color:#273444 !important;
    font-size:14px !important;
    font-weight:400 !important;
    line-height:1.6 !important;
}

/* ==============================
   4 THÔNG TIN: 2 x 2
============================== */
.featured-info-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:22px 34px !important;
    margin:0 0 30px !important;
}

.featured-info-grid .info-item{
    display:grid !important;
    grid-template-columns:48px minmax(0,1fr) !important;
    gap:14px !important;
    align-items:center !important;
    min-width:0;
}

.featured-info-grid .info-icon{
    width:48px !important;
    height:48px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid #e0e9f3 !important;
    border-radius:7px !important;
    background:#fff !important;
    color:#12afe4 !important;
    box-shadow:0 5px 15px rgba(38,85,128,.05);
}

.featured-info-grid .info-icon svg{
    width:23px !important;
    height:23px !important;
}
.featured-info-grid .info-icon img{
    display:block !important;
    width:30px !important;
    height:30px !important;
    max-width:30px !important;
    max-height:30px !important;
    object-fit:contain !important;
}
.featured-info-grid .info-text{
    min-width:0;
}

.featured-info-grid .info-label{
    margin:0 0 3px !important;
    color:#334155 !important;
    font-size:13px !important;
    font-weight:400 !important;
    line-height:1.35 !important;
}

.featured-info-grid .info-val{
    color:#111827 !important;
    font-size:14px !important;
    font-weight:600 !important;
    line-height:1.4 !important;
}

/* ==============================
   BUTTON
============================== */
.featured-project-btns{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    margin-top:4px !important;
}

.project-action-btn{
    min-height:42px !important;
    padding:0 19px !important;
    font-size:11px !important;
    font-weight:600 !important;
}

.project-action-btn.btn-featured-primary{
    box-shadow:0 9px 20px rgba(23,184,232,.20) !important;
}

.project-action-btn.btn-featured-secondary{
    border-color:#e4e9ef !important;
}

/* ==============================
   DẢI DỰ ÁN NHỎ
============================== */
.projects-slider-container{
    position:relative!important;
    z-index:5!important;
    width:min(1160px,100%)!important;
    margin:36px auto 0!important;
  
  padding:12px!important;
overflow:hidden!important;

border:1px solid #e8edf3!important;
border-radius:18px!important;

background:rgba(255,255,255,.96)!important;

box-shadow:
    0 12px 34px rgba(31,71,110,.14),
    0 3px 10px rgba(31,71,110,.06)!important;
}

.projects-slider-track{
    display:flex!important;
    align-items:stretch!important;
    gap:12px!important;
    width:100%!important;
    padding:4px!important;
}

.project-slide-item{
    flex:0 0 calc((100% - 60px) / 6)!important;
    min-width:0!important;
    color:inherit!important;
    text-decoration:none!important;
}

.project-slide-card{
    height:100%!important;
    padding:8px!important;

    border:1px solid #edf1f5!important;
    border-radius:12px!important;
    background:#fff!important;

    box-shadow:
        0 6px 18px rgba(31,71,110,.10),
        0 2px 6px rgba(31,71,110,.05)!important;

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease!important;
}

.project-slide-card:hover{
    transform:translateY(-3px)!important;
    border-color:#bdebf8!important;
    box-shadow:
        0 10px 24px rgba(31,71,110,.15),
        0 3px 8px rgba(31,71,110,.07)!important;
}

.project-slide-card.active{
    border-color:#20b7e9!important;
    box-shadow:
        0 10px 26px rgba(24,170,220,.18),
        0 3px 8px rgba(31,71,110,.07)!important;
}

.slide-img-box{
    width:100%!important;
    height:105px!important;

    overflow:hidden!important;
    border-radius:8px!important;
    background:#eef3f7!important;
}

.slide-img-box img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
}

.slide-card-label{
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    padding:9px 2px 4px!important;
}

.slide-num{
    flex:0 0 30px!important;
    width:30px!important;
    height:30px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    border-radius:50%!important;
    background:#e8effa!important;
    color:#172033!important;

    font-size:11px!important;
    font-weight:700!important;
}

.project-slide-card.active .slide-num{
    background:#16b8e9!important;
    color:#fff!important;
}

.slide-title{
    min-width:0!important;

    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;

    color:#1c2430!important;
    font-size:11px!important;
    font-weight:600!important;
    line-height:1.35!important;
}
/* ==============================
   TABLET
============================== */
@media(max-width:991px){
    .featured-project-section{
        padding:52px 0 42px !important;
    }

    .featured-project-wrapper{
        grid-template-columns:1fr !important;
        gap:28px !important;
    }

    .featured-project-media{
        min-height:340px;
    }

    .featured-media-box{
        min-height:320px;
    }

    .featured-media-box img{
    width:108% !important;
    max-height:350px !important;
    transform:scale(1.08);
}

    .project-slide-item{
        flex:0 0 calc((100% - 16px) / 3) !important;
    }
}

/* ==============================
   MOBILE
============================== */
@media(max-width:575px){
    .featured-project-section{
        padding:40px 0 32px !important;
    }

    .featured-project-wrapper{
        padding:0 !important;
    }

    .featured-project-media{
        min-height:260px;
    }

   .featured-media-box img{
    width:100% !important;
    max-height:270px !important;
    transform:scale(1);
}

    .featured-project-title{
        font-size:23px !important;
    }

    .featured-info-grid{
        grid-template-columns:1fr !important;
        gap:16px !important;
    }

    .featured-project-btns{
        align-items:stretch !important;
        flex-direction:column !important;
    }

    .project-action-btn{
        width:100% !important;
    }

    .projects-slider-container{
        margin-top:28px !important;
    }

    .project-slide-item{
        flex:0 0 78% !important;
    }
}
  /* ==================================================
   FEATURED PROJECT AUTOPLAY
================================================== */

.featured-project-slide[hidden]{
    display:none !important;
}

.featured-project-slide.is-active{
    display:grid !important;
    animation:bivacoProjectFade .38s ease both;
}

.project-slide-item{
    appearance:none;
    -webkit-appearance:none;
    border:0;
    outline:0;
    background:transparent;
    padding:0;
    margin:0;
    font:inherit;
    color:inherit;
    text-align:left;
    cursor:pointer;
}

.project-slide-item:focus-visible{
    outline:2px solid #12afe4;
    outline-offset:4px;
    border-radius:8px;
}

@keyframes bivacoProjectFade{
    from{
        opacity:0;
        transform:translateY(5px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media (prefers-reduced-motion:reduce){
    .featured-project-slide.is-active{
        animation:none !important;
    }
}
 

/* ==================================================
   MOBILE FINAL V2 - DỰ ÁN NỔI BẬT
   Đặt cuối block để thắng toàn bộ CSS desktop/autoplay
================================================== */
@media (max-width: 767px) {

    [data-home-section="products"] {
        padding: 38px 0 34px !important;
        overflow: hidden !important;
    }

    [data-home-section="products"] .ctnr {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    [data-home-section="products"] .featured-project-stage {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    [data-home-section="products"] .featured-project-wrapper,
    [data-home-section="products"] .featured-project-slide,
    [data-home-section="products"] .featured-project-slide.is-active {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 1px solid #e6edf5 !important;
        border-radius: 20px !important;
        background: #fff !important;
        box-shadow: 0 12px 32px rgba(31, 71, 110, .10) !important;
        transform: none !important;
    }

    [data-home-section="products"] .featured-project-media {
        position: relative !important;
        order: 1 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 280px !important;
        min-height: 280px !important;
        margin: 0 !important;
        padding: 14px 14px 0 !important;
        overflow: hidden !important;
        background: linear-gradient(180deg, #f8fcff 0%, #fff 100%) !important;
        box-sizing: border-box !important;
    }

    [data-home-section="products"] .featured-media-glow {
        width: 220px !important;
        height: 220px !important;
        right: -35px !important;
        top: 20px !important;
        transform: none !important;
        opacity: .65 !important;
    }

    [data-home-section="products"] .featured-media-box {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 266px !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
    }

    [data-home-section="products"] .featured-media-box img,
    [data-home-section="products"] .featured-project-media img {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        margin: 0 auto !important;
        transform: none !important;
        transform-origin: center center !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    [data-home-section="products"] .featured-project-content {
        position: relative !important;
        order: 2 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 20px 18px 22px !important;
        justify-self: auto !important;
        box-sizing: border-box !important;
    }

    [data-home-section="products"] .featured-project-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    [data-home-section="products"] .featured-badge-pill {
        display: inline-flex !important;
        align-items: center !important;
        width: auto !important;
        max-width: 100% !important;
        min-height: 38px !important;
        margin: 0 0 16px !important;
        padding: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    [data-home-section="products"] .featured-badge-pill .badge-num {
        flex: 0 0 auto !important;
        min-height: 38px !important;
        padding: 0 16px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    [data-home-section="products"] .featured-badge-pill .badge-text {
        display: block !important;
        width: auto !important;
        padding: 0 16px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    [data-home-section="products"] .featured-project-title {
        width: 100% !important;
        margin: 0 0 10px !important;
        color: #08a7df !important;
        font-size: 24px !important;
        font-weight: 700 !important;
        line-height: 1.24 !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    [data-home-section="products"] .featured-project-subtitle {
        width: 100% !important;
        margin: 0 0 10px !important;
        font-size: 16px !important;
        line-height: 1.45 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    [data-home-section="products"] .featured-project-desc {
        width: 100% !important;
        margin: 0 0 18px !important;
        font-size: 14px !important;
        line-height: 1.55 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    [data-home-section="products"] .featured-info-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 11px !important;
        width: 100% !important;
        margin: 0 0 18px !important;
    }

    [data-home-section="products"] .featured-info-grid .info-item {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        gap: 11px !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    [data-home-section="products"] .featured-info-grid .info-icon {
        width: 42px !important;
        height: 42px !important;
    }

    [data-home-section="products"] .featured-info-grid .info-text,
    [data-home-section="products"] .featured-info-grid .info-val,
    [data-home-section="products"] .featured-info-grid .info-label {
        min-width: 0 !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

    [data-home-section="products"] .featured-info-grid .info-label {
        font-size: 12px !important;
    }

    [data-home-section="products"] .featured-info-grid .info-val {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    [data-home-section="products"] .featured-project-btns,
    [data-home-section="products"] .project-action-buttons {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    [data-home-section="products"] .project-action-btn,
    [data-home-section="products"] .btn-featured-primary,
    [data-home-section="products"] .btn-featured-secondary {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 50px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        border-radius: 14px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    [data-home-section="products"] .project-action-btn svg {
        width: 19px !important;
        height: 19px !important;
        flex: 0 0 19px !important;
    }

    [data-home-section="products"] .project-action-btn span {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* Mobile: chỉ hiển thị 1 dự án chính, ẩn toàn bộ danh sách dự án phía dưới */
    [data-home-section="products"] .projects-slider-container {
        display: none !important;
    }

    /* Safety: ngoài slide active, mọi dự án khác luôn ẩn trên mobile */
    [data-home-section="products"] .featured-project-slide:not(.is-active),
    [data-home-section="products"] .featured-project-slide[aria-hidden="true"] {
        display: none !important;
    }

    [data-home-section="products"] .featured-project-slide.is-active {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    [data-home-section="products"] .featured-project-btns,
    [data-home-section="products"] .project-action-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    [data-home-section="products"] .project-action-btn {
        padding: 0 8px !important;
    }

    [data-home-section="products"] .featured-project-media {
        height: 250px !important;
        min-height: 250px !important;
        padding: 12px 12px 0 !important;
    }

    [data-home-section="products"] .featured-media-box {
        height: 238px !important;
    }

    [data-home-section="products"] .featured-project-content {
        padding: 18px 16px 20px !important;
    }

    [data-home-section="products"] .featured-project-title {
        font-size: 22px !important;
    }

    [data-home-section="products"] .featured-badge-pill .badge-num,
    [data-home-section="products"] .featured-badge-pill .badge-text {
        font-size: 12px !important;
    }
}


/* ==================================================
   V38 — MOBILE PROJECT BADGE ABOVE IMAGE
   Số dự án + "Dự án nổi bật" nằm trên ảnh, desktop giữ nguyên.
================================================== */
.featured-badge-pill--mobile{
    display:none !important;
}

@media (max-width:767px){
    [data-home-section="products"] .featured-badge-pill--desktop{
        display:none !important;
    }

    [data-home-section="products"] .featured-badge-pill--mobile{
        order:0 !important;
        display:inline-flex !important;
        align-self:flex-start !important;
        align-items:center !important;
        width:auto !important;
        max-width:calc(100% - 28px) !important;
        min-height:40px !important;
        margin:14px 14px 8px !important;
        padding:0 !important;
        overflow:hidden !important;
        white-space:nowrap !important;
        border-radius:999px !important;
        background:#dce8fb !important;
        box-shadow:none !important;
        position:relative !important;
        z-index:3 !important;
    }

    [data-home-section="products"] .featured-badge-pill--mobile .badge-num{
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        min-height:40px !important;
        padding:0 16px !important;
        border-radius:999px !important;
        background:linear-gradient(135deg,#22b7e8,#34caeb) !important;
        color:#fff !important;
        font-family:"Bai Jamjuree",sans-serif !important;
        font-size:13px !important;
        line-height:1 !important;
        font-weight:700 !important;
        white-space:nowrap !important;
    }

    [data-home-section="products"] .featured-badge-pill--mobile .badge-text{
        display:block !important;
        padding:0 18px !important;
        color:#111827 !important;
        font-family:"Bai Jamjuree",sans-serif !important;
        font-size:16px !important;
        line-height:1.2 !important;
        font-weight:700 !important;
        white-space:nowrap !important;
    }

    [data-home-section="products"] .featured-project-media{
        order:1 !important;
        padding-top:4px !important;
    }

    [data-home-section="products"] .featured-project-content{
        order:2 !important;
    }
}

@media (max-width:480px){
    [data-home-section="products"] .featured-badge-pill--mobile .badge-num{
        font-size:13px !important;
    }
    [data-home-section="products"] .featured-badge-pill--mobile .badge-text{
        font-size:16px !important;
    }
}
