/*
 * XPERT XBOX Custom Styles
 * Version: 1.0.0
 * Optimized for performance and Core Web Vitals
 */

/* ==========================================================================
   Base Styles & Typography
   ========================================================================== */

:root {
    --color-primary: #10b981;
    --color-primary-dark: #059669;
    --color-secondary: #06b6d4;
    --color-dark: #0f172a;
    --color-dark-alt: #1e293b;
    --color-light: #f1f5f9;
    --color-text: #334155;
    --color-text-light: #64748b;
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-tech: 'Orbitron', monospace;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);
    overflow-x: hidden;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* ==========================================================================
   Content Post Cards
   ========================================================================== */

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 24px;
}

.post-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-dark);
    line-height: 1.3;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-excerpt {
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* ==========================================================================
   Affiliate Disclosure Box
   ========================================================================== */

.xpx-disclosure {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    box-shadow: var(--shadow-sm);
}

.xpx-disclosure strong {
    color: var(--color-dark);
    font-size: 1.05rem;
}

/* ==========================================================================
   Product Comparison Tables
   ========================================================================== */

.xpx-comparison-table {
    overflow-x: auto;
    margin: 40px 0;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.xpx-comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.xpx-comparison-table thead {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: white;
}

.xpx-comparison-table th,
.xpx-comparison-table td {
    padding: 16px;
    text-align: left;
}

.xpx-comparison-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.xpx-comparison-table tbody tr:hover {
    background: #f8fafc;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .post-card-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .post-card-content {
        padding: 16px;
    }
    
    .post-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .social-share,
    .back-to-top {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

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

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