/* ============================================
   MENAVDC — Premium Coming Soon Page
   Fonts: Inter | Brand Colors from Logo
   ============================================ */

:root {
    --red:       #EF3B39;
    --green:     #00A651;
    --black:     #080808;
    --black-2:   #111111;
    --white:     #ffffff;
    --white-50:  rgba(255,255,255,0.5);
    --white-20:  rgba(255,255,255,0.2);
    --white-10:  rgba(255,255,255,0.1);
    --white-05:  rgba(255,255,255,0.05);
    --border:    rgba(255,255,255,0.10);
    --white-30:  rgba(255,255,255,0.3);
    --logo-glow: rgba(239,59,57,0.12);
    --green-glow:rgba(0,166,81,0.10);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--black);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Background Effects ──────────────────── */
.bg-logo-echo {
    position: fixed;
    width: 680px;
    height: 680px;
    top: 50%;
    right: -180px;
    transform: translateY(-50%);
    background-image: url('https://www.menavdc.ae/logo/menavdc-logo-white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
    filter: blur(2px);
}

.bg-circle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    opacity: 0.14;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: var(--red);
    top: -180px;
    right: -180px;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: var(--green);
    bottom: -120px;
    left: -120px;
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ── Language Bar ───────────────────────── */
.lang-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: stretch;
    gap: 0;
    z-index: 100;
    background: rgba(8,8,8,0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.lang-btn {
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--white-30);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    padding: 14px 18px;
    text-transform: uppercase;
}

.lang-btn:first-child {
    border-left: none;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--white);
    background: rgba(255,255,255,0.04);
}

.lang-btn.active {
    color: var(--red);
}

.lang-divider {
    display: none;
}

/* ── Layout Wrapper ─────────────────────── */
.wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* hides old aside columns — not used anymore */
.aside { display: none; }

/* ── Top Header Bar (white — logo background) ─── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 64px;   /* right: 0 — lang-group flushes to edge */
    height: 80px;
    background: #ffffff;
    border-left: 6px solid var(--red);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 3px 28px rgba(0,0,0,0.30), 0 1px 0 rgba(0,0,0,0.08);
    opacity: 0;
    animation: fadeDown 0.6s ease 0.1s forwards;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* header-logo: vertical centering since header is align-items:stretch */
.header-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0 28px 0 0;
}

/* Black logo — no glow needed */
.header-logo-img {
    height: 52px;
    width: auto;
    display: block;
    filter: none;
    transition: opacity 0.25s;
}

.header-logo:hover .header-logo-img {
    opacity: 0.70;
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.header-brand-name {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #0a0a0a;
    text-transform: uppercase;
    line-height: 1;
}

.header-brand-name span {
    color: var(--red);
}

.header-brand { display: none; }
.header-brand-name { display: none; }
.header-brand-tag  { display: none; }

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    /* right: 0 so lang-group flushes to header edge */
    padding: 0 0 0 24px;
}

/* ─ Lang group: transparent, blends with white header ─ */
.lang-group {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    background: transparent;
    border-left: 1px solid rgba(0,0,0,0.12);
    margin-left: 8px;
    margin-right: 0;
}

.lang-btn {
    background: none;
    border: none;
    border-left: 1px solid rgba(0,0,0,0.10);
    color: #a0a0a0;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    padding: 0 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.lang-btn:first-child {
    border-left: none;
}

.lang-btn:hover {
    color: #222;
    background: rgba(0,0,0,0.04);
}

.lang-btn.active {
    color: var(--red);
    background: rgba(239,59,57,0.05);
}

/* ── UAE flag stripe decoration — 3 thin lines ── */
.header-flag-stripes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 4px;
    flex-shrink: 0;
}

.header-flag-stripes span {
    display: block;
    width: 32px;
    height: 3px;
    border-radius: 2px;
}

.hf-green { background: #009A44; }
.hf-white { background: #EF3B39; }   /* red — UAE flag colour */
.hf-black { background: #000000; }

/* ── Coming-soon badge ───────────────────────── */
.header-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #0a0a0a;
    border: 1.5px solid rgba(10,10,10,0.22);
    padding: 6px 14px;
    text-transform: uppercase;
    background: transparent;
    white-space: nowrap;
}

/* ── Main Column ─────────────────────────── */
.main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px 80px 56px;
    flex: 1;
}

/* ── Header / Logo (old — hidden by site-header) ── */
.header { display: none; }
.logo   { display: none; }

/* ── Hero ────────────────────────────────── */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 0 48px;
    gap: 28px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.35s forwards;
}

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 14px;
}

.eyebrow::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--red);
    flex-shrink: 0;
}

.headline {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
}

.line-1 {
    display: block;
    font-size: clamp(56px, 9vw, 112px);
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--white);
    text-transform: uppercase;
}

.line-accent {
    display: block;
    font-size: clamp(56px, 9vw, 112px);
    font-weight: 900;
    letter-spacing: -2px;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--white-20);
    text-transform: uppercase;
}

.sub {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--white-50);
    max-width: 580px;
    border-left: 2px solid var(--red);
    padding-left: 20px;
    letter-spacing: 0.1px;
}

/* ── Locations ───────────────────────────── */
.locations {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 0 48px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.5s forwards;
}

.loc-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    flex: 1;
    position: relative;
    transition: background 0.3s;
}

.loc-item:hover {
    background: var(--white-05);
}

.loc-separator {
    width: 1px;
    background: var(--border);
    margin: 16px 40px;
    flex-shrink: 0;
}

.loc-flag {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.loc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loc-city {
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loc-region {
    font-size: 12px;
    font-weight: 400;
    color: var(--green);
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.loc-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    margin-left: auto;
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green); }
    50% { opacity: 0.5; box-shadow: 0 0 20px var(--green); }
}

/* ── Infrastructure Status ──────────────── */
.status-section {
    margin-bottom: 56px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.65s forwards;
}

.status-widget {
    border: 1px solid var(--border);
    width: 100%;
}

.status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.status-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--white-50);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease infinite;
}

.status-ts {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--white-30);
    font-variant-numeric: tabular-nums;
}

.status-nodes {
    border-bottom: 1px solid var(--border);
}

.snode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 12px;
}

.snode:last-child {
    border-bottom: none;
}

.snode-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.snode-flag {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.snode-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--white);
}

.snode-facility {
    font-size: 10px;
    color: var(--white-30);
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.snode-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.snode-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.sm-v {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sm-g { color: var(--green); }

.sm-k {
    font-size: 9px;
    font-weight: 400;
    color: var(--white-30);
    letter-spacing: 1px;
}

.sbadge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border: 1px solid;
}

.sbadge-p {
    color: rgba(239, 189, 57, 0.8);
    border-color: rgba(239, 189, 57, 0.3);
    background: rgba(239, 189, 57, 0.04);
}

.sbadge-a {
    color: var(--green);
    border-color: rgba(0, 166, 81, 0.3);
    background: rgba(0, 166, 81, 0.04);
}

.status-paths {
    padding: 12px 0;
}

.spath {
    display: flex;
    align-items: center;
    padding: 5px 18px;
    gap: 10px;
}

.sp-node {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--white-30);
    white-space: nowrap;
    width: 110px;
    flex-shrink: 0;
}

.sp-node:last-of-type {
    text-align: left;
    width: 90px;
}

.sp-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.sp-travel {
    position: absolute;
    top: -1px;
    left: -20%;
    width: 20%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    animation: travel 2.4s linear infinite;
}

/* Reverse pulse — travels right to left, offset by 1.2s */
.sp-travel-back {
    animation: travel-back 2.4s linear 1.2s infinite;
    left: auto;
    right: -20%;
    background: linear-gradient(270deg, transparent, rgba(0,166,81,0.5), transparent);
}

@keyframes travel {
    from { left: -20%; }
    to   { left: 120%; }
}

@keyframes travel-back {
    from { right: -20%; }
    to   { right: 120%; }
}

.sp-lat {
    font-size: 10px;
    font-weight: 600;
    color: var(--white-50);
    font-variant-numeric: tabular-nums;
    width: 54px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Footer ──────────────────────────────── */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.footer-email {
    font-size: 13px;
    font-weight: 400;
    color: var(--white-50);
    letter-spacing: 0.3px;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-email:hover {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-copy {
    font-size: 12px;
    font-weight: 400;
    color: var(--white-20);
    letter-spacing: 0.5px;
}

/* ── Animations ──────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast Notification ──────────────────── */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--white);
    color: var(--black);
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 200;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--red);
    color: var(--white);
}

/* ── Arabic RTL ──────────────────────────── */
html[dir="rtl"] .wrapper {
    direction: rtl;
}

html[dir="rtl"] .main {
    direction: rtl;
}

/* RTL: flip red border, padding and lang-group to opposite side */
html[dir="rtl"] .site-header {
    direction: rtl;
    border-left: none;
    border-right: 6px solid var(--red);
    padding: 0 64px 0 0;   /* logo on right, lang-group flushes to left edge */
}

html[dir="rtl"] .header-logo {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header-right {
    flex-direction: row-reverse;
    /* left: 0 so lang-group flushes to left edge in RTL */
    padding: 0 24px 0 0;
}

/* lang-group: flip border for RTL (light, matches white header) */
html[dir="rtl"] .lang-group {
    border-left: none;
    border-right: 1px solid rgba(0,0,0,0.12);
    margin-left: 0;
    margin-right: 8px;
}

/* RTL lang-btn borders — light on white header */
html[dir="rtl"] .lang-btn {
    border-left: none;
    border-right: 1px solid rgba(0,0,0,0.10);
}

html[dir="rtl"] .lang-btn:first-child {
    border-right: none;
}

html[dir="rtl"] .header-flag-stripes {
    /* stripes look natural on either side */
}

html[dir="rtl"] .aside {
    border-right: none;
    border-left: 1px solid var(--border);
}

html[dir="rtl"] .sub {
    border-left: none;
    border-right: 2px solid var(--red);
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] .snode {
    flex-direction: row-reverse;
}

html[dir="rtl"] .snode-left {
    flex-direction: row-reverse;
}

html[dir="rtl"] .snode-metric {
    align-items: flex-start;
}

html[dir="rtl"] .spath {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sp-node:last-of-type {
    text-align: right;
}

html[dir="rtl"] .eyebrow::before {
    display: none;
}

html[dir="rtl"] .eyebrow::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--red);
    flex-shrink: 0;
}

html[dir="rtl"] .footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .loc-separator {
    display: none;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
    .wrapper {
        grid-template-columns: 1fr;
    }

    .site-header {
        padding-left: 40px;
    }

    .main {
        padding: 48px 48px;
    }

    .loc-separator {
        margin: 16px 24px;
    }
}

@media (max-width: 768px) {
    .wrapper {
        grid-template-columns: 1fr;
    }

    .aside {
        display: none;
    }

    /* Compact lang buttons on mobile */
    .lang-btn {
        padding: 0 14px;
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .site-header {
        padding-left: 20px;
    }

    .header-right {
        gap: 12px;
        padding: 0 0 0 16px;
    }

    .lang-group {
        margin-right: 0;
    }

    .header-brand { display: none; }
    /* Keep badge visible on tablet */

    .main {
        padding: 40px 28px;
    }

    .locations {
        flex-direction: column;
        gap: 0;
    }

    .loc-separator {
        display: none;
    }

    .loc-item {
        border-bottom: 1px solid var(--border);
        padding: 20px 0;
    }

    .loc-item:last-child {
        border-bottom: none;
    }

    .status-widget {
        max-width: 100%;
    }

    .sbadge {
        display: none;
    }

    .snode-right {
        gap: 12px;
    }

    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 32px 20px;
        overflow-x: hidden;
    }

    .site-header {
        padding-left: 16px;
        height: 64px;
    }

    .header-right {
        gap: 8px;
        padding: 0 0 0 10px;
    }

    /* Flag stripes hidden on very small screens */
    .header-flag-stripes {
        display: none;
    }

    /* Badge: hidden on small mobile to free space for lang buttons */
    .header-badge {
        display: none;
    }

    .lang-btn {
        padding: 0 12px;
        font-size: 9px;
    }

    .line-1,
    .line-accent {
        letter-spacing: -1px;
    }

    .sub {
        font-size: 14px;
    }

    .header-logo-img {
        height: 34px;
    }

    .header-brand-name {
        font-size: 14px;
    }

    /* Hide large watermark — causes overflow on narrow screens */
    .bg-logo-echo {
        display: none;
    }

    /* Spath: wrap nodes on very narrow screens */
    .spath {
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 8px 12px;
    }

    .sp-line {
        display: none;
    }

    .sp-node {
        width: auto;
        flex-shrink: 1;
    }

    .sp-node:last-of-type {
        width: auto;
        text-align: left;
    }

    /* Truncate very long facility strings */
    .snode-facility {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Status widget full-width protection */
    .status-widget {
        max-width: 100%;
        overflow: hidden;
    }

    .status-nodes,
    .status-paths {
        overflow: hidden;
    }
}
