/* ============================================
   WHO WE ARE - Medium Screen Responsive Styles
   Screen Width: 601px to 695px
   ============================================ */

@media only screen and (min-width: 601px) and (max-width: 695px) {

    /* ----------------------------------------
       ISSUE 1: Technology-driven Company Heading
       Break into two lines: "Technology-driven" / "Company"
       ---------------------------------------- */

    /* Reduce heading font size and add word-break */
    .content-row.full h1[style*="font-size: 56px"] {
        font-size: 38px !important;
        line-height: 1.2 !important;
        padding: 0 20px !important;
        word-spacing: 100vw !important;
    }

    /* ----------------------------------------
       ISSUE 2: Section container padding
       ---------------------------------------- */

    /* Reduce outer container padding */
    .content-row.full > div[style*="padding: 0 60px"] {
        padding: 0 20px !important;
    }

    .content-row.full[style*="padding: 80px"] {
        padding: 50px 0 !important;
    }

    /* ----------------------------------------
       ISSUE 3: Stack Image Below Text
       ---------------------------------------- */

    /* Two-column layout → vertical stack */
    .content-row.full > div > div[style*="display: flex"][style*="gap: 40px"] {
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* Left text column - full width */
    .content-row.full > div > div[style*="display: flex"][style*="gap: 40px"] > div[style*="flex: 1"] {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* Right image column - full width, below text */
    .content-row.full > div > div[style*="display: flex"][style*="gap: 40px"] > div[style*="flex: 0 0 665px"] {
        flex: 1 1 100% !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Nucleus image - responsive */
    .content-row.full > div > div[style*="display: flex"][style*="gap: 40px"] > div[style*="flex: 0 0 665px"] img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* ----------------------------------------
       ISSUE 4: Text size adjustments
       ---------------------------------------- */

    /* Paragraphs */
    .content-row.full p[style*="font-size: 20px"] {
        font-size: 18px !important;
        line-height: 1.6 !important;
    }

    /* Mission/Vision headings */
    .content-row.full h3[style*="font-size: 26px"] {
        font-size: 24px !important;
    }

    /* ----------------------------------------
       ISSUE 5: Statistics Section
       Stack vertically with reordering
       ---------------------------------------- */

    /* Statistics outer container padding */
    .content-row.full[style*="padding: 0px 60px"] {
        padding: 0 20px !important;
    }

    /* Statistics flex container - vertical stack */
    .content-row.full[style*="padding: 0px 60px"] > div > div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }

    /* Statistics items - full width */
    .content-row.full[style*="padding: 0px 60px"] > div > div[style*="display: flex"] > div[style*="flex: 1"] {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    /* Reorder: Active Clients (1st child) = order 1 (default) */
    /* Reorder: Projects Done (2nd child) = order 2 (default) */

    /* Reorder: GCC & Beyond globe (3rd child) → last */
    .content-row.full[style*="padding: 0px 60px"] > div > div[style*="display: flex"] > div[style*="margin-top: -40px"] {
        order: 5 !important;
        margin-top: 0 !important;
    }

    /* Reorder: Glorious Years (4th child) → 3rd */
    .content-row.full[style*="padding: 0px 60px"] > div > div[style*="display: flex"] > div[style*="flex: 1"]:nth-child(4) {
        order: 3 !important;
    }

    /* Reorder: Team Advisors (5th child) → 4th */
    .content-row.full[style*="padding: 0px 60px"] > div > div[style*="display: flex"] > div[style*="flex: 1"]:nth-child(5) {
        order: 4 !important;
    }

    /* Statistics numbers */
    .content-row.full h2[style*="font-size: 64px"] {
        font-size: 46px !important;
    }

    /* ----------------------------------------
       ISSUE 6: Marquee logos
       ---------------------------------------- */

    .marquee-track img {
        width: 160px !important;
        height: 86px !important;
    }

    /* ============================================
       ISSUE 7: Footer Medium Layout
       Vertical Stack + Arrow aligned with Socials
       ============================================ */

    /* ----- Trusted by Businesses Section ----- */
    /* Hide entire blue gradient + "Trusted by Businesses" text */
    .content-row.full[style*="overflow: hidden"]:has(img[src*="page_end_gradient"]) {
        display: none !important;
    }

    /* Footer container */
    .clapat-footer.compact-footer {
        margin-top: 60px !important;
        height: auto !important;
        min-height: auto !important;
    }

    .clapat-footer.compact-footer #footer-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 15px 20px !important;
        padding-top: 60px !important;
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        gap: 0 !important;
    }

    /* ----- ROW 1: Footer Navigation (Full Width) ----- */
    .clapat-footer.compact-footer #footer-container .footer-middle {
        flex: 1 1 100% !important;
        order: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 3px !important;
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        pointer-events: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
    }

    /* Nav links - vertical stack */
    .clapat-footer.compact-footer .footer-middle nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 3px !important;
    }

    /* Nav link text color */
    .clapat-footer.compact-footer .footer-middle nav a {
        color: #02042a !important;
    }

    /* Copyright notice - hide Terms/Privacy, show only copyright */
    .clapat-footer.compact-footer .footer-middle > div[style*="font-size: 8px"] {
        display: block !important;
        visibility: hidden !important;
        font-size: 0 !important;
        text-align: center !important;
        margin-top: 5px !important;
        width: 100% !important;
        position: relative !important;
    }

    .clapat-footer.compact-footer .footer-middle > div[style*="font-size: 8px"] a {
        display: none !important;
    }

    .clapat-footer.compact-footer .footer-middle > div[style*="font-size: 8px"]::before {
        content: "Copyright \00A9 2026. All Rights Reserved" !important;
        visibility: visible !important;
        font-size: 16px !important;
        color: #02042a !important;
        display: block !important;
    }

    /* ----- ROW 2: Back to Top Arrow + Social Icons ----- */

    /* Back to Top Button */
    .clapat-footer.compact-footer #footer-container #backtotop.button-wrap.left {
        flex: 0 0 auto !important;
        order: 2 !important;
        position: relative !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        margin: 0 !important;
        margin-top: -8px !important;
        margin-right: auto !important;
        margin-left: -10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    /* Hide "Back to Top" text */
    .clapat-footer.compact-footer #footer-container #backtotop .button-text {
        display: none !important;
    }

    /* Arrow icon wrapper */
    .clapat-footer.compact-footer #footer-container #backtotop .icon-wrap {
        float: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        opacity: 1 !important;
        width: 36px !important;
        height: 36px !important;
    }

    .clapat-footer.compact-footer #footer-container #backtotop .button-icon {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
    }

    /* Purple arrow */
    .clapat-footer.compact-footer #footer-container #backtotop .button-icon i {
        color: #6315e5 !important;
        font-size: 16px !important;
        line-height: 36px !important;
    }

    /* Social Icons: Centered in row 2 */
    .clapat-footer.compact-footer #footer-container .socials-wrap {
        flex: 0 0 auto !important;
        order: 3 !important;
        position: relative !important;
        float: none !important;
        width: auto !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        padding: 0 !important;
        transform: translateX(-45px) !important;
    }

    /* Hide "Follow Us" text and share icon */
    .clapat-footer.compact-footer #footer-container .socials-wrap .socials-text,
    .clapat-footer.compact-footer #footer-container .socials-wrap .socials-icon {
        display: none !important;
    }

    /* Social icons: horizontal row */
    .clapat-footer.compact-footer #footer-container .socials-wrap .socials {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        transform: none !important;
        text-align: center !important;
        width: auto !important;
        height: auto !important;
        line-height: normal !important;
    }

    /* Each social icon */
    .clapat-footer.compact-footer #footer-container .socials-wrap .socials li {
        float: none !important;
        opacity: 1 !important;
        transform: none !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
    }

    .clapat-footer.compact-footer #footer-container .socials-wrap .socials li a {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 16px !important;
        color: #02042a !important;
    }

}
