/* ===========================================
   CONTACT PAGE – MOBILE RESPONSIVE (344px–600px)
   =========================================== */

@media screen and (max-width: 600px) {

    /* Hero title bigger on mobile */
    #hero-caption .hero-title {
        font-size: 100px !important;
        line-height: 118px !important;
    }

    /* ============================================
       ISSUE 1: Pakistan Address Overlaps Form
       Let address container grow to fit all cards
       ============================================ */

    #clapat-page-content.light-content .contact-map-addresses .contact-addresses-half {
        height: auto !important;
        padding-bottom: 60px !important;
    }

    /* Center location cards on mobile */
    .contact-location {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .contact-addresses-half {
        align-items: center !important;
    }

    /* Push "let's talk" form down to avoid Pakistan address overlap */
    .content-row.row_padding_top.row_padding_bottom .contact-form-v2 {
        margin-top: 60px !important;
    }

    /* ============================================
       ISSUE 2: Footer Vertical Stack
       Nav Links → Copyright → Arrow + Socials
       ============================================ */

    /* FIX: Override parent footer constraints (height, overflow, pointer-events) */
    .clapat-footer {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        pointer-events: auto !important;
        position: relative !important;
    }

    /* Flex-wrap row layout: nav + copyright take full-width rows, arrow + socials share last row */
    .clapat-footer #footer-container {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 30px 20px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        gap: 10px !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
        /* Kill any grid remnants from contact.css */
        grid-template-columns: none !important;
        column-gap: 10px !important;
    }

    /* ----- ROW 1: Nav Links (full width, vertical stack) ----- */
    .clapat-footer #footer-container .footer-nav-links {
        order: 1 !important;
        flex: 1 1 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 5px !important;
        transform: translateX(-90px) !important;
        -webkit-transform: translateX(-90px) !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
        grid-column: unset !important;
        position: relative !important;
        float: none !important;
        flex-wrap: nowrap !important;
    }

    .clapat-footer #footer-container .footer-nav-links a {
        font-size: 16px !important;
        margin-top: 0 !important;
        display: block !important;
        float: none !important;
        opacity: 1 !important;
        color: #fff !important;
    }

    /* ----- ROW 2: Copyright (full width, centered) ----- */
    .clapat-footer #footer-container .footer-copyright-text {
        order: 2 !important;
        flex: 1 1 100% !important;
        display: block !important;
        text-align: center !important;
        transform: none !important;
        -webkit-transform: none !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        position: relative !important;
        float: none !important;
        grid-column: unset !important;
        margin: 5px 0 !important;
        white-space: normal !important;
        font-size: inherit !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* ============================================
       ISSUE 3: Hide "| Terms of Use | Privacy Policy"
       ============================================ */

    .clapat-footer #footer-container .footer-copyright-text span {
        font-size: 0 !important;
        visibility: hidden !important;
        line-height: 0 !important;
    }

    .clapat-footer #footer-container .footer-copyright-text span::before {
        content: "Copyright \00A9 2026. All Rights Reserved" !important;
        font-size: 16px !important;
        visibility: visible !important;
        color: #fff !important;
        display: block !important;
        line-height: 1.4 !important;
    }

    .clapat-footer #footer-container .footer-copyright-text span a {
        display: none !important;
    }

    /* ============================================
       ISSUE 4: Hide "Back to Top" Text
       ============================================ */

    .clapat-footer #footer-container #backtotop.button-wrap .button-text,
    .clapat-footer #footer-container #backtotop.button-wrap.left .button-text,
    .clapat-footer #footer-container #backtotop .button-text.sticky,
    .clapat-footer #footer-container #backtotop .button-text.sticky.left {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Kill the ::after clearing pseudo-element that becomes a flex child */
    .clapat-footer #footer-container #backtotop.button-wrap::after {
        display: none !important;
    }

    /* ============================================
       ISSUE 5: Arrow + Social Icons Row
       Arrow to the left, Social icons to the right
       ============================================ */

    /* Back to Top button — sits left on ROW 3 */
    /* Using calc(-50vw + offset) for responsive left-edge positioning:
       -50vw moves from center to left edge, +58px = 20px padding + 18px half-arrow + 20px left margin */
    .clapat-footer #footer-container #backtotop.button-wrap.left {
        order: 3 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        margin: 15px 0 0 -540px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        grid-column: unset !important;
        width: auto !important;
        height: auto !important;
        margin-bottom: 0 !important;
    }

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

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

    /* Arrow icon color */
    .clapat-footer #footer-container #backtotop .button-icon i {
        color: #4814ac !important;
        font-size: 16px !important;
        line-height: 36px !important;
    }

    /* Social Icons — sits right of arrow on ROW 3 */
    /* Using margin-left for reliable horizontal positioning */
    .clapat-footer #footer-container .socials-wrap {
        order: 4 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        float: none !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        margin-top: -51px !important;
        margin-right: 60px !important; /* Adjust this value to move socials right */
        padding: 0 !important;
        grid-column: unset !important;
        transform: none !important;
        -webkit-transform: none !important;
        transition: none !important;
        line-height: normal !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;
    }

    /* Prevent hover transform on socials-wrap */
    .clapat-footer #footer-container .socials-wrap:hover {
        transform: none !important;
        -webkit-transform: none !important;
    }

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

    /* Social icons: horizontal row */
    .clapat-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;
        -webkit-transform: none !important;
        text-align: center !important;
        width: auto !important;
        height: auto !important;
        line-height: normal !important;
        float: none !important;
        position: relative !important;
    }

    /* Each social icon */
    .clapat-footer #footer-container .socials-wrap .socials li {
        float: none !important;
        opacity: 1 !important;
        transform: none !important;
        -webkit-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;
        transition: none !important;
        position: relative !important;
    }

    /* Prevent hover re-transforms on individual social icons */
    .clapat-footer #footer-container .socials-wrap:hover .socials li {
        opacity: 1 !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

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

}
