/* Hero Banner */
.hero-banner {
    position: relative;
    overflow: hidden;
    line-height: 0;
    background-color: #1a2744;
}

.hero-banner .animate-on-load,
.hero-banner .animate-on-scroll--scale {
    opacity: 1;
    transform: none;
}

.hero-banner__bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.hero-banner__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--hero-content-padding);
    box-sizing: border-box;
    line-height: normal;
}

body.page-home .hero-banner__content {
    padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
    padding-bottom: var(--hero-home-content-pad-bottom);
}

.hero-banner__box {
    width: 100%;
    max-width: var(--hero-max-width);
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--hero-radius);
    padding: var(--hero-box-padding);
    text-align: center;
    box-sizing: border-box;
}

.hero-banner__title {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: var(--hero-title);
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 var(--hero-title-mb);
}

.hero-banner__subtitle {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    font-size: var(--hero-subtitle, var(--hero-title));
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 var(--hero-subtitle-mb);
}

.hero-banner__desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--hero-desc);
    line-height: 1.5;
    margin: 0 auto;
    max-width: var(--hero-desc-max-w);
}

@media (max-width: 1023px) {
    .hero-banner {
        min-height: clamp(320px, 58vw, 440px);
    }

    .hero-banner__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .hero-banner__subtitle {
        font-size: var(--hero-subtitle, var(--hero-title));
    }

    body.page-home .hero-banner__content {
        padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
        padding-bottom: var(--hero-home-content-pad-bottom);
        align-items: center;
    }

    .hero-banner__box {
        width: min(100%, 560px);
        background: transparent;
        padding: 0;
        border-radius: 0;
    }

    .hero-banner__title,
    .hero-banner__subtitle,
    .hero-banner__desc {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    }

    .hero-banner__title,
    .hero-banner__subtitle {
        margin-bottom: 6px;
        letter-spacing: 0.02em;
        text-wrap: balance;
    }

    .hero-banner__subtitle {
        margin-bottom: 8px;
    }

    .hero-banner__desc {
        max-width: none;
        text-wrap: pretty;
    }
}

@media (max-width: 767px) {
    .hero-banner {
        min-height: clamp(280px, 72vw, 380px);
    }

    body.page-home .hero-banner__content {
        padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
        padding-bottom: var(--hero-home-content-pad-bottom);
    }

    .hero-banner__title,
    .hero-banner__subtitle {
        margin-bottom: 4px;
        line-height: 1.22;
        letter-spacing: 0.015em;
    }

    .hero-banner__subtitle {
        margin-bottom: 6px;
    }

    .hero-banner__desc {
        line-height: 1.5;
    }
}

/* Desktop — fixed hero height until desktop nav (1280px+) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .hero-banner {
        position: relative;
        height: clamp(360px, 40vw, 480px);
    }

    .hero-banner__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    body.page-home .hero-banner__content {
        padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
        padding-bottom: var(--hero-home-content-pad-bottom);
    }

    .hero-banner__subtitle {
        font-size: var(--hero-subtitle);
    }
}

/* Desktop nav (≥1280px) — homepage banner fills viewport */
@media (min-width: 1280px) {
    body.page-home .hero-banner {
        position: relative;
        height: 100vh;
        min-height: 100vh;
    }

    .hero-banner__bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    body.page-home .hero-banner__content {
        padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
        padding-bottom: var(--hero-home-content-pad-bottom);
    }

    .hero-banner__subtitle {
        font-size: var(--hero-subtitle);
    }
}

@media (min-width: 2000px) {
    .hero-banner__content {
        top: 0;
        bottom: 0;
        left: 50%;
        right: auto;
        width: var(--page-max-width);
        max-width: var(--page-max-width);
        transform: translateX(-50%);
    }

    body.page-home .hero-banner__content {
        padding-top: calc(var(--header-height) + var(--hero-home-content-pad-top));
        padding-bottom: var(--hero-home-content-pad-bottom);
    }

    .hero-banner__desc {
        max-width: var(--hero-desc-max-w);
    }

    .projects__card-media img {
        min-height: var(--project-card-img-h);
    }
}

/* Products Section */
.products {
    background-color: #F9FAFB;
    padding: var(--section-py) 0;
}

.products__header {
    text-align: center;
    margin-bottom: var(--section-header-mb);
}

.products__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-title);
    line-height: 1.3;
    text-transform: uppercase;
    color: #111827;
    margin: 0 0 10px;
}

.products__subtitle {
    font-size: var(--section-subtitle);
    line-height: 1.45;
    color: #6b7280;
    margin: 0;
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    margin-bottom: calc(var(--section-header-mb) + 5px);
}

.products__card {
    display: flex;
    align-items: center;
    gap: var(--product-card-gap);
    min-height: var(--product-card-min-h);
    padding: var(--product-card-padding);
    background-color: #fff;
    border: none;
    border-radius: var(--product-card-radius, 12px);
    box-shadow: 0 4px 16px rgba(26, 58, 108, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.products__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(26, 58, 108, 0.14);
}

.products__card-body {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: var(--product-card-body-min-h);
    box-sizing: border-box;
}

.products__card-title {
    flex: 1;
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--product-card-title);
    line-height: 1.35;
    text-transform: uppercase;
    color: #1F2937;
    margin: 0;
}

.products__card-link {
    flex-shrink: 0;
    font-size: var(--product-card-link);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ff9803;
    transition: color 0.2s ease;
    margin-top: 4px;
}

.products__card:hover .products__card-link {
    color: var(--color-primary);
}

.products__card-media {
    flex: 0 0 60%;
    max-width: 60%;
    min-height: var(--product-card-media-min-h);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.products__card-media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.products__footer {
    text-align: center;
    margin-top: var(--btn-block-gap);
}

@media (max-width: 1023px) {
    .products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--grid-gap-lg);
    }

    .products__card-title {
        line-height: 1.3;
    }
}

@media (max-width: 767px) {
    .products__header {
        margin-bottom: 20px;
    }

    .products__title {
        margin-bottom: 6px;
    }

    .products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--grid-gap-lg);
        margin-bottom: 20px;
    }

    .products__card {
        flex-direction: column;
        align-items: stretch;
    }

    .products__card-body,
    .products__card-media {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .products__card-title {
        align-items: flex-start;
        min-height: 1.5em;
    }

    .products__card-link {
        margin-top: 6px;
    }
}

/* Why Choose Us Section */
.why-us {
    background-color: #FFFFFF;
    padding: var(--section-py) 0;
}

.why-us__header {
    text-align: center;
    margin-bottom: var(--section-header-mb);
}

.why-us__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-title);
    line-height: 1.3;
    text-transform: uppercase;
    color: #111827;
    margin: 0 0 12px;
}

.why-us__subtitle {
    font-size: var(--section-subtitle);
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}

.why-us__list {
    display: flex;
    flex-direction: column;
    gap: var(--why-list-gap);
}

.why-us__row {
    display: grid;
    grid-template-columns: 5% 50% 5% 40%;
    align-items: center;
    width: 100%;
}

.why-us__row--reverse {
    grid-template-columns: 40% 5% 50% 5%;
}

.why-us__content {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    box-sizing: border-box;
}

.why-us__row--reverse .why-us__content {
    grid-column: 3;
}

.why-us__media {
    grid-column: 4;
    grid-row: 1;
    align-self: center;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.why-us__row--reverse .why-us__media {
    grid-column: 1;
}

.why-us__item-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-item-title);
    line-height: 1.45;
    color: #111827;
    margin: 0 0 16px;
}

.why-us__item-desc {
    font-size: var(--section-body);
    line-height: 1.75;
    color: #4a4a5a;
    margin: 0;
}

.why-us__media img {
    display: block;
    width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.why-us__row:hover .why-us__media img {
    transform: scale(1.03);
}

@media (max-width: 1023px) {
    .why-us__row,
    .why-us__row--reverse {
        display: flex;
        flex-direction: column;
        gap: var(--why-row-gap);
    }

    .why-us__media {
        order: 1;
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .why-us__content {
        order: 2;
        flex: none;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .why-us__row,
    .why-us__row--reverse {
        gap: 16px;
    }

    .why-us__item-title {
        margin-bottom: 10px;
    }

    .why-us__media img {
        height: var(--why-img-height);
        min-height: 0;
    }
}

@media (min-width: 1024px) {
    .why-us__media img {
        min-height: var(--why-img-height);
    }
}

/* Innovation Section */
.innovation {
    background-color: #F9FAFB;
    padding: var(--section-py) 0;
}

.innovation__header {
    text-align: center;
    margin-bottom: var(--section-header-mb);
}

.innovation__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-title);
    line-height: 1.3;
    text-transform: uppercase;
    color: #111827;
    margin: 0 0 12px;
}

.innovation__subtitle {
    font-size: var(--section-subtitle);
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}

.innovation__body {
    display: grid;
    grid-template-columns: 0% 50% 4% 46%;
    align-items: stretch;
    width: 100%;
}

.innovation__media {
    grid-column: 2;
    grid-row: 1;
    border-radius: 12px;
    overflow: hidden;
}

.innovation__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: var(--innovation-img-min-h);
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

.innovation__content {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.innovation__body-text {
    font-size: var(--section-body);
    line-height: 1.5;
    color: #4a4a5a;
    text-align: justify;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: normal;
    margin: 0 0 var(--btn-content-gap);
}

.innovation__body-text p {
    display: inline;
    margin: 0;
}

.innovation__body-text p:not(:last-child)::after {
    content: '\A\A';
    white-space: pre;
}

.innovation__body-text p:empty::after {
    content: '\A';
    white-space: pre;
}

.innovation__btn {
    margin-top: auto;
    align-self: flex-end;
}

@media (max-width: 1023px) {
    .innovation__body {
        display: flex;
        flex-direction: column;
        gap: var(--innovation-body-gap);
    }

    .innovation__btn {
        align-self: flex-start;
    }
}

/* Project Cases Section */
.projects {
    background-color: #FFFFFF;
    padding: var(--section-py) 0;
}

.projects__header {
    text-align: center;
    margin-bottom: var(--section-header-mb);
}

.projects__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-title);
    line-height: 1.3;
    text-transform: uppercase;
    color: #111827;
    margin: 0 0 10px;
}

.projects__subtitle {
    font-size: var(--section-subtitle);
    line-height: 1.45;
    color: #6b7280;
    margin: 0;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap-lg);
    margin-bottom: calc(var(--section-header-mb) - 3px);
}

.projects__card {
    background-color: #fff;
    border-radius: var(--project-card-radius, 12px);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(26, 58, 108, 0.12);
}

.projects__card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.projects__card-media {
    overflow: hidden;
}

.projects__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.projects__card:hover .projects__card-media img {
    transform: scale(1.05);
}

.projects__card-body {
    padding: var(--project-card-body-pad);
}

.projects__card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--project-card-title);
    line-height: 1.4;
    color: #4b5563;
    margin: 0;
}

.projects__card[hidden] {
    display: none;
}

.projects__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--btn-block-gap);
    margin-top: var(--btn-block-gap);
}

.projects__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.projects__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(23, 41, 140, 0.3);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.projects__dot:hover {
    background-color: rgba(23, 41, 140, 0.5);
}

.projects__dot--active {
    background-color: var(--color-primary);
}

.projects__footer {
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 1023px) {
    .projects__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--grid-gap-lg);
    }

    .projects__card-media img {
        min-height: 140px;
    }
}

@media (max-width: 767px) {
    .projects__header {
        margin-bottom: 20px;
    }

    .projects__title {
        margin-bottom: 6px;
    }

    .projects__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--grid-gap-lg);
        margin-bottom: 20px;
    }

    .projects__card-media {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .projects__card-media img {
        min-height: 0;
    }

    .projects__card-title {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 3.8em;
        font-size: clamp(11px, 3.2vw, var(--project-card-title));
    }

    .projects__controls {
        gap: var(--btn-block-gap);
        margin-top: var(--btn-block-gap);
    }
}

/* News Media Section */
.news {
    background-color: #F3F7FB;
    padding: var(--section-py) 0;
}

.news__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--grid-gap-lg);
    margin-bottom: var(--section-header-mb);
}

.news__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--section-title);
    line-height: 1.3;
    text-transform: uppercase;
    color: #111827;
    margin: 0 0 8px;
}

.news__subtitle {
    font-size: var(--section-subtitle);
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0;
}

.news__view-btn {
    flex-shrink: 0;
}

.news__layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--news-layout-gap);
    align-items: stretch;
}

.news__side {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news__divider {
    flex-shrink: 0;
    height: 1px;
    background-color: var(--color-border);
    margin: 16px 0;
}

.news__card {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 58, 108, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(26, 58, 108, 0.1);
}

.news__card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news__card-link--horizontal {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    box-sizing: border-box;
}

.news__card--horizontal {
    flex: 1;
}

.news__card--featured .news__card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news__card-media--featured {
    flex: 1;
    min-height: var(--news-featured-h);
    overflow: hidden;
}

.news__card-media--thumb {
    flex: 0 0 var(--news-thumb-width);
    align-self: stretch;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
}

.news__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.news__card-media--thumb img {
    width: 100%;
    height: 100%;
    padding: 10px;
    border-radius: 5px 0 0 5px;
    object-fit: cover;
    object-position: center;
}

.news__card:hover .news__card-media img {
    transform: scale(1.05);
}

.news__card--horizontal:hover .news__card-media--thumb img {
    transform: none;
}

.news__card-body {
    padding: var(--news-card-body-pad);
}

.news__card-link--horizontal .news__card-body {
    padding: var(--news-card-body-pad-h);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news__date {
    display: block;
    font-size: var(--fs-xs);
    line-height: 1.4;
    color: #9ca3af;
    margin-bottom: 12px;
}

.news__card-link--horizontal .news__date {
    margin-bottom: 8px;
}

.news__card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--news-card-title);
    color: #111827;
    margin: 0 0 12px;
}

.news__card-link--horizontal .news__card-title {
    margin-bottom: 8px;
}

.news__card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--news-card-desc);
    color: #4B5563;
    margin: 0 0 16px;
}

.news__card-link--horizontal .news__card-desc {
    margin-bottom: 12px;
}

.news__read-more {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ff9803;
    transition: color 0.2s ease;
}

.news__card:hover .news__read-more {
    color: var(--color-primary);
}

@media (max-width: 1023px) {
    .news__layout {
        grid-template-columns: 1fr;
        gap: var(--news-layout-gap);
    }

    .news__header {
        align-items: flex-start;
        margin-bottom: calc(var(--section-header-mb) - 4px);
    }

    .news__side {
        gap: var(--grid-gap-lg);
    }

    .news__divider {
        margin: 0;
    }

    .news__card--featured .news__card-link {
        display: block;
        height: auto;
    }

    .news__card-media--featured {
        flex: none;
        height: auto;
        min-height: var(--news-featured-h);
        aspect-ratio: 374 / 256;
    }

    .news__card-link--horizontal {
        flex-direction: column;
    }

    .news__card-media--thumb {
        flex: none;
        width: 100%;
        aspect-ratio: 374 / 256;
        align-self: auto;
        border-radius: 12px 12px 0 0;
    }

    .news__card-media--thumb img {
        padding: 0;
        border-radius: 0;
    }

    .news__card-link--horizontal .news__card-body {
        padding: var(--news-card-body-pad);
    }

    .news__card-title {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .news__card-link--horizontal .news__card-title {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 767px) {
    .news__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--btn-block-gap);
        margin-bottom: 20px;
    }

    .news__title {
        margin-bottom: 6px;
    }

    .news__card-body {
        padding: var(--news-card-body-pad);
    }

    .news__card-link--horizontal .news__card-body {
        padding: var(--news-card-body-pad);
    }

    .news__date {
        margin-bottom: 8px;
    }

    .news__card-title {
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .news__card-desc {
        margin-bottom: 12px;
    }

    .news__card:hover {
        transform: none;
    }
}

/* Scroll & load animations — homepage stagger */
.hero-banner__bg {
    animation: heroBannerZoom 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroBannerZoom {
    from {
        transform: scale(1.08);
    }

    to {
        transform: scale(1);
    }
}

.products__grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.products__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.products__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.products__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.08s; }
.products__grid .animate-on-scroll:nth-child(5) { transition-delay: 0.16s; }
.products__grid .animate-on-scroll:nth-child(6) { transition-delay: 0.24s; }

.projects__grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.projects__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.projects__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.projects__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .hero-banner__bg {
        animation: none;
    }
}
