/* ═══════════════════════════════════════════════════════
   Nexafliq — Main Website Stylesheet
   Palette: Deep Navy · Electric Blue → Cyan Green
   ═══════════════════════════════════════════════════════ */

:root {
    --deep-navy: #0D2B55;
    --deep-navy-light: #1A3F72;
    --deep-navy-lighter: #2A5590;

    --electric-blue: #0077FF;
    --cyan-green: #00E5AA;
    --accent-gradient: linear-gradient(135deg, #0077FF, #00E5AA);

    --soft-white: #F4F6FA;
    --charcoal: #1A1A2E;
    --charcoal-light: #24243D;

    --steel: #5B6B85;
    --steel-light: #8494AB;
    --text-on-dark: #E8EDF5;
    --text-on-dark-muted: #9AA8C2;
    --text-on-dark-dim: #6B7A94;

    --surface-light: rgba(13, 43, 85, 0.04);
    --surface-light-hover: rgba(13, 43, 85, 0.08);
    --border-light: rgba(13, 43, 85, 0.1);
    --surface-dark: rgba(255, 255, 255, 0.05);
    --surface-dark-hover: rgba(255, 255, 255, 0.1);
    --border-dark: rgba(255, 255, 255, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); background: var(--charcoal); color: var(--text-on-dark); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══════════════ SVG LOGO ═══════════════ */
.logo-svg {
    display: inline-block;
    vertical-align: middle;
}

.logo-nav-svg {
    width: 30px;
    height: auto;
    margin-right: -6px;
}

.logo-footer-svg {
    width: 26px;
    height: auto;
    margin-right: -6px;
}

/* ═══════════════ NAVIGATION ═══════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(16px);
    padding: 12px 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
}

.nav-container { display: flex; align-items: center; }

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-right: 28px;
}

.logo-icon {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 24px; }

.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-on-dark-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover { color: var(--electric-blue); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0077FF;
    transition: var(--transition);
}

.nav-links a:hover::after { width: 100%; }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary { background: var(--accent-gradient); color: #fff; }

.btn-primary:hover {
    box-shadow: 0 4px 25px rgba(0, 119, 255, 0.35);
    transform: translateY(-2px);
}

.btn-outline { background: transparent; color: var(--cyan-green); border: 2px solid var(--cyan-green); }

.btn-outline:hover {
    background: rgba(0, 229, 170, 0.08);
    box-shadow: 0 0 20px rgba(0, 229, 170, 0.15);
    transform: translateY(-2px);
}

/* ═══════════════ HERO ═══════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--charcoal);
}

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 119, 255, 0.15), transparent 70%);
    top: -200px;
    right: -150px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 170, 0.08), transparent 70%);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 119, 255, 0.08), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: var(--electric-blue);
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--text-on-dark);
}

.text-accent {
    color: var(--electric-blue);
}

.text-accent-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-on-dark-muted);
    max-width: 600px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* Stats hidden for startup phase — remove display:none when clients/projects are ready */
.hero-stats {
    display: none;
    gap: 48px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid var(--border-dark);
}

.stat { display: flex; flex-direction: column; }

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label { font-size: 0.85rem; color: var(--text-on-dark-dim); font-weight: 500; }

/* ═══════════════ SECTIONS ═══════════════ */
.section { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 60px; }

.section-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    color: var(--electric-blue);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    color: var(--text-on-dark);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-on-dark-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* ── About (dark) ── */
.about { background: var(--charcoal); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

.about-text p { color: var(--text-on-dark-muted); margin-bottom: 20px; font-size: 1.02rem; }

.about-highlights { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }

.highlight { display: flex; gap: 16px; align-items: start; }
.highlight-icon { flex-shrink: 0; margin-top: 2px; color: var(--electric-blue); }
.highlight-icon svg { width: 28px; height: 28px; }
.highlight h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: var(--text-on-dark); }
.highlight p { font-size: 0.9rem; color: var(--text-on-dark-muted); margin-bottom: 0; }

.about-visual { display: flex; flex-direction: column; gap: 20px; }

.about-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
}

.about-card:hover {
    border-color: var(--electric-blue);
    background: var(--surface-dark-hover);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(0, 119, 255, 0.1);
}

.about-card-icon { margin-bottom: 12px; color: var(--electric-blue); }
.about-card-icon svg { width: 32px; height: 32px; }
.about-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-on-dark); }
.about-card p { font-size: 0.9rem; color: var(--text-on-dark-muted); }

/* ── Services (dark) ── */
.services { background: var(--charcoal); }
.services .section-title { color: var(--text-on-dark); }
.services .section-subtitle { color: var(--text-on-dark-muted); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }

.service-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    border-color: rgba(0, 119, 255, 0.3);
    background: var(--surface-dark-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before { opacity: 1; }

.service-icon { margin-bottom: 16px; color: var(--electric-blue); }
.service-icon svg { width: 36px; height: 36px; }
.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--text-on-dark); }
.service-card p { font-size: 0.9rem; color: var(--text-on-dark-muted); line-height: 1.6; }

/* Service Category Headers */
.service-category-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    margin-top: 8px;
}

.service-category-header:first-child {
    margin-top: 0;
    padding-top: 0;
}

.svc-cat-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--electric-blue);
    letter-spacing: 2px;
}

.service-category-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-on-dark);
    margin: 0;
}

/* ── Why Us (dark) ── */
.why-us { background: var(--charcoal); }

.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.why-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: var(--transition);
}

.why-card:hover {
    border-color: var(--electric-blue);
    background: var(--surface-dark-hover);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.1);
}

.why-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 12px;
    color: var(--electric-blue);
    opacity: 0.4;
}

.why-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--text-on-dark); }
.why-card p { font-size: 0.9rem; color: var(--text-on-dark-muted); line-height: 1.6; }

/* ═══════════════ SERVICE REQUEST FORM ═══════════════ */
.request-section { background: var(--charcoal); }
.request-section .section-title { color: var(--text-on-dark); }
.request-section .section-subtitle { color: var(--text-on-dark-muted); }

.form-wrapper {
    max-width: 740px;
    margin: 0 auto;
    background: var(--charcoal-light);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
}

.form-message {
    display: none;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.92rem;
    font-weight: 500;
    align-items: center;
    gap: 10px;
}

.form-success {
    background: rgba(0, 229, 170, 0.1);
    border: 1px solid rgba(0, 229, 170, 0.3);
    color: var(--cyan-green);
}

.form-error {
    background: rgba(255, 80, 80, 0.1);
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff5050;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-on-dark-muted);
}

.required {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-on-dark);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-on-dark-dim); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa8c2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Brand-styled dropdown list — Deep Navy pillar headers, Charcoal options */
.form-group select optgroup {
    background: var(--deep-navy);
    color: var(--electric-blue);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 12px;
}

.form-group select option {
    background: var(--charcoal);
    color: var(--text-on-dark);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 10px 16px;
}

.form-group select option:checked,
.form-group select option:hover {
    background: var(--deep-navy-light);
    color: var(--cyan-green);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.btn-submit { width: 100%; padding: 16px; font-size: 1rem; margin-top: 8px; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
    background: #081E3D;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 60px 0 30px;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }

.footer-brand p { color: var(--text-on-dark-muted); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }

.footer-links h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; color: var(--text-on-dark); }
.footer-links li { font-size: 0.88rem; color: var(--text-on-dark-dim); margin-bottom: 10px; }
.footer-links a { color: var(--text-on-dark-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--cyan-green); }

.footer-bottom { border-top: 1px solid var(--border-dark); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-on-dark-dim); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 968px) {
    .about-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.8rem; }

    .hero-stats { gap: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .form-wrapper { padding: 32px 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { text-align: center; }
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }
.animate-in:nth-child(7) { animation-delay: 0.7s; }
.animate-in:nth-child(8) { animation-delay: 0.8s; }

/* ═══════════════ LANGUAGE DROPDOWN ═══════════════ */
.lang-dropdown {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    z-index: 1002;
}

.lang-globe {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: var(--text-on-dark-muted);
    transition: var(--transition);
}

.lang-globe:hover {
    color: var(--electric-blue);
}

.globe-icon {
    width: 22px;
    height: 22px;
}

.globe-badge {
    position: absolute;
    bottom: -2px;
    right: -4px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1;
    background: var(--charcoal);
    color: var(--electric-blue);
    padding: 1px 3px;
    border-radius: 3px;
    border: 1px solid rgba(0, 119, 255, 0.3);
    pointer-events: none;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--charcoal-light);
    border: 1px solid rgba(0, 119, 255, 0.25);
    border-radius: var(--radius-sm);
    min-width: 140px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    z-index: 1001;
}

.lang-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--text-on-dark-muted);
    transition: var(--transition);
    text-align: left;
}

.lang-option:hover {
    background: var(--surface-dark-hover);
    color: var(--text-on-dark);
}

.lang-option.active {
    color: var(--electric-blue);
}

.lang-option-code {
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    opacity: 0.6;
}

.lang-option-name {
    font-weight: 500;
}

body.rtl .lang-dropdown {
    right: auto;
    left: 24px;
}

body.rtl .lang-menu {
    right: auto;
    left: 0;
}

body.rtl .lang-option {
    text-align: right;
}

/* ═══════════════ RTL — ARABIC ═══════════════ */
body.rtl {
    font-family: 'Cairo', var(--font);
    text-align: right;
}

/* Nav links keep source order in RTL */
body.rtl .nav-links {
    flex-direction: row;
}

body.rtl .logo {
    direction: ltr;
    gap: 0px;
    margin-right: 0;
    margin-left: 28px;
}

body.rtl .logo-nav-svg,
body.rtl .logo-footer-svg {
    margin-right: 0;
    margin-left: 0;
}

/* Hero alignment */
body.rtl .hero-content {
    text-align: right;
}

body.rtl .hero-stats {
    flex-direction: row-reverse;
}

body.rtl .stat {
    text-align: right;
}

/* Section headers stay centered in RTL (base rule applies) */

/* About grid */
body.rtl .about-grid {
    direction: rtl;
}

body.rtl .highlight {
    flex-direction: row;
}

body.rtl .highlight h4,
body.rtl .highlight p {
    text-align: right;
}

body.rtl .about-card {
    text-align: right;
}

body.rtl .about-card:hover {
    transform: translateX(-6px);
}

/* Services & Why Us grids */
body.rtl .services-grid,
body.rtl .why-grid {
    direction: rtl;
}

body.rtl .service-card,
body.rtl .why-card {
    text-align: right;
}

body.rtl .service-card::before {
    left: auto;
    right: 0;
}

/* Form */
body.rtl .form-row {
    direction: rtl;
}

body.rtl .form-group label {
    text-align: right;
}

body.rtl .form-group input,
body.rtl .form-group select,
body.rtl .form-group textarea {
    text-align: right;
    direction: rtl;
}

body.rtl .form-group select {
    background-position: left 14px center;
    padding-right: 16px;
    padding-left: 36px;
}

/* Footer */
body.rtl .footer-grid {
    direction: rtl;
}

body.rtl .footer-brand {
    text-align: right;
}

/* Footer logo keeps LTR internal order (N + exafliq) but hugs the right edge */
body.rtl .footer-brand .logo {
    justify-content: flex-end;
}

body.rtl .footer-links {
    text-align: right;
}

body.rtl .footer-links ul {
    padding: 0;
}

body.rtl .footer-bottom {
    text-align: center;
}
