/* 
   ELITE CHOICE | اختيار النخبة
   Ultra-Luxurious Design System Styling
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Cinzel:wght@400;700;900&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --bg-black: #040406;
    --bg-slate: #0a0a0f;
    --gold-primary: #d4af37;
    --gold-secondary: #c5a059;
    --gold-light: #f3e5ab;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --purple-neon: #8a2be2;
    --purple-glow: rgba(138, 43, 226, 0.25);
    --glass-bg: rgba(10, 10, 15, 0.65);
    --glass-border: rgba(212, 175, 55, 0.15);
    --glass-border-hover: rgba(212, 175, 55, 0.45);
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    background-color: var(--bg-black);
    color: #f3f4f6;
    font-family: 'Cairo', 'sans-serif';
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary), var(--purple-neon));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Interactive Particle Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

/* Typography & Metallic Gradients */
.font-cinzel {
    font-family: 'Cinzel', serif;
}

.text-gold-gradient {
    background: linear-gradient(135deg, #fff 10%, #f3e5ab 30%, #d4af37 70%, #c5a059 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.2));
}

.text-purple-gradient {
    background: linear-gradient(135deg, #fff 20%, #c084fc 50%, #8a2be2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 3D Text Shading */
.text-3d {
    text-shadow: 
        0 1px 0 #111, 
        0 2px 0 #151515, 
        0 3px 0 #222, 
        0 4px 0 #252525, 
        0 5px 0 #333, 
        0 8px 16px rgba(0,0,0,0.9),
        0 0 25px var(--gold-glow);
}

/* Glassmorphism Styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 
        0 15px 35px 0 rgba(0, 0, 0, 0.6), 
        inset 0 0 16px rgba(255, 255, 255, 0.02);
    transform-style: preserve-3d;
    transition: 
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 
        0 25px 50px 0 rgba(0, 0, 0, 0.8),
        0 0 30px rgba(212, 175, 55, 0.15),
        inset 0 0 20px rgba(138, 43, 226, 0.15);
}

/* Pop-out items on 3D Tilt */
.pop-out-sm {
    transform: translateZ(20px);
}
.pop-out-md {
    transform: translateZ(40px);
}
.pop-out-lg {
    transform: translateZ(70px);
}

/* Floating Animations */
@keyframes float-gentle {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-element {
    animation: float-gentle 7s ease-in-out infinite;
}

/* Animated Golden Border Sweep */
.btn-gold-sweep {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease;
}

.btn-gold-sweep::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.btn-gold-sweep:hover::before {
    left: 100%;
}

.btn-gold-sweep:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Horizontal & Vertical Timeline Glow Nodes */
.timeline-node {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-primary);
    border: 4px solid var(--bg-black);
    box-shadow: 
        0 0 0 2px var(--gold-primary),
        0 0 15px var(--gold-primary);
    position: absolute;
    right: -42px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

.glass-panel:hover .timeline-node {
    background: var(--purple-neon);
    box-shadow: 
        0 0 0 2px var(--purple-neon),
        0 0 15px var(--purple-neon);
}

/* Page Scroll Reveal Base */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.96) rotateX(-5deg);
    filter: blur(8px);
    transition: 
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    perspective: 1000px;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0);
}

/* Specialized Card Images */
.card-img-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 10%, rgba(10, 10, 15, 0.1) 100%);
    z-index: 1;
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover .card-img {
    transform: scale(1.08);
}

/* Image frame 3D effect */
.frame-3d {
    position: relative;
    perspective: 1000px;
}

.frame-3d-inner {
    border: 2px solid var(--gold-primary);
    border-radius: 28px;
    padding: 8px;
    background: rgba(10,10,15,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(212, 175, 55, 0.1);
    transform: rotateY(-8deg) rotateX(4deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.frame-3d:hover .frame-3d-inner {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.9), 0 0 40px rgba(138, 43, 226, 0.2);
}

/* Interactive Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0.4) 50%, transparent 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.25);
    transform: translateY(-5px);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(4,4,6,0.98);
    backdrop-filter: blur(15px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 16px;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 50px rgba(212,175,55,0.25);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 35px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold-primary);
}
