/* CircuitGlass Care - Main Styles */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-400: #5CB8FF;
    --primary-500: #3AA7FF;
    --primary-600: #2891E6;
    --accent-teal: #20C6B7;
    --accent-teal-light: #3DD9CA;
    --dark-900: #0B1220;
    --dark-800: #1E293B;
    --dark-700: #2D3A4F;
    --dark-600: #3F4E63;
    --light-100: #E8EDF3;
    --light-200: #CDD5E0;
    --light-300: #A7B0BD;
    --success: #20C6B7;
    --warning: #F59E0B;
    --error: #EF4444;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(167, 176, 189, 0.1);
    --neon-glow: rgba(58, 167, 255, 0.4);
    
    /* Typography */
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 96px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-card: 0 4px 16px rgba(11, 18, 32, 0.4);
    --shadow-card-hover: 0 8px 32px rgba(58, 167, 255, 0.2);
    --shadow-glow-blue: 0 0 24px rgba(58, 167, 255, 0.4);
    --shadow-glow-teal: 0 0 20px rgba(32, 198, 183, 0.3);
    
    /* Animation */
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 400ms;
    --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-900);
    color: var(--light-200);
    line-height: 1.6;
    font-size: 16px;
}

/* High Contrast Mode */
body.high-contrast {
    --dark-900: #000000;
    --dark-800: #1a1a1a;
    --light-100: #FFFFFF;
    --light-200: #FFFFFF;
    --primary-500: #5CB8FF;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--light-100);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

@media (max-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
}

a {
    color: var(--primary-500);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-default);
}

a:hover {
    color: var(--primary-400);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-2xl);
    }
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--duration-normal) var(--easing-default);
}

.navbar.scrolled {
    background: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid rgba(167, 176, 189, 0.2);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--light-100);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-links {
    display: none;
    list-style: none;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width var(--duration-normal) var(--easing-default), 
                left var(--duration-normal) var(--easing-default);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    left: 0;
}

.nav-cta {
    display: none;
}

@media (min-width: 768px) {
    .nav-cta {
        display: block;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--light-100);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--dark-800);
    border-bottom: 1px solid var(--dark-700);
    padding: var(--spacing-lg);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.mobile-menu a {
    padding: var(--spacing-sm) 0;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-default);
    border: none;
    font-family: var(--font-body);
    min-height: 44px;
}

.btn-primary {
    background: var(--primary-500);
    color: var(--light-100);
    box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
    background: var(--primary-400);
    box-shadow: 0 0 24px rgba(58, 167, 255, 0.6);
    transform: scale(1.02);
}

.btn-primary:active {
    background: var(--primary-600);
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--accent-teal);
    color: var(--light-100);
    box-shadow: var(--shadow-glow-teal);
}

.btn-secondary:hover {
    background: var(--accent-teal-light);
    transform: scale(1.02);
}

/* Hero Section */
.hero {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-900) 0%, var(--dark-800) 100%);
    padding: var(--spacing-4xl) 0;
}

@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        padding: var(--spacing-3xl) 0;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cpath d='M0 200 L200 200 M200 0 L200 200 M200 200 L400 200 M200 200 L200 400' stroke='%233AA7FF' stroke-width='1' opacity='0.1' fill='none'/%3E%3Ccircle cx='200' cy='200' r='4' fill='%233AA7FF' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.1;
    animation: pulse-pcb 3s ease-in-out infinite;
}

@keyframes pulse-pcb {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.15; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    margin-bottom: var(--spacing-lg);
    font-size: 48px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
}

.hero p {
    font-size: 18px;
    color: var(--light-300);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* PCB Separator */
.pcb-separator {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-500) 20%, 
        var(--accent-teal) 50%, 
        var(--primary-500) 80%, 
        transparent 100%);
    margin: var(--spacing-3xl) 0;
    position: relative;
    opacity: 0.3;
}

.pcb-separator::before,
.pcb-separator::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: var(--shadow-glow-blue);
}

.pcb-separator::before { left: 20%; }
.pcb-separator::after { right: 20%; }

/* Section */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-md);
}

.section-header p {
    color: var(--light-300);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--duration-normal) var(--easing-default);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-card-hover);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-500);
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    color: var(--light-300);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card */
.article-card {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-normal) var(--easing-default);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-card-hover);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--dark-700);
}

.article-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-xs);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.badge-quick-fix {
    background: rgba(58, 167, 255, 0.15);
    color: var(--primary-400);
    border: 1px solid var(--primary-500);
}

.badge-data-safety {
    background: rgba(32, 198, 183, 0.15);
    color: var(--accent-teal-light);
    border: 1px solid var(--accent-teal);
}

.badge-guide {
    background: rgba(167, 176, 189, 0.1);
    color: var(--light-300);
    border: 1px solid var(--dark-700);
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--light-100);
    margin: 0;
}

.article-excerpt {
    color: var(--light-300);
    font-size: 16px;
    line-height: 1.6;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--light-300);
    font-size: 14px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--duration-normal) var(--easing-default);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-card-hover);
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(58, 167, 255, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.category-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-500);
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--light-100);
    margin: 0;
}

.category-description {
    color: var(--light-300);
    font-size: 14px;
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.review-card {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.review-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dark-700);
}

.review-author {
    flex: 1;
}

.review-name {
    font-weight: 600;
    color: var(--light-100);
    margin-bottom: 4px;
}

.review-rating {
    display: flex;
    gap: 4px;
}

.review-rating svg {
    width: 16px;
    height: 16px;
    fill: var(--warning);
}

.review-text {
    color: var(--light-300);
    line-height: 1.6;
}

/* Newsletter */
.newsletter {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    text-align: center;
}

.newsletter h2 {
    margin-bottom: var(--spacing-md);
}

.newsletter p {
    color: var(--light-300);
    margin-bottom: var(--spacing-xl);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .newsletter-form {
        flex-direction: column;
    }
}

.newsletter-input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-md);
    color: var(--light-200);
    font-size: 16px;
    font-family: var(--font-body);
    min-height: 48px;
}

.newsletter-input:focus {
    outline: none;
    border: 2px solid var(--primary-500);
    box-shadow: var(--shadow-glow-blue);
    background: rgba(30, 41, 59, 0.6);
}

.newsletter-input::placeholder {
    color: var(--light-300);
    opacity: 0.6;
}

/* Footer */
.footer {
    background: var(--dark-800);
    border-top: 1px solid var(--dark-700);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-3xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
}

.footer-section p,
.footer-section a {
    color: var(--light-300);
    font-size: 14px;
    line-height: 1.8;
    display: block;
    margin-bottom: var(--spacing-xs);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--dark-700);
    color: var(--light-300);
    font-size: 14px;
}

/* Contrast Toggle */
.contrast-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-500);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow-blue);
    transition: all var(--duration-fast) var(--easing-default);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contrast-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-400);
}

.contrast-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--light-100);
}

/* Breadcrumb */
.breadcrumb {
    padding: var(--spacing-lg) 0;
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    font-size: 14px;
    color: var(--light-300);
}

.breadcrumb a {
    color: var(--light-300);
}

.breadcrumb a:hover {
    color: var(--primary-400);
}

.breadcrumb svg {
    width: 16px;
    height: 16px;
    stroke: var(--light-300);
}

/* Page Header */
.page-header {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    text-align: center;
    position: relative;
}

.page-header h1 {
    margin-bottom: var(--spacing-md);
}

.page-header p {
    color: var(--light-300);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Disclaimer */
.disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--light-200);
    font-size: 14px;
    margin: var(--spacing-lg) 0;
}

.disclaimer strong {
    color: var(--warning);
}

/* Utilities */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* Advantages Grid */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.advantage-item {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--duration-normal) var(--easing-default);
}

.advantage-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-teal);
    box-shadow: var(--shadow-card-hover);
}

.advantage-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 198, 183, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.advantage-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-teal);
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-sm);
}

.advantage-item p {
    color: var(--light-300);
    font-size: 14px;
}

/* Checklist */
.checklist {
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 600px;
    margin: var(--spacing-xl) auto;
}

.checklist h3 {
    margin-bottom: var(--spacing-lg);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--dark-700);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    color: var(--light-200);
}

.checklist-item input[type="checkbox"]:checked + label {
    color: var(--light-300);
    text-decoration: line-through;
}
