/**
 * DMS Smart Monitor - Site Stylesheet
 * Design System extracted from original index.html
 * Version: 2.0.0 - Mobile & Cross-Browser Optimized
 */

/* ============================================
   DESIGN TOKENS / CSS VARIABLES
   ============================================ */
:root {
    /* Brand Colors */
    --bg-navy: #1C2E4A;
    --bg-darker: #0f172a;
    --bg-darkest: #0b1120;
    --text-white: #FFFFFF;
    --accent-orange: #F58220;
    --accent-orange-hover: #e07010;
    --accent-blue: #B8D8EB;
    
    /* Component Colors */
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-hover: rgba(255, 255, 255, 0.08);
    --card-border: rgba(184, 216, 235, 0.2);
    --card-border-hover: rgba(184, 216, 235, 0.4);
    --text-muted: rgba(255, 255, 255, 0.85);
    --text-faded: rgba(255, 255, 255, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* Status Colors */
    --color-error: #ef4444;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    
    /* Layout */
    --nav-height: 80px;
    --container-max: 1200px;
    --container-narrow: 800px;
    --spacing-section: 100px;
    --spacing-section-mobile: 60px;
    
    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 100px;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    --shadow-image: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-med: 0.3s ease;
    
    /* Touch targets - minimum 44px for accessibility */
    --touch-target-min: 44px;
    
    /* Safe area for notched devices */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

body {
    background-color: var(--bg-darker);
    font-family: var(--font-body);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    /* Support for notched devices */
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent image dragging */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

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

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-orange);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    z-index: 10001;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 10px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

h1 {
    font-weight: 800;
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

h2 {
    font-weight: 700;
    font-size: clamp(26px, 4vw, 42px);
    color: var(--accent-blue);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-orange);
    margin-top: 12px;
    border-radius: 2px;
}

h2.no-bar::after {
    display: none;
}

h2.center {
    text-align: center;
}

h2.center::after {
    margin-left: auto;
    margin-right: auto;
}

h3 {
    font-weight: 600;
    font-size: clamp(18px, 3vw, 22px);
    margin-bottom: 16px;
}

h4 {
    font-weight: 600;
    font-size: clamp(16px, 2.5vw, 18px);
    margin-bottom: 12px;
}

p, li {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--accent-blue);
    max-width: 500px;
    margin-bottom: 24px;
}

strong {
    font-weight: 600;
    color: var(--text-white);
}

small {
    font-size: 14px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

section {
    padding: var(--spacing-section) 0;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    z-index: 2;
}

section.dark-mode {
    background-color: var(--bg-navy);
}

section.no-border {
    border-bottom: none;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.two-column.reverse {
    direction: rtl;
}

.two-column.reverse > * {
    direction: ltr;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }
.mb-6 { margin-bottom: 60px; }

.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }
.mt-6 { margin-top: 60px; }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    align-items: center;
    /* Support for notched devices */
    padding-top: var(--safe-area-top);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    font-family: var(--font-heading);
    color: white;
    text-decoration: none;
    min-height: var(--touch-target-min);
    flex-shrink: 0;
}

.logo-area img {
    height: 40px;
    width: auto;
}

.logo-area .logo-sub {
    color: var(--accent-blue);
    font-weight: 400;
}

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

.nav-links > a,
.nav-links > .nav-dropdown > .nav-dropdown-toggle {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color var(--transition-fast);
    padding: 8px 4px;
    white-space: nowrap;
}

.nav-links > a:hover,
.nav-links > a.active {
    color: white;
}

.nav-links > a.active {
    color: var(--accent-orange);
}

/* Dashboard Login Button - Desktop */
.nav-links .btn-login {
    background: var(--accent-orange);
    color: white;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    margin-left: 8px;
    border: none;
}

.nav-links .btn-login:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-1px);
    color: white;
}

.nav-links .btn-login i {
    font-size: 12px;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 4px;
    transition: color var(--transition-fast);
}

.nav-dropdown-toggle:hover {
    color: white;
}

.nav-dropdown-toggle i {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: var(--bg-darker);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    margin-top: 16px;
    box-shadow: var(--shadow-card);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 8px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
}

.nav-dropdown-menu a:hover {
    background: var(--card-bg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    -webkit-tap-highlight-color: transparent;
    z-index: 1001;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: all var(--transition-fast);
    gap: 10px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    min-height: var(--touch-target-min);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: white;
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: var(--card-bg-hover);
}

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

.btn-outline:hover {
    background: var(--accent-orange);
    color: white;
}

.btn-login {
    background: var(--accent-orange);
    color: white;
    padding: 8px 20px;
    font-size: 14px;
}

.btn-login:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Button loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    margin-left: 8px;
}

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

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

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform var(--transition-med), border-color var(--transition-med);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--card-border-hover);
}

.card.no-hover:hover {
    transform: none;
}

.card-accent {
    border-top: 4px solid var(--accent-orange);
}

.card-accent-left {
    border-left: 4px solid var(--accent-orange);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-orange), #ff9f43);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
}

.card-icon.blue {
    background: linear-gradient(135deg, var(--accent-blue), #87ceeb);
    color: var(--bg-navy);
}

.card-sm {
    padding: 24px;
}

/* ============================================
   IMAGES
   ============================================ */
.img-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-image);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding-top: calc(var(--nav-height) + var(--safe-area-top) + 80px);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 130, 32, 0.15);
    border-radius: var(--radius-full);
    border: 1px solid rgba(245, 130, 32, 0.3);
    color: var(--accent-orange);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-sectors {
    margin-top: 40px;
    display: flex;
    gap: 40px;
    color: var(--text-faded);
    flex-wrap: wrap;
}

.hero-sectors div {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Page Header (for inner pages) */
.page-header {
    padding-top: calc(var(--nav-height) + var(--safe-area-top) + 60px);
    padding-bottom: 60px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 16px;
}

.page-header .lead {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-faded);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a:hover {
    color: var(--accent-orange);
}

.breadcrumb span {
    color: var(--text-faded);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-val {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    color: var(--accent-orange);
    display: block;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 14px;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   LISTS
   ============================================ */
ul.check-list {
    list-style: none;
}

ul.check-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 16px;
}

ul.check-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-orange);
    position: absolute;
    left: 0;
    top: 4px;
}

ul.bullet-list {
    list-style: none;
}

ul.bullet-list li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
}

ul.bullet-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 8px;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.pricing-table {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
}

.pricing-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--accent-blue);
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    white-space: nowrap;
}

.pricing-table td {
    padding: 16px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-muted);
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-table tr:hover td {
    background: var(--card-bg);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--accent-blue);
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-body);
    /* 16px minimum prevents iOS zoom on focus */
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom select arrow */
select {
    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='%23B8D8EB' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background-color: var(--bg-navy);
    color: white;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-orange);
    background: var(--card-bg-hover);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.15);
}

input::placeholder, textarea::placeholder {
    color: var(--text-faded);
    opacity: 1;
}

/* Fix for Firefox placeholder opacity */
input::-moz-placeholder, textarea::-moz-placeholder {
    color: var(--text-faded);
    opacity: 1;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkbox & Radio styling */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"] {
    border-radius: 4px;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

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

/* Form states */
input.error, select.error, textarea.error {
    border-color: var(--color-error);
}

input.error:focus, select.error:focus, textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
    color: var(--color-error);
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-error::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
}

.form-success {
    color: var(--color-success);
    font-size: 14px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 20px;
}

/* Alert messages */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-warning);
}

.alert-info {
    background: rgba(184, 216, 235, 0.1);
    border: 1px solid rgba(184, 216, 235, 0.3);
    color: var(--accent-blue);
}

/* ============================================
   FEATURE BOXES
   ============================================ */
.feature-box {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-icon.orange {
    background: var(--accent-orange);
    color: white;
}

.feature-icon.blue {
    background: var(--accent-blue);
    color: var(--bg-navy);
}

.feature-content h4 {
    margin-bottom: 6px;
}

.feature-content p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    background: var(--card-bg);
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    transition: background var(--transition-fast);
    min-height: var(--touch-target-min);
    -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
    background: var(--card-bg-hover);
}

.faq-question i {
    color: var(--accent-orange);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-med);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 24px 24px 24px;
    color: var(--text-muted);
}

/* ============================================
   TIMELINE / STEPS
   ============================================ */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--accent-orange);
    border-radius: 50%;
    border: 3px solid var(--bg-darker);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-orange {
    background: rgba(245, 130, 32, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 130, 32, 0.3);
}

.badge-blue {
    background: rgba(184, 216, 235, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(184, 216, 235, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-darkest);
    padding: 60px 0;
    padding-bottom: calc(60px + var(--safe-area-bottom));
    border-top: 1px solid var(--border-subtle);
    font-size: 14px;
    color: var(--text-faded);
}

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

.footer-brand {
    max-width: 280px;
}

.footer-brand img {
    height: 30px;
    width: auto;
    opacity: 0.8;
    margin-bottom: 16px;
}

.footer-col h5 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    padding: 0;
    font-size: 14px;
}

.footer-col ul li a {
    color: var(--text-faded);
    transition: color var(--transition-fast);
    display: inline-block;
    padding: 4px 0;
}

.footer-col ul li a:hover {
    color: var(--accent-orange);
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-navy);
    border-top: 1px solid var(--card-border);
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-area-bottom));
    z-index: 9999;
    display: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    font-size: 14px;
    min-width: 200px;
}

.cookie-text a {
    color: var(--accent-orange);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   ANIMATION CANVAS
   ============================================ */
#sensor-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-orange { color: var(--accent-orange); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
.text-faded { color: var(--text-faded); }

.bg-dark { background: var(--bg-darker); }
.bg-navy { background: var(--bg-navy); }

.visually-hidden {
    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;
}

/* Hide on specific breakpoints */
.hide-mobile { display: block; }
.hide-desktop { display: none; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: calc(20px + var(--safe-area-top));
    padding-bottom: calc(20px + var(--safe-area-bottom));
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-navy);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    -webkit-animation: modalSlideIn 0.3s ease;
    animation: modalSlideIn 0.3s ease;
}

@-webkit-keyframes modalSlideIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px);
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-faded);
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    transition: color var(--transition-fast);
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
}

.modal-icon.success-icon {
    background: rgba(245, 130, 32, 0.15);
    color: var(--accent-orange);
    border: 2px solid rgba(245, 130, 32, 0.3);
}

.modal-content h2 {
    color: var(--text-white);
    margin-bottom: 12px;
}

.modal-content h2::after {
    display: none;
}

.modal-lead {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

.modal-details {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.modal-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-detail-item:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
}

.modal-detail-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.modal-detail-item a {
    color: var(--accent-orange);
}

.modal-detail-item a:hover {
    text-decoration: underline;
}

.modal-close-btn {
    width: 100%;
}

/* ============================================
   RESPONSIVE - LARGE TABLETS (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: span 3;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .three-column {
        grid-template-columns: 1fr 1fr;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
}

/* ============================================
   RESPONSIVE - TABLETS & MOBILE (768px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-section: 60px;
        --nav-height: 70px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .two-column {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .two-column.reverse {
        direction: ltr;
    }
    
    .three-column {
        grid-template-columns: 1fr;
    }
    
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Navigation - Slide Down Menu */
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-darker);
        flex-direction: column;
        padding: 0;
        gap: 0;
        border-top: 1px solid var(--border-light);
        z-index: 999;
        max-height: calc(100vh - var(--nav-height));
        max-height: calc(100dvh - var(--nav-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        /* Animation */
        opacity: 0;
        -webkit-transform: translateY(-10px);
        transform: translateY(-10px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    
    .nav-links.show {
        display: flex;
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
    
    /* Mobile menu inner padding */
    .nav-links::before {
        content: '';
        display: block;
        padding-top: 8px;
    }
    
    .nav-links::after {
        content: '';
        display: block;
        padding-bottom: calc(20px + var(--safe-area-bottom));
    }
    
    .nav-links > a {
        display: flex;
        align-items: center;
        padding: 18px 24px;
        font-size: 17px;
        font-weight: 500;
        color: var(--text-white);
        border-bottom: 1px solid var(--border-subtle);
        min-height: 56px;
        transition: background var(--transition-fast);
    }
    
    .nav-links > a:hover,
    .nav-links > a:active {
        background: var(--card-bg);
    }
    
    .nav-links > a.active {
        color: var(--accent-orange);
        background: rgba(245, 130, 32, 0.1);
    }
    
    /* Mobile Dashboard Login Button */
    .nav-links .btn-login {
        margin: 16px 24px;
        padding: 16px 24px;
        font-size: 16px;
        justify-content: center;
        border-radius: var(--radius-sm);
        border-bottom: none;
        min-height: 54px;
    }
    
    .nav-links .btn-login:hover {
        transform: none;
    }
    
    /* Mobile Dropdown */
    .nav-dropdown {
        border-bottom: 1px solid var(--border-subtle);
    }
    
    .nav-dropdown-toggle {
        display: flex;
        padding: 18px 24px;
        font-size: 17px;
        color: var(--text-white);
        font-weight: 500;
        min-height: 56px;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .nav-dropdown-toggle:hover {
        background: var(--card-bg);
    }
    
    .nav-dropdown-toggle i {
        color: var(--accent-orange);
    }
    
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        margin: 0;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 8px 0;
        min-width: 0;
    }
    
    .nav-dropdown-menu a {
        padding: 14px 24px 14px 44px;
        font-size: 15px;
        color: var(--text-muted);
        min-height: 48px;
        display: flex;
        align-items: center;
        border-bottom: none;
    }
    
    .nav-dropdown-menu a:hover {
        background: var(--card-bg);
        color: var(--text-white);
    }
    
    .nav-dropdown:hover .nav-dropdown-toggle i {
        transform: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Typography */
    h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .lead {
        font-size: 16px;
    }
    
    /* Hero */
    .hero {
        padding-top: calc(var(--nav-height) + 40px);
        min-height: auto;
        padding-bottom: 60px;
    }
    
    .hero-sectors {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-header {
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 40px;
    }
    
    /* Stats */
    .stats-bar {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .card {
        padding: 24px;
    }
    
    .card:hover {
        transform: none;
    }
    
    /* Cookie banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    /* Utility classes */
    .hide-mobile { display: none !important; }
    .hide-desktop { display: block !important; }
    
    /* FAQ */
    .faq-question {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .faq-answer-inner {
        padding: 0 20px 20px 20px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (480px)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --spacing-section: 50px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer {
        padding: 40px 0;
    }
    
    .footer-bottom {
        margin-top: 40px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .modal-content {
        padding: 24px;
        margin: 10px;
        border-radius: var(--radius-md);
    }
    
    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .modal-content h2 {
        font-size: 22px;
    }
    
    .modal-details {
        padding: 16px;
    }
    
    .modal-detail-item {
        font-size: 13px;
        gap: 10px;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    /* Stats */
    .stat-val {
        font-size: 28px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 13px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .faq-answer-inner {
        padding: 0 16px 16px 16px;
        font-size: 14px;
    }
}

/* ============================================
   RESPONSIVE - VERY SMALL SCREENS (360px)
   ============================================ */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .nav-links {
        padding: 20px;
    }
}

/* ============================================
   RESPONSIVE - LANDSCAPE MOBILE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 40px;
    }
    
    .page-header {
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 30px;
    }
    
    .nav-links {
        padding-top: 16px;
        padding-bottom: 16px;
    }
    
    .nav-links a {
        padding: 12px 0;
    }
    
    .modal-overlay {
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        margin-top: 0;
        margin-bottom: 20px;
    }
}

/* ============================================
   RESPONSIVE - HIGH DPI / RETINA
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp borders on retina displays */
    .card, .btn, input, select, textarea {
        border-width: 0.5px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar, .footer, .cookie-banner, #sensor-mesh, .modal-overlay, .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    section {
        padding: 20px 0;
        border: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
    }
    
    h2::after {
        display: none;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
        background: white;
    }
    
    .btn {
        border: 1px solid black;
        background: white;
        color: black;
    }
}