/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;700;800&display=swap');

:root {
    --primary: #0044B3;
    --primary-dark: #002255;
    --secondary: #00A3E0;
    --accent: #FFC107;
    --bg-main: #FFFFFF;
    --bg-alt: #F4F7FB;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 68, 179, 0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(0,68,179,0.15);
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

body.dark-mode {
    --primary: #3388FF;
    --primary-dark: #1A4480;
    --secondary: #00BFFF;
    --bg-main: #0B1120;
    --bg-alt: #111827;
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --glass-bg: rgba(17, 24, 39, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-hover: 0 15px 40px rgba(51,136,255,0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-dark);
    font-weight: 700;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-alt);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Header & Nav */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: transparent;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

header.sticky {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 45px;
    width: auto;
    display: block;
    transition: transform var(--transition);
}

.logo:hover .site-logo {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: transform var(--transition);
}

#dark-mode-toggle:hover {
    transform: scale(1.1);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 68, 179, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 68, 179, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

body.dark-mode .btn-outline {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(0, 163, 224, 0.1), transparent),
                radial-gradient(circle at bottom left, rgba(0, 68, 179, 0.05), transparent);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 163, 224, 0.1);
    color: var(--secondary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 163, 224, 0.2);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .hero h1 {
    background: linear-gradient(135deg, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: block;
    transition: transform var(--transition);
}

.hero-img:hover {
    transform: translateY(-5px);
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.countries-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.countries-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.countries-list i {
    color: var(--primary);
}

/* Why Saudi Section */
.why-saudi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Authorities Section */
.authorities {
    background: var(--bg-alt);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.auth-card {
    background: var(--bg-main);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.auth-card h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-card h4 {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.auth-card ul {
    text-align: left;
    margin: 0 auto;
    max-width: 250px;
}

.auth-card ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-card ul li i {
    color: var(--secondary);
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.product-item {
    background: var(--bg-alt);
    padding: 25px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-item:hover {
    background: var(--bg-main);
    border-color: var(--glass-border);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.product-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-item h4 {
    font-size: 1.1rem;
}

/* Services Section */
.services {
    background: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-main);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 68, 179, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

body.dark-mode .service-icon {
    background: rgba(51, 136, 255, 0.1);
}

.service-icon i {
    color: var(--primary);
    font-size: 1.5rem;
}

.service-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Documents Checklist */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-alt);
    border-radius: 8px;
    font-weight: 500;
}

.doc-item i {
    color: #10B981;
    font-size: 1.2rem;
}

/* Timeline */
.timeline-section {
    background: var(--primary-dark);
    color: #fff;
}

.timeline-section .section-header h2, .timeline-section .section-header p {
    color: #fff;
}

.timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px; left: 0; right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 14%;
    min-width: 120px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border: 4px solid var(--primary-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 15px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.timeline-step h4 {
    color: #fff;
    font-size: 1rem;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* FAQ */
.faq {
    background: var(--bg-alt);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-main);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

body.dark-mode .faq-question {
    color: var(--text-main);
}

.faq-question i {
    transition: var(--transition);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 300px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    padding: 40px;
    background: var(--primary-dark);
    color: #fff;
    border-radius: var(--border-radius);
}

.contact-info h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.info-item h4 {
    color: #fff;
    margin-bottom: 5px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

body.dark-mode .form-control {
    border-color: rgba(255,255,255,0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,68,179,0.1);
}

.form-control.error {
    border-color: #dc3545;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.map-placeholder {
    margin-top: 40px;
    height: 250px;
    background: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    border-radius: var(--border-radius);
    position: relative;
}

.map-placeholder::after {
    content: 'Google Maps View';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: inherit;
}

/* Footer */
footer {
    background: #05101E;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9CA3AF;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #9CA3AF;
}

/* Utilities */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Floating Elements */
#scroll-top, .whatsapp-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: var(--shadow);
    z-index: 99;
    cursor: pointer;
    transition: var(--transition);
}

#scroll-top {
    right: 30px;
    background: var(--primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#scroll-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-btn {
    left: 30px;
    background: #25D366;
    font-size: 1.8rem;
    text-decoration: none;
}

.whatsapp-btn:hover, #scroll-top:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .about-grid, .auth-grid, .contact-grid, .hero-grid { grid-template-columns: 1fr; }
    .timeline::before { display: none; }
    .timeline { flex-direction: column; align-items: flex-start; gap: 40px; position: relative; padding-left: 30px; }
    .timeline::after {
        content: '';
        position: absolute;
        left: 30px; top: 0; bottom: 0; width: 2px;
        background: rgba(255,255,255,0.2);
    }
    .timeline-step { width: 100%; text-align: left; display: flex; align-items: center; gap: 20px; }
    .step-number { margin: 0; flex-shrink: 0; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: var(--shadow);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
        gap: 15px;
    }
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr; }
}
