/* ============================================================
   CSS VARIABLES
============================================================ */
:root {
    --teal:          #1ab6c8;
    --teal-mid:      #1590b0;
    --navy:          #1a4b7a;
    --navy-deep:     #0f2f52;
    --gold:          #c9a84c;
    --gold-light:    #e8c97a;
    --white:         #ffffff;
    --off-white:     #f4f8fb;
    --text-dark:     #0d1f36;
    --text-mid:      #3a5a78;
    --text-light:    #7ea8c4;
    --border:        rgba(26,182,200,.18);
    --shadow-card:   0 8px 40px rgba(15,47,82,.18);
    --gradient:      linear-gradient(135deg,var(--teal) 0%,var(--navy-deep) 100%);
    --gradient-gold: linear-gradient(135deg,var(--gold) 0%,var(--gold-light) 50%,var(--gold) 100%);
    --radius:        14px;
    --transition:    .35s cubic-bezier(.4,0,.2,1);
    --font-main:     'Cairo', sans-serif;
    --font-sub:      'Tajawal', sans-serif;
}

/* ============================================================
   RESET & BASE
============================================================ */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--font-main);background:var(--off-white);color:var(--text-dark);overflow-x:hidden}
img{display:block;max-width:100%}
a{text-decoration:none;color:inherit}

/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar{width:6px}
::-webkit-scrollbar-track{background:var(--off-white)}
::-webkit-scrollbar-thumb{background:var(--teal-mid);border-radius:99px}

/* ============================================================
   NAVBAR
   — removed backdrop-filter (expensive GPU layer on mobile)
   — replaced with solid semi-transparent bg + will-change:none
============================================================ */
.navbar{
    position:fixed;top:0;left:0;right:0;z-index:100;
    display:flex;align-items:center;justify-content:space-between;
    padding:0 2.5rem;height:70px;
    background:rgba(12,38,68,.92);          /* solid, no backdrop-filter */
    border-bottom:1px solid rgba(201,168,76,.2);
    transition:background var(--transition);
}
.navbar.scrolled{background:rgba(8,24,46,.98)}

.logo-wrapper a{display:flex;align-items:center;gap:.75rem}
.site-logo{
    height:46px;width:auto;
    /* Reserve space to prevent CLS */
    aspect-ratio:auto 200/69;
    transition:transform var(--transition);
}
.site-logo:hover{transform:scale(1.05)}

.nav-links{display:flex;gap:2rem;list-style:none}
.nav-links a{
    font-size:.9rem;font-weight:600;color:rgba(255,255,255,.8);
    letter-spacing:.04em;transition:color var(--transition);position:relative;
}
.nav-links a::after{
    content:'';position:absolute;bottom:-4px;left:0;right:0;
    height:2px;background:var(--gold);
    transform:scaleX(0);transition:transform var(--transition);border-radius:99px;
}
.nav-links a:hover{color:var(--gold-light)}
.nav-links a:hover::after{transform:scaleX(1)}

.nav-cta{
    background:var(--gradient);color:var(--white)!important;
    padding:.45rem 1.2rem;border-radius:99px;font-size:.85rem!important;
    transition:opacity var(--transition),transform var(--transition)!important;
}
.nav-cta:hover{opacity:.88;transform:translateY(-1px)!important}
.nav-cta::after{display:none!important}

/* ============================================================
   HERO — COLLAGE + ART LOGO
   — collage images opacity reduced to avoid LCP competition
   — animations use animation-fill-mode:both + respect prefers-reduced-motion
============================================================ */
.hero-collage{
    position:relative;height:100vh;min-height:640px;
    overflow:hidden;display:flex;align-items:center;justify-content:center;
    /* Reserve viewport height — prevents CLS */
    contain:layout style;
}

.collage-bg{
    position:absolute;inset:0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    grid-template-rows:repeat(4,1fr);
    gap:3px;
    transform:scale(1.05);
    /* Zoom animation deferred — starts after LCP */
    animation:slowZoom 22s 1s ease-in-out infinite alternate both;
    will-change:transform;
}
@keyframes slowZoom{
    from{transform:scale(1.05) rotate(0deg)}
    to  {transform:scale(1.12) rotate(.4deg)}
}
.collage-bg img{
    width:100%;height:100%;
    object-fit:cover;opacity:.5;
    /* Explicit dimensions prevent CLS — actual size set by grid */
    min-width:0;min-height:0;
}

.hero-overlay{
    position:absolute;inset:0;
    background:
        radial-gradient(ellipse at 50% 40%,rgba(15,47,82,.5) 0%,rgba(8,20,40,.94) 100%),
        linear-gradient(180deg,rgba(8,20,40,.72) 0%,rgba(10,30,60,.45) 50%,rgba(8,20,40,.88) 100%);
}
.hero-overlay::after{
    content:'';position:absolute;inset:0;
    background:repeating-linear-gradient(
        -55deg,transparent 0px,transparent 60px,
        rgba(201,168,76,.025) 60px,rgba(201,168,76,.025) 62px);
}

.hero-content{
    position:relative;z-index:2;text-align:center;color:var(--white);
    padding:2rem;max-width:860px;width:100%;
    display:flex;flex-direction:column;align-items:center;
}

@keyframes heroFadeUp{
    from{opacity:0;transform:translateY(28px)}
    to  {opacity:1;transform:translateY(0)}
}

/* Art logo — LCP element, no animation delay */
.hero-art-logo{
    width:min(500px,85vw);height:auto;display:block;margin:0 auto 2rem;
    /* Explicit aspect ratio prevents CLS */
    aspect-ratio:1764/608;
    filter:drop-shadow(0 0 40px rgba(201,168,76,.45)) drop-shadow(0 10px 32px rgba(0,0,0,.65));
    /* No animation on LCP element — don't block paint */
}

.hero-divider{
    width:100px;height:2px;background:var(--gradient-gold);
    border-radius:99px;margin:0 auto 1.8rem;
    box-shadow:0 0 14px rgba(201,168,76,.55);
    animation:heroFadeUp .7s .3s both;
}

.hero-badge{
    display:inline-block;
    background:rgba(201,168,76,.14);border:1px solid rgba(201,168,76,.55);
    color:var(--gold-light);font-size:.76rem;font-weight:700;
    letter-spacing:.14em;text-transform:uppercase;
    padding:.38rem 1.2rem;border-radius:99px;margin-bottom:1.3rem;
    animation:heroFadeUp .7s .4s both;
}

.hero-content h1{
    font-size:clamp(2.2rem,5vw,4rem);font-weight:900;line-height:1.18;
    text-shadow:0 0 2px #000,0 2px 4px rgba(0,0,0,.95),0 6px 18px rgba(0,0,0,.85),0 14px 50px rgba(0,0,0,.65);
    animation:heroFadeUp .7s .5s both;
    margin-bottom:.6rem;
}
.hero-content h1 .gold{
    background:var(--gradient-gold);
    -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
    filter:drop-shadow(0 2px 8px rgba(201,168,76,.4));
}

.hero-subtitle{
    font-family:var(--font-sub);font-size:clamp(.95rem,2vw,1.18rem);font-weight:400;
    color:rgba(255,255,255,.9);
    text-shadow:0 1px 3px rgba(0,0,0,1),0 4px 14px rgba(0,0,0,.9),0 10px 30px rgba(0,0,0,.75);
    animation:heroFadeUp .7s .6s both;
    letter-spacing:.04em;
}

.hero-scroll-hint{
    margin-top:3rem;display:flex;flex-direction:column;align-items:center;gap:.5rem;
    color:rgba(255,255,255,.35);font-size:.68rem;font-family:var(--font-sub);
    letter-spacing:.12em;animation:heroFadeUp .7s .75s both;
}
.scroll-arrow{
    width:20px;height:20px;
    border-right:2px solid rgba(201,168,76,.5);border-bottom:2px solid rgba(201,168,76,.5);
    transform:rotate(45deg);animation:scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce{
    0%,100%{transform:rotate(45deg) translateY(0);opacity:.4}
    50%     {transform:rotate(45deg) translateY(5px);opacity:.9}
}

/* Respect reduced motion */
@media(prefers-reduced-motion:reduce){
    .collage-bg,.hero-divider,.hero-badge,.hero-content h1,.hero-subtitle,
    .hero-scroll-hint,.scroll-arrow{animation:none!important;opacity:1!important;transform:none!important}
}

/* ============================================================
   BUTTONS
============================================================ */
.btn{
    display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.8rem;
    border-radius:99px;font-family:var(--font-main);font-weight:700;font-size:.92rem;cursor:pointer;
    transition:transform var(--transition),box-shadow var(--transition),opacity var(--transition);
}
.btn-primary{background:var(--gradient);color:var(--white);box-shadow:0 6px 28px rgba(26,182,200,.38)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 10px 36px rgba(26,182,200,.5)}
.btn-outline{background:transparent;border:2px solid rgba(255,255,255,.4);color:var(--white)}
.btn-outline:hover{border-color:var(--teal);color:var(--teal);transform:translateY(-2px)}

/* ============================================================
   STATS BAR
============================================================ */
.stats-bar{
    background:var(--gradient);padding:1.6rem 2rem;
    display:flex;justify-content:center;gap:3rem;flex-wrap:wrap;
}
.stat-item{text-align:center;color:var(--white)}
.stat-number{font-size:2rem;font-weight:900;line-height:1}
.stat-label{font-size:.78rem;opacity:.75;margin-top:.3rem;font-family:var(--font-sub)}

/* ============================================================
   SECTION HEADERS
============================================================ */
.section-header{text-align:center;margin-bottom:3.5rem}
.sub-label{
    display:inline-flex;align-items:center;gap:.5rem;
    font-size:.75rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
    color:var(--teal-mid);margin-bottom:.9rem;
}
.sub-label::before,.sub-label::after{
    content:'';display:block;width:28px;height:2px;background:var(--teal);border-radius:99px;
}
.section-header h2{font-size:clamp(1.8rem,4vw,2.8rem);font-weight:900;color:var(--text-dark);line-height:1.2}
.section-header p{
    font-family:var(--font-sub);color:var(--text-mid);max-width:520px;
    margin:.9rem auto 0;font-size:.98rem;line-height:1.7;
}

/* ============================================================
   ABOUT SECTION
   — content-visibility:auto defers off-screen rendering
============================================================ */
.about-section{padding:7rem 2rem;background:var(--white);content-visibility:auto;contain-intrinsic-size:0 600px}
.about-container{
    max-width:1140px;margin:0 auto;
    display:grid;grid-template-columns:1fr 1fr;gap:5rem;align-items:center;
}
.about-image{position:relative;border-radius:var(--radius);overflow:hidden}
.about-image::before{
    content:'';position:absolute;inset:-3px;
    border-radius:calc(var(--radius) + 3px);background:var(--gradient);z-index:-1;
}
.about-image img{
    width:100%;aspect-ratio:4/3;object-fit:cover;
    border-radius:var(--radius);transition:transform .6s ease;
}
.about-image:hover img{transform:scale(1.04)}
.about-image::after{
    content:'';position:absolute;bottom:-20px;right:-20px;width:140px;height:140px;
    background-image:radial-gradient(circle,var(--teal) 1.5px,transparent 1.5px);
    background-size:14px 14px;opacity:.22;z-index:1;pointer-events:none;
}
.about-content .sub-label{justify-content:flex-start}
.about-content h2{
    font-size:clamp(1.7rem,3vw,2.5rem);font-weight:900;
    color:var(--text-dark);line-height:1.25;margin-bottom:1.2rem;
}
.about-content h2 em{font-style:normal;color:var(--teal-mid)}
.about-content p{font-family:var(--font-sub);color:var(--text-mid);font-size:.98rem;line-height:1.85;margin-bottom:1rem}
.features-list{list-style:none;margin:1.8rem 0;display:flex;flex-direction:column;gap:.8rem}
.features-list li{display:flex;align-items:center;gap:.75rem;font-size:.92rem;color:var(--text-mid);font-family:var(--font-sub)}
.features-list li i{
    flex-shrink:0;width:28px;height:28px;background:rgba(26,182,200,.12);color:var(--teal-mid);
    border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.75rem;
}

/* ============================================================
   SERVICES SECTION
============================================================ */
.services-section{padding:7rem 2rem;background:var(--off-white);content-visibility:auto;contain-intrinsic-size:0 700px}
.services-grid{
    max-width:1140px;margin:0 auto;
    display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.8rem;
}
.service-card{
    background:var(--white);border-radius:var(--radius);
    padding:2.2rem 1.8rem;box-shadow:var(--shadow-card);
    border:1px solid transparent;
    transition:transform var(--transition),border-color var(--transition),box-shadow var(--transition);
    position:relative;overflow:hidden;
}
.service-card::before{
    content:'';position:absolute;top:0;left:0;right:0;height:3px;
    background:var(--gradient);transform:scaleX(0);transform-origin:left;
    transition:transform var(--transition);
}
.service-card:hover{transform:translateY(-6px);border-color:var(--border);box-shadow:0 20px 52px rgba(15,47,82,.15)}
.service-card:hover::before{transform:scaleX(1)}
.service-icon{
    width:54px;height:54px;background:var(--gradient);border-radius:14px;
    display:flex;align-items:center;justify-content:center;
    font-size:1.35rem;color:var(--white);margin-bottom:1.4rem;
    box-shadow:0 6px 20px rgba(26,182,200,.3);
}
.service-card h3{font-size:1.1rem;font-weight:700;margin-bottom:.6rem;color:var(--text-dark)}
.service-card p{font-family:var(--font-sub);font-size:.88rem;color:var(--text-mid);line-height:1.7}

/* ============================================================
   GALLERY — MASONRY
============================================================ */
.gallery-section{padding:7rem 2rem;background:var(--white);content-visibility:auto;contain-intrinsic-size:0 1200px}
.masonry-grid{max-width:1280px;margin:0 auto;columns:4;column-gap:14px}
.gallery-item{break-inside:avoid;margin-bottom:14px;border-radius:10px;overflow:hidden;position:relative;cursor:pointer}
.gallery-item img{
    width:100%;display:block;
    transition:transform .5s ease,filter .5s ease;filter:saturate(.85);
}
.gallery-item::after{
    content:'';position:absolute;inset:0;
    background:linear-gradient(to top,rgba(15,47,82,.65),transparent 50%);
    opacity:0;transition:opacity var(--transition);border-radius:10px;
}
.gallery-item:hover img{transform:scale(1.06);filter:saturate(1.1)}
.gallery-item:hover::after{opacity:1}

/* ============================================================
   CONTACT STRIP
============================================================ */
.contact-strip{
    background:var(--gradient);padding:5rem 2rem;
    text-align:center;color:var(--white);position:relative;overflow:hidden;
    content-visibility:auto;contain-intrinsic-size:0 300px;
}
.contact-strip::before{
    content:'';position:absolute;inset:0;
    background: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='%23ffffff' fill-opacity='0.04'%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");
}
.contact-strip h2{font-size:clamp(1.6rem,3.5vw,2.4rem);font-weight:900;margin-bottom:.6rem;position:relative}
.contact-strip p{font-family:var(--font-sub);opacity:.8;margin-bottom:2rem;font-size:.98rem;position:relative}
.contact-buttons{display:flex;justify-content:center;gap:1rem;flex-wrap:wrap;position:relative}
.contact-phone-btn{
    display:inline-flex;align-items:center;gap:.6rem;
    background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.3);
    color:var(--white);padding:.7rem 1.4rem;border-radius:99px;
    font-size:.88rem;font-weight:600;
    transition:background var(--transition),transform var(--transition);
}
.contact-phone-btn:hover{background:rgba(255,255,255,.25);transform:translateY(-2px)}

/* ============================================================
   FOOTER
============================================================ */
.footer{background:var(--navy-deep);color:rgba(255,255,255,.8);padding:4rem 2rem 0;content-visibility:auto;contain-intrinsic-size:0 400px}
.footer-container{max-width:1140px;margin:0 auto}
.footer-top{
    display:flex;align-items:flex-start;justify-content:space-between;
    gap:3rem;flex-wrap:wrap;padding-bottom:3rem;border-bottom:1px solid rgba(255,255,255,.08);
}
.footer-brand img{height:52px;width:auto;margin-bottom:1rem;opacity:.9;aspect-ratio:auto}
.footer-brand p{font-family:var(--font-sub);font-size:.88rem;opacity:.55;max-width:240px;line-height:1.7}
.footer-grid{display:flex;gap:4rem;flex-wrap:wrap}
.footer-col h4{font-size:.82rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--teal);margin-bottom:1.2rem}
.footer-numbers{display:flex;flex-direction:column;gap:.55rem}
.footer-numbers a{font-size:.88rem;opacity:.7;direction:ltr;display:inline-block;transition:opacity var(--transition),color var(--transition)}
.footer-numbers a:hover{opacity:1;color:var(--teal)}
.footer-col p{font-family:var(--font-sub);font-size:.88rem;opacity:.65;line-height:1.7}
.social-links{display:flex;gap:.8rem;margin-top:.3rem}
.social-links a{
    width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.18);
    display:flex;align-items:center;justify-content:center;font-size:.85rem;
    transition:background var(--transition),border-color var(--transition),transform var(--transition);
}
.social-links a:hover{background:#1877f2;border-color:#1877f2;transform:translateY(-3px)}
.footer-bottom{padding:1.4rem 0;text-align:center;font-size:.78rem;opacity:.4;font-family:var(--font-sub)}

/* ============================================================
   FLOATING CONTROLS
============================================================ */
.floating-controls{position:fixed;bottom:2rem;left:1.4rem;display:flex;flex-direction:column;gap:.75rem;z-index:200}
[dir="ltr"] .floating-controls{left:auto;right:1.4rem}
.float-icon{
    width:48px;height:48px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;font-size:1.1rem;
    box-shadow:0 4px 20px rgba(0,0,0,.22);
    transition:transform var(--transition),box-shadow var(--transition);cursor:pointer;
}
.float-icon:hover{transform:scale(1.12);box-shadow:0 8px 28px rgba(0,0,0,.28)}
.lang-switch{background:var(--white);color:var(--navy);font-size:.7rem;font-weight:700;flex-direction:column;gap:0;line-height:1}
.lang-switch i{font-size:.85rem;margin-bottom:2px}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .7s cubic-bezier(.22,1,.36,1),transform .7s cubic-bezier(.22,1,.36,1)}
.reveal.visible{opacity:1;transform:none}

/* ============================================================
   RESPONSIVE
============================================================ */
@media(max-width:900px){
    .about-container{grid-template-columns:1fr;gap:2.5rem}
    .masonry-grid{columns:2}
    .footer-top{flex-direction:column;gap:2rem}
    .nav-links{display:none}
    .hero-art-logo{width:min(380px,90vw)}
}
@media(max-width:540px){
    .masonry-grid{columns:2}
    .stats-bar{gap:1.5rem}
    .navbar{padding:0 1.2rem}
    .footer-grid{gap:2rem}
    .hero-art-logo{width:min(290px,92vw)}
    .hero-content h1{font-size:clamp(1.7rem,7vw,2.6rem)}
}
