/* ============================================================
   FOOTER CSS — LEAP RD&O
   Includes: footer layout, columns, social links, map,
   back-to-top button, news popup
   ============================================================ */

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 40px 40px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    border-radius: 40px 40px 0 0;
}

@media (min-width: 768px) {
    footer {
        padding: 100px 40px 40px;
        border-radius: 60px 60px 0 0;
    }
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(206, 206, 206, 0.03) 0%, transparent 50%);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    margin-bottom: 15px;
}

.footer-brand .footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 15px;
}

.footer-brand .tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-weight: 300;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 15px;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    font-family: 'Almarai', sans-serif;
}

.footer-column ul {
    list-style: none;
    padding-right: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.listThem ul {
    list-style: circle;
    padding-right: 28px;
}

/* Remove ::after pseudo-element from all footer links */
.footer-column ul li a,
.footer-column a,
footer a,
footer .social-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
    position: static !important;
}

.footer-column ul li a::after,
.footer-column ul li a::before,
.footer-column a::after,
.footer-column a::before,
footer a::after,
footer a::before,
footer ul li a::after,
footer ul li a::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    border: none !important;
    position: static !important;
}

.footer-column ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul li a:hover,
.footer-column a:hover {
    color: #37B3E3;
}

/* ── Contact icons ── */
.footer-contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer-contact-icon svg {
    width: 100%;
    height: 100%;
}

.phone-number {
    direction: ltr;
    display: inline-block;
}

/* ── Social links ── */
.social-links {
    display: flex;
    gap: 15px;
    /* margin-top: 30px; */
}
.footer-company-desc{
margin-top:20px
}
.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.social-links a:hover svg g,
.social-links a:hover svg path {
    fill: #37b3e3;
}

/* ── Footer bottom bar ── */
.footer-bottom {
    text-align: center;
    padding-top: 30px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ── Footer map ── */
.footer-map {
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    direction: ltr;
    position: relative;
}

.footer-map iframe {
    width: 100%;
    height: 280px;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
    border-radius: 20px;
}

.footer-map:hover iframe {
    filter: grayscale(50%);
}

.footer-map-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1d1d1d;
    padding: 20px 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    direction: rtl;
    white-space: nowrap;
}

.footer-map-btn > span {
    font-size: medium;
}

@media (min-width: 768px) {
    .footer-map-btn > span {
        font-size: large;
    }
}

.footer-map-btn:hover {
    background: rgba(55, 179, 227, 0.9);
    color: #fff;
    border-color: rgba(55, 179, 227, 0.5);
}

.footer-map-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ============================================================
   NEWS POPUP
   ============================================================ */
.popup-overlay {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: auto;
    height: auto;
    background: none;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-120%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.popup-card {
    background: #ffffff;
    border-radius: 20px;
    width: 380px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
}

.popup-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.popup-close:hover {
    background: #ffffff;
    transform: rotate(90deg);
}

.popup-close svg {
    width: 16px;
    height: 16px;
    color: #1d1d1d;
}

.popup-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1d1d1d;
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.popup-content {
    padding: 20px;
    text-align: right;
}

.popup-content h3 {
    font-family: 'Almarai', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #1d1d1d;
    margin-bottom: 10px;
    line-height: 1.6;
}

.popup-content p {
    font-size: 13px;
    color: #666666;
    line-height: 1.7;
    margin-bottom: 15px;
}

.popup-cta {
    display: inline-block;
    background: #1d1d1d;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
}

.popup-cta:hover {
    color: #37b3e3 !important;
    background-color: transparent;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: #37b3e3;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1d1d1d;
    transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE — Footer
   ============================================================ */
@media (max-width: 1200px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-column ul li a {
        justify-content: center;
    }

    .listThem ul {
        list-style: none;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    /* Footer contact icon stacks on top of text */
    .footer-column ul li a {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        justify-content: center;
    }

    .footer-contact-icon {
        margin-bottom: 5px;
    }

    /* Footer mobile centering */
    .footer-brand {
        text-align: center;
    }

    .footer-brand .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-column ul li a {
        justify-content: center;
    }

    .listThem ul {
        list-style: none;
        padding-right: 0;
    }

    /* Popup mobile */
    .popup-overlay {
        bottom: 15px;
        left: 15px;
        right: 15px;
    }

    .popup-card {
        width: 100%;
        border-radius: 16px;
    }

    .popup-image {
        height: 225px;
    }

    .popup-content {
        padding: 15px;
    }

    .popup-content h3 {
        font-size: 15px;
    }

    .popup-content p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .popup-cta {
        width: 100%;
        text-align: center;
        padding: 11px 20px;
        font-size: 13px;
    }
}
