/* =========================================================
   PKL FOOTER — FINAL RESPONSIVE / MOBILE CORRECT
   Clean file. Replace the old footer.css completely.

   Desktop:
   - Pattern = side decoration
   - 4 columns + Contact row

   Tablet:
   - Pattern = narrower side decoration
   - 2 columns + Contact row

   Mobile:
   - Pattern = ONE visible image at the top (NOT repeated)
   - Content = full width below it
   - 1 column
   - Contact data stacked cleanly

   Arabic:
   - RTL
   - Tajawal
   - BLACK pattern
   - Pattern on right

   English:
   - LTR
   - WHITE pattern
   - Pattern on left

   No logo / no statement / no arrows / no hover
   ========================================================= */


/* =========================================================
   1) FONTS
   ========================================================= */

@font-face {
    font-family: "PKL Raleway";
    src: url("../fonts/Raleway-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PKL Raleway";
    src: url("../fonts/Raleway-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PKL Tajawal";
    src: url("../fonts/Tajawal-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PKL Tajawal";
    src: url("../fonts/Tajawal-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PKL Tajawal";
    src: url("../fonts/Tajawal-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   2) VARIABLES
   ========================================================= */

:root {
    --pkl-footer-cyan: #00c8f0;
    --pkl-footer-white: #f7f7f7;

    --pkl-footer-font-en: "PKL Raleway", Arial, sans-serif;
    --pkl-footer-font-ar: "PKL Tajawal", Tahoma, Arial, sans-serif;

    --pkl-footer-pattern-desktop: clamp(250px, 20vw, 390px);
    --pkl-footer-pattern-tablet: clamp(105px, 13vw, 150px);

    --pkl-footer-max: 1920px;
}


/* =========================================================
   3) ROOT
   ========================================================= */

.pkl-footer {
    position: relative;
    isolation: isolate;

    width: 100%;
    margin: 0;
    padding: 34px 0 12px;

    overflow: hidden;

    background: var(--pkl-footer-cyan);
    color: var(--pkl-footer-white);
}

.pkl-footer[lang="en"],
html[lang^="en"] .pkl-footer {
    direction: ltr;
    text-align: left;
    font-family: var(--pkl-footer-font-en);
}

.pkl-footer[lang="ar"],
html[lang^="ar"] .pkl-footer {
    direction: rtl;
    text-align: right;
    font-family: var(--pkl-footer-font-ar);
}


/* =========================================================
   4) PATTERN
   Important:
   use the real .pkl-footer__pattern element from footer.blade.php.
   No repeat-y. No tiled pattern.
   ========================================================= */

.pkl-footer__pattern {
    position: absolute;
    z-index: 0;

    top: 0;
    bottom: 0;

    width: var(--pkl-footer-pattern-desktop);
    height: 100%;

    pointer-events: none;

    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

/* EN = left / white */
.pkl-footer[lang="en"] > .pkl-footer__pattern,
html[lang^="en"] .pkl-footer > .pkl-footer__pattern {
    left: 0;
    right: auto;

    background-image:
        url("../images/footer/04-pkl-navy-diagonal-grid-white.png");
}

/* AR = right / black */
.pkl-footer[lang="ar"] > .pkl-footer__pattern,
html[lang^="ar"] .pkl-footer > .pkl-footer__pattern {
    right: 0;
    left: auto;

    background-image:
        url("../images/footer/04-pkl-navy-diagonal-grid-black.png");
}


/* =========================================================
   5) RESET / CLEANUP
   ========================================================= */

.pkl-footer *,
.pkl-footer *::before,
.pkl-footer *::after {
    box-sizing: border-box;
}

.pkl-footer a {
    color: inherit;
    text-decoration: none;
}

.pkl-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pkl-footer__top,
.pkl-footer__brand,
.pkl-footer__logo,
.pkl-footer__statement {
    display: none !important;
}

.pkl-footer__arrow,
.pkl-footer__arrow::before,
.pkl-footer__arrow::after {
    display: none !important;
    content: none !important;
}


/* =========================================================
   6) CONTAINER
   ========================================================= */

.pkl-footer__container {
    position: relative;
    z-index: 2;

    width: min(var(--pkl-footer-max), 100%);
    margin: 0 auto;
}


/* =========================================================
   7) DESKTOP PANEL
   ========================================================= */

.pkl-footer__panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    width: 100%;
    margin: 0;

    gap: 14px 28px;

    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Reserve physical pattern area on desktop */
.pkl-footer[lang="en"] .pkl-footer__panel,
html[lang^="en"] .pkl-footer__panel {
    padding:
        16px
        38px
        16px
        calc(var(--pkl-footer-pattern-desktop) + 38px);
}

.pkl-footer[lang="ar"] .pkl-footer__panel,
html[lang^="ar"] .pkl-footer__panel {
    padding:
        16px
        calc(var(--pkl-footer-pattern-desktop) + 38px)
        16px
        38px;
}


/* =========================================================
   8) COLUMNS
   ========================================================= */

.pkl-footer__column {
    min-width: 0;

    margin: 0;
    padding: 10px 4px 14px;

    border: 0 !important;
}

.pkl-footer__title {
    position: relative;

    width: fit-content;
    max-width: 100%;

    margin: 0 0 22px;

    color: var(--pkl-footer-white);

    font-size: clamp(20px, 1.25vw, 24px);
    font-weight: 500;
    line-height: 1.2;

    white-space: normal;
}

.pkl-footer__title::after {
    content: "";

    position: absolute;
    inset-inline-start: 0;
    bottom: -8px;

    width: 46px;
    height: 3px;

    border-radius: 999px;
    background: var(--pkl-footer-white);
}


/* =========================================================
   9) LINKS
   ========================================================= */

.pkl-footer__links {
    display: grid;
    grid-template-columns: 1fr;

    gap: 7px;
}

.pkl-footer__links li,
.pkl-footer__links a {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.pkl-footer__links a {
    display: inline-block;

    width: fit-content;
    max-width: 100%;

    color: var(--pkl-footer-white);

    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;

    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;

    transition: none !important;
    transform: none !important;
}

.pkl-footer[lang="ar"] .pkl-footer__links a,
html[lang^="ar"] .pkl-footer__links a {
    direction: rtl;
    text-align: right;

    font-size: 16px;
}

/* no hover */
.pkl-footer__links a:hover,
.pkl-footer__links a:focus,
.pkl-footer__links a:active {
    color: var(--pkl-footer-white);
    background: transparent;
    transform: none !important;
}


/* =========================================================
   10) CONTACT
   ========================================================= */

.pkl-footer__contact {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns:
        minmax(150px, .7fr)
        minmax(0, 2fr)
        auto;

    align-items: center;

    gap: 16px 24px;

    padding: 12px 4px 16px;
}

.pkl-footer__contact > .pkl-footer__title {
    margin: 0;
}

.pkl-footer__contact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px 22px;

    width: 100%;

    margin: 0;
    padding: 0;

    font-style: normal;
}

.pkl-footer__contact-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);

    align-items: center;

    gap: 10px;

    width: 100%;
    min-width: 0;

    color: var(--pkl-footer-white);

    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.pkl-footer[lang="ar"] .pkl-footer__contact-item,
html[lang^="ar"] .pkl-footer__contact-item {
    direction: rtl;
    text-align: right;

    font-size: 16px;
}

.pkl-footer__contact-item > span:last-child,
.pkl-footer__contact-item a {
    min-width: 0;

    white-space: normal;
    overflow-wrap: anywhere;
}

.pkl-footer__icon,
.pkl-footer__social-link {
    display: grid;
    place-items: center;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border: 2px solid var(--pkl-footer-white);
    border-radius: 50%;

    background: transparent;
    color: var(--pkl-footer-white);

    transition: none !important;
}

.pkl-footer__icon svg,
.pkl-footer__social-link svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pkl-footer__social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 0;
}

.pkl-footer__social-link:hover,
.pkl-footer__social-link:focus,
.pkl-footer__social-link:active {
    background: transparent;
    color: var(--pkl-footer-white);
    border-color: var(--pkl-footer-white);

    transform: none !important;
}


/* =========================================================
   11) BOTTOM
   ========================================================= */

.pkl-footer__bottom {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 62px;

    padding: 10px 54px;
}

.pkl-footer__copyright {
    margin: 0;

    color: var(--pkl-footer-white);

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;

    text-align: center;
}

.pkl-footer__back-top {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;

    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;

    transform: translateY(-50%);

    border: 2px solid var(--pkl-footer-white);
    border-radius: 50%;

    background: transparent;
    color: var(--pkl-footer-white);

    cursor: pointer;

    transition: none !important;
}

.pkl-footer__back-top svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.pkl-footer__back-top:hover,
.pkl-footer__back-top:focus,
.pkl-footer__back-top:active {
    transform: translateY(-50%) !important;

    background: transparent;
    color: var(--pkl-footer-white);
}


/* =========================================================
   12) TABLET — 768px to 1199px
   ========================================================= */

@media (min-width: 768px) and (max-width: 1199.98px) {

    .pkl-footer {
        padding-top: 26px;
    }

    .pkl-footer__pattern {
        width: var(--pkl-footer-pattern-tablet);
    }

    .pkl-footer__panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 8px 18px;
    }

    .pkl-footer[lang="en"] .pkl-footer__panel,
    html[lang^="en"] .pkl-footer__panel {
        padding:
            12px
            22px
            12px
            calc(var(--pkl-footer-pattern-tablet) + 24px);
    }

    .pkl-footer[lang="ar"] .pkl-footer__panel,
    html[lang^="ar"] .pkl-footer__panel {
        padding:
            12px
            calc(var(--pkl-footer-pattern-tablet) + 24px)
            12px
            22px;
    }

    .pkl-footer__column {
        padding: 10px 4px 13px;
    }

    .pkl-footer__title {
        margin-bottom: 20px;

        font-size: 20px;
    }

    .pkl-footer[lang="ar"] .pkl-footer__title,
    html[lang^="ar"] .pkl-footer__title {
        font-size: 21px;
    }

    .pkl-footer__links {
        gap: 6px;
    }

    .pkl-footer__contact {
        grid-column: 1 / -1;

        grid-template-columns: 1fr;

        gap: 13px;

        padding: 12px 4px 16px;
    }

    .pkl-footer__contact-list {
        grid-template-columns: 1fr 1fr;

        gap: 10px 18px;
    }

    .pkl-footer__social {
        margin-top: 2px;
    }
}

/* =========================================================
   13) MOBILE — <= 767px
   Reference layout:
   - Two content columns
   - Row 1: About / Projects
   - Row 2: Warehouses / Career
   - Contact below
   - Pattern remains decorative and does NOT steal content width
   ========================================================= */

@media (max-width: 767.98px) {

    .pkl-footer {
        padding: 20px 0 10px !important;
        overflow: hidden !important;
    }

    /* Keep the pattern visible but decorative only. */
    .pkl-footer__pattern {
        position: absolute !important;
        top: auto !important;
        bottom: 18px !important;

        width: 108px !important;
        height: 108px !important;

        opacity: .22 !important;

        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;

        pointer-events: none !important;
        z-index: 0 !important;
    }

    /* English pattern = left */
    .pkl-footer[lang="en"] > .pkl-footer__pattern,
    html[lang^="en"] .pkl-footer > .pkl-footer__pattern {
        left: 8px !important;
        right: auto !important;
    }

    /* Arabic pattern = right */
    .pkl-footer[lang="ar"] > .pkl-footer__pattern,
    html[lang^="ar"] .pkl-footer > .pkl-footer__pattern {
        right: 8px !important;
        left: auto !important;
    }

    .pkl-footer__container {
        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 16px !important;

        position: relative !important;
        z-index: 2 !important;
    }

    /*
     * Two-column mobile layout like the reference screenshot.
     * IMPORTANT: no side padding is reserved for the pattern.
     */
    .pkl-footer__panel,
    .pkl-footer[lang="en"] .pkl-footer__panel,
    .pkl-footer[lang="ar"] .pkl-footer__panel,
    html[lang^="en"] .pkl-footer__panel,
    html[lang^="ar"] .pkl-footer__panel {
        display: grid !important;

        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;

        column-gap: 22px !important;
        row-gap: 24px !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    /* Arabic auto-placement starts logically from the right. */
    .pkl-footer[lang="ar"] .pkl-footer__panel,
    html[lang^="ar"] .pkl-footer__panel {
        direction: rtl !important;
    }

    .pkl-footer[lang="en"] .pkl-footer__panel,
    html[lang^="en"] .pkl-footer__panel {
        direction: ltr !important;
    }

    /* Reset every old forced desktop/tablet position. */
    .pkl-footer__panel > .pkl-footer__column,
    .pkl-footer__panel > .pkl-footer__contact,
    .pkl-footer[lang="en"] .pkl-footer__panel > .pkl-footer__column,
    .pkl-footer[lang="ar"] .pkl-footer__panel > .pkl-footer__column,
    html[lang^="en"] .pkl-footer__panel > .pkl-footer__column,
    html[lang^="ar"] .pkl-footer__panel > .pkl-footer__column {
        grid-column: auto !important;
        grid-row: auto !important;

        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
    }

    /* Groups look like the supplied mobile reference. */
    .pkl-footer__column:not(.pkl-footer__contact) {
        padding: 0 !important;
    }

    .pkl-footer__title {
        width: fit-content !important;
        max-width: 100% !important;

        margin: 0 0 14px !important;

        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;

        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__title,
    html[lang^="ar"] .pkl-footer__title {
        font-size: 17px !important;
    }

    .pkl-footer__title::after {
        bottom: -6px !important;

        width: 34px !important;
        height: 2px !important;
    }

    .pkl-footer__links {
        display: grid !important;
        grid-template-columns: 1fr !important;

        gap: 8px !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .pkl-footer__links li {
        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .pkl-footer__links a {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.45 !important;

        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__links a,
    html[lang^="ar"] .pkl-footer__links a {
        font-size: 14px !important;
    }

    /*
     * Contact is below the four groups.
     * English = left column, Arabic = right column.
     * This mirrors the supplied reference.
     */
    .pkl-footer__contact,
    .pkl-footer[lang="en"] .pkl-footer__panel > .pkl-footer__contact,
    .pkl-footer[lang="ar"] .pkl-footer__panel > .pkl-footer__contact,
    html[lang^="en"] .pkl-footer__panel > .pkl-footer__contact,
    html[lang^="ar"] .pkl-footer__panel > .pkl-footer__contact {
        display: block !important;

        width: 100% !important;

        margin: 4px 0 0 !important;
        padding: 0 !important;
    }

    .pkl-footer[lang="en"] .pkl-footer__contact,
    html[lang^="en"] .pkl-footer__contact {
        grid-column: 1 !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__contact,
    html[lang^="ar"] .pkl-footer__contact {
        grid-column: 2 !important;
    }

    .pkl-footer__contact > .pkl-footer__title {
        margin-bottom: 15px !important;
    }

    .pkl-footer__contact-list {
        display: grid !important;
        grid-template-columns: 1fr !important;

        gap: 9px !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .pkl-footer__contact-item {
        display: grid !important;

        grid-template-columns: 34px minmax(0, 1fr) !important;

        gap: 8px !important;
        align-items: center !important;

        width: 100% !important;
        min-width: 0 !important;

        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__contact-item,
    html[lang^="ar"] .pkl-footer__contact-item {
        grid-template-columns: 34px minmax(0, 1fr) !important;

        font-size: 13px !important;
    }

    .pkl-footer__contact-item > span:last-child,
    .pkl-footer__contact-item a {
        min-width: 0 !important;

        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .pkl-footer__icon,
    .pkl-footer__social-link {
        width: 34px !important;
        height: 34px !important;

        flex: 0 0 34px !important;
    }

    .pkl-footer__icon svg,
    .pkl-footer__social-link svg {
        width: 16px !important;
        height: 16px !important;
    }

    .pkl-footer__social {
        display: flex !important;
        flex-wrap: wrap !important;

        gap: 7px !important;

        margin: 12px 0 0 !important;
    }

    /* Bottom spans the full footer width. */
    .pkl-footer__bottom {
        width: 100% !important;
        min-height: 54px !important;

        margin-top: 18px !important;

        padding: 8px 42px !important;
    }

    .pkl-footer__copyright {
        font-size: 10px !important;
        line-height: 1.35 !important;
    }

    .pkl-footer__back-top {
        width: 32px !important;
        height: 32px !important;

        inset-inline-start: 0 !important;
    }
}


/* =========================================================
   14) iPHONE / SMALL MOBILE — <= 430px
   ========================================================= */

@media (max-width: 430px) {

    .pkl-footer__container {
        padding: 0 12px !important;
    }

    .pkl-footer__panel,
    .pkl-footer[lang="en"] .pkl-footer__panel,
    .pkl-footer[lang="ar"] .pkl-footer__panel,
    html[lang^="en"] .pkl-footer__panel,
    html[lang^="ar"] .pkl-footer__panel {
        column-gap: 18px !important;
        row-gap: 22px !important;
    }

    .pkl-footer__title {
        font-size: 15px !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__title,
    html[lang^="ar"] .pkl-footer__title {
        font-size: 16px !important;
    }

    .pkl-footer__links a {
        font-size: 12px !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__links a,
    html[lang^="ar"] .pkl-footer__links a {
        font-size: 13px !important;
    }

    .pkl-footer__pattern {
        width: 92px !important;
        height: 92px !important;

        opacity: .18 !important;
    }
}


/* =========================================================
   15) VERY SMALL MOBILE — <= 360px
   Still two columns, but tighter.
   ========================================================= */

@media (max-width: 360px) {

    .pkl-footer__container {
        padding: 0 10px !important;
    }

    .pkl-footer__panel,
    .pkl-footer[lang="en"] .pkl-footer__panel,
    .pkl-footer[lang="ar"] .pkl-footer__panel,
    html[lang^="en"] .pkl-footer__panel,
    html[lang^="ar"] .pkl-footer__panel {
        column-gap: 14px !important;
        row-gap: 20px !important;
    }

    .pkl-footer__title {
        font-size: 14px !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__title,
    html[lang^="ar"] .pkl-footer__title {
        font-size: 15px !important;
    }

    .pkl-footer__links a {
        font-size: 11.5px !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__links a,
    html[lang^="ar"] .pkl-footer__links a {
        font-size: 12.5px !important;
    }

    .pkl-footer__contact-item {
        font-size: 11px !important;
    }

    .pkl-footer[lang="ar"] .pkl-footer__contact-item,
    html[lang^="ar"] .pkl-footer__contact-item {
        font-size: 12px !important;
    }

    .pkl-footer__pattern {
        width: 82px !important;
        height: 82px !important;
    }
}
