/* =========================================================
   SENTINEL QUANTUM VANGUARD AI PRO
   LIQUID GLASS – INSTITUTIONAL / GOVERNMENT GRADE
   Version: FINAL – Production
   Shared Styles - Applied across all pages
   ========================================================= */

/* ========================================
   LIQUID GLASS VARIABLES - Global
   ======================================== */
:root {
    /* Liquid Glass Core */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-highlight: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);

    /* Background - No Pure Black */
    --bg-main: #0b0f14;
    --bg-soft: #121826;
    --bg-panel: #0f1623;
    --bg-primary: #0b0f14;
    --bg-secondary: #121826;
    --bg-tertiary: #0f1623;
    
    /* Text - Enhanced Readability */
    --text-main: #e8ecf1;
    --text-soft: #b6c0cc;
    --text-muted: #8b97a8;
    --text-primary: #e8ecf1;
    --text-secondary: #b6c0cc;
    
    /* Accent Colors - Professional */
    --accent: #4fa3ff;
    --accent-primary: #4fa3ff;
    --accent-secondary: #5ba3f5;
    --accent-tertiary: #7fb3f0;
    
    /* Border & Dividers */
    --border-primary: rgba(255, 255, 255, 0.18);
    --border-secondary: rgba(255, 255, 255, 0.08);
    
    /* Status Colors */
    --status-success: #4caf50;
    --status-warning: #ff9800;
    --status-error: #f44336;
    --status-info: #2196f3;
    
    /* Card & Module Backgrounds - Glass */
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.12);
    
    /* Shadows - Liquid Glass */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.45);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Border Radius - Premium */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 16px;
}

/* ========================================
   BASE STYLES - Visual Comfort
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-soft) 100%);
    color: var(--text-main);
    font-family: "Inter", "Roboto", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   SECTIONS - Breathing Space (UX)
   ======================================== */
section {
    margin-bottom: 4rem;
    position: relative;
}

/* ========================================
   LIQUID GLASS - Universal Surfaces
   ======================================== */
.glass,
.card,
.module,
.section,
.panel,
.box {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
}

/* ========================================
   LIQUID REFLECTIONS - Signature Effect
   ======================================== */
.glass::before,
.card::before,
.module::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.03)
    );
    pointer-events: none;
    z-index: 0;
}

/* Ensure content is above the reflection */
.glass > *,
.card > *,
.module > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   TYPOGRAPHY - Enhanced Hierarchy
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    letter-spacing: 0.02em;
    font-weight: 600;
}

p {
    color: var(--text-soft);
    line-height: 1.7;
}

/* ========================================
   FIXED NAVIGATION BAR - Glass Style
   ======================================== */
.top-nav,
header,
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 15, 22, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.top-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.nav-brand {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-brand::before {
    content: "⬢";
    color: var(--accent-primary);
    font-size: 1.3em;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(74, 144, 226, 0.1);
}

.nav-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2em;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    display: flex;
}

/* ========================================
   IMPROVED MODULE CARDS - Liquid Glass
   ======================================== */
.module-card-enhanced,
.module-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.module-card-enhanced::before,
.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.03)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.module-card-enhanced:hover,
.module-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--glass-highlight);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.module-card-enhanced:hover::before,
.module-card:hover::before {
    opacity: 1;
}

.module-card-enhanced > *,
.module-card > * {
    position: relative;
    z-index: 1;
}

.module-icon-visual {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.8em;
    color: white;
}

.module-title-enhanced,
.module-title {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.module-desc-enhanced,
.module-description {
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 0.95em;
}

/* ========================================
   SECTION HEADERS WITH ANCHORS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-primary);
}

.section-header h2 {
    color: #ffffff;
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
}

.section-anchor {
    color: var(--accent-primary);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.7em;
}

.section-header:hover .section-anchor {
    opacity: 1;
}

/* ========================================
   PREMIUM BUTTONS - Anti-Demo Glass Style
   ======================================== */
.btn-enhanced,
button,
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 22px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.28),
        rgba(255, 255, 255, 0.10)
    );
    border: 1px solid var(--glass-border);
    color: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.btn-enhanced:hover,
button:hover,
.btn:hover,
a.btn:hover {
    background: rgba(255, 255, 255, 0.30);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-enhanced-secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--accent-primary);
}

.btn-enhanced-secondary:hover {
    background: rgba(79, 163, 255, 0.1);
    border-color: var(--glass-highlight);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    section {
        margin-bottom: 2.5rem;
    }

    .top-nav-container {
        flex-wrap: wrap;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        display: none;
        padding-top: var(--spacing-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-enhanced {
        width: 100%;
    }
}

/* ========================================
   LISTS & TABLES - Glass Treatment
   ======================================== */
ul li {
    color: var(--text-soft);
}

table {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

table th,
table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

table th {
    color: #ffffff;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
}

table td {
    color: var(--text-soft);
}

/* ========================================
   FOOTER - Glass Style
   ======================================== */
footer {
    background: rgba(8, 12, 18, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: var(--spacing-lg);
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus indicators for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
