@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #FAFBFC;
    --bg-secondary: #F1F5F9;
    --bg-dark: #0F172A;
    
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
    --color-secondary: #7C3AED;
    --color-accent: #F59E0B;
    --color-highlight: #06B6D4;
    
    --card-bg: #FFFFFF;
    --border-color: #DCE6F2;
    --border-hover: #7C3AED;
    
    --text-main: #111827;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    --status-success: #16A34A;
    --status-warning: #EA580C;
    
    --border-radius: 22px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 40px -10px rgba(37, 99, 235, 0.1);
    
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Layout: Dashboard Style */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sticky Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 1000;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--bg-secondary);
    color: var(--color-primary);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-top: 0.25rem;
}

.sidebar-footer a:hover {
    color: var(--color-primary);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    width: calc(100% - var(--sidebar-width));
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

p { margin-bottom: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

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

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid #CBD5E1;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--color-secondary);
}

/* Glassmorphism & Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark-section {
    background-color: var(--bg-dark);
    color: #FFFFFF;
    padding: 6rem 3rem;
}

.dark-section h2, .dark-section h3, .dark-section p {
    color: #FFFFFF;
}

.dark-section .text-secondary {
    color: var(--text-muted);
}

.light-section {
    background-color: var(--bg-primary);
    padding: 6rem 3rem;
}

.alt-section {
    background-color: var(--bg-secondary);
    padding: 6rem 3rem;
}

/* Sections Structure */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section (Asymmetric Split) */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 90vh;
    align-items: center;
    padding: 3rem;
    gap: 4rem;
    background: radial-gradient(circle at top right, #F1F5F9, var(--bg-primary));
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-disclaimer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Floating Widget */
.floating-widget {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.floating-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

/* Spotlight Section */
.spotlight-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.spotlight-sidebar {
    background: var(--bg-dark);
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spotlight-content {
    padding: 3rem;
}

/* Horizontal Cards */
.horizontal-card {
    display: flex;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    align-items: center;
    gap: 2rem;
}

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

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.card-body {
    flex-grow: 1;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
}

.tag.hazard { background: rgba(22, 163, 74, 0.1); color: var(--status-success); }
.tag.general { background: rgba(37, 99, 235, 0.1); color: var(--color-primary); }

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

/* Comparison Matrix */
.matrix-wrapper {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.comparison-matrix {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.comparison-matrix th, .comparison-matrix td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-matrix th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.comparison-matrix td {
    font-size: 0.95rem;
}

.comparison-matrix tr:last-child td {
    border-bottom: none;
}

.check-yes { color: var(--status-success); font-weight: bold; }
.check-no { color: var(--text-muted); }
.check-partial { color: var(--status-warning); font-weight: bold; }

/* Device Tabs */
.device-tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--color-primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accordion */
.accordion-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-secondary);
}

.accordion-item.active .accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-height: 1000px; /* arbitrary max-height for transition */
}

/* Editorial Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.25rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 4px solid var(--bg-primary);
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Content Pages (Reviews, Legal) */
.page-header {
    padding: 4rem 3rem 2rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.content-body {
    padding: 3rem;
    max-width: 800px;
}

.content-body h2 {
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.content-body ul, .content-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.content-body li {
    margin-bottom: 0.5rem;
}

.info-box {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
}

.warning-box {
    background: rgba(234, 88, 12, 0.05);
    border-left: 4px solid var(--status-warning);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-primary);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 4rem 3rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

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

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-float);
    padding: 2rem;
    border-radius: var(--border-radius);
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.cookie-content h3 {
    margin-bottom: 0.5rem;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Focus Styles for Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1002;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px; /* space for mobile toggle */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-split {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
    
    .spotlight-card {
        grid-template-columns: 1fr;
    }
    
    .horizontal-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-actions {
        width: 100%;
        flex-direction: row;
    }
    
    .card-actions .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .dark-section, .light-section, .alt-section {
        padding: 3rem 1.5rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .page-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .content-body {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar, .mobile-menu-toggle, .hero-split, .cookie-banner, .btn {
        display: none !important;
    }
    .main-content {
        margin: 0;
        width: 100%;
    }
    body {
        background: white;
        color: black;
    }
}