@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Tajawal:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #070a12;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --gold-primary: #f59e0b;
    --gold-light: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.35);
    --gold-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #fef08a 100%);
    --blue-primary: #0284c7;
    --blue-light: #38bdf8;
    --blue-glow: rgba(2, 132, 199, 0.35);
    --blue-gradient: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #bae6fd 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(245, 158, 11, 0.3);
    --border-blue: rgba(56, 189, 248, 0.3);
    --font-main: 'Tajawal', 'Cairo', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animated Canvas Glow */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 0 12px var(--gold-glow));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1) rotate(5deg);
}

.brand-text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 0%;
    height: 2px;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-contact-nav {
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    background: var(--gold-gradient);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 20px var(--gold-glow);
    transition: all 0.3s ease;
}

.btn-contact-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 5% 4rem;
    gap: 3rem;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    z-index: 2;
}

.badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 10px var(--gold-light);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    background: var(--gold-gradient);
    color: #070a12;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 10px 30px var(--gold-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.6);
}

.btn-secondary {
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 3D Hero Emblem Container */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

.emblem-3d-wrapper {
    position: relative;
    width: 380px;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.emblem-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(245, 158, 11, 0.3));
    animation: float3D 6s ease-in-out infinite;
}

.emblem-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(30px);
}

@keyframes float3D {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-15px) rotateY(6deg); }
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-subtitle {
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* Apps Section */
.apps-section {
    padding: 6rem 5%;
    position: relative;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1200px;
}

/* 3D App Cards */
.app-card-3d {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(16px);
}

.app-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.app-card-gold::before {
    background: var(--gold-gradient);
}

.app-card-blue::before {
    background: var(--blue-gradient);
}

.app-card-3d:hover {
    transform: translateY(-10px) rotateX(4deg) rotateY(-4deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.app-card-gold:hover {
    border-color: var(--border-gold);
    box-shadow: 0 20px 50px var(--gold-glow);
}

.app-card-blue:hover {
    border-color: var(--border-blue);
    box-shadow: 0 20px 50px var(--blue-glow);
}

.card-header-3d {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.app-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    padding: 8px;
    transform: translateZ(30px);
    transition: transform 0.3s ease;
}

.app-card-3d:hover .app-icon-wrapper {
    transform: translateZ(50px) scale(1.05);
}

.app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.app-title-group h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.app-tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tag-gold {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-light);
    border: 1px solid var(--border-gold);
}

.tag-blue {
    background: rgba(2, 132, 199, 0.15);
    color: var(--blue-light);
    border: 1px solid var(--border-blue);
}

.app-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    transform: translateZ(20px);
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    transform: translateZ(25px);
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: #cbd5e1;
}

.features-list li i {
    font-size: 1rem;
}

.icon-gold { color: var(--gold-light); }
.icon-blue { color: var(--blue-light); }

.card-action-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    transform: translateZ(35px);
}

.btn-card-gold {
    background: var(--gold-gradient);
    color: #070a12;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-card-gold:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

.btn-card-blue {
    background: var(--blue-gradient);
    color: #070a12;
    box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-card-blue:hover {
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.6);
}

/* Features Grid Section */
.features-section {
    padding: 6rem 5%;
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    padding: 6rem 5% 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 30px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.contact-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.contact-card-content {
    position: relative;
    z-index: 1;
}

.contact-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.contact-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #ffffff;
    padding: 0.95rem 2.4rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.6);
}

/* Agent Card Styles (Placed Cleanly Under Contact Section) */
.agent-section {
    padding: 2rem 5% 6rem;
    max-width: 1000px;
    margin: 0 auto;
}

.agent-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-gold);
    border-radius: 28px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
}

.agent-card:hover {
    box-shadow: 0 20px 55px rgba(245, 158, 11, 0.25);
    border-color: var(--gold-light);
}

.agent-info {
    flex: 1;
}

.agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 1.1rem;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--border-gold);
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.agent-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.agent-location {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 1.05rem;
}

.agent-location i {
    color: var(--gold-light);
    font-size: 1.2rem;
}

.btn-agent-wa {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    color: #0f172a;
    padding: 0.9rem 2rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
    transition: all 0.3s ease;
}

.btn-agent-wa:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.55);
}

/* Footer */
footer {
    padding: 2.5rem 5%;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(7, 10, 18, 0.95);
}

/* Modal Details View */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-body {
    background: #0f172a;
    border: 1px solid var(--border-gold);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    padding: 2.5rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-body {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover { color: var(--text-main); }

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 7rem;
    }
    .badge-glow, .hero-btns {
        justify-content: center;
    }
    .emblem-3d-wrapper {
        width: 280px;
        height: 280px;
    }
    .nav-links { display: none; }
    .agent-card {
        flex-direction: column;
        text-align: center;
    }
    .agent-location {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
