/* Interactive 3D Corporate Footer — Alkhamis Group
   Layer 01/02 = Three.js canvas (background + atmosphere)
   Layer 03    = real, indexable HTML content                         */

.site-footer-3d {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #06266b 0%, #032f72 45%, #021c47 100%);
    color: #eaf1ff;
    isolation: isolate;
}

/* curved horizon transition from the page above into the footer */
.site-footer-3d__horizon {
    position: absolute;
    inset-block-start: -1px;
    inset-inline: 0;
    height: 64px;
    background: var(--sf-page-bg, #ffffff);
    clip-path: ellipse(60% 100% at 50% 0%);
    z-index: 3;
    pointer-events: none;
}

.site-footer-3d__canvas-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.site-footer-3d__canvas-layer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.site-footer-3d__watermark {
    position: absolute;
    inset-block-end: -6%;
    inset-inline: 0;
    text-align: center;
    font-size: clamp(90px, 18vw, 220px);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.04);
    letter-spacing: 0.05em;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.site-footer-3d__content {
    position: relative;
    z-index: 2;
    padding-block: 110px 0;
}

.site-footer-3d__grid {
    display: grid;
    grid-template-columns: 1.05fr repeat(3, 0.75fr) 1.1fr;
    gap: 32px;
    align-items: start;
}

.sf-brand__logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.sf-brand__logo img {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sf-brand__tag {
    color: #a9c2ef;
    font-size: 13.5px;
    max-width: 240px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.sf-social {
    display: flex;
    gap: 10px;
}

.sf-social a {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    color: #eaf1ff;
    transition: transform 0.25s ease, background 0.25s ease;
}

.sf-social a:hover {
    transform: translateY(-4px);
    background: rgba(46, 187, 50, 0.35);
}

.sf-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sf-col__toggle {
    display: none;
    margin-inline-start: auto;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #cfe0ff;
    font-size: 11px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s ease;
}

.sf-col.is-open .sf-col__toggle {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.14);
}

.sf-col__body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.35s ease;
}

.sf-col__body > ul {
    overflow: hidden;
    min-height: 0;
}

.sf-col h4 a {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.sf-col h4 a:hover {
    color: #68cfff;
    transform: none;
}
.sf-col h4 a::after {
    display: none;
}

.sf-col h4 .sf-underline {
    position: absolute;
    inset-block-end: -6px;
    inset-inline-start: 0;
    height: 2px;
    width: 30px;
    background: #45d64c;
    transform: scaleX(0);
    transform-origin: right center;
}
html[dir="ltr"] .sf-col h4 .sf-underline {
    transform-origin: left center;
}

.sf-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sf-col li {
    margin-bottom: 10px;
}

.sf-col a {
    color: #c3d3f2;
    font-size: 13.5px;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.sf-col a:hover {
    color: #fff;
    transform: translateX(-3px);
}
html[dir="ltr"] .sf-col a:hover {
    transform: translateX(3px);
}

.sf-col a::after {
    content: "";
    position: absolute;
    inset-block-end: -2px;
    inset-inline-start: 0;
    width: 0;
    height: 1px;
    background: #45d64c;
    transition: width 0.25s ease;
}

.sf-col a:hover::after {
    width: 100%;
}

/* Newsletter — hero green panel */
.sf-newsletter {
    position: relative;
    border-radius: 18px;
    padding: 28px 26px;
    background: radial-gradient(120% 140% at 20% 10%, #45d64c 0%, #2ebb32 55%, #1e9a26 100%);
    overflow: hidden;
    clip-path: inset(0 0 0 100%);
    box-shadow: 0 20px 50px rgba(20, 90, 25, 0.35);
}
html[dir="ltr"] .sf-newsletter {
    clip-path: inset(0 100% 0 0);
}
.sf-newsletter.is-open {
    clip-path: inset(0 0 0 0);
}

.sf-newsletter::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 55%);
    pointer-events: none;
}

.sf-newsletter h3 {
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.4;
}

.sf-newsletter p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13.5px;
    line-height: 1.8;
    margin: 0 0 20px;
}

.sf-newsletter__form {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.sf-newsletter__form input {
    flex: 1;
    border: none;
    padding: 13px 16px;
    font-size: 13.5px;
    outline: none;
    color: #163d1a;
    background: transparent;
    min-width: 0;
}

.sf-newsletter__btn {
    border: none;
    background: #16305e;
    color: #fff;
    width: 46px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.sf-newsletter__btn i {
    transition: transform 0.3s ease;
}

.sf-newsletter__btn:hover i {
    transform: translate(-3px, -3px) rotate(-8deg);
}
html[dir="ltr"] .sf-newsletter__btn:hover i {
    transform: translate(3px, -3px) rotate(8deg);
}

.sf-newsletter__note {
    display: block;
    margin-top: 12px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.8);
}

.sf-newsletter__success {
    display: none;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13.5px;
    margin-top: 12px;
}
.sf-newsletter__success.is-visible {
    display: flex;
}

/* Contact row */
.sf-contact {
    margin-top: 46px;
    padding-block: 22px;
    border-block: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
}

.sf-contact a,
.sf-contact span {
    color: #dce6fb;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.sf-contact a:hover {
    color: #68cfff;
}

.sf-contact .sf-sep {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

/* Bottom bar */
.sf-bottom {
    background: #021c47;
    padding-block: 16px;
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

.sf-bottom__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: #9db3dd;
}

.sf-bottom__inner > span:first-child {
    justify-self: start;
}

.sf-bottom__inner > span:last-child {
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sf-bottom img {
    height: 16px;
    vertical-align: middle;
    margin-inline-start: 0;
}

/* Elements revealed by the GSAP master timeline start hidden */
.sf-reveal {
    opacity: 0;
    transform: translateY(22px);
}

@media (prefers-reduced-motion: reduce) {
    .sf-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .sf-newsletter {
        clip-path: inset(0 0 0 0) !important;
    }
}

@media (max-width: 991px) {
    .site-footer-3d__grid {
        grid-template-columns: 1fr 1fr;
        row-gap: 36px;
    }
    .sf-newsletter {
        grid-column: 1 / -1;
        clip-path: inset(0 0 0 0) !important;
    }
    .sf-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575px) {
    .site-footer-3d__content {
        padding-block: 56px 0;
    }
    .site-footer-3d__grid {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }
    .site-footer-3d__canvas-layer {
        height: 220px;
        inset-block-end: auto;
    }
    .sf-brand {
        margin-bottom: 8px;
    }
    .sf-col {
        border-block-end: 1px solid rgba(255, 255, 255, 0.1);
        padding-block-end: 10px;
    }
    .sf-col h4 {
        margin-bottom: 0;
        padding-block: 12px 0;
    }
    .sf-col__toggle {
        display: flex;
    }
    .sf-col__body {
        grid-template-rows: 0fr;
    }
    .sf-col.is-open .sf-col__body {
        grid-template-rows: 1fr;
    }
    .sf-col__body > ul {
        padding-block-start: 10px;
    }
    .sf-newsletter {
        padding: 22px 20px;
        margin-block-start: 4px;
    }
    .sf-contact {
        margin-top: 28px;
        padding-block: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .sf-contact .sf-sep {
        display: none;
    }
    .sf-bottom {
        padding-block: 12px;
    }
    .sf-bottom__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }
}
