﻿
@keyframes footerFadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
} 

@keyframes footerIconPop {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-15deg);
    }

    70% {
        transform: scale(1.15) rotate(4deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes footerLinkSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* base hidden state — JS adds .footer-visible to trigger */
.footer-anim {
    opacity: 0;
    animation-fill-mode: forwards;
    animation-duration: 0.65s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-delay: var(--d, 0s);
}

.footer.footer-visible .footer-anim {
    animation-name: footerFadeUp;
}

/* special override for icons */
.footer.footer-visible .social-icons-row .social-icon {
    opacity: 0;
    animation: footerIconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

    .footer.footer-visible .social-icons-row .social-icon:nth-child(1) {
        animation-delay: 0.30s;
    }

    .footer.footer-visible .social-icons-row .social-icon:nth-child(2) {
        animation-delay: 0.38s;
    }

    .footer.footer-visible .social-icons-row .social-icon:nth-child(3) {
        animation-delay: 0.46s;
    }

    .footer.footer-visible .social-icons-row .social-icon:nth-child(4) {
        animation-delay: 0.54s;
    }

/* special override for links */
.footer.footer-visible .links-row .footer-link {
    opacity: 0;
    animation: footerLinkSlide 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

    .footer.footer-visible .links-row .footer-link:nth-child(1) {
        animation-delay: 0.40s;
    }

    .footer.footer-visible .links-row .footer-link:nth-child(2) {
        animation-delay: 0.47s;
    }

    .footer.footer-visible .links-row .footer-link:nth-child(3) {
        animation-delay: 0.54s;
    }

    .footer.footer-visible .links-row .footer-link:nth-child(4) {
        animation-delay: 0.61s;
    }

    .footer.footer-visible .links-row .footer-link:nth-child(5) {
        animation-delay: 0.68s;
    }

    .footer.footer-visible .links-row .footer-link:nth-child(6) {
        animation-delay: 0.75s;
    }


/* ── FOOTER BASE ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

.footer {
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
    direction: rtl;
    font-family: 'Alexandria', sans-serif;
}

.footer-bg-image {
    position: relative;
    width: 100%;
    line-height: 0;
}

    .footer-bg-image img {
        width: 100%;
        height: auto;
        display: block;
        vertical-align: bottom;
    }

.footer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%;
    text-align: center;
    color: white;
    z-index: 10;
    padding: 20px;
}

/* Logo */
.logo-section {
    margin-bottom: 20px;
}

.logo img {
    height: 80px;
    width: auto;
}

/* Home button */
.home-button-section {
    margin-bottom: 22px;
}

.home-btn {
    display: inline-block;
    background: rgba(255,255,255,0.9);
    color: #2c5aa0;
    padding: 14px 40px;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Alexandria', sans-serif;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

    .home-btn:hover {
        background: white;
        color: #2c5aa0;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

.follow-label {
    font-size: 1.9rem;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    margin-bottom: 14px;
    font-family: 'Alexandria', sans-serif;
}

/* Social icons row */
.social-icons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 22px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

    .social-icon:hover {
        background: rgba(255,255,255,0.25);
        color: white;
        transform: translateY(-4px) scale(1.1);
        box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    }

    .social-icon i {
        font-size: 1.2rem;
    }

/* Nav links */
.footer-links {
    margin-bottom: 18px;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.footer-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 1.05rem;
    padding: 0 16px;
    border-left: 1px solid rgba(255,255,255,0.3); /* RTL: separator on left */
    font-family: 'Alexandria', sans-serif;
    transition: color 0.25s, transform 0.25s;
    white-space: nowrap;
}

    /* rightmost item (first in RTL row) — no separator */
    .footer-link:first-child {
        border-left: 1px solid rgba(255,255,255,0.3);
    }

    .footer-link:last-child {
        border-left: none;
    }

    .footer-link:hover {
        color: white;
        transform: translateY(-2px);
    }

/* Copyright */
.copyright p {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-family: 'Alexandria', sans-serif;
}


/* =====================================================
   ABOUT SECTION — Arabic RTL
   ===================================================== */

.about-section-ar {
    background-color: #f8f9fa;
    padding: 70px 0;
}

/* outer wrapper just centers the group */
.about-inner-ar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    direction: rtl;
    max-width: 1400px;
    margin: 0 auto;
    padding-right:230px;
}

.about-title-ar {
    min-width: 250px;
    text-align: right;
    line-height: 1.3;
    flex-shrink: 0;
    
}

    .about-title-ar h5 {
        color: #005AA9;
        font-size: 2.5rem;
        font-weight: 300;
        margin: 0;
        font-family: 'Alexandria', sans-serif;
    }

    .about-title-ar h3 {
        color: #005AA9;
        font-size: 2.5rem;
        font-weight: 400;
        margin: 0;
        font-family: 'Alexandria', sans-serif;
    }

    .about-title-ar h2 {
        color: #175BA7;
        font-size: 2rem;
        font-weight: 700;
        margin: 0;
        font-family: 'Alexandria', sans-serif;
    }

.rotating-images {
    position: relative;
    width: 300px;
    height: 300px;
    min-width: 300px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 auto;
    right:110px;
}

.rotating-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.85) rotate(-8deg);
    transition: opacity 1s ease, transform 1s ease;
}

    .rotating-img.active {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        z-index: 5;
        animation: gentleSpin 8s infinite alternate;
    }


.about-description-ar {
    flex: 1;
    font-size: 1.3rem;
    color: #175BA7;
    font-weight: 300;
    line-height: 1.85;
    font-family: 'Alexandria', sans-serif;
    text-align: right;
    padding-right: 230px;
}


/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    .footer-content {
        width: 90%;
    }

    .logo img {
        height: 70px;
    }

    .follow-label {
        font-size: 1.6rem;
    }
}

@media (max-width: 1024px) {
    .footer-content {
        width: 92%;
    }

    .logo img {
        height: 65px;
    }

    .home-btn {
        padding: 12px 35px;
        font-size: 1rem;
    }

    .follow-label {
        font-size: 1.5rem;
    }

    .social-icon {
        width: 42px;
        height: 42px;
    }

    .footer-link {
        font-size: 0.95rem;
    }

    .about-inner-ar {
        max-width: 820px;
        gap: 30px;
        justify-content: center;
        padding-right: 0 !important; /* إلغاء الإزاحة */
    }

    .rotating-images {
        width: 240px;
        height: 240px;
        min-width: 240px;
        margin: 0 auto;
        right: 0 !important; /* إلغاء right:110px */
        left: auto;
        position: relative;
    }

    .about-description-ar {
        font-size: 1.2rem;
        padding-right: 0 !important; /* إلغاء الإزاحة */
    }
}

@media (max-width: 991px) {
    .about-inner-ar {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        padding: 0 !important;
        max-width: 100%;
    }

    .about-title-ar {
        width: auto;
        text-align: center;
    }

    .about-description-ar {
        text-align: center;
        font-size: 1.15rem;
        padding: 0 !important;
    }

    .rotating-images {
        width: 220px;
        height: 220px;
        min-width: 220px;
        margin: 0 auto;
        right: 0 !important;
        left: auto;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rotating-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 900px) {
    .footer-content {
        width: 95%;
    }

    .logo img {
        height: 60px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .footer {
        left: 0;
        right: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .footer-bg-image {
        display: none;
    }

    .footer-content {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        padding: 40px 20px;
        background: linear-gradient(135deg, #114C8D 0%, #0a1a3a 100%);
    }

    .logo img {
        height: 55px;
    }

    .home-btn {
        padding: 10px 30px;
        font-size: 0.9rem;
    }

    .follow-label {
        font-size: 1.3rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

        .social-icon i {
            font-size: 1.1rem;
        }

    .links-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-link {
        border-left: none;
        padding: 0;
        font-size: 0.9rem;
        white-space: normal;
    }

    .copyright p {
        font-size: 0.85rem;
    }

    .about-section-ar {
        padding: 50px 20px;
    }

    .rotating-images {
        width: 180px;
        height: 180px;
        min-width: 180px;
        margin: 0 auto;
        right: 0 !important;
        left: auto;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rotating-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .about-inner-ar {
        padding: 0 !important;
    }

    .about-description-ar {
        padding: 0 !important;
    }
}

@media (max-width: 600px) {
    .footer-content {
        padding: 35px 15px;
        background: linear-gradient(135deg, #0a1a3a 0%, #0d1f44 100%);
    }

    .logo img {
        height: 50px;
    }

    .home-btn {
        padding: 9px 28px;
        font-size: 0.85rem;
    }

    .follow-label {
        font-size: 1.2rem;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }

    .footer-link {
        font-size: 0.85rem;
    }

    .copyright p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 30px 12px;
    }

    .logo img {
        height: 45px;
    }

    .home-btn {
        padding: 8px 25px;
        font-size: 0.8rem;
    }

    .follow-label {
        font-size: 1.1rem;
    }

    .social-icons-row {
        gap: 12px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

        .social-icon i {
            font-size: 0.9rem;
        }

    .copyright p {
        font-size: 0.75rem;
    }

    .rotating-images {
        width: 150px;
        height: 150px;
        min-width: 150px;
        margin: 0 auto;
        right: 0 !important;
    }

    .rotating-img {
        object-fit: cover;
    }

    .about-description-ar {
        padding: 0 !important;
    }
}

@media (max-width: 380px) {
    .footer-content {
        padding: 25px 10px;
    }

    .logo img {
        height: 40px;
    }

    .home-btn {
        padding: 7px 22px;
        font-size: 0.75rem;
    }

    .follow-label {
        font-size: 1rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

        .social-icon i {
            font-size: 0.8rem;
        }

    .copyright p {
        font-size: 0.7rem;
    }
}