/* Performance-optimized CSS for Air Maestro comparison site */

/* CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header and Navigation */
.nav-container {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h2 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 6rem 1rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.cta-button.primary {
    background: var(--white);
    color: var(--primary-color);
}

.cta-button.primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Comparison Table */
.comparison-section {
    background: var(--bg-light);
}

.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.comparison-table .highlighted-row {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    font-weight: 500;
}

.comparison-table .highlighted-row td:first-child {
    border-left: 4px solid var(--accent-color);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Pricing Section */
.pricing-section {
    background: var(--bg-light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.pricing-card.featured {
    border: 3px solid var(--accent-color);
    transform: scale(1.05);
}

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

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.pricing-card.featured .pricing-header {
    background: linear-gradient(135deg, var(--accent-color), #059669);
}

.pricing-header h3 {
    margin: 0 0 0.5rem;
    color: inherit;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.pricing-features {
    padding: 2rem;
    list-style: none;
    margin: 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-cta {
    display: block;
    margin: 0 2rem 2rem;
    background: var(--accent-color);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pricing-cta:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Reviews Section */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.review-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent-color);
    margin: 0;
}

.review-content {
    margin-bottom: 1.5rem;
}

.review-content p {
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
}

.review-author strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.review-author span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }

    section {
        padding: 3rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .nav-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .comparison-table-wrapper {
        margin: 0 -1rem;
        border-radius: 0;
    }

    .feature-card,
    .review-card,
    .pricing-card {
        margin: 0 -0.5rem;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav-container,
    .hero,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .comparison-table {
        page-break-inside: avoid;
    }
}