/* ============================================================
   موقع شركة عصر الشرق — التصميم الرئيسي
   ============================================================ */

:root {
    --navy:      #0a2540;
    --navy-2:    #0f3460;
    --blue:      #2b7fd4;
    --gold:      #f5a623;
    --red:       #d62828;
    --green:     #14532d;
    --green-2:   #1c7a45;
    --cream:     #f7f3e3;
    --ink:       #0b1522;
    --muted:     #6b7a90;
    --bg:        #eef2f7;
    --white:     #ffffff;
    --radius:    18px;
    --shadow:    0 20px 50px -20px rgba(10, 37, 64, .35);
    --shadow-sm: 0 8px 24px -12px rgba(10, 37, 64, .30);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.75;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-text strong { font-family: 'Cairo', sans-serif; font-weight: 900; }

a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* خلفية ثلاثية الأبعاد */
#bg-3d {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(43,127,212,.18), transparent 60%),
        radial-gradient(900px 500px at 0% 20%, rgba(245,166,35,.12), transparent 60%),
        linear-gradient(180deg, #f4f7fb, #eef2f7);
}

/* خلفية فيديو / صورة متحركة تغطي كامل الصفحة */
.bg-media {
    position: fixed; inset: 0; z-index: -3;
    width: 100%; height: 100%; object-fit: cover;
}
.bg-image { background-size: cover; background-position: center; }
/* طبقة تعتيم خفيفة فوق الوسائط للحفاظ على وضوح النصوص */
.bg-scrim {
    position: fixed; inset: 0; z-index: -2;
    background: linear-gradient(180deg, rgba(244,247,251,.80), rgba(238,242,247,.86));
}
/* عند وجود خلفية وسائط نُخفي التدرّج المعتم الافتراضي */
body.has-media-bg::before { background: transparent; }

/* ============ الهيدر ============ */
.site-header {
    position: fixed;
    top: 0; inset-inline: 0;
    z-index: 100;
    transition: .35s;
    padding: 14px 0;
}
.site-header.scrolled {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    padding: 8px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; color: var(--navy); }
.brand-text small { color: var(--muted); font-size: .72rem; }
.site-header.scrolled .brand-text strong,
.site-header.scrolled .main-nav a { color: var(--navy); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { font-weight: 600; color: var(--navy); position: relative; transition: .25s; }
.main-nav a:not(.nav-cta)::after {
    content: ''; position: absolute; bottom: -6px; inset-inline-start: 0;
    width: 0; height: 2px; background: var(--gold); transition: .25s;
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff !important; padding: 9px 20px; border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 3px; transition: .3s; }

/* ============ Hero ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 130px 0 60px;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 40px;
    align-items: center;
}
.eyebrow {
    display: inline-block;
    background: rgba(43,127,212,.12);
    color: var(--blue);
    font-weight: 700;
    font-size: .8rem;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.hero-text h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.25; color: var(--navy); }
.grad-text {
    background: linear-gradient(120deg, var(--blue), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.12rem; color: #38475c; margin: 20px 0 28px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 28px; border-radius: 999px; font-weight: 700;
    font-family: 'Cairo', sans-serif; cursor: pointer; border: 0;
    transition: transform .2s, box-shadow .2s; font-size: 1rem;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-green { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--navy); border: 1.5px solid rgba(10,37,64,.15); }
.btn-block { display: flex; width: 100%; margin-top: auto; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }

.hero-stats { display: flex; gap: 34px; margin-top: 40px; }
.stat { display: flex; flex-direction: column; }
.stat .num { font-family: 'Cairo'; font-weight: 900; font-size: 2.4rem; color: var(--navy); line-height: 1; }
.stat small { color: var(--muted); font-weight: 600; }

/* عرض اللوغوات ثلاثي الأبعاد — بطاقات منفصلة بلا تداخل */
.hero-visual { display: flex; justify-content: center; align-items: center; perspective: 1200px; }
.logo-stage {
    position: relative;
    width: 380px; height: 380px;
    transform-style: preserve-3d;
    animation: stageFloat 7s ease-in-out infinite;
}
@keyframes stageFloat { 0%,100%{ transform: rotateX(6deg) rotateY(-6deg);} 50%{ transform: rotateX(-4deg) rotateY(6deg);} }

.logo-card {
    position: absolute;
    background: rgba(255,255,255,.95);
    border-radius: 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.7);
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    backdrop-filter: blur(6px);
}
.logo-card img { width: 100%; height: 100%; object-fit: contain; }

/* البطاقة الرئيسية في الوسط */
.logo-main {
    width: 200px; height: 200px;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 3;
}
/* البطاقتان الجانبيتان في زاويتين متقابلتين بعيداً عن المركز */
.logo-side { width: 128px; height: 128px; z-index: 2; }
.logo-a { top: 0; inset-inline-end: 0; animation: cardBob 4.4s ease-in-out infinite; }
.logo-b { bottom: 0; inset-inline-start: 0; animation: cardBob 5s ease-in-out infinite .9s; }
@keyframes cardBob { 0%,100%{ transform: translateY(0) rotate(-2deg);} 50%{ transform: translateY(-16px) rotate(2deg);} }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.scroll-hint span {
    display: block; width: 26px; height: 42px; border: 2px solid rgba(10,37,64,.4);
    border-radius: 14px; position: relative;
}
.scroll-hint span::after {
    content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 5px; height: 8px; background: var(--navy); border-radius: 3px;
    animation: scrolldot 1.6s infinite;
}
@keyframes scrolldot { 0%{ opacity:1; top:8px;} 100%{ opacity:0; top:22px;} }

/* ============ الأقسام العامة ============ */
.section { padding: 90px 0; position: relative; }
.section-alt { background: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.section-head { text-align: center; margin-bottom: 50px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--navy); }
.section-sub { color: var(--muted); margin-top: 8px; }

/* من نحن */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.about-card {
    background: #fff; padding: 34px; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid rgba(10,37,64,.06);
}
.about-lead { font-size: 1.12rem; margin-bottom: 14px; }
.about-lead strong { color: var(--navy); }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
    background: #fff; padding: 24px; border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid rgba(10,37,64,.06);
}
.feature-ico { font-size: 2rem; margin-bottom: 8px; }
.feature h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* العلامات التجارية */
.brands-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.brand-card {
    display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius); padding: 34px;
    box-shadow: var(--shadow); text-align: center; position: relative; overflow: hidden;
    border: 1px solid rgba(10,37,64,.06);
}
.brand-card::before {
    content: ''; position: absolute; top: 0; inset-inline: 0; height: 6px;
}
.brand-cinderella::before { background: linear-gradient(90deg, var(--gold), var(--red)); }
.brand-lahn::before { background: linear-gradient(90deg, var(--green), var(--green-2)); }
.brand-card-logo {
    width: 130px; height: 130px; margin: 6px auto 18px;
    border-radius: 24px; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 14px;
}
.brand-card-logo img { max-width: 100%; max-height: 100%; }
.logo-fallback { font-family:'Cairo'; font-weight:900; color: var(--navy); }
.brand-card h3 { font-size: 1.5rem; color: var(--navy); margin-bottom: 10px; }
.brand-card p { color: var(--muted); margin-bottom: 22px; }

/* الخريطة */
.map-legend { display: flex; gap: 20px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; font-weight: 700; }
.lg-c { color: var(--red); }
.lg-l { color: var(--green-2); }
.lg-h { color: var(--blue); }
.map-box {
    height: 480px; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); border: 4px solid #fff; z-index: 1;
}

/* تواصل معنا */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.contact-info h2 { color: var(--navy); }
.contact-list { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.contact-list .ci {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(43,127,212,.12);
    display: inline-flex; align-items: center; justify-content: center;
}
.contact-form {
    background: #fff; padding: 32px; border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid rgba(10,37,64,.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label { font-weight: 700; margin-bottom: 6px; font-size: .92rem; color: var(--navy); }
.field input, .field textarea {
    font-family: inherit; font-size: 1rem; padding: 12px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fbfcfe;
    transition: .2s; resize: vertical;
}
.field input:focus, .field textarea:focus {
    outline: 0; border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 4px rgba(43,127,212,.12);
}
.form-status { margin-top: 14px; font-weight: 700; }
.form-status.ok { color: var(--green-2); }
.form-status.err { color: var(--red); }

/* ============ الفوتر ============ */
.site-footer { background: var(--navy); color: #cdd9e8; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 40px; padding: 60px 0 40px; }
.footer-logo { height: 64px; margin-bottom: 14px; background: #fff; padding: 8px 12px; border-radius: 12px; }
.footer-about h3 { color: #fff; margin-bottom: 8px; }
.footer-phones { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.footer-phones a { color: #fff; font-weight: 700; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4, .footer-map h4 { color: #fff; margin-bottom: 8px; }
.footer-links a { transition: .2s; }
.footer-links a:hover { color: var(--gold); padding-inline-start: 6px; }
.footer-map-box { height: 200px; border-radius: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.15); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: .9rem; }

/* ============ حركات الظهور ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* تأثير الإمالة ثلاثي الأبعاد */
.tilt { transition: transform .25s ease; transform-style: preserve-3d; will-change: transform; }

/* ============ مبدّل اللغة (الكرة الأرضية) ============ */
.lang-switch { position: relative; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.7); border: 1.5px solid rgba(10,37,64,.15);
    color: var(--navy); padding: 7px 14px; border-radius: 999px; cursor: pointer;
    font-family: 'Cairo', sans-serif; font-weight: 700; font-size: .9rem; transition: .2s;
}
.lang-btn:hover { background: #fff; box-shadow: var(--shadow-sm); }
.lang-btn svg { flex: none; }
.lang-menu {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
    background: #fff; border-radius: 14px; box-shadow: var(--shadow);
    list-style: none; padding: 8px; min-width: 150px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .22s; z-index: 200;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
    display: block; padding: 9px 14px; border-radius: 10px; font-weight: 600; color: var(--navy);
    transition: .18s;
}
.lang-menu a:hover { background: var(--bg); }
.lang-menu a.active { background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; }

/* خط لاتيني أنيق للإنجليزية */
.lang-en, .lang-en h1, .lang-en h2, .lang-en h3, .lang-en h4 { font-family: 'Poppins', sans-serif; }
.lang-en .brand-text strong { font-family: 'Poppins', sans-serif; }

/* ============ الاستجابة ============ */
@media (max-width: 900px) {
    .hero-inner, .about-grid, .brands-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .about-features { grid-template-columns: 1fr 1fr; }
    .hero-visual { order: -1; margin-bottom: 20px; }
    .main-nav {
        position: fixed; inset: 0 0 0 30%; background: rgba(255,255,255,.98);
        flex-direction: column; justify-content: center; gap: 28px;
        transform: translateX(100%); transition: .35s; box-shadow: var(--shadow);
    }
    .main-nav.open { transform: none; }
    .nav-toggle { display: flex; z-index: 200; }
    .site-header { background: rgba(255,255,255,.9); backdrop-filter: blur(12px); }
    .brand-text strong { color: var(--navy); }
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .hero-stats { gap: 20px; }
    .logo-stage { width: 290px; height: 300px; }
    .logo-main { width: 160px; height: 160px; }
    .logo-side { width: 104px; height: 104px; }
    .about-features { grid-template-columns: 1fr; }
}
