:root {
    --primary-bg: #202c39;
    --secondary-bg: #151e29;
    --accent-gold: #c5a059;
    --accent-silver: #e2e8f0;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    /* Subtle Grain Texture Overlay for depth */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(197, 160, 89, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(197, 160, 89, 0.03) 0%, transparent 20%);
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-bg);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    animation: loaderFade 2.5s ease-in-out infinite;
}

.loader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.3));
}

.loader-line {
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    margin: 0 auto;
    animation: loaderLine 2s ease-in-out forwards;
}

@keyframes loaderFade {
    0%, 100% { opacity: 0.8; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes loaderLine {
    0% { width: 0; }
    100% { width: 100px; }
}

/* --- Pro Glassmorphism & Elevated Glow --- */
.glass-panel {
    background: rgba(32, 44, 57, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    background: rgba(32, 44, 57, 0.6);
    border-color: rgba(197, 160, 89, 0.4);
    /* Elevated Golden Glow Effect */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(197, 160, 89, 0.15);
    transform: translateY(-5px);
}

/* --- Golden Shimmer Text Effect --- */
.reveal-text {
    background: linear-gradient(to right, #ffffff 0%, #ffffff 40%, #c5a059 50%, #ffffff 60%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 1s ease;
}

.reveal-text.shimmer-active {
    animation: shimmerPass 2s linear forwards;
}

@keyframes shimmerPass {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* --- Dynamic Button Glimmer --- */
.btn-glimmer {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-glimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: -1;
    transition: none;
}

.btn-glimmer:hover::after {
    animation: glimmerSweep 0.75s ease-in-out;
}

@keyframes glimmerSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* --- Parallax Backgrounds --- */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Taller for movement */
    z-index: -1;
    transform: translateZ(0); /* Hardware acceleration */
    will-change: transform;
}

/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .card-3d {
        transform: none !important; 
        transition: transform 0.3s ease;
    }
    
    .card-3d:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    }

    /* Disable heavy effects on mobile */
    .parallax-bg { height: 100%; transform: none !important; }

    /* Typography Adjustments */
    h1 { font-size: 2.25rem !important; line-height: 1.3 !important; }
    h2 { font-size: 1.75rem !important; }
    p { font-size: 0.95rem !important; line-height: 1.6 !important; }
    .container { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
}

.hero-text-shadow { text-shadow: 2px 2px 4px rgba(0,0,0,0.7); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--secondary-bg); }
::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}
.pulse-gold { animation: pulse-gold 2s infinite; }

/* Tab Transitions */
.tab-content { display: none; animation: fadeIn 0.5s ease-out forwards; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Saudi Pattern */
.saudi-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c5a059' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Modal Styles */
.modal { opacity: 0; visibility: hidden; transition: all 0.3s ease-in-out; z-index: 10002; }
.modal.active { opacity: 1; visibility: visible; }
.modal-content { transform: scale(0.95); transition: transform 0.3s ease-in-out; }
.modal.active .modal-content { transform: scale(1); }

/* Text Highlight */
::selection { background-color: var(--accent-gold); color: var(--primary-bg); }
