/* ==========================================================================
   Google Fonts & Global Variables
   ========================================================================== */
   :root {
    --primary-color: #007bff; /* Bright blue for cleanliness */
    --secondary-color: #0056b3; /* Darker blue */
    --dark-color: #1a1e29; /* VIP Dark Navy */
    --gold-color: #d4af37; /* Warm Gold */
    --light-bg: #f8fcfd; /* Very light blue/white */
    --text-color: #333333;
    --transition: all 0.3s ease-in-out;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif;
}

/* Utilities */
.text-gold { color: var(--gold-color) !important; }
.bg-gold { background-color: var(--gold-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.text-dark { color: var(--dark-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-light-primary { background-color: rgba(0, 123, 255, 0.1) !important; }
.text-light-alpha { color: rgba(255, 255, 255, 0.2); }
.section-bg { background-color: var(--light-bg); }
.section-bg-alt { background-color: #ffffff; }
.transition-all { transition: var(--transition); }
.tracking-wide { letter-spacing: 2px; }

/* ==========================================================================
   Preloader (Curtain Effect)
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
}

.curtain {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--dark-color);
    z-index: 1;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.left-curtain {
    left: 0;
    transform-origin: left;
}

.right-curtain {
    right: 0;
    transform-origin: right;
}

.preloader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.preloader-logo {
    max-width: 180px;
    opacity: 0;
    transform: scale(0.5);
    animation: logoPulseGrow 2s forwards 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

@keyframes logoPulseGrow {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    50% { opacity: 1; transform: scale(1.1) translateY(-10px); filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.6)); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2)); }
}

.preloader-text {
    font-size: 2rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s forwards 0.8s;
}

.company-name-anim {
    font-size: 4rem;
    font-weight: 900;
    color: var(--gold-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s forwards 1.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.loaded .left-curtain {
    transform: translateX(-100%);
}

body.loaded .right-curtain {
    transform: translateX(100%);
}

body.loaded .preloader-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.8rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled .nav-link,
.navbar.scrolled .navbar-brand .brand-text {
    color: var(--dark-color) !important;
}

.navbar.scrolled .nav-link.active,
.navbar.scrolled .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Removed incorrect invert filter */

.brand-logo {
    height: 55px;
    object-fit: contain;
}

.brand-text {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.nav-link {
    font-weight: 600;
    color: var(--text-color) !important;
    margin: 0 10px;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: url('../images/hero-bg-libya.png') center/cover no-repeat fixed;
    overflow: hidden;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.6) 0%, rgba(26, 30, 41, 0.85) 100%);
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-image-wrapper {
    position: relative;
}

.about-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    box-shadow: none !important;
    background: transparent;
}

.animated-badge {
    animation: floatUpDown 4s ease-in-out infinite;
}

.atom-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 120px;
    margin-top: -60px;
    margin-left: -110px;
    border: 2px dashed rgba(0, 123, 255, 0.4);
    border-radius: 50%;
    animation: spinOrbit1 8s linear infinite;
    pointer-events: none;
}

.atom-orbit.orbit-2 {
    width: 240px;
    height: 140px;
    margin-top: -70px;
    margin-left: -120px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    animation: spinOrbit2 12s linear infinite;
}

.atom-orbit.orbit-3 {
    width: 260px;
    height: 160px;
    margin-top: -80px;
    margin-left: -130px;
    border: 2px dotted rgba(0, 123, 255, 0.5);
    animation: spinOrbit3 15s linear infinite;
}

@keyframes floatUpDown {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

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

@keyframes spinOrbit2 {
    0% { transform: rotate(60deg); }
    100% { transform: rotate(420deg); }
}

@keyframes spinOrbit3 {
    0% { transform: rotate(120deg); }
    100% { transform: rotate(480deg); }
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stat-item {
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Gallery (Bento Grid 3D)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.bento-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    perspective: 1000px; /* For 3D effect */
    cursor: pointer;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
}

.bento-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: var(--transition);
    transform: translateZ(30px); /* 3D pop */
}

.bento-item:hover .bento-inner {
    transform: scale3d(1.02, 1.02, 1.02) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

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

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

@media (max-width: 991px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-large { grid-column: span 2; }
    .bento-wide { grid-column: span 2; }
}

@media (max-width: 575px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-wide { grid-column: span 1; }
}

/* ==========================================================================
   Contact Section & VIP Theme Box
   ========================================================================== */
.vip-theme-box {
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-right: 5px solid var(--gold-color);
}

.icon-box-contact {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.form-floating > label {
    right: 0;
    left: auto;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

.form-floating > .form-control:focus ~ label, 
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-links a, .contact-list a {
    transition: var(--transition);
}

.footer-links a:hover, .contact-list a:hover {
    color: var(--gold-color) !important;
    padding-right: 5px;
}

.social-icon {
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: white;
}

/* ==========================================================================
   WhatsApp Hotspot
   ========================================================================== */
.whatsapp-hotspot {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Bottom left for Arabic (RTL) layout */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    text-decoration: none;
    animation: pulse 2s infinite;
}

.whatsapp-hotspot:hover {
    background-color: #128c7e;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991px) {
    .company-name-anim { font-size: 3rem; }
    .hero-section h1 { font-size: 3.5rem; }
    .hero-section p { font-size: 1.5rem !important; }
    
    .about-badge {
        position: relative;
        bottom: 0;
        right: 0;
        margin: 40px auto 0;
    }
}

@media (max-width: 767px) {
    .company-name-anim { font-size: 2.2rem; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.25rem !important; }
    .preloader-logo { max-width: 140px; }
    .preloader-text { font-size: 1.5rem; }
    
    .vip-theme-box { padding: 2rem !important; }
    
    .atom-orbit {
        width: 150px; height: 80px;
        margin-top: -40px; margin-left: -75px;
    }
    .atom-orbit.orbit-2 {
        width: 170px; height: 100px;
        margin-top: -50px; margin-left: -85px;
    }
    .atom-orbit.orbit-3 {
        width: 190px; height: 120px;
        margin-top: -60px; margin-left: -95px;
    }
    
    .whatsapp-hotspot {
        width: 50px; height: 50px;
        bottom: 20px; left: 20px;
    }
}
