/* ─── Custom Fonts ────────────────────────────────────────────── */
@font-face {
    font-family: 'A Massir Ballpoint';
    src: local('A Massir Ballpoint'),
         url('A Massir Ballpoint.woff2') format('woff2'),
         url('A Massir Ballpoint.woff') format('woff'),
         url('A Massir Ballpoint.ttf') format('truetype'),
         url('A Massir Ballpoint.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sierra Danielle';
    src: local('Sierra Danielle'),
         url('Sierra Danielle.woff2') format('woff2'),
         url('Sierra Danielle.woff') format('woff'),
         url('Sierra Danielle.ttf') format('truetype'),
         url('Sierra Danielle.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ─── Design Tokens ───────────────────────────────────────────── */
:root {
    --gold:          #38bdf8;
    --gold-hover:    #0284c7;
    --gold-glow:     rgba(56,189,248,.35);
    --gold-light:    #0f172a;
    --card-bg:       rgba(15, 23, 42, 0.85);
    --card-border:   rgba(56,189,248,.35);
    --text-main:     #ffffff;
    --text-muted:    #94a3b8;
    --btn-bg:        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
    --btn-border:    rgba(56,189,248,.55);
    --btn-hover-bg:  linear-gradient(135deg, #0284c7, #38bdf8);
    --shadow-soft:   0 8px 24px rgba(0,0,0,.4);
    --shadow-btn:    0 6px 20px rgba(0,0,0,.4), 0 0 12px rgba(56,189,248,.18);
    --radius-card:   28px;
    --radius-btn:    16px;
    --font-ar:       'A Massir Ballpoint','Cairo','Tajawal',sans-serif;
    --font-en:       'Outfit',sans-serif;
    --font-serif:    'Sierra Danielle','Playfair Display',serif;
    --transition:    0.3s cubic-bezier(.16,1,.3,1);
}

/* Dark Mode Tokens */
body.dark-theme {
    --gold:          #7dd3fc;
    --gold-hover:    #38bdf8;
    --gold-glow:     rgba(125,211,252,.35);
    --gold-light:    #020617;
    --card-bg:       rgba(8, 14, 30, 0.90);
    --card-border:   rgba(125,211,252,.35);
    --text-main:     #ffffff;
    --text-muted:    #cbd5e1;
    --btn-bg:        linear-gradient(135deg, rgba(8, 14, 30, 0.95), rgba(15, 23, 42, 0.95));
    --btn-border:    rgba(125,211,252,.65);
    --btn-hover-bg:  linear-gradient(135deg, #0369a1, #0284c7);
    --shadow-soft:   0 12px 32px rgba(0,0,0,.5);
    --shadow-btn:    0 6px 22px rgba(0,0,0,.5), 0 0 16px rgba(125,211,252,.25);
}

/* ─── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
}

html[lang="ar"] { --font: var(--font-ar); }
html[lang="en"] { --font: var(--font-en); }

/* ─── Body & Background ───────────────────────────────────────── */
body {
    font-family: var(--font-ar);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 20px 60px;
    background-color: #020617;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    overscroll-behavior: none;
}

html[lang="en"] body { font-family: var(--font-en); }

/* Background image */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background: url('bg_space.png') center/cover no-repeat;
    opacity: 0.85;
    animation: panBackground 30s infinite alternate ease-in-out;
}

.bg-dunes {
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(circle at 0% 0%, rgba(56,189,248,.06) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(125,211,252,.05) 0%, transparent 45%);
}

.bg-glow {
    position: fixed;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(56,189,248,.09) 0%, transparent 70%);
    top: 20%; left: 50%;
    transform: translate(-50%,-50%);
    z-index: -1;
    pointer-events: none;
}

body.dark-theme .bg-glow  { background: radial-gradient(circle, rgba(125,211,252,.07) 0%, transparent 70%); }
body.dark-theme .bg-dunes { opacity: .2; }

/* ─── Top Controls ────────────────────────────────────────────── */
.top-controls {
    position: fixed;
    top: max(20px, env(safe-area-inset-top));
    left: max(20px, env(safe-area-inset-left));
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 10000;
}

.control-btn,
.theme-toggle-btn,
.lang-toggle-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.5);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25), inset 0 0 10px rgba(56, 189, 248, 0.15);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) {
    .control-btn:hover,
    .theme-toggle-btn:hover,
    .lang-toggle-btn:hover {
        transform: translateY(-2px) scale(1.08);
        box-shadow: 0 0 22px rgba(56, 189, 248, 0.7), inset 0 0 12px rgba(56, 189, 248, 0.4);
        border-color: #38bdf8;
        background: radial-gradient(circle at top left, rgba(2, 132, 199, 0.9), rgba(15, 23, 42, 0.95));
        color: #ffffff;
    }
}

.control-btn:active,
.theme-toggle-btn:active,
.lang-toggle-btn:active {
    transform: scale(0.92);
}

body:not(.dark-theme) .sun-icon { display:none; }
body.dark-theme .moon-icon      { display:none; }

/* ─── Logo per Theme ──────────────────────────────────────────── */
/* Light mode → logo.png, Dark mode → logo3.png */
body.dark-theme     .logo-light { display: none; }
body:not(.dark-theme) .logo-dark  { display: none; }

body.dark-theme .logo-dark {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.95)) 
            drop-shadow(0 12px 28px rgba(0, 0, 0, 0.95)) 
            drop-shadow(0 0 16px rgba(125, 211, 252, 0.75));
}

/* ─── Main Card ───────────────────────────────────────────────── */
.linky-container {
    width: 100%;
    max-width: 460px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 40px 28px 32px;
    box-shadow: none;
    backdrop-filter: blur(2px);
    animation: slideUpFade .7s cubic-bezier(.16,1,.3,1) both;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ─── Header ──────────────────────────────────────────────────── */
.linky-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Logo – no circle frame */
.logo-circle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-logo {
    width: 260px;
    height: auto;
    object-fit: contain;
}

/* Logo fallback text */
.logo-fallback-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.lf-top {
    font-family: var(--font-ar);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .25em;
    color: var(--text-main);
}

.lf-bot {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--gold);
}

/* Brand name */
.brand-name {
    font-family: var(--font-ar);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.01em;
}

html[lang="en"] .brand-name { font-family: var(--font-en); }

.brand-tagline {
    font-size: .9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Arabic tagline under logo */
.brand-tagline-ar {
    font-family: var(--font-ar);
    font-size: 1.6rem;
    color: #e0f7fa;
    font-weight: 700;
    letter-spacing: .03em;
    text-align: center;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ─── Links Section ───────────────────────────────────────────── */
.links-section,
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-section { gap: 10px; }

.contact-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

/* Row of two buttons */
.links-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ─── Button ──────────────────────────────────────────────────── */
.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 22px;
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: var(--radius-btn);
    color: #ffffff;
    text-decoration: none;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        color var(--transition);
    position: relative;
    overflow: hidden;
}

.link-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle at center, var(--gold-glow) 0%, transparent 70%);
    transition: opacity var(--transition);
}

.link-btn:hover::after { opacity: 1; }

.link-btn:hover {
    background: var(--btn-hover-bg);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.45);
}

.link-btn:active { transform: translateY(-1px); }

/* Full-width variant */
.link-btn.full { width: 100%; }

/* Half-width */
.link-btn.half { width: 100%; }

/* Outline/secondary style for feedback */
.link-btn.outline {
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--gold);
    color: #ffffff;
}

.link-btn.outline:hover {
    background: var(--gold-hover);
    color: #ffffff;
}

/* Contact buttons slightly smaller text */
.contact-btn { font-size: .98rem; }

/* Icon wrapper */
.link-icon {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(56,189,248,.6));
    transition: color var(--transition), filter var(--transition), transform var(--transition);
}

.link-btn:hover .link-icon {
    color: #ffffff !important;
    filter: drop-shadow(0 0 8px rgba(255,255,255,.9)) !important;
    transform: scale(1.1);
}

.link-btn.outline .link-icon { color: inherit; }

.link-icon svg { width: 24px; height: 24px; }

.link-label {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: .02em;
    text-shadow: 0 1px 4px rgba(0,0,0,.7);
    transition: color var(--transition);
}

/* ─── Individual Brand Accents ────────────────────────── */
#btn-menu {
    border-color: rgba(56, 189, 248, 0.7);
    background: linear-gradient(135deg, rgba(14, 30, 56, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-menu .link-icon { color: #38bdf8; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7)); }

#btn-whatsapp {
    border-color: rgba(37, 211, 102, 0.65);
    background: linear-gradient(135deg, rgba(10, 38, 22, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-whatsapp .link-icon { color: #25D366; filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.7)); }

#btn-instagram {
    border-color: rgba(225, 48, 108, 0.65);
    background: linear-gradient(135deg, rgba(42, 14, 30, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-instagram .link-icon { color: #e1306c; filter: drop-shadow(0 0 8px rgba(225, 48, 108, 0.7)); }

#btn-facebook {
    border-color: rgba(24, 119, 242, 0.65);
    background: linear-gradient(135deg, rgba(12, 28, 54, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-facebook .link-icon { color: #1877f2; filter: drop-shadow(0 0 8px rgba(24, 119, 242, 0.7)); }

#btn-tiktok {
    border-color: rgba(254, 44, 85, 0.65);
    background: linear-gradient(135deg, rgba(38, 12, 24, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-tiktok .link-icon { color: #fe2c55; filter: drop-shadow(0 0 8px rgba(254, 44, 85, 0.7)); }

#btn-feedback {
    border-color: rgba(255, 215, 0, 0.65);
    background: linear-gradient(135deg, rgba(45, 38, 10, 0.95), rgba(15, 23, 42, 0.95));
}
#btn-feedback .link-icon { color: #FFD700; filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7)); }

.contact-btn {
    border-color: rgba(56, 189, 248, 0.6);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
}
.contact-btn .link-icon { color: #38bdf8; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6)); }

/* ─── Location / Map Section ──────────────────────────────────── */
.location-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-subheading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    letter-spacing: .04em;
    margin-top: 4px;
}

.map-wrapper {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-btn);
}

.map-wrapper iframe {
    display: block;
    filter: invert(92%) hue-rotate(180deg) saturate(0.85) brightness(0.88);
    width: 100%;
}

body:not(.dark-theme) .map-wrapper iframe {
    filter: none;
}

.open-maps-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    padding: 7px 13px;
    border-radius: 10px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(125,211,252,.2);
    transition: background var(--transition), border-color var(--transition);
    font-family: 'Outfit', sans-serif;
}

.open-maps-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: var(--gold);
}

body:not(.dark-theme) .open-maps-btn {
    background: rgba(255,255,255,0.88);
    color: #0f172a;
    border-color: rgba(56,189,248,.3);
}

body:not(.dark-theme) .open-maps-btn:hover {
    background: rgba(255,255,255,1);
    border-color: var(--gold);
}

/* ─── Footer ──────────────────────────────────────────────────── */
.linky-footer {
    text-align: center;
    font-size: .78rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--card-border);
    padding-top: 18px;
    margin-top: 4px;
}

.linky-footer a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition);
}

.linky-footer a:hover { color: var(--gold-hover); text-decoration: underline; }

/* ─── Intro / Splash ──────────────────────────────────────────── */
body.intro-active { overflow: hidden; }

.intro-screen {
    position: fixed; inset: 0;
    background: #020617;
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity .45s cubic-bezier(.77,0,.18,1), visibility .45s;
}

.intro-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}

.intro-logo-wrapper {
    position: relative;
    width: 250px; height: 160px;
    display: flex; align-items: center; justify-content: center;
    animation: introLogoEntrance 1.1s cubic-bezier(.16,1,.3,1) both;
}

.intro-logo {
    width: 100%; height: 100%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 0 14px rgba(56,189,248,.22));
}

.intro-glow {
    position: absolute;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,.3) 0%, transparent 70%);
    z-index: 1;
    animation: introGlowPulse 2.2s infinite ease-in-out;
}

/* ─── Keyframes ───────────────────────────────────────────────── */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes introLogoEntrance {
    from { opacity:0; transform: scale(.7) translateY(20px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}

@keyframes introGlowPulse {
    0%,100% { transform: scale(1);    opacity: .4; }
    50%      { transform: scale(1.25); opacity: .85; }
}

@keyframes panBackground {
    0% { transform: scale(1.05) translate(0, 0); }
    50% { transform: scale(1.1) translate(-10px, 15px); }
    100% { transform: scale(1.05) translate(10px, -5px); }
}

/* ─── Mobile Responsive ───────────────────────────────────────── */
@media (max-width: 520px) {
    body {
        padding: 24px 16px 40px;
        align-items: center;
        min-height: 100dvh;
    }

    .linky-container {
        width: 100%;
        max-width: 420px;
        min-height: unset;
        border-radius: 24px;
        border: 1px solid var(--card-border);
        padding: 36px 18px 28px;
        gap: 20px;
    }

    /* Logo */
    .circle-logo {
        width: 190px;
    }

    /* Buttons */
    .link-btn {
        padding: 14px 16px;
        font-size: .95rem;
        border-radius: 14px;
    }

    .links-row { gap: 10px; }

    /* Map */
    .map-wrapper iframe { height: 200px; }

    /* Top controls */
    .top-controls {
        top: 16px;
        left: 16px;
    }
    .theme-toggle-btn,
    .lang-toggle-btn {
        width: 38px;
        height: 38px;
        font-size: .78rem;
    }


    /* Footer */
    .linky-footer { margin-top: 8px; }
}

@media (max-width: 360px) {
    .links-row {
        grid-template-columns: 1fr;
    }

    .linky-container {
        padding: 32px 14px 24px;
    }
}

