/* Banner Image Styles */
.banner-container {
    position: relative;
    /* Reserve space to prevent layout shift - 16:9 aspect ratio */
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    /* Prevent layout shift */
    min-height: 400px;
}

/* Mobile: Reduce banner height for better performance */
@media (max-width: 768px) {
    .banner-container {
        aspect-ratio: 2 / 1; /* Taller on mobile, less data to load */
        min-height: 300px;
        max-height: 400px;
    }
}

.banner-image-overlay {
    position: absolute;
    top: 37%;
    left: 50%;
    transform: translateX(-50%);
    /* Prevent layout shift by reserving space */
    min-height: 200px;
    width: 100%;
    max-width: 1400px;
    padding: 0 15px;
    box-sizing: border-box;
    /* Ensure overlay doesn't cause shifts */
    will-change: transform;
    backface-visibility: hidden;
    /* Prevent text reflow */
    contain: layout style paint;
    /* Desktop: Prevent CLS */
    margin: 0;
}

/* Mobile: Fix overlay positioning to prevent CLS */
@media (max-width: 768px) {
    .banner-image-overlay {
        top: auto;
        bottom: 32px;
        transform: translateX(-50%);
        min-height: 150px;
        /* Reserve space to prevent shift */
        padding-bottom: 20px;
        margin: 0;
    }
}

.banner-image-overlay h1 {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 54px;
    line-height: 115%;
    /* color: var(--color-text-text-950); */
    width: 440px;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 5px 5px 5px #000;
}

.banner-image-overlay p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    /* color: var(--color-text-text-700); */
    width: 305px;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 3px 1px 4px #000;
}

.banner-image-overlay a {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 130%;
    color: #ffffff !important; /* Ensure sufficient contrast - WCAG AA compliant */
    padding: 10px 20px;
}

.banner-image-overlay a i {
    rotate: 330deg;
    margin-left: 10px;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Prevent layout shift */
    display: block;
    aspect-ratio: 16 / 9;
}

/* Ensure picture element doesn't cause layout shift */
.banner-container picture {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.banner-container picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Home Page Styles */
.achievements-full-width {
    width: 100%;
    background: white;
    border-bottom: 1px solid var(--color-neutral-neutral-200);
}

.achievements-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    width: 100%;
}

.achievement-item {
    flex: 1;
    border-right: 1px solid var(--color-neutral-neutral-200);
    padding: 20px 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.achievement-item:last-child {
    border-right: none;
}

.achievement-content {
    text-align: center;
    width: 100%;
}

.achievement-content.right {
    text-align: right;
}

.achievement-content.left {
    text-align: left;
}

.achievement-content p {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 42px;
    line-height: 120%;
    color: var(--color-text-text-950);
    margin-bottom: 8px;
}

.achievement-content span {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 21px;
    line-height: 130%;
    color: var(--color-text-text-950);
}

.service-trusted-container {
    padding-top: 64px;
}

.service-trusted-container p {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 54px;
    line-height: 115%;
    color: var(--color-text-text-950);
    margin-bottom: 30px;
}

.card-services {
    border-radius: 15px;
    border: 1px solid var(--color-neutral-neutral-200);
    position: relative;
    min-width: auto;
    min-height: 542px;
}

.card-services img {
    width: 100%;
    height: 100%;
    aspect-ratio: 192 / 293;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.card-services .services-text {
    height: 76px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-services span {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 18px;
    line-height: 130%;
    color: #27272a;
}

.card-services span i {
    rotate: 330deg;
}

/* Separate flip card component */
.card-services-flip {
    border-radius: 15px;
    border: 1px solid var(--color-neutral-neutral-200);
    position: relative;
    min-width: auto;
    min-height: 542px;
    background-image: url("../image/card-flip.webp");
    background-size: cover;
    background-position: center;
}

.card-services-flip .services-text-flip {
    height: 76px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 15px 15px;
}

.card-services-flip .services-text-flip span {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 18px;
    line-height: 130%;
    color: #fff;
}

.card-services-flip .services-text-flip span i {
    rotate: 330deg;
    color: #fff;
}

.why-choose-us-container {
    padding-top: 64px;
    padding-bottom: 64px;
}

.why-choose-us-container p {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 54px;
    line-height: 115%;
    color: var(--color-text-text-950);
    margin-bottom: 32px;
}

.card-why-choose-us {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 24px;
}

.card-why-choose-us p {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 26px;
    line-height: 125%;
    color: var(--color-text-text-950);
    margin-bottom: 0;
}

.card-why-choose-us span {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: var(--color-text-text-400);
}

.get-to-know-container {
    padding: 64px 0px;
    background: var(--color-neutral-neutral-100);
}

.get-to-know-container .row {
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.get-to-know-text {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 32px;
}

.get-to-know-text p {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 54px;
    line-height: 115%;
    color: var(--color-text-text-950);
    margin-bottom: 0;
}

.get-to-know-text span {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: var(--color-text-text-400);
}

.get-to-know-container .row img {
    border-radius: 12px;
    width: 500px;
    height: auto;
    object-fit: cover;
}

.feature-container {
    padding-top: 64px;
    padding-bottom: 64px;
    position: relative;
    z-index: 1;
    background-image: url("../image/w-vector.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 250px;
    min-height: 500px;
}

.feature-container .feature-title {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 54px;
    line-height: 115%;
    color: var(--color-text-text-950);
    margin-bottom: 0px;
}

/* Custom Accordion Styles */
.accordion-button::after {
    display: none !important;
}

.accordion-button::before {
    content: "+"; /* Plus icon */
    font-family: var(--second-family);
    font-weight: 600;
    font-size: 18px;
    transition: transform 0.2s ease-in-out;
    margin-left: auto;
    color: var(--color-text-text-950);
    position: absolute;
    right: 0;
    z-index: 10;
}

.accordion-button:not(.collapsed)::before {
    content: "-" !important;
    transform: rotate(0deg);
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 26px;
    line-height: 125%;
    color: var(--color-text-text-950);
}

.accordion-button.collapsed::before {
    content: "+" !important;
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 26px;
    line-height: 125%;
    color: var(--color-text-text-950);
}

.accordion-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.accordion-text {
    font-family: var(--second-family);
    font-weight: 700;
    font-size: 26px;
    line-height: 125%;
    color: var(--color-text-text-950);
}

.accordion-button {
    font-family: var(--second-family);
    font-weight: 600;
    font-size: 18px;
    line-height: 130%;
    color: var(--color-text-text-950);
    background-color: transparent;
    border: none;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-neutral-neutral-200);
    width: 100%;
    position: relative;
    border: transparent;
}

.accordion-header {
    border: transparent;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button:not(.collapsed) {
    background-color: transparent;
    color: var(--color-text-text-950);
    box-shadow: none;
}

.accordion-item {
    border: none;
    background: transparent;
}

.accordion-item:last-child {
    border: none;
}

.accordion-body {
    font-family: var(--second-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    color: var(--color-text-text-400);
    padding-left: 0;
    border-bottom: 1px solid var(--color-neutral-neutral-300);
}

.service-trusted-container .row {
    /* width: 100%; */
    overflow-x: scroll;
    flex-flow: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) and (min-width: 425px) {
    .banner-container {
        position: relative;
    }

    .banner-container::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 1) 100%
        );
        pointer-events: none;
        z-index: 1;
        opacity: 90%;
        height: 100%;
    }

    .banner-image {
        height: 100%;
        object-fit: cover;
    }

    .banner-container {
        aspect-ratio: 2 / 1;
        height: auto;
        min-height: 350px;
        max-height: 400px;
    }

    .banner-image-overlay {
        bottom: 32px;
        top: unset;
        z-index: 2;
        /* Prevent layout shift on mobile */
        position: absolute;
        transform: translateX(-50%);
        min-height: 150px;
        padding-bottom: 20px;
    }

    .banner-image-overlay h1 {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 32px;
        line-height: 120%;
        color: var(--color-text-text-950);
        width: unset;
        margin-bottom: 16px;
    }

    .banner-image-overlay p {
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 130%;
        color: var(--color-text-text-700);
        margin-bottom: 16px;
    }

    .achievements-content-wrapper {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .achievement-item {
        flex: 0 0 50%;
        border-right: 1px solid var(--color-neutral-neutral-200);
        border-bottom: 1px solid var(--color-neutral-neutral-200);
        min-height: 80px;
        padding: 20px 8px;
    }

    .achievement-item:nth-child(2) {
        border-right: 1px solid var(--color-neutral-neutral-200);
    }

    .achievement-item.last-item {
        flex: 0 0 100%;
        border-right: none;
        border-bottom: none;
    }

    .achievement-content {
        text-align: center !important;
    }

    .achievement-content.right,
    .achievement-content.left {
        text-align: center !important;
    }

    .achievement-content p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 24px;
        line-height: 125%;
        text-align: center;
        color: var(--color-text-text-950);
        margin-bottom: 0;
    }

    .achievement-content span {
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 130%;
        text-align: center;
        color: var(--color-text-text-950);
    }

    .service-trusted-container {
        max-width: 100dvh;
    }

    .service-trusted-container .service-trusted-title {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 32px;
        line-height: 120%;
        color: var(--color-text-text-950);
    }

    .service-trusted-container .row {
        /* width: 100%; */
        overflow-x: scroll;
        flex-flow: nowrap;
    }

    .why-choose-us-container p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 32px;
        line-height: 120%;
        color: var(--color-text-text-950);
    }

    .why-choose-us-container .row .col-12 {
        margin-bottom: 24px;
    }

    .why-choose-us-container .row .col-12 .card-why-choose-us p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 22px;
        line-height: 125%;
        color: var(--color-text-text-950);
    }

    .why-choose-us-container .row .col-12 .card-why-choose-us span {
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 130%;
        color: var(--color-text-text-400);
    }

    .get-to-know-container .row {
        flex-direction: column-reverse;
    }

    .get-to-know-container .row img {
        border-radius: 12px;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .get-to-know-text p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 32px;
        line-height: 120%;
        color: var(--color-text-text-950);
    }

    .get-to-know-text span {
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 130%;
        color: var(--color-text-text-400);
    }

    .feature-container {
        background-image: unset;
    }

    .feature-container .row {
        gap: 44px;
    }

    .feature-container .feature-title {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 32px;
        line-height: 120%;
        color: var(--color-text-text-950);
    }
}

@media (max-width: 424px) {
    .banner-container::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            126deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 1) 100%
        );
        pointer-events: none;
        z-index: 1;
        opacity: 48%;
        height: 100%;
    }

    .banner-image-overlay {
        position: absolute;
        top: auto;
        bottom: 32px;
        left: 50%;
        transform: translateX(-50%);
        /* Prevent layout shift */
        min-height: 120px;
        padding-bottom: 20px;
    }

    .banner-image {
        height: 100%;
        object-fit: cover;
    }

    .banner-container {
        aspect-ratio: 2 / 1;
        height: auto;
        min-height: 300px;
        max-height: 350px;
    }

    .banner-image-overlay h1 {
        font-size: 28px;
        margin-bottom: 20px;
        width: 100%;
    }

    .banner-image-overlay p {
        text-wrap-style: balance;
        margin-bottom: 20px;
        width: 100%;
    }

    .banner-image-overlay a {
        font-size: 14px;
        color: #ffffff !important; /* Ensure sufficient contrast on mobile */
    }

    .achievements-content-wrapper {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .achievement-item {
        flex: 0 0 50%;
        border-right: 1px solid var(--color-neutral-neutral-200);
        border-bottom: 1px solid var(--color-neutral-neutral-200);
        min-height: 60px;
    }

    .achievement-item:nth-child(2) {
        border-right: 1px solid var(--color-neutral-neutral-200);
    }

    .achievement-item.last-item {
        flex: 0 0 100%;
        border-right: none;
        border-bottom: none;
    }

    .achievement-content {
        text-align: center !important;
    }

    .achievement-content.right,
    .achievement-content.left {
        text-align: center !important;
    }

    .achievement-content p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 22px;
        line-height: 125%;
        text-align: center;
        color: var(--color-text-text-950);
        margin-bottom: 0;
    }

    .service-trusted-container .row {
        /* width: 100%; */
        overflow-x: scroll;
        flex-flow: nowrap;
    }

    .achievement-content span {
        font-size: 10px;
    }

    .service-trusted-container {
        padding-top: 32px;
    }

    .why-choose-us-container {
        padding-top: 32px;
        padding-bottom: calc(32px - 20px);
    }

    .service-trusted-container .service-trusted-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .why-choose-us-container p {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .why-choose-us-container .row .col-12 {
        margin-bottom: 20px;
    }

    .why-choose-us-container .row .col-12 .card-why-choose-us p {
        font-size: 18px;
    }

    .card-why-choose-us {
        gap: 15px;
    }

    .card-why-choose-us p {
        margin-bottom: 0;
    }

    .get-to-know-text p {
        font-size: 24px;
    }

    .get-to-know-container {
        padding: 32px 0px;
    }

    .get-to-know-text a {
        font-size: 14px;
    }

    .get-to-know-container .row {
        gap: 20px;
    }

    .get-to-know-container .row {
        flex-direction: column-reverse;
    }

    .get-to-know-container .row img {
        border-radius: 12px;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .get-to-know-text {
        gap: 20px;
    }

    .get-to-know-text span {
        font-size: 14px;
    }

    .card-why-choose-us span {
        font-size: 14px;
    }

    .feature-container {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .feature-container .feature-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .accordion-button {
        padding: 10px 0px;
    }

    .accordion-text {
        font-size: 18px;
    }

    .achievements-content-wrapper {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .achievement-item {
        flex: 0 0 50%;
        border-right: 1px solid var(--color-neutral-neutral-200);
        border-bottom: 1px solid var(--color-neutral-neutral-200);
        min-height: 80px;
        padding: 20px 8px;
    }

    .achievement-item:nth-child(2) {
        border-right: 1px solid var(--color-neutral-neutral-200);
    }

    .achievement-item.last-item {
        flex: 0 0 100%;
        border-right: none;
        border-bottom: none;
    }

    .achievement-content {
        text-align: center !important;
    }

    .achievement-content.right,
    .achievement-content.left {
        text-align: center !important;
    }

    .achievement-content p {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 22px;
        line-height: 125%;
        text-align: center;
        color: var(--color-text-text-950);
        margin-bottom: 0;
    }

    .achievement-content span {
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 12px;
        line-height: 130%;
        text-align: center;
        color: var(--color-text-text-950);
    }
}
