/* ==========================================================================
   HOME — các section trang chủ (front-page)
   ========================================================================== */

/* ==========================================================================
   1. HERO SLIDER — TYPE A: continuous visual, full-bleed.
   Media phủ toàn chiều ngang; chữ nằm trong .container.
   ========================================================================== */

.hero {
    position: relative;
    z-index: 1;
}

.hero__stage {
    position: relative;
    height: var(--hero-h);
    overflow: hidden;
    background: #eaf3fa;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}

.hero__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s var(--ease), visibility 0s;
}

.hero__media,
.hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero__media img {
    object-fit: cover;
    /* Neo phải: phần bị cắt khi cover rơi vào vùng nền sáng bên trái, giữ trọn biển thương hiệu bên phải */
    object-position: right center;
    transform: scale(1.04);
    transform-origin: right center;
    transition: transform 7s linear;
}

.hero__slide.is-active .hero__media img {
    transform: scale(1);
}

/* Gradient trái → phải giúp chữ dễ đọc, không tạo đường cắt dọc */
.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            rgba(241, 247, 252, 0.78) 0%,
            rgba(241, 247, 252, 0.55) 28%,
            rgba(241, 247, 252, 0) 50%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    padding-top: 66px;
}

.hero__content {
    max-width: 640px;
}

.hero__slide.is-active .hero__content > * {
    animation: heroFadeUp 0.8s var(--ease) both;
}

.hero__slide.is-active .hero__content > :nth-child(2) { animation-delay: 0.08s; }
.hero__slide.is-active .hero__content > :nth-child(3) { animation-delay: 0.16s; }
.hero__slide.is-active .hero__content > :nth-child(4) { animation-delay: 0.24s; }

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.hero__content .eyebrow {
    font-size: 16px;
}

.hero__title {
    margin-top: 10px;
    font-size: var(--fs-hero);
    line-height: 1.22;
    letter-spacing: -0.035em;
    color: var(--color-heading);
}

.hero__desc {
    max-width: 620px;
    margin-top: 12px;
    font-size: var(--fs-lead);
    line-height: 1.48;
    letter-spacing: -0.01em;
    color: #4f6b8e;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 32px;
    margin-top: 27px;
}

.hero__actions .btn {
    min-height: 55px;
    padding: 0 24px;
    font-size: 16.5px;
}

.hero__actions .link-arrow {
    font-size: 16.5px;
}

/* Điều khiển slider */
.hero__controls {
    position: absolute;
    left: 0;
    right: 0;
    top: 412px;
    z-index: 4;
    pointer-events: none;
}

.hero__controls-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
    width: max-content;
}

.hero__counter {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-heading);
    color: var(--color-muted);
}

.hero__counter-current {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-heading);
}

.hero__counter-sep {
    font-size: 23px;
    font-weight: 300;
    color: #7f98b4;
}

.hero__counter-total {
    font-size: 18.5px;
    font-weight: 500;
    color: #6a84a3;
}

.hero__pause {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 6px;
    padding-left: 0;
    border-radius: 50%;
    background: #d8eff6;
    color: var(--color-heading);
    position: relative;
}

.hero__pause::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: #c9dbe8;
}

.hero__pause .icon {
    font-size: 14px;
}

.hero__pause .icon-play {
    display: none;
}

.hero__pause[aria-pressed='true'] .icon-pause {
    display: none;
}

.hero__pause[aria-pressed='true'] .icon-play {
    display: block;
}

.hero__arrow {
    position: absolute;
    top: 256px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-heading);
    box-shadow: 0 6px 20px rgba(0, 45, 85, 0.16);
    transform: translateY(-50%);
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.hero__arrow .icon {
    font-size: 20px;
    stroke-width: 2.4;
}

.hero__arrow:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.hero__arrow--prev {
    left: 20px;
}

.hero__arrow--next {
    right: 20px;
}

/* Tabs slider — chồng lên mép dưới hero */
.hero__tabs-wrap {
    position: relative;
    z-index: 6;
    margin-top: calc(var(--hero-tabs-h) * -0.58);
}

.hero-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: var(--hero-tabs-h);
    border-radius: 8px;
    background: var(--color-white);
    box-shadow: 0 8px 26px rgba(0, 45, 85, 0.1);
    margin-inline: -2px;
}

.hero-tabs__tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #1c4d7c;
    overflow: hidden;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.hero-tabs__tab + .hero-tabs__tab::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #d6e2ec;
}

.hero-tabs__num {
    font-weight: 500;
}

.hero-tabs__tab:hover {
    color: var(--color-accent);
}

.hero-tabs__tab.is-active {
    background: linear-gradient(180deg, #0a5a8e 0%, #004778 100%);
    color: var(--color-white);
}

.hero-tabs__tab.is-active::before,
.hero-tabs__tab.is-active + .hero-tabs__tab::before {
    display: none;
}

/* Thanh tiến trình cam dưới tab đang active */
.hero-tabs__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 0;
    background: var(--color-orange);
    border-radius: 0 0 8px 8px;
}

.hero-tabs__tab.is-active .hero-tabs__progress {
    width: 100%;
}

.hero.is-playing .hero-tabs__tab.is-active .hero-tabs__progress {
    width: 0;
    animation: heroProgress var(--hero-interval, 6s) linear forwards;
}

.hero.is-paused .hero-tabs__tab.is-active .hero-tabs__progress {
    animation-play-state: paused;
}

@keyframes heroProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* ==========================================================================
   2. ABOUT — "Một đối tác. Giải pháp đồng bộ."
   ========================================================================== */

.about {
    padding: 30px 0 14px;
}

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 682fr) minmax(0, 580fr);
    column-gap: 49px;
    align-items: start;
    margin-inline: calc(var(--bleed) * -1);
}

.about__media {
    position: relative;
    aspect-ratio: 682 / 418;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__caption {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 12px;
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-heading);
}

.about__content {
    padding-top: 4px;
}

.about__title {
    margin-top: 12px;
    font-size: var(--fs-display);
    line-height: 1.17;
    letter-spacing: -0.035em;
}

.about__desc {
    max-width: 600px;
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
}

.about__features {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 16px 0;
    margin-top: 26px;
}

.about__features .feature:first-child {
    padding-right: 26px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 17px;
}

.feature + .feature {
    padding-left: 30px;
    border-left: 1px solid var(--color-border);
}

.feature__title {
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.025em;
    color: var(--color-heading);
}

.feature__desc {
    margin-top: 3px;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.about__link {
    margin-top: 28px;
    font-size: 16.5px;
}

/* ==========================================================================
   3. SOLUTIONS — "Giải pháp xử lý nước toàn diện"
   ========================================================================== */

.solutions {
    padding: 14px 0 18px;
    overflow: hidden;
}

.solutions__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 682fr) minmax(0, 580fr);
    column-gap: 49px;
    margin-left: calc(var(--bleed) * -1);
}

.solutions__head {
    padding-left: var(--bleed);
}

.solutions__head .section-title {
    margin-top: 6px;
}

.solutions__head .section-desc {
    max-width: 640px;
    margin-top: 6px;
}

.solution-list {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    list-style: none;
    padding: 0;
}

.solution-item {
    position: relative;
    display: grid;
    grid-template-columns: 59px 47px minmax(0, 1fr) 24px;
    align-items: center;
    column-gap: 0;
    min-height: 77px;
    padding: 0 26px 0 27px;
    border-radius: var(--radius-sm);
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 58, 102, 0.05);
    color: var(--color-heading);
    transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.solution-item:hover {
    color: var(--color-heading);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.solution-item__num {
    font-family: var(--font-heading);
    font-size: 19.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b4a7d;
}

.solution-item__icon {
    display: grid;
    place-items: center;
    color: var(--color-accent);
}

.solution-item__icon .icon {
    font-size: 38.5px;
    stroke-width: 2.1;
}

.solution-item__text {
    padding-left: 26px;
}

.solution-item__title {
    display: block;
    font-family: var(--font-heading);
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
    color: #0b3f6e;
}

.solution-item__desc {
    display: block;
    margin-top: 3px;
    font-size: 15.5px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.solution-item__arrow .icon {
    font-size: 19px;
    color: #0b4a7d;
}

.solution-item.is-active {
    background: linear-gradient(90deg, #0a568a 0%, #004272 100%);
    box-shadow: 0 8px 22px rgba(0, 66, 114, 0.25);
}

.solution-item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 7px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--color-orange);
}

.solution-item.is-active .solution-item__num,
.solution-item.is-active .solution-item__icon,
.solution-item.is-active .solution-item__title,
.solution-item.is-active .solution-item__arrow .icon {
    color: var(--color-white);
}

.solution-item.is-active .solution-item__desc {
    color: rgba(255, 255, 255, 0.82);
}

/* Cột phải: panel bài giới thiệu từng giải pháp (đổi theo item đang hover/focus).
   Các panel xếp chồng cùng 1 ô grid → chiều cao ổn định, chuyển đổi bằng fade. */
.solutions__feature {
    position: relative;
    display: grid;
    min-height: 100%;
}

.solution-panel {
    grid-area: 1 / 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}

.solution-panel.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s var(--ease), visibility 0s;
}

.solutions__visual {
    position: absolute;
    top: 21px;
    left: -39px;
    width: 685px;
    height: 345px;
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0, #000 7%, #000 88%, transparent 100%),
        linear-gradient(180deg, #000 78%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, transparent 0, #000 7%, #000 88%, transparent 100%),
        linear-gradient(180deg, #000 78%, transparent 100%);
    mask-composite: intersect;
    pointer-events: none;
}

.solutions__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform 0.6s var(--ease);
}

.solution-panel.is-active .solutions__visual img {
    transform: none;
}

.solutions__feature-body {
    position: relative;
    z-index: 1;
    transform: translateY(8px);
    transition: transform 0.35s var(--ease);
}

.solution-panel.is-active .solutions__feature-body {
    transform: none;
}

.solutions__feature-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--color-heading);
}

.solutions__feature-desc {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.45;
    color: var(--color-text-strong);
}

.solutions__feature-excerpt {
    max-width: 560px;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
}

.solutions__feature .btn {
    min-height: 50px;
    margin-top: 16px;
    padding: 0 22px;
    align-self: flex-start;
}

/* ==========================================================================
   4. PROJECTS — "Dấu ấn từ những công trình"
   ========================================================================== */

.projects {
    padding: 20px 0 17px;
}

.projects__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.projects__head .section-title {
    margin-top: 4px;
    font-size: 32.5px;
}

.projects__head .link-arrow {
    margin-bottom: 12px;
    font-size: 15px;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    margin-inline: calc(var(--bleed) * -0.8);
}

/* ==========================================================================
   5. PROCESS — "Chặt chẽ trong từng bước triển khai"
   ========================================================================== */

.process {
    padding: 14px 0 0;
}

.process__head .section-title {
    margin-top: 5px;
    font-size: 27.5px;
    letter-spacing: -0.03em;
}

.process__steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.82fr);
    margin-top: 12px;
    list-style: none;
    padding: 0;
}

.step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-left: -4px;
}

.step .icon-circle {
    width: 84px;
    height: 84px;
    background: #e1f1f8;
    color: #0b5a8f;
}

.step .icon-circle .icon {
    font-size: 35.5px;
    stroke-width: 1.9;
}

.step__num {
    display: block;
    font-family: var(--font-heading);
    font-size: 18.5px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-orange);
}

.step__title {
    margin-top: 3px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.step__desc {
    margin-top: 3px;
    font-size: 16px;
    line-height: 1.47;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

/* Đường chấm nối giữa các bước */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 38px;
    right: 22px;
    width: 86px;
    border-top: 2px dotted #7fb6d5;
}
