/* Global Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #050505;
    --gold: #d4af37;
    --gold-light: #ffd700;
    --gold-dark: #b8860b;
    --blue: #0b1a2d;
    --card-bg: rgba(12, 20, 34, 0.8);
    --text: #f5f5f5;
    --text-muted: #cbd5e1;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
}

body {
    background-color: var(--bg);
    position: relative;
    overflow-x: hidden;
}

/* Pharaonic Hieroglyphics Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.08;
    background-image:
        /* Hieroglyphics symbols */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ctext x='20' y='40' font-family='serif' font-size='30' fill='%23d4af37'%3E𓀀%3C/text%3E%3Ctext x='80' y='80' font-family='serif' font-size='25' fill='%23d4af37'%3E𓁹%3C/text%3E%3Ctext x='140' y='50' font-family='serif' font-size='28' fill='%23d4af37'%3E𓂀%3C/text%3E%3Ctext x='30' y='120' font-family='serif' font-size='32' fill='%23d4af37'%3E𓃭%3C/text%3E%3Ctext x='100' y='150' font-family='serif' font-size='26' fill='%23d4af37'%3E𓄿%3C/text%3E%3Ctext x='160' y='130' font-family='serif' font-size='30' fill='%23d4af37'%3E𓅓%3C/text%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
}

/* Additional animated layer with different symbols */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Ctext x='40' y='60' font-family='serif' font-size='35' fill='%23ffd700'%3E𓆣%3C/text%3E%3Ctext x='120' y='100' font-family='serif' font-size='28' fill='%23ffd700'%3E𓇋%3C/text%3E%3Ctext x='180' y='70' font-family='serif' font-size='30' fill='%23ffd700'%3E𓈖%3C/text%3E%3Ctext x='50' y='160' font-family='serif' font-size='33' fill='%23ffd700'%3E𓉐%3C/text%3E%3Ctext x='140' y='200' font-family='serif' font-size='29' fill='%23ffd700'%3E𓊖%3C/text%3E%3Ctext x='200' y='180' font-family='serif' font-size='31' fill='%23ffd700'%3E𓋹%3C/text%3E%3C/svg%3E");
    background-size: 250px 250px;
    background-repeat: repeat;
}



/* Radial gradient overlay for depth */
body {
    background-image:
        radial-gradient(circle at 50% 0%, #1a2c4e 0%, transparent 70%),
        repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 20px);
    background-attachment: fixed;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

header h2 {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    background: linear-gradient(to right, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

nav {
    display: flex;
    gap: clamp(10px, 2vw, 20px);
    align-items: center;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 1rem);
    transition: 0.3s;
}

nav a:hover {
    color: var(--gold);
}

#themeToggle {
    background: none;
    border: 1px solid var(--gold);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 5% 40px;
    position: relative;
}

.hero-logo {
    width: 80%;
    max-width: 450px;
    height: auto;
    margin-bottom: 20px;
    mix-blend-mode: screen;
    animation: float 6s ease-in-out infinite;
}

h1 {
    font-size: clamp(1.8rem, 8vw, 3.5rem);
    margin: 10px 0;
    line-height: 1.2;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

h3 {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

/* Pharaonic Buttons */
.cta a,
form button {
    display: inline-block;
    padding: 14px 30px;
    background: radial-gradient(circle at center, #161e31, #0b1120);
    color: var(--gold) !important;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    position: relative;
    border: none;
    cursor: pointer;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    transition: transform 0.3s, filter 0.3s;
}

.cta a::before,
form button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold-dark));
    z-index: -1;
    padding: 2px;
    clip-path: inherit;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.cta a:hover,
form button:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

/* Sections */
section {
    padding: clamp(50px, 10vh, 100px) 5%;
    position: relative;
}

section h2 {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
    text-align: center;
    margin: 0 auto clamp(30px, 5vh, 60px);
    color: var(--gold);
    width: fit-content;
}

section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    margin: 10px auto;
    background: var(--gold);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
}

/* Enhanced Card Styles */
.card {
    background: linear-gradient(145deg, #0f172a, #0b1120);
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 1;

    /* Text styles for direct text nodes (Services section) */
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    z-index: -1;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 175, 55, 0.4),
        inset 0 0 10px rgba(212, 175, 55, 0.1);
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.card:hover::before {
    left: 150%;
    transition: 0.7s ease-in-out;
}

.card h4 {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 10px;
    transition: 0.3s;
}

.card:hover h4 {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
    transform: scale(1.05);
}

.card p {
    font-size: 1rem;
    font-weight: 400;
    color: #cbd5e1;
    text-shadow: none;
}

/* About Section Image */
.photo {
    width: 60%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 30px auto 0;
    mix-blend-mode: screen;
    animation: float 6s ease-in-out infinite;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

input,
textarea {
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: white;
    font-family: inherit;
    border-radius: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 5%;
    background: #020617;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* Floating Socials */
.social-sidebar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.facebook {
    background: #1877f2;
}

.whatsapp {
    background: #25d366;
}

.snapchat {
    background: #fffc00;
    color: #000;
}

.tiktok {
    background: #000;
}

.maps {
    background: #ea4335;
}

/* Light Mode */
body.light {
    --bg: #f8fafc;
    --text: #0f172a;
    --text-muted: #475569;
}

body.light header {
    background: rgba(255, 255, 255, 0.95);
}

body.light .card {
    background: white;
    border-color: #e2e8f0;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Specific Fixes */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px 5%;
    }

    nav {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .cta a,
    form button {
        width: 100%;
        text-align: center;
    }

    .social-sidebar {
        right: 10px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    font-size: 24px;
    border: none;
    outline: none;
    background: var(--gold);
    color: #000;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: 0.3s;
    font-weight: bold;
}

#backToTop:hover {
    background: var(--gold-light);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Mobile Adjustments for BackToTop */
@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        left: 20px;
        font-size: 20px;
        padding: 8px 15px;
    }
}

/* ============================================ */
/* Preloader / Loading Screen */
/* ============================================ */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0b1120 0%, #1a2c4e 50%, #0b1120 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.pharaoh-loader {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 30px;
    height: 100px;
}

.pyramid {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 60px solid var(--gold);
    animation: pyramidPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

.pyramid-2 {
    animation-delay: 0.3s;
    border-bottom-color: var(--gold-light);
}

.pyramid-3 {
    animation-delay: 0.6s;
    border-bottom-color: var(--gold-dark);
}

@keyframes pyramidPulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.7;
    }
}

.preloader-title {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    animation: shimmer 3s linear infinite;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.loading-bar {
    width: 250px;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    border-radius: 10px;
    animation: loadingProgress 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--gold);
}

@keyframes loadingProgress {
    0% {
        width: 0%;
        transform: translateX(0);
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
        transform: translateX(0);
    }
}

.preloader-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}