/* Layout-only fixes shared by every page. Browser zoom uses these same breakpoints. */
html,
body {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow-x: clip;
}

/* Use the available screen width at normal browser zoom. */
.container,
.auto-container,
.footer-container,
.faq-wrapper,
.cos-container,
.cos-seo-container,
.outsourcing-container {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    padding-left: clamp(16px, 2vw, 48px);
    padding-right: clamp(16px, 2vw, 48px);
}

.page_header .container-fluid {
    max-width: none !important;
}

#cos-websites-showcase > div {
    max-width: none !important;
}

#partnerSlider {
    gap: 30px;
    animation: cosPartnerScroll 60s linear infinite;
}

#partnerSlider .photo {
    width: clamp(160px, 16vw, 240px);
    flex: 0 0 clamp(160px, 16vw, 240px);
}

#partnerSlider .photo img {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
}

@keyframes cosPartnerScroll {
    to { transform: translateX(calc(-1 * var(--partner-loop-width, 0px))); }
}

@media (prefers-reduced-motion: reduce) {
    #partnerSlider { animation: none; }
}

#canvas,
#box_wrapper {
    width: 100%;
    max-width: 100%;
}

.about-section .auto-container {
    padding-left: 15px;
    padding-right: 15px;
}

.header_absolute {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    margin-top: 0 !important;
    background-image: none !important;
}

/* Reserve the header's space instead of covering the banner underneath it. */
.header_absolute .page_header_wrapper,
.header_absolute .page_header {
    position: relative !important;
    top: auto !important;
    background-color: #1d1d1d !important;
    background-image: none !important;
    opacity: 1;
}

.page_header .container-fluid {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.page_header .container-fluid .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.page_header .row.align-items-center {
    min-height: 104px;
}

.page_header .logo img {
    width: 88px;
    max-width: 100%;
    height: auto;
}

.page_header .row.align-items-center > [class*="col-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.container {
    margin-left: auto;
    margin-right: auto;
}

/* Team members wrap into complete cards rather than a clipped fixed-height strip. */
.team-slider-wrapper {
    overflow: visible;
}

.team-slider-track,
#teamSlider,
#teamSlider2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
    gap: 20px;
    width: 100%;
    animation: none;
}

.team-slider-track .team-card,
#teamSlider2 .team-card,
.team-grid .team-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
}

.team-slider-track .team-image {
    height: auto;
    aspect-ratio: 3 / 4;
}

.team-slider-track .team-image img {
    object-position: center top;
}

#teamSlider2 .team-image-box {
    height: 260px;
}

.team-slider-track .team-content h3 {
    margin-top: 0;
}

.team-slider-track .team-content,
#teamSlider2 .team-content {
    overflow-wrap: anywhere;
}

.steps .step {
    min-width: 0;
}

.faq-section .faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
}

.faq-grid .card {
    min-width: 0;
    margin: 0;
    background: #272727;
    border: 1px solid #3a3a3a !important;
    border-radius: 12px;
    overflow: hidden;
}

.faq-grid .card:has(> .collapse.show),
.faq-grid .card:has(> .collapsing) { grid-column: 1 / -1; }
.faq-grid .card-header p { margin: 0; }

.faq-grid .card-header a {
    display: block;
    min-height: 80px;
    padding: 22px 64px !important;
    font-size: clamp(15px, 1vw, 18px) !important;
    font-weight: 600;
    line-height: 1.5;
    text-transform: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.faq-grid .card-header a::before { position: absolute; left: 20px; top: 22px; margin: 0; }
.faq-grid .card-header a::after { right: 20px; top: 20px; }
.faq-grid .card-header a:focus-visible { outline: 2px solid #fbb32d; outline-offset: -3px; }
.faq-grid .card-body { position: relative; padding: 0 24px 24px 64px; }
.faq-grid .card-body::before { left: 20px; top: 0; }
.faq-grid .card-body p { max-width: 110ch; font-size: 16px; line-height: 1.7; }

@media (max-width: 767px) {
    .faq-section .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .faq-grid .card-header a { padding: 18px 48px 18px 54px !important; }
    .faq-grid .card-header a::before { left: 14px; top: 18px; }
    .faq-grid .card-header a::after { right: 14px; top: 16px; }
    .faq-grid .card-body { padding: 0 18px 20px 54px; }
    .faq-grid .card-body::before { left: 14px; }
}

/* Expanded About Us panels use the whole row rather than leaving a tall gap. */
.about-services-accordion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.about-services-accordion > .box-in-content { display: contents; }
.about-services-accordion .box { min-width: 0; margin: 0; }
.about-services-accordion .box:has(.accordion[aria-expanded="true"]) { grid-column: 1 / -1; }

.about-services-accordion .accordion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    font-size: clamp(16px, 1.1vw, 20px);
}

.about-services-accordion .accordion::after { content: "+"; flex-shrink: 0; font-size: 24px; }
.about-services-accordion .accordion[aria-expanded="true"]::after { content: "−"; }
.about-services-accordion .accordion:focus-visible { outline: 2px solid #fbb32d; outline-offset: -3px; }
.about-services-accordion .content { padding: 22px 24px; }
.about-services-accordion .content p { max-width: 100ch; font-size: clamp(15px, 1vw, 18px); }
.about-services-accordion .content p:last-child { margin-bottom: 0; }

@media (min-width: 1024px) {
    .about-services-accordion .content { columns: 2; column-gap: 40px; }
    .about-services-accordion .content p { break-inside: avoid; }
}

@media (max-width: 767px) {
    .about-services-accordion { grid-template-columns: minmax(0, 1fr); }
    .about-services-accordion .accordion,
    .about-services-accordion .content { padding: 18px; }
}

/* Share title/number/content rows so wrapped headings cannot bend the line. */
@media (min-width: 768px) {
    .steps {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        column-gap: 24px;
    }

    .steps .step {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 3;
        padding-right: 0;
    }

    .steps .step .step-top { display: contents; }
    .steps .step .step-title { grid-row: 1; }
    .steps .step .step-content { grid-row: 3; }

    .steps .step .step-bullet {
        grid-row: 2;
        width: 100%;
        border-radius: 0;
        background: none;
        text-align: left;
    }

    .steps .step .step-bullet::before {
        display: block;
        position: relative;
        z-index: 1;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #7470fc;
        text-align: center;
    }

    .steps .step .step-bullet::after {
        left: 20px;
        width: calc(100% + 24px);
    }

    .steps .step:last-child .step-bullet::after { display: none; }
}

.page_title {
    height: auto !important;
    min-height: 280px;
}

.page_title > .container {
    padding-top: 55px;
    padding-bottom: 55px;
}

@media (min-width: 1200px) {
    .page_header .sf-menu > li > a {
        margin-left: clamp(10px, 1.2vw, 22px);
        margin-right: clamp(10px, 1.2vw, 22px);
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .page_header.line-header .sf-menu > li > a::before {
        bottom: 22px;
    }
}

.outsourcing-wrapper > *,
.service-grid > *,
.team-grid > *,
#teamSlider1 > *,
.faq-column,
.faq-left,
.faq-right,
.divide-by-content,
.footer-box,
.align-section > * {
    min-width: 0;
}

.contact-item a,
.footer-box,
.item-content {
    overflow-wrap: anywhere;
}

@media (max-width: 1199px) {
    .page_header .row.align-items-center {
        min-height: 80px;
    }

    .page_header .logo img {
        width: 64px;
    }

    .page_header .toggle_menu {
        top: 10px;
        right: 10px;
        margin-top: 0;
    }

    .page_title {
        min-height: 240px;
    }

    .page_title > .container {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .container {
        max-width: calc(100% - 30px);
        margin-left: auto;
        margin-right: auto;
    }

    .top-nav .sf-menu {
        max-width: calc(100% - 60px);
        overflow-y: auto;
    }

    .icon-box[style*="width:"] {
        max-width: 100%;
        height: auto !important;
        min-height: 300px;
    }

}

@media (max-width: 991px) {
    .align-section.service-item.vertical-item > .item-media {
        flex-basis: auto !important;
        width: 100%;
    }

    .align-section.service-item.vertical-item > .item-media img {
        height: auto !important;
    }

    .fed-section {
        flex-direction: column;
    }

    .fed-section > *,
    .services,
    .box-in-content {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .steps .step .step-top {
        flex-direction: row-reverse;
        justify-content: flex-end;
        align-items: flex-start;
    }

    .steps .step .step-title {
        min-width: 0;
    }

    .steps .step .step-title h6 {
        margin-top: 0;
        margin-bottom: 10px;
    }

    .steps .step .step-bullet {
        flex-shrink: 0;
    }

    .steps .step:last-child .step-bullet::after {
        display: none;
    }

    .team-slider-track,
    #teamSlider,
    #teamSlider2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    #teamSlider2 .team-image-box {
        height: 180px;
    }

    .team-slider-track .team-content,
    #teamSlider2 .team-content {
        padding: 14px 8px;
    }

    .page_slider .cover-image {
        min-height: 540px;
    }

    .page_slider .intro_layers {
        padding-top: 30px;
        padding-bottom: 40px;
    }

    .page_slider .intro_layers .intro_layer h3 {
        font-size: clamp(22px, 5vw, 30px);
    }

    .page_slider .intro_layer p,
    p {
        line-height: 1.6;
    }

    .about-section .image-column .image-block:nth-child(1),
    .about-section .image-column .image-block:nth-child(2) {
        margin-left: 0;
        margin-right: 0;
    }

    .about-section .image-column .image-block:nth-child(2) {
        margin-top: 20px;
    }

    .custom-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .footer-container,
    .divide-by-content,
    .footer-box {
        max-width: 100%;
    }

    .footer-box ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px !important;
    }

    .horizontal-line,
    .slider-image {
        max-width: 100%;
    }

    .slider-image {
        height: auto;
    }

    .uppur-button {
        flex-wrap: wrap;
        gap: 15px;
    }

    .btn,
    .read-more-btn {
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content-text.active {
        max-height: none;
    }
}

@media (max-width: 359px) {
    .team-slider-track,
    #teamSlider,
    #teamSlider2,
    #teamSlider1,
    .team-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #teamSlider2 .team-image-box {
        height: 260px;
    }
}
