/* ==========================================================================
   SECTION SLIDE-ABOUT (port từ Next.js home.model.css — phần home-slide-about)
   ========================================================================== */

.home-slide-about {
    position: relative;
    height: 50rem;
    overflow: hidden;
    color: #fff;
}

.home-slide-about__swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.home-slide-about__slide {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.home-slide-about__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    overflow: hidden;
}

.home-slide-about__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.home-slide-about__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.60) 0%, rgba(0, 0, 0, 0.00) 35.1%, #000 100%);
    z-index: 1;
    pointer-events: none;
}

/* ===== Tabs (desktop) ===== */
.home-slide-about__tabs {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.25rem;
    z-index: 3;
}

.home-slide-about__tab {
    width: 18.75rem;
    height: 2.875rem;
    position: relative;
    text-align: left;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
    border: 0;
    display: block;
}

.home-slide-about__tab-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.home-slide-about__tab-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: #fff;
    transition: width 0.4s ease;
}

.home-slide-about__tab.is-active .home-slide-about__tab-line::after {
    width: 100%;
}

@keyframes home-slide-about-story-line {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/*@media (min-width: 769px) {*/
    .home-slide-about__tab-line {
        overflow: hidden;
    }

    .home-slide-about__tab-line::after {
        width: 100%;
        transform: scaleX(0);
        transform-origin: left center;
        transition: none;
    }

    .home-slide-about__tab.is-active .home-slide-about__tab-line::after {
        animation: home-slide-about-story-line var(--slide-about-duration, 6000ms) linear forwards;
    }
/*}*/

.home-slide-about__tab-index,
.home-slide-about__tab-label {
    display: block;
    font-size: 0.875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-slide-about__tab-index {
    margin-top: 0.625rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.home-slide-about__tab-label {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.85);

    color: #FFF;

/* Text/PC/Body/14/14-R-ALLCAP */
font-family: "Averta Std CY";
font-size: 0.875rem;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
}

.home-slide-about__tab.is-active .home-slide-about__tab-label {
    color: #fff;
}

/* ===== Content panel ===== */
.home-slide-about__content {
    position: absolute;
    bottom: 4.375rem;
    left: 0;
    right: 0;
    z-index: 3;
    max-width: 65%;
    display: grid;
    grid-template-columns: 1fr;
}

.home-slide-about__title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 120%;
    grid-column: 1;
    grid-row: 1;
}

/* Panel system: chỉ panel.is-active hiển thị, có fade transition (thay AnimatePresence) */
.home-slide-about__panel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    grid-column: 1;
    grid-row: 2;
    pointer-events: none;
}

.home-slide-about__panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-width: 48rem;
}

.home-slide-about__highlight {
    position: relative;
    margin: 0.5rem 0 1.25rem;
    margin-top: 0;
    padding-top: 0.75rem;
    width: fit-content;
}

.home-slide-about__highlight .line {
    position: absolute;
    left: 0;
    top: 50%;
    width: 11rem;
    height: 1px;
    opacity: 0.9;
    transform: translateY(-50%);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.45));
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        #fff 21.15%,
        #fff 77.4%,
        rgba(255, 255, 255, 0) 100%
    );
}

.home-slide-about__highlight .eyebrow {
    font-size: 1.375rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.home-slide-about__highlight .eyebrow__mobile {
    display: none;
}

.home-slide-about__highlight .big {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 1.25rem;
}

.home-slide-about__highlight .big-sub {
    color: #fff;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 120%;
    text-transform: uppercase;
}

.home-slide-about__highlight .big-sub__mobile {
    display: none;
}

.home-slide-about__desc {
   
    color: #fff;
    text-align: justify;
    font-size: 1rem;
    font-weight: 400;
     display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* Số dòng tối đa bạn muốn hiển thị */
  overflow: hidden;
  text-overflow: ellipsis;
    line-height: 140%;
    letter-spacing: -0.01rem;
     max-width: 48rem;
}

/* ===== Capacity controls (pagination + nav arrows) ===== */
.home-capacity__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    width: 100%;
}

.home-capacity__pagination {
    display: none;
    align-items: baseline;
    gap: 0.125rem;
    color: #fff;
}

.home-capacity__pagination strong {
    font-size: 1.125rem;
    font-weight: 600;
}

.home-capacity__pagination em {
    font-style: normal;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.home-capacity__nav {
    display: inline-flex;
    align-items: center;
    gap: 1.875rem;
}

.home-capacity__nav-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.home-capacity__nav-btn svg {
    width: 1.4rem;
    height: auto;
}

.home-capacity__nav-btn:hover {
    opacity: 0.6;
}

.home-capacity__nav-btn.prev svg {
    transform: rotate(180deg);
}

/* Trên desktop: controls nằm trên slider absolute */
.home-slide-about .home-capacity__controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    z-index: 3;
    color: #fff;
}

/* Trên desktop ẩn mobile tabs */
.home-slide-about__tabs--mobile {
    display: none !important;
}

/* ========================================================================
   MOBILE
   ======================================================================== */
@media (max-width: 768px) {
    .home-slide-about {
        height: auto;
    }

    .home-slide-about__swiper {
        position: relative;
        height: 16.3125rem;
        overflow: hidden;
        inset: auto;
    }

    .home-slide-about__overlay {
        display: none;
    }

    .home-slide-about__tabs {
        display: none;
    }

    .home-slide-about__tabs--mobile {
        display: block !important;
        position: absolute;
        top: 0rem;
        left: 1rem;
        width: calc(100% - 2rem);
        transform: none;
        padding: 0;
        margin-top: 0;
        z-index: 3;
    }

    .home-slide-about__tabs--mobile .home-slide-about__tab {
        width: 100%;
        height: auto;
        min-height: 4.25rem;
    }

    .home-slide-about__tabs--mobile .home-slide-about__tab-line {
        top: 1rem;
        height: 2px; /* Chỉnh lại độ dày cho dễ thấy */
        background: rgba(255, 255, 255, 0.3);
        position: absolute;
        left: 0;
        right: 0;
        overflow: hidden; /* Cần thiết để chứa thanh chạy bên trong */
    }

    .home-slide-about__tabs--mobile .home-slide-about__tab-line::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        
        /* Trạng thái mặc định: Co lại về 0 bên trái */
        transform: scaleX(0);
        transform-origin: left center;
        transition: none;
    }

    /* Khi có class .is-active, kích hoạt animation */
    .home-slide-about__tabs--mobile .home-slide-about__tab.is-active .home-slide-about__tab-line::after {
        animation: home-slide-about-story-line var(--slide-about-duration, 5000ms) linear forwards !important;
    }

    .home-slide-about__tab-index {
        margin-top: 1.06rem;
        margin-bottom: 0.52rem;
        color: rgba(255, 255, 255, 0.65);
    }

    .home-slide-about__tab-label {
        color: #000;
        margin-top: 0;
        color: #FFF;

/* Text/PC/Body/14/14-R-ALLCAP */
font-family: "Averta Std CY";
font-size: 0.875rem;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
    }

    .home-slide-about__tabs--mobile .home-slide-about__tab-index,
    .home-slide-about__tabs--mobile .home-slide-about__tab-label {
        
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
        color: rgba(255, 255, 255, 0.65);

/* Text/PC/Body/14/14-R-ALLCAP */
font-family: "Averta Std CY";
font-size: 0.875rem;
font-style: normal;
font-weight: 400;
line-height: normal;
text-transform: uppercase;
    }

    .home-slide-about__content {
        position: relative;
        bottom: auto;
        max-width: 100%;
        padding-top: 1.19rem;
    }

    .home-slide-about__panel {
        padding:0;
    }

    .home-slide-about__panel.is-active {
        max-width: 100%;
    }

    .home-slide-about__title {
        color: #000;
        font-size: 1rem;
    }

    .home-slide-about__highlight {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 0.45rem;
        padding-top: 0;
        margin-bottom: 1.5rem;
        white-space: nowrap;
    }

    .home-slide-about__highlight--04 {
        display: flex;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 0.5rem;
        white-space: nowrap;
    }

    .home-slide-about__highlight .eyebrow {
        color: #000;
        font-size: 1rem;
        font-weight: 600;
        line-height: 120%;
        margin-top: 1.65rem;
        white-space: nowrap;
    }

    .home-slide-about__highlight .eyebrow.eyebrow-04 {
        width: auto;
        overflow: visible;
        display: inline-block;
    }

    .home-slide-about__highlight .eyebrow.eyebrow-04 .eyebrow__pc {
        display: none;
    }

    .home-slide-about__highlight .eyebrow.eyebrow-04 .eyebrow__mobile {
        display: inline;
    }

    .home-slide-about__highlight .big {
        opacity: 0.9;
        color: #000;
        font-size: 3.125rem;
        line-height: 1;
        margin-right: 0.48rem;
        margin-left: 0;
    }

    .home-slide-about__highlight .big.big-04 {
        margin-left: 0;
    }

    .home-slide-about__highlight .big-sub {
        color: #000;
        font-size: 0.625rem;
        font-weight: 600;
        line-height: 120%;
        margin-top: 1.55rem;
        text-transform: uppercase;
    }

    .home-slide-about__highlight .big-sub-03 .big-sub__pc,
    .home-slide-about__highlight .big-sub-04 .big-sub__pc {
        display: none;
    }

    .home-slide-about__highlight .big-sub-03 .big-sub__mobile,
    .home-slide-about__highlight .big-sub-04 .big-sub__mobile {
        display: inline;
    }

    .home-slide-about__highlight .big-sub.big-sub-04 {
        width: 4rem;
        display: inline-block;
    }

    .home-slide-about__highlight .line {
        top: 1.06rem;
        width: 8.2rem;
        transform: none;
        filter: none;
        background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0) 0%,
            #000 21.15%,
            #000 77.4%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .home-slide-about__highlight .line.line-04 {
        width: 5.875rem;
    }

    .home-slide-about__desc {
        color: #000;
        font-size: 0.75rem;
        line-height: 140%;
        letter-spacing: -0.0075rem;
        min-height: 4.2rem;
    }

    .home-slide-about .home-capacity__controls {
        position: relative;
        bottom: auto;
        display: flex !important;
        margin-top: 0.14rem;
        margin-top:0.5rem;
        padding-bottom: 2.23rem;
        color: #252525;
    }

    .home-slide-about .home-capacity__controls .home-capacity__pagination strong,
    .home-slide-about .home-capacity__controls .home-capacity__pagination em {
        color: #252525;
    }

    .home-capacity__nav-btn {
        color: #252525;
    }
}
