/*
Theme Name: NAF
Theme URI: https://nafnfc.com
Author: NAF Team
Description: Minimalist corporate theme for NAF NFC.
Version: 2.2.0 (Final Golden Master)
*/

/* =========================================
   1. DESKTOP / GLOBAL OVERRIDES (الأوامر العليا)
   ========================================= */

/* إخفاء زر الهمبرغر على الديسكتوب */
.menu-toggle {
    display: none !important;
}

/* تكبير اللوغو على الديسكتوب */
.site-logo {
    height: 85px !important;
    width: auto;
    transition: all 0.3s ease;
}

/* تنسيق القائمة على الديسكتوب (أفقية) */
.naf-menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    
    /* تصفير ستايلات الموبايل */
    position: static;
    background: transparent;
    box-shadow: none;
    border: none;
    width: auto;
    transform: none;
}

.naf-menu li { border: none; margin: 0; }

.naf-menu li a {
    text-decoration: none;
    color: var(--naf-secondary);
    font-weight: 700;
    font-size: 1rem;
    padding: 0;
}

.naf-menu li a:hover {
    color: var(--naf-primary);
    background: none;
    padding-left: 0;
}

/* ===========================================================
   2. VARIABLES & RESET & GLOBAL
   =========================================================== */
:root {
  --naf-primary: #c5a45c;
  --naf-primary-light: #d4ba7f;
  --naf-primary-dark: #a88b45;
  --naf-secondary: #0b1b3f;
  --naf-secondary-light: #162c5c;
  --naf-secondary-dark: #060f24;
  --naf-bg-default: #f8f9fa;
  --naf-bg-paper: #ffffff;
  --naf-text-primary: #0b1b3f;
  --naf-text-secondary: #5a6a8b;
  --naf-font-family: 'Inter', -apple-system, sans-serif;
}

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

body { 
    margin: 0; padding: 0; 
    font-family: var(--naf-font-family); 
    background: var(--naf-bg-default); 
    color: var(--naf-text-primary); 
    line-height: 1.7; 
    overflow-x: hidden;
    scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }

.container { 
    max-width: 1200px; 
    width: 100%; 
    margin-left: auto !important; 
    margin-right: auto !important; 
    padding-left: 20px;
    padding-right: 20px;
    display: block; 
}

/* ===========================================================
   3. SITE HEADER (STRUCTURE)
   =========================================================== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

.header-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Columns */
.logo-col { flex-shrink: 0; }
.menu-col { flex-grow: 1; display: flex; justify-content: center; }
.social-col { flex-shrink: 0; display: flex; }

/* Socials */
.header-socials { display: flex; gap: 10px; }
.header-socials a {
    width: 36px; height: 36px; border-radius: 50%;
    background-color: #f0f2f5; color: var(--naf-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: all 0.3s ease;
}
.header-socials a:hover {
    background-color: var(--naf-primary); color: #fff; transform: translateY(-2px);
}

.naf-menu li a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; background-color: var(--naf-primary);
    transition: width 0.3s ease;
}
.naf-menu li a:hover::after { width: 100%; }

/* ===========================================================
   4. HERO SECTION (Layout & 3D Rotator)
   =========================================================== */
.hero-section { 
    background: var(--naf-secondary); 
    color: #fff; 
    padding: 80px 0; 
    width: 100%;
    overflow: hidden;
    display: flex; justify-content: center;
}

.hero-section .container { 
    display: flex; align-items: center; justify-content: center; 
    gap: 80px; max-width: 1100px; width: 100%;
}

.hero-content { flex: 0 1 550px; }

.hero-title { 
    font-size: 3rem; color: var(--naf-primary); 
    margin-bottom: 20px; line-height: 1.2;
}

.hero-description { 
    font-size: 1.1rem; color: rgba(255,255,255,0.9); 
    margin-bottom: 30px; 
}

.hero-buttons { display: flex; gap: 15px; }

.hero-btn-primary { 
    background: var(--naf-primary); color: #fff; 
    padding: 12px 35px; border-radius: 50px; 
    font-weight: 600; font-size: 1rem;
    box-shadow: 0 5px 15px rgba(197, 164, 92, 0.2);
    white-space: nowrap; 
}
.hero-btn-primary:hover { 
    background: #fff; color: var(--naf-secondary); 
    transform: translateY(-2px); 
}

/* Rotator */
.hero-image-wrapper {
    flex: 0 1 500px; 
    display: flex; justify-content: center; align-items: center;
    perspective: 1500px; z-index: 10;
}

.card-rotator {
    position: relative; width: 350px; height: 220px;
    margin: 0 auto; transform-style: preserve-3d;
    animation: floatCard 6s ease-in-out infinite;
}

.rotating-card {
    position: absolute; top: 0; left: 0;
    width: 100%; height: auto; border-radius: 20px;
    backface-visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0; transform: rotateY(180deg) scale(0.5) translateZ(-100px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.rotating-card.active {
    opacity: 1; transform: rotateY(-10deg) rotateX(5deg) scale(1);
    z-index: 2; box-shadow: 20px 30px 60px rgba(197, 164, 92, 0.2); 
}

.rotating-card.exit {
    opacity: 0; transform: rotateY(-180deg) scale(0.5) translateZ(-100px);
    z-index: 1;
}

@keyframes floatCard { 
    0% { transform: translateY(0px) rotateZ(0deg); } 
    50% { transform: translateY(-25px) rotateZ(1deg); } 
    100% { transform: translateY(0px) rotateZ(0deg); } 
}

/* ===========================================================
   5. PARTNERS SLIDER
   =========================================================== */
.partners-section { padding: 50px 0; background: #fff; overflow: hidden; text-align: center; }

.logo-slider { width: 100%; height: 160px; position: relative; overflow: hidden; margin: auto; background: #fff; }

.logo-slide-track { display: flex; align-items: center; width: max-content; animation: scroll 80s linear infinite; }
.logo-slide-track:hover { animation-play-state: paused; }

.slide {
    width: auto; flex-shrink: 0; height: 160px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 20px; position: relative; cursor: pointer;
}

.slide img {
    height: 100px; width: auto; max-width: unset;
    object-fit: contain; filter: none; opacity: 1;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.slide:hover img { transform: scale(1.4) translateY(-5px); filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1)); }

@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===========================================================
   6. ABOUT US SECTION
   =========================================================== */
.about-section {
    border: 3px solid var(--naf-primary); border-radius: 30px;
    background: #fff; margin: 80px auto; max-width: 1100px;
    padding: 80px 60px; box-shadow: 0 20px 60px rgba(197, 164, 92, 0.15);
    overflow: hidden;
}

.about-grid { display: flex; align-items: center; justify-content: space-between; gap: 60px; }

.about-col-left { flex: 0 0 35%; text-align: center; }
.logo-showcase { background: radial-gradient(circle, rgba(197,164,92,0.08) 0%, rgba(255,255,255,0) 70%); padding: 30px; border-radius: 50%; }

.about-label {
    color: var(--naf-primary); font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.9rem; display: block; margin-bottom: 20px;
}

.about-big-logo {
    width: 100%; max-width: 280px; height: auto; display: inline-block;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); transition: transform 0.3s ease;
}
.about-big-logo:hover { transform: scale(1.05); }

.about-col-right { flex: 0 0 60%; }
.about-text p { font-size: 1.05rem; color: #555; line-height: 1.8; margin-bottom: 25px; text-align: left; }
.about-text strong { color: var(--naf-secondary); font-weight: 700; }

.about-features { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; }
.feature-item { display: flex; align-items: center; gap: 12px; color: var(--naf-secondary); font-weight: 600; font-size: 0.95rem; }
.feature-item i { color: var(--naf-primary); font-size: 1.4rem; }

/* ===========================================================
   7. PRODUCTS / GATEWAY SECTION
   =========================================================== */
.gateway-section { padding: 100px 0; background: #fff; }

.gateway-row { display: flex; align-items: center; gap: 80px; margin-bottom: 120px; }
.gateway-row:nth-child(even) { flex-direction: row-reverse; } 
.gateway-row:last-child { margin-bottom: 0; }

.gateway-content { flex: 1; }
.gateway-label { color: var(--naf-primary); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 15px; display: block; }
.gateway-title { font-size: 2.8rem; margin-bottom: 25px; color: var(--naf-secondary); }
.gateway-desc { font-size: 1.15rem; color: #555; margin-bottom: 35px; max-width: 90%; }

.gateway-image { flex: 1; position: relative; }
.gateway-image img { width: 100%; border-radius: 20px; box-shadow: 0 25px 50px rgba(0,0,0,0.15); transition: transform 0.4s ease; background: #f0f0f0; }
.gateway-row:hover .gateway-image img { transform: scale(1.02); }

.gateway-btn { 
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--naf-secondary); color: #fff; 
    padding: 16px 35px; border-radius: 50px; 
    font-weight: 600; text-transform: uppercase; font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(11, 27, 63, 0.2);
}
.gateway-btn:hover { background: var(--naf-primary); padding-right: 45px; }

/* ===========================================================
   8. SERVICES & CONTACT & FOOTER
   =========================================================== */
.bottom-services { background: #f4f6f9; padding: 100px 0; }
.services-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.services-header h2 { font-size: 2.5rem; color: var(--naf-secondary); }
.services-grid-simple { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.service-simple-item { background: #fff; padding: 40px 30px; border-radius: 16px; border: 1px solid rgba(0,0,0,0.05); text-align: center; transition: all 0.3s ease; }
.service-simple-item:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--naf-primary); }
.service-simple-item i { font-size: 2.5rem; color: var(--naf-primary); margin-bottom: 20px; display: inline-block; }
.service-simple-item h4 { margin: 0; color: var(--naf-secondary); font-size: 1.2rem; font-weight: 700; }

.contact-section { padding: 100px 0; background: #f8f9fa; position: relative; }
.section-header-center { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.5rem; color: var(--naf-secondary); margin-bottom: 15px; }
.section-subtitle { color: #666; font-size: 1.1rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1000px; margin: 0 auto; }
.contact-card { background: #fff; padding: 40px 30px; border-radius: 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid transparent; }
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--naf-primary-light); }
.icon-box { width: 70px; height: 70px; background: rgba(197, 164, 92, 0.1); color: var(--naf-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 25px; transition: all 0.3s ease; }
.contact-card:hover .icon-box { background: var(--naf-primary); color: #fff; }
.contact-card h3 { font-size: 1.3rem; color: var(--naf-secondary); margin-bottom: 15px; font-weight: 700; }
.contact-card p { color: #555; line-height: 1.6; margin: 0; }
a.contact-card { text-decoration: none; display: block; color: inherit; }
.contact-card a { color: var(--naf-secondary); font-weight: 600; text-decoration: none; transition: color 0.3s; }
.contact-card a:hover { color: var(--naf-primary); }
.contact-card span { font-size: 0.9rem; color: #999; }

.site-footer-minimal { background: var(--naf-secondary); color: #fff; padding: 60px 0 20px; text-align: center; }
.footer-minimal-content { display: flex; flex-direction: column; align-items: center; gap: 30px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-company-name { font-size: 1.5rem; color: #fff; margin-bottom: 10px; letter-spacing: 1px; }
.footer-address { color: rgba(255,255,255,0.7); font-size: 1rem; margin: 0; }
.footer-address i { color: var(--naf-primary); margin-right: 8px; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a { font-size: 1.5rem; color: rgba(255,255,255,0.8); transition: all 0.3s; }
.footer-socials a:hover { color: var(--naf-primary); transform: scale(1.2); }
.footer-minimal-bottom { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,0.4); z-index: 9999; transition: all 0.3s; }
.whatsapp-float:hover { background: #128c7e; transform: scale(1.1); }
.whatsapp-float i { color: #fff; font-size: 30px; }

/* =========================================
   BACK TO TOP BUTTON
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 110px; /* رفعناه لفوق عشان ما يغطي زر الواتساب */
    right: 30px;   /* نفس استقامة الواتساب */
    width: 50px;
    height: 50px;
    
    background: var(--naf-secondary); /* لون كحلي فخم */
    color: #fff;
    border: 2px solid var(--naf-primary); /* إطار ذهبي */
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9990; /* أقل بشوي من القائمة والواتساب */
    
    /* الحالة الافتراضية: مخفي */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

/* لما يظهر */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* عند المرور عليه */
.back-to-top:hover {
    background: var(--naf-primary); /* يقلب ذهبي */
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(197, 164, 92, 0.4);
}

/* تنسيق للموبايل (تصغير بسيط) */
@media (max-width: 991px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 100px; /* تعديل بسيط للموقع */
        right: 25px;
        font-size: 1rem;
    }
}


/* =========================================
   MOBILE RESPONSIVENESS (MASTER FIX - CORRECTED)
   Max Width: 991px
   ========================================= */
@media (max-width: 991px) {

    /* --- 1. HEADER FIX (HAMBURGER & ALIGNMENT) --- */
    .site-header { padding: 15px 0; position: relative; z-index: 1000; background: #fff; }
    
    .header-flex-wrapper {
        display: flex; 
        flex-direction: row; /* تم التصحيح */
        align-items: center; /* تم التصحيح */
        justify-content: space-between; 
        padding: 0 20px; 
        position: relative;
    }

    /* Logo */
    .logo-col { flex: 0 0 auto; order: 1; }
    .site-logo { height: 55px !important; width: auto; display: block; }

    /* Social Icons */
    .social-col { 
        display: flex !important; order: 2; 
        margin-left: auto; margin-right: 15px; 
        align-items: center;
    }
    
    /* Hamburger Button (The Fix) */
    .menu-col { flex: 0 0 auto; order: 3; width: auto; border: none; padding: 0; }
    
    .menu-toggle { 
        display: flex !important; /* Force Show */
        font-size: 1.5rem; 
        color: var(--naf-secondary); 
        width: 48px; height: 48px; /* كبرتها شوي لتكون مريحة للمس */
        align-items: center; justify-content: center;
        background: #f8f9fa; 
        border: 1px solid rgba(0,0,0,0.08); 
        border-radius: 12px; 
        cursor: pointer; 
        transition: all 0.3s ease;
        z-index: 1001; /* فوق كل شي */
    }
    .menu-toggle:active, .menu-toggle:hover {
        background: #fff; border-color: var(--naf-primary); color: var(--naf-primary);
        box-shadow: 0 5px 15px rgba(197, 164, 92, 0.15);
    }

    /* Floating Menu Style */
    .naf-menu {
        display: none !important; /* Hidden by default */
        position: absolute;
        top: 100%; left: 50%; 
        transform: translateX(-50%); 
        margin-top: 20px; 
        width: 90%; max-width: 380px; 
        background: #fff; 
        flex-direction: column; /* تم التصحيح */
        padding: 10px 0;
        border: 2px solid var(--naf-primary); 
        border-radius: 20px; 
        box-shadow: 0 15px 40px rgba(0,0,0,0.15); 
        z-index: 9999; 
        overflow: hidden; 
    }
    
    /* Active State */
    .naf-menu.active { 
        display: flex !important; 
        animation: floatDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    }
    
    @keyframes floatDown { 
        from { opacity: 0; transform: translateX(-50%) translateY(-20px); } 
        to { opacity: 1; transform: translateX(-50%) translateY(0); } 
    }
    
    .naf-menu li { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.03); margin: 0; }
    .naf-menu li:last-child { border-bottom: none; } 

    .naf-menu li a {
        display: block; width: 100%; 
        text-align: left; /* تم التصحيح */
        padding: 15px 30px; 
        font-weight: 600; font-size: 1.1rem;
        color: var(--naf-secondary); transition: all 0.3s;
    }

    .naf-menu li a:hover {
        background-color: rgba(197, 164, 92, 0.08); 
        color: var(--naf-primary); 
        padding-left: 40px;
    }

    /* --- 2. HERO SECTION (YOUR FIXED LAYOUT) --- */
    .hero-section { padding-top: 30px !important; padding-bottom: 50px !important; height: auto !important; display: block !important; }
    
    .hero-section .container {
        display: grid !important;
        grid-template-areas: "content" "image" "buttons";
        gap: 0px !important; justify-items: center;
    }
    
    .hero-content { grid-area: content; width: 100% !important; text-align: center !important; padding: 0 10px !important; margin-bottom: 0 !important; }
    .hero-title { font-size: 1.8rem !important; line-height: 1.2 !important; margin-bottom: 10px !important; }
    
    /* Fixed Syntax & Units here */
    .hero-description {
        font-size: 0.9rem !important; line-height: 1.5 !important;
        margin-top: 10px !important;
        margin-bottom: 50px !important; 
        padding: 0 15px !important;
    }
    
    .hero-image-wrapper {
        grid-area: image; width: 100% !important; display: flex !important; justify-content: center !important;
        perspective: none !important; height: 160px !important; 
        margin-top: 0 !important;
        margin-bottom: 30px !important;      
        overflow: visible !important; z-index: 1;
    }
    .card-rotator { width: 260px !important; height: 100% !important; margin: 0 auto !important; }

    .hero-buttons {
        grid-area: buttons; display: flex !important; justify-content: center !important;
        width: 100% !important; margin-bottom: 50px !important; 
        margin-top: 0 !important; position: relative; z-index: 10;
    }
    .hero-btn-primary { padding: 12px 40px !important; font-size: 1rem !important; }   
    
    /* --- 4. ABOUT US --- */
    .about-section { margin: 30px 15px; padding: 30px 20px; border-width: 2px; }
    .about-grid { display: flex; flex-direction: column; gap: 15px; } /* تم التصحيح */
    .about-col-left { display: block; width: 100%; margin-bottom: 0; }
    .about-big-logo { display: none; } 
    .about-label { display: block; text-align: center; font-size: 0.8rem; margin-bottom: 5px; }
    .about-col-right { width: 100%; }
    .about-text p { font-size: 0.9rem; text-align: center; line-height: 1.6; padding: 0; }
    
    .about-features {
        display: flex !important; 
        flex-direction: row !important; /* تم التصحيح */
        flex-wrap: wrap !important;     /* تم التصحيح */
        justify-content: center; gap: 8px; margin-top: 15px; padding-bottom: 0;
    }
    .feature-item {
        flex: 0 1 auto; font-size: 0.7rem; padding: 6px 10px;              
        border-radius: 50px; white-space: nowrap; background: #f8f9fa; border: 1px solid #eee;
    }
    .feature-item i { font-size: 0.9rem; margin-right: 5px; }
    
    /* --- 3. PARTNERS --- */
    .logo-slider { height: 140px; pointer-events: none; margin-bottom: 20px; }
    .slide { width: 25vw; padding: 0 1px; display: flex; align-items: center; justify-content: center; }
    .slide img { height: 85px; width: 100%; object-fit: contain; transform: scale(1.1); }

    /* --- 5, 6, 7. SWIPE SECTIONS --- */
    .gateway-section .container, .services-grid-simple, .contact-grid {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
        gap: 20px; padding: 10px 15px 40px; scrollbar-width: none;
    }
    .gateway-section .container::-webkit-scrollbar { display: none; }
    .services-grid-simple::-webkit-scrollbar { display: none; }
    .contact-grid::-webkit-scrollbar { display: none; }

    .gateway-row, .gateway-row:nth-child(even) {
        flex: 0 0 85vw; width: 85vw; 
        flex-direction: column-reverse; /* تم التصحيح */
        background: #fff;
        border: 2px solid var(--naf-primary); border-radius: 20px; padding: 25px 20px;
        margin: 0; scroll-snap-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }
    .service-simple-item, .contact-card, a.contact-card {
        flex: 0 0 75vw; scroll-snap-align: center; margin: 0;
    }
    
    /* Gateway styling inside mobile */
    .gateway-title { font-size: 1.6rem; margin-top: 15px; margin-bottom: 10px; }
    .gateway-desc { font-size: 0.9rem; margin-bottom: 20px; }
    .gateway-image img { height: 160px; object-fit: cover; }
    .gateway-btn { width: 100%; justify-content: center; }
    
    /* Service styling inside mobile */
    .service-simple-item { background: #fff; border: 1px solid #eee; box-shadow: 0 5px 10px rgba(0,0,0,0.03); }
    
    /* Contact styling inside mobile */
    .contact-card { border: 1px solid #eee; }
}