/* =============================================================
   AIN SALSABEL GENERAL TRADING - Core Stylesheet
   Premium / 3D / Glassmorphism look
   ============================================================= */

:root {
    --c-bg:        #07142e;
    --c-bg-2:      #0a1f44;
    --c-bg-3:      #122c5e;
    --c-primary:   #c9a35d;   /* gold */
    --c-primary-2: #e8c887;
    --c-primary-d: #7a5a1e;
    --c-accent:    #1fb6ff;
    --c-text:      #eef3ff;
    --c-text-mute: #9aabd1;
    --c-border:    rgba(255, 255, 255, 0.08);
    --c-glass:     rgba(255, 255, 255, 0.06);
    --c-glass-2:   rgba(255, 255, 255, 0.10);
    --c-card:      rgba(13, 33, 70, 0.55);
    --c-success:   #2ee59d;
    --c-danger:    #ff5470;

    --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 25px 60px rgba(0, 0, 0, 0.55);
    --shadow-3: 0 40px 100px rgba(0, 0, 0, 0.65);

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;

    --t-fast: 0.25s cubic-bezier(.2,.7,.3,1);
    --t-med:  0.45s cubic-bezier(.2,.7,.3,1);
    --t-slow: 0.8s  cubic-bezier(.2,.7,.3,1);

    --f-head: 'Playfair Display', 'Cairo', serif;
    --f-body: 'Inter', 'Cairo', system-ui, sans-serif;
    --f-ar:   'Cairo', 'Tajawal', sans-serif;
}

* { box-sizing: border-box; }
*::selection { background: var(--c-primary); color: var(--c-bg); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--f-body);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}
body[dir="rtl"] { font-family: var(--f-ar); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary); }
h1,h2,h3,h4,h5 { font-family: var(--f-head); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; color: #fff; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
p  { margin: 0 0 1em; color: var(--c-text-mute); }

.container { width: min(1200px, 92%); margin: 0 auto; }
.d-none-md { display: inline-flex; }

/* =============================================================
   Background 3D canvas
   ============================================================= */
#bg-3d {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(1200px 800px at 10% 10%,  rgba(31, 182, 255, 0.15), transparent 60%),
        radial-gradient(1000px 700px at 90% 30%,  rgba(201, 163, 93, 0.18), transparent 60%),
        radial-gradient(900px  900px at 50% 100%, rgba(122, 90, 30, 0.20), transparent 60%),
        linear-gradient(180deg, #050d20 0%, #07142e 60%, #050d20 100%);
}
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        linear-gradient(transparent 50%, rgba(0,0,0,0.04) 50%) 0 0/100% 4px,
        radial-gradient(circle at 50% 50%, transparent 0, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.25;
}

/* =============================================================
   Loader
   ============================================================= */
#page-loader {
    position: fixed; inset: 0; z-index: 9999;
    display: grid; place-items: center;
    background: radial-gradient(circle at center, #0a1f44 0%, #050d20 100%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
    width: 70px; height: 70px;
    border: 3px solid rgba(201, 163, 93, 0.2);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
.loader-text {
    font-family: var(--f-head);
    letter-spacing: 0.5em;
    color: var(--c-primary);
    text-indent: 0.5em;
    font-weight: 700;
    font-size: 0.9rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   Top bar
   ============================================================= */
.top-bar {
    background: linear-gradient(90deg, #050d20, #0a1f44 60%, #050d20);
    border-bottom: 1px solid var(--c-border);
    font-size: 0.83rem;
    color: var(--c-text-mute);
}
.top-bar__inner {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 42px; gap: 1rem; flex-wrap: wrap;
}
.top-bar__info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.top-bar__info a { display: inline-flex; align-items: center; gap: 0.45rem; }
.top-bar__info a:hover { color: var(--c-primary); }
.top-bar__info i { color: var(--c-primary); }
.top-bar__social { display: flex; gap: 0.5rem; }
.top-bar__social a {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    transition: all var(--t-fast);
    font-size: 0.75rem;
}
.top-bar__social a:hover { background: var(--c-primary); color: var(--c-bg); border-color: var(--c-primary); transform: translateY(-2px); }

/* =============================================================
   Header / Navigation
   ============================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    background: rgba(7, 20, 46, 0.6);
    border-bottom: 1px solid transparent;
    transition: all var(--t-med);
}
.site-header.scrolled {
    background: rgba(7, 20, 46, 0.92);
    border-bottom-color: var(--c-border);
    box-shadow: var(--shadow-1);
}
.nav__inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 78px; gap: 1.5rem;
}
.logo {
    display: inline-flex; align-items: center; gap: 0.75rem;
    font-weight: 700; color: #fff;
}
.logo__mark {
    display: grid; place-items: center;
    filter: drop-shadow(0 4px 12px rgba(201, 163, 93, 0.4));
    transition: transform var(--t-med);
}
.logo:hover .logo__mark { transform: rotate(360deg) scale(1.05); }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__title {
    font-family: var(--f-head); font-size: 1.15rem; letter-spacing: 0.04em;
}
.logo__sub {
    font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase;
    color: var(--c-primary);
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__list {
    display: flex; list-style: none; margin: 0; padding: 0; gap: 0.4rem;
}
.nav__list a {
    position: relative;
    padding: 0.6rem 0.9rem; border-radius: var(--r-sm);
    font-weight: 500; font-size: 0.95rem; color: var(--c-text);
    transition: all var(--t-fast);
}
.nav__list a::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
    border-radius: var(--r-sm);
    opacity: 0; transform: scale(0.9);
    transition: all var(--t-fast);
    z-index: -1;
}
.nav__list a:hover::before, .nav__list a.active::before { opacity: 1; transform: scale(1); }
.nav__list a:hover, .nav__list a.active { color: #fff; }

.nav__cta {
    padding: 0.7rem 1.4rem !important;
    font-size: 0.9rem !important;
}

.nav__toggle {
    display: none;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 5px;
    transition: all var(--t-fast);
}
.nav__toggle span {
    width: 22px; height: 2px;
    background: var(--c-primary);
    border-radius: 2px;
    transition: all var(--t-fast);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================================
   Buttons
   ============================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.95rem 1.7rem;
    border-radius: 50px;
    font-weight: 600; font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-med);
    position: relative; overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.btn--primary {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-d) 100%);
    color: #0a1f44;
    box-shadow: 0 10px 30px rgba(201, 163, 93, 0.4);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(201, 163, 93, 0.55); color: #0a1f44; }
.btn--primary::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.7s;
}
.btn--primary:hover::after { transform: translateX(100%); }

.btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--c-primary); color: var(--c-primary); }

.btn--outline {
    background: transparent;
    color: var(--c-primary);
    border-color: var(--c-primary);
}
.btn--outline:hover { background: var(--c-primary); color: #0a1f44; }

.btn--lg { padding: 1.1rem 2.2rem; font-size: 1rem; }

/* =============================================================
   Section
   ============================================================= */
.section { padding: 6rem 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(10, 31, 68, 0.4) 50%, transparent); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 4rem; }
.section__eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 50px;
    background: rgba(201, 163, 93, 0.12);
    border: 1px solid rgba(201, 163, 93, 0.3);
    color: var(--c-primary);
    font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1.2rem;
}
.section__eyebrow::before {
    content: ''; width: 8px; height: 8px; background: var(--c-primary);
    border-radius: 50%; animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(1.4);} }
.section__title { margin-bottom: 0.7rem; }
.section__title em { font-style: normal; color: var(--c-primary); }
.section__desc { color: var(--c-text-mute); font-size: 1.05rem; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
    position: relative;
    min-height: calc(100vh - 120px);
    display: flex; align-items: center;
    padding: 6rem 0 4rem;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(7, 20, 46, 0.4) 0%, rgba(7, 20, 46, 0.85) 80%, var(--c-bg) 100%),
        url('https://images.unsplash.com/photo-1518684079-3c830dcef090?w=2400&q=85&auto=format&fit=crop') center/cover no-repeat;
    transform: scale(1.1);
    animation: heroZoom 20s ease infinite alternate;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero__content h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: 1.05; margin-bottom: 1.2rem; }
.hero__content h1 em { font-style: normal; color: var(--c-primary); background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary), var(--c-primary-d)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__lead { font-size: 1.15rem; max-width: 560px; margin-bottom: 2rem; }
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 540px; }
.hero__meta-item { padding-left: 1rem; border-left: 2px solid var(--c-primary); }
.hero__meta-item strong { display: block; font-family: var(--f-head); color: #fff; font-size: 1.4rem; }
.hero__meta-item span { color: var(--c-text-mute); font-size: 0.85rem; }

.hero__visual {
    position: relative; height: 540px;
    display: grid; place-items: center;
}

/* =============================================================
   Cards
   ============================================================= */
.card {
    position: relative;
    padding: 2.2rem;
    border-radius: var(--r-lg);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--t-med);
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.06) 50%, transparent 70%);
    transition: left 0.8s;
}
.card:hover::before { left: 100%; }
.card:hover { transform: translateY(-6px); border-color: rgba(201, 163, 93, 0.4); box-shadow: var(--shadow-2); }

.card__icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
    color: #0a1f44;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 8px 24px rgba(201, 163, 93, 0.35);
    transition: transform var(--t-med);
}
.card:hover .card__icon { transform: rotate(-8deg) scale(1.1); }

.card__title { color: #fff; margin-bottom: 0.6rem; }
.card__text  { color: var(--c-text-mute); font-size: 0.95rem; margin: 0; }

.grid { display: grid; gap: 1.6rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* =============================================================
   Stats
   ============================================================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(201, 163, 93, 0.08), rgba(201, 163, 93, 0));
    border: 1px solid var(--c-border);
    transition: all var(--t-med);
}
.stat:hover { transform: translateY(-4px); border-color: var(--c-primary); }
.stat__num {
    font-family: var(--f-head);
    font-size: 2.6rem; font-weight: 800;
    background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    line-height: 1;
}
.stat__label { color: var(--c-text-mute); font-size: 0.9rem; letter-spacing: 0.05em; }

/* =============================================================
   Page banner (inner pages)
   ============================================================= */
.page-banner {
    padding: 8rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--c-border);
}
.page-banner::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(7, 20, 46, 0.5), rgba(7, 20, 46, 0.9)),
        var(--banner-img, url('https://images.unsplash.com/photo-1542838132-92c53300491e?w=2400&q=85')) center/cover no-repeat;
}
.page-banner h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); margin-bottom: 0.8rem; }
.page-banner p { font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.5rem; }
.breadcrumb { display: inline-flex; gap: 0.5rem; align-items: center; font-size: 0.9rem; color: var(--c-text-mute); }
.breadcrumb a { color: var(--c-primary); }
.breadcrumb i { font-size: 0.7rem; }

/* =============================================================
   Forms
   ============================================================= */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--c-text-mute); font-weight: 500; }
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: 0.95rem 1.1rem;
    background: rgba(7, 20, 46, 0.6);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    color: var(--c-text);
    font: inherit; font-size: 0.95rem;
    transition: all var(--t-fast);
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    outline: none; border-color: var(--c-primary);
    background: rgba(7, 20, 46, 0.9);
    box-shadow: 0 0 0 3px rgba(201, 163, 93, 0.15);
}
textarea.form-control { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* =============================================================
   Footer
   ============================================================= */
.site-footer {
    position: relative;
    margin-top: 6rem;
    padding-top: 5rem;
    background: linear-gradient(180deg, transparent, rgba(5, 13, 32, 0.95));
    border-top: 1px solid var(--c-border);
    overflow: hidden;
}
.footer__3d {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-primary), transparent);
    filter: blur(0.5px);
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.2fr;
    gap: 2.5rem; padding-bottom: 3rem;
}
.footer__col h4 {
    color: #fff; font-size: 1.05rem; margin-bottom: 1.2rem;
    position: relative; padding-bottom: 0.6rem;
}
.footer__col h4::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 30px; height: 2px; background: var(--c-primary);
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 0.55rem; font-size: 0.92rem; color: var(--c-text-mute); }
.footer__col a:hover { color: var(--c-primary); padding-left: 4px; }
.footer__about { color: var(--c-text-mute); font-size: 0.92rem; margin: 1rem 0 1.4rem; }
.footer__social { display: flex; gap: 0.6rem; }
.footer__social a {
    width: 38px; height: 38px; display: grid; place-items: center;
    background: var(--c-glass); border: 1px solid var(--c-border);
    border-radius: 50%; transition: all var(--t-fast);
}
.footer__social a:hover { background: var(--c-primary); color: #0a1f44; transform: translateY(-3px); }
.footer__contact li { display: flex; gap: 0.7rem; align-items: flex-start; }
.footer__contact i { color: var(--c-primary); margin-top: 4px; min-width: 16px; }
.footer__bottom {
    border-top: 1px solid var(--c-border);
    padding: 1.5rem 0;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
    color: var(--c-text-mute); font-size: 0.85rem;
}
.footer__legal { margin: 0; }
.logo--footer .logo__title { color: #fff; font-size: 1.2rem; }

/* =============================================================
   Back to top + WhatsApp
   ============================================================= */
.to-top, .whatsapp-fab {
    position: fixed; z-index: 90;
    width: 50px; height: 50px; border-radius: 50%;
    display: grid; place-items: center;
    color: #fff; cursor: pointer;
    border: none;
    box-shadow: var(--shadow-2);
    transition: all var(--t-med);
}
.to-top {
    right: 24px; bottom: 24px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
    color: #0a1f44;
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

.whatsapp-fab {
    left: 24px; bottom: 24px;
    background: #25d366;
    font-size: 1.5rem;
    animation: pulseWhats 2.5s ease infinite;
}
.whatsapp-fab:hover { background: #20bf5b; color: #fff; transform: scale(1.1); }
@keyframes pulseWhats {
    0%,100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5), var(--shadow-2); }
    50%     { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), var(--shadow-2); }
}

/* =============================================================
   Utilities
   ============================================================= */
.text-center { text-align: center; }
.text-gold   { color: var(--c-primary); }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }

/* Alert (form feedback) */
.alert {
    padding: 1rem 1.2rem; border-radius: var(--r-sm);
    margin-bottom: 1.2rem; font-size: 0.95rem;
    border: 1px solid transparent;
    animation: slideIn 0.4s ease;
}
.alert--success { background: rgba(46, 229, 157, 0.1); color: var(--c-success); border-color: rgba(46, 229, 157, 0.3); }
.alert--error   { background: rgba(255, 84, 112, 0.1); color: var(--c-danger);  border-color: rgba(255, 84, 112, 0.3); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
