/* ============================================================================
   MOBILE COMMON STYLES
   Base styles for all mobile pages
   Theme: Red, Black, White, Engineering Grid, Architectural
   ============================================================================ */

/* CSS Variables */
:root {
    --primary-red: #CC0000;
    --dark-red: #8B0000;
    --accent-red: #FF0000;
    --light-red: #FF3333;
    --bg-black: #000000;
    --bg-dark: #0A0A0A;
    --bg-card: rgba(20, 20, 20, 0.95);
    --bg-card-hover: rgba(30, 30, 30, 0.98);
    --border-primary: rgba(204, 0, 0, 0.3);
    --border-strong: rgba(204, 0, 0, 0.6);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.5);
    --grid-color: rgba(204, 0, 0, 0.08);
    --shadow-primary: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-red: 0 4px 20px rgba(204, 0, 0, 0.3);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Base HTML & Body */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Red strip at the very top (safe-area / status bar separator) */
    background: #8B0000;
    background-color: #8B0000;
    /* Extend themed background to top safe area */
    padding-top: env(safe-area-inset-top);
    /* Prevent unwanted border/gap */
    border: none;
    outline: none;
    margin: 0;
    color-scheme: dark;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #000000;
    background-color: #000000;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    margin: 0;
    border: none;
    outline: none;
    /* Prevent pull-to-refresh white glow at top */
    overscroll-behavior-y: contain;
    overscroll-behavior: contain;
}

/* Engineering Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
        linear-gradient(0deg, var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(204, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ============================================================================
   GLOBAL MOBILE ADJUSTMENTS
   ============================================================================ */

/* Architectural Gradient Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(204, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 0, 0, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Main Content Container */
.mobile-page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 70px; /* Account for bottom nav (65px + 5px buffer) */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-red);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn-primary:hover,
.btn-primary:active {
    background: linear-gradient(135deg, var(--accent-red), var(--primary-red));
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(204, 0, 0, 0.4), inset 0 0 25px rgba(255, 255, 255, 0.15);
}

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

.btn-secondary:hover,
.btn-secondary:active {
    background: rgba(204, 0, 0, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.08);
}

/* Cards */
.mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-red);
    transform: translateY(-2px);
}

/* Section Container */
.mobile-section {
    padding: 24px 16px;
}

.mobile-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-left: 16px;
}

/* Professional Title Accent - Left vertical bar with gradient */
.mobile-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 85%;
    background: linear-gradient(180deg, 
        #CC0000 0%,
        rgba(204, 0, 0, 0.8) 50%,
        rgba(204, 0, 0, 0.3) 100%
    );
    border-radius: 3px;
    box-shadow: 
        0 0 12px rgba(204, 0, 0, 0.5),
        inset 1px 0 0 rgba(255, 255, 255, 0.3);
}

/* Stylish white glow accent at bottom */
.mobile-section-title::after {
    content: '';
    position: absolute;
    left: 16px;
    bottom: -8px;
    width: 45px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(204, 0, 0, 0.4) 50%,
        transparent 100%
    );
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.mobile-section-title i {
    color: var(--primary-red);
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px rgba(204, 0, 0, 0.4));
}

.mobile-section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Container */
.mobile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Divider */
.mobile-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
    margin: 24px 0;
}

/* Loading Spinner */
.mobile-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-primary);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge */
.mobile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(204, 0, 0, 0.15);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(204, 0, 0, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(204, 0, 0, 0.3);
    color: #fff;
}

/* Mobile UI should not show desktop-like side scrollbar. */
html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Touch Device Optimizations */
@media (hover: none) {
    .mobile-card:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #FF0000;
        --border-primary: rgba(255, 0, 0, 0.5);
        --text-primary: #FFFFFF;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-page-wrapper {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* ============================================================================
   LOGO ENHANCEMENTS - MAXIMUM VISIBILITY
   Dark Silver, Bold, Prominent on all pages
   ============================================================================ */

/* All logo images across the site */
img[src*="logo.svg"],
img[src*="favicon.svg"],
img[alt*="Logo"],
img[alt*="logo"] {
    filter: 
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 20px rgba(0, 0, 0, 0.5))
        brightness(1.04)
        contrast(1.12);
    transition: all 0.3s ease;
}

/* Logo hover effect - more prominent shadow */
img[src*="logo.svg"]:hover,
img[src*="favicon.svg"]:hover {
    filter: 
        drop-shadow(0 8px 16px rgba(0, 0, 0, 0.85))
        drop-shadow(0 0 24px rgba(0, 0, 0, 0.65))
        brightness(1.06)
        contrast(1.14);
    transform: scale(1.04) translateY(-2px);
}

/* Splash screen logo specific - deep shadow depth */
.splash-logo img,
.splash-screen img[src*="logo"] {
    filter: 
        drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8))
        drop-shadow(0 0 30px rgba(0, 0, 0, 0.6))
        brightness(1.05)
        contrast(1.15);
    animation: mobileLogoDepth 3s ease-in-out infinite alternate;
}

@keyframes mobileLogoDepth {
    0% {
        filter: 
            drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 30px rgba(0, 0, 0, 0.6))
            brightness(1.05)
            contrast(1.15);
        transform: translateY(0px);
    }
    100% {
        filter: 
            drop-shadow(0 12px 28px rgba(0, 0, 0, 0.95))
            drop-shadow(0 0 40px rgba(0, 0, 0, 0.7))
            brightness(1.08)
            contrast(1.18);
        transform: translateY(-2px);
    }
}

.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 24px; }
.pt-4 { padding-top: 32px; }

.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 24px; }
.pb-4 { padding-bottom: 32px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SITE-WIDE FOOTER  (.wg-footer)  — mobile-optimized
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.wg-footer{position:relative;margin:56px 10px 0;border-radius:16px;padding:40px 18px 34px;text-align:center;overflow:hidden;background:radial-gradient(circle at 50% -20%,rgba(255,56,56,0.2),rgba(255,56,56,0) 48%),linear-gradient(145deg,rgba(36,11,11,0.97) 0%,rgba(20,6,6,0.98) 52%,rgba(10,2,2,0.99) 100%);border:1px solid rgba(255,60,60,0.2);box-shadow:0 -6px 24px rgba(0,0,0,0.4),0 10px 24px rgba(0,0,0,0.46),0 0 0 1px rgba(255,72,72,0.07),inset 0 1px 0 rgba(255,106,106,0.24),inset 0 -20px 34px rgba(140,0,0,0.11)}
.wg-footer::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:min(180px,52%);height:3px;border-radius:999px;background:linear-gradient(90deg,rgba(255,78,78,0),rgba(255,68,68,0.95),rgba(255,78,78,0));box-shadow:0 0 16px rgba(255,48,48,0.46)}
.wg-footer::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,rgba(255,255,255,0.04) 0%,rgba(255,255,255,0) 32%),repeating-linear-gradient(90deg,rgba(255,0,0,0.025) 0px,rgba(255,0,0,0.025) 1px,transparent 1px,transparent 64px);mix-blend-mode:screen;opacity:0.35}
.wg-footer-inner{max-width:100%;position:relative;z-index:1}
.wg-qwrap{padding:0 10px;margin-bottom:22px}
.wg-qmark{font-family:Georgia,serif;font-size:3.9rem;line-height:.62;color:rgba(255,52,52,0.46);display:block;margin-bottom:10px;text-shadow:0 6px 16px rgba(204,0,0,0.34)}
.wg-qtext{font-size:.82rem;font-style:italic;color:#efdada;line-height:1.75;margin:0 0 10px}
.wg-qsrc{font-size:.64rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:rgba(255,80,80,0.9);display:block}
.wg-divider{width:min(130px,44%);height:1px;background:linear-gradient(90deg,rgba(255,80,80,0),rgba(255,80,80,0.72),rgba(255,80,80,0));margin:0 auto 18px}
.wg-copy{font-size:.68rem;color:#cfafaf;line-height:1.8}
.wg-copy strong{display:block;margin-bottom:4px;color:#f0d2d2;font-size:.70rem}
.wg-tagline{font-size:.62rem;color:#b99797}
.wg-tagline a{color:#ff8585;text-decoration:none;transition:color .2s ease}
.wg-tagline a:hover{color:#ffb4b4;text-decoration:underline}
