/**
 * Fortress Solutions - Global Stylesheet
 * FORTRESS COMPUTER SYSTEMS AND SOFTWARE DESIGNING L.L.C.
 * Abu Dhabi, UAE | venusfortress.com
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Color Palette - Harmonious with logo.png (Royal Tech Blue, Electric Lime, Pure White & Slate Navy) */
    --bg-main: #F8FAFD;
    --bg-secondary: #EEF4FC;
    --bg-surface: #FFFFFF;
    --bg-surface-translucent: rgba(255, 255, 255, 0.90);
    
    --text-primary: #0B1938;
    --text-secondary: #2E3E5C;
    --text-muted: #5C7094;
    --text-inverse: #FFFFFF;

    --brand-blue: #2055B8;
    --brand-blue-dark: #0E2A68;
    --brand-blue-light: #EBF2FF;
    --brand-blue-subtle: rgba(32, 85, 184, 0.12);
    
    --brand-cyan: #0284C7;
    --brand-cyan-light: #E0F2FE;
    --brand-cyan-glow: rgba(2, 132, 199, 0.25);
    
    --brand-lime: #84CC16;
    --brand-lime-vibrant: #D4F700;
    --brand-lime-glow: rgba(212, 247, 0, 0.35);

    --brand-navy-dark: #09152E;
    --brand-navy-surface: #0E1E40;

    /* Legacy mapping aliases so all views smoothly inherit the new brand identity */
    --brand-teal: var(--brand-blue);
    --brand-teal-dark: var(--brand-blue-dark);
    --brand-teal-light: var(--brand-blue-light);
    --brand-mint: var(--brand-cyan);
    --brand-mint-subtle: var(--brand-blue-subtle);

    --border-subtle: rgba(32, 85, 184, 0.12);
    --border-hover: rgba(32, 85, 184, 0.35);
    --border-focus: #2055B8;

    --shadow-sm: 0 2px 8px rgba(11, 25, 56, 0.04);
    --shadow-card: 0 4px 20px -2px rgba(11, 25, 56, 0.06), 0 2px 6px -1px rgba(11, 25, 56, 0.04);
    --shadow-hover: 0 16px 36px -4px rgba(32, 85, 184, 0.16), 0 6px 16px -2px rgba(11, 25, 56, 0.06);
    --shadow-glow: 0 0 24px rgba(32, 85, 184, 0.25);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

    --container-max: 1280px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-size: 16px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* WCAG 2.2 Focus Visible Enhancements (SC 2.4.7, 2.4.11, 2.4.13) */
:focus-visible {
    outline: 3px solid #2055B8 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(32, 85, 184, 0.35) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw + 0.8rem, 2.6rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 1.5vw + 0.6rem, 1.7rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }
p { color: var(--text-secondary); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
a:hover {
    color: var(--brand-blue-dark);
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Skip link for accessibility (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -120px;
    left: 20px;
    background: #09152E;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 2px solid #38BDF8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 100000;
    font-weight: 700;
    text-decoration: none;
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: 20px;
}
html[dir="rtl"] .skip-link {
    left: auto;
    right: 20px;
}

/* Screen Reader Only Utility (WCAG 4.1.2) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 32px);
    padding-right: clamp(16px, 4vw, 32px);
}

/* Section Header Shared Utility */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(36px, 5vw, 64px);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--brand-blue-light);
    color: var(--brand-blue-dark);
    border: 1px solid rgba(32, 85, 184, 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.section-badge i {
    color: var(--brand-blue);
    font-size: 0.8rem;
}

.section-title {
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-title .gradient-text,
.page-title .gradient-text,
.gradient-text {
    background: linear-gradient(135deg, #2055B8 0%, #0284C7 55%, #84CC16 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 26px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #2055B8 0%, #11347D 100%);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px rgba(32, 85, 184, 0.28);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1847A3 0%, #0D2760 100%);
    color: var(--text-inverse);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 85, 184, 0.38);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: var(--brand-blue-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.btn-ghost {
    background: transparent;
    color: var(--brand-blue);
    border: 1px solid rgba(32, 85, 184, 0.25);
}
.btn-ghost:hover {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue);
    color: var(--brand-blue-dark);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 15px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* ===================================================
   HEADER & NAVIGATION
=================================================== */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(248, 250, 253, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 20px rgba(11, 25, 56, 0.06);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Brand Logo Container (Edge-to-Edge Emblem Fit) */
.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon-wrapper {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    background: #2055B8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(32, 85, 184, 0.28);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.brand-meta {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Navigation Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 28px);
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--brand-teal);
    background: var(--brand-teal-light);
}

.nav-link.active {
    color: var(--brand-teal);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--brand-teal);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-teal-dark);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    line-height: 1;
}

.lang-toggle-btn i {
    font-size: 0.85rem;
    color: var(--brand-teal);
}

.lang-toggle-btn:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
    background: var(--brand-teal-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.mobile-nav-toggle:hover {
    background: var(--brand-teal-light);
    border-color: var(--brand-teal);
    color: var(--brand-teal);
}

/* Mobile Navigation Drawer */
.mobile-drawer {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(247, 250, 249, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 999;
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
    pointer-events: none;
}

.mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    background: var(--brand-teal-light);
    border-color: var(--brand-teal);
    color: var(--brand-teal);
}

/* ===================================================
   FOOTER
=================================================== */
.site-footer {
    margin-top: auto;
    background: #09152E;
    color: #E2E8F0;
    border-top: 1px solid rgba(32, 85, 184, 0.25);
    padding-top: clamp(48px, 6vw, 72px);
    padding-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: clamp(32px, 4vw, 56px);
    margin-bottom: clamp(40px, 5vw, 60px);
}

.footer-brand-col p {
    color: #94A3B8;
    font-size: 0.95rem;
    margin-top: 16px;
    line-height: 1.7;
    max-width: 360px;
}

.footer-legal-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #38BDF8;
    margin-top: 16px;
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 1.05rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: #38BDF8;
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.92rem;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: #38BDF8;
    padding-left: 4px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #94A3B8;
    font-size: 0.92rem;
}

.contact-detail-row i {
    color: #38BDF8;
    margin-top: 4px;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-detail-row a {
    color: #E2E8F0;
}
.contact-detail-row a:hover {
    color: #38BDF8;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E2E8F0;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: #2055B8;
    color: #FFFFFF;
    border-color: #38BDF8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 85, 184, 0.4);
}

.footer-bottom {
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    color: #64748B;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: #94A3B8;
}
.footer-bottom a:hover {
    color: #38BDF8;
}

/* Back to Top Floating Button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--brand-blue);
    color: var(--text-inverse);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
=================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 860px) {
    .nav-menu {
        display: none;
    }
    .mobile-nav-toggle {
        display: flex;
    }
    .mobile-drawer {
        display: flex;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 70px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .brand-tagline {
        display: none;
    }
}

/* Prefers Reduced Motion Accessibility Override */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================================
   BILINGUAL & RTL (ARABIC) SUPPORT
=================================================== */
html[dir="rtl"] body {
    font-family: 'Cairo', var(--font-body);
    text-align: right;
}

html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] h4, 
html[dir="rtl"] h5, 
html[dir="rtl"] h6,
html[dir="rtl"] .btn,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .brand-name,
html[dir="rtl"] .section-badge {
    font-family: 'Cairo', var(--font-heading);
    letter-spacing: 0;
}

html[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 4px;
}

html[dir="rtl"] .back-to-top {
    right: auto;
    left: 24px;
}

html[dir="rtl"] .fa-arrow-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .contact-detail-row {
    flex-direction: row;
}

html[dir="rtl"] .product-meta {
    text-align: right;
}

html[dir="rtl"] .form-group label {
    text-align: right;
}

