/* Motor Genie Hero - Professional Electronics Website Styles */

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

:root {
    /* Primary Colors */
    --primary: 210 84% 45%; /* #1e5bb8 */
    --primary-dark: 210 84% 35%; /* #175191 */
    --primary-light: 210 84% 55%; /* #2870d4 */
    
    /* Secondary Colors */
    --secondary: 210 11% 15%; /* #202329 */
    --secondary-light: 210 11% 25%; /* #353a42 */
    
    /* Neutral Colors */
    --background: 210 11% 98%; /* #f5f7fa */
    --surface: 0 0% 100%; /* #ffffff */
    --surface-alt: 210 11% 96%; /* #f0f3f6 */
    
    /* Text Colors */
    --text-primary: 210 11% 15%; /* #202329 */
    --text-secondary: 210 11% 45%; /* #6b7280 */
    --text-muted: 210 11% 65%; /* #9ca3af */
    
    /* Border Colors */
    --border: 210 11% 85%; /* #d1d5db */
    --border-light: 210 11% 90%; /* #e5e7eb */
    
    /* Status Colors */
    --success: 142 76% 36%; /* #16a34a */
    --warning: 38 92% 50%; /* #f59e0b */
    --error: 0 84% 60%; /* #ef4444 */
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 1rem;
    
    /* Typography */
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
    --shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
    --shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1), 0 2px 4px -2px hsl(0 0% 0% / 0.1);
    --shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
    --transition-slow: all 0.3s ease-in-out;
}

/* Base HTML Elements */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: hsl(var(--text-primary));
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: 1rem;
    color: hsl(var(--text-secondary));
}

a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: var(--transition);
}

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

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
    color: hsl(var(--text-secondary));
}

/* Layout Components */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: white;
    border-color: hsl(var(--primary));
}

.btn-primary:hover {
    background-color: hsl(var(--primary-dark));
    border-color: hsl(var(--primary-dark));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: white;
    border-color: hsl(var(--secondary));
}

.btn-secondary:hover {
    background-color: hsl(var(--secondary-light));
    border-color: hsl(var(--secondary-light));
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

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

/* Header */
.header {
    background-color: hsl(var(--surface));
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--container-padding);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: hsl(var(--text-primary));
}

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

.nav-link {
    color: hsl(var(--text-secondary));
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: hsl(var(--primary));
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: hsl(var(--text-primary));
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, hsl(var(--background)) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.hero-text p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Services Section */
.services {
    padding: 4rem 0;
    background-color: hsl(var(--surface));
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.service-card {
    text-align: center;
    padding: 2rem;
    background-color: hsl(var(--surface));
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

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

/* About Section */
.about {
    padding: 4rem 0;
    background-color: hsl(var(--surface-alt));
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-features {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.about-features li {
    color: hsl(var(--success));
    font-weight: 500;
}

/* Blog Sections */
.blog-preview {
    padding: 4rem 0;
    background-color: hsl(var(--surface));
}

.blog-preview h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.blog-card {
    background-color: hsl(var(--surface));
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.blog-card img {
    width: 64px;
    height: 64px;
    margin: 1.5rem auto 1rem;
    display: block;
}

.blog-card h3 {
    margin: 1rem 1.5rem;
    font-size: var(--font-size-lg);
}

.blog-card h3 a {
    color: hsl(var(--text-primary));
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: hsl(var(--primary));
}

.blog-card p {
    margin: 0 1.5rem 1rem;
    color: hsl(var(--text-secondary));
}

.blog-card .read-more {
    display: block;
    margin: 1rem 1.5rem 1.5rem;
    color: hsl(var(--primary));
    font-weight: 500;
}

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

/* Blog Page Styles */
.blog-header {
    padding: 3rem 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, hsl(var(--background)) 100%);
    text-align: center;
}

.blog-articles {
    padding: 4rem 0;
    background-color: hsl(var(--surface));
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-date,
.blog-category {
    color: hsl(var(--text-muted));
    font-size: var(--font-size-sm);
    background-color: hsl(var(--surface-alt));
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.blog-image {
    margin: 2rem 0;
    text-align: center;
}

.blog-content img {
    width: 80px;
    height: 80px;
}

/* Article Page Styles */
.article-page {
    padding: 2rem 0;
}

.article-header {
    margin-bottom: 3rem;
}

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

.article-date,
.article-category {
    color: hsl(var(--text-muted));
    font-size: var(--font-size-sm);
    background-color: hsl(var(--surface-alt));
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    width: 120px;
    height: 120px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.article-intro {
    font-size: var(--font-size-lg);
    color: hsl(var(--text-primary));
    font-weight: 500;
    margin-bottom: 2rem;
}

.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--text-primary));
}

.article-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--text-primary));
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
}

.article-tags {
    margin-bottom: 2rem;
}

.tag {
    display: inline-block;
    background-color: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: var(--font-size-sm);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background-color: hsl(var(--surface-alt));
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.testimonial-card {
    background-color: hsl(var(--surface));
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: hsl(var(--text-secondary));
}

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

.testimonial-author span {
    color: hsl(var(--text-muted));
    font-size: var(--font-size-sm);
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-dark)) 100%);
    color: white;
    text-align: center;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    color: hsl(var(--primary) / 0.1);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input {
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: var(--font-size-base);
    background-color: rgba(255, 255, 255, 0.9);
    color: hsl(var(--text-primary));
}

.form-group input::placeholder {
    color: hsl(var(--text-muted));
}

.form-group input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 3px hsl(var(--primary-light) / 0.3);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background-color: hsl(var(--surface));
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
}

.social-media h3 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a {
    color: hsl(var(--primary));
    font-weight: 500;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand .brand-text {
    color: white;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-column h4 {
    color: white;
    margin-bottom: 1rem;
}

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

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

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-column a:hover {
    color: white;
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: hsl(var(--surface));
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 1rem;
    border-top: 1px solid hsl(var(--border));
}

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

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
}

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

.cookie-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.hidden {
    display: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 1rem;
}

.modal-content {
    background-color: hsl(var(--surface));
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
}

.cookie-category {
    margin-bottom: 1rem;
}

.cookie-category label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.cookie-category input[type="checkbox"] {
    margin-top: 0.125rem;
}

.cookie-category span {
    font-size: var(--font-size-sm);
    color: hsl(var(--text-secondary));
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Thanks Page */
.thanks {
    padding: 4rem 0;
    text-align: center;
}

.thanks-content {
    max-width: 600px;
    margin: 0 auto;
}

.thanks-icon {
    margin-bottom: 2rem;
}

.thanks-icon img {
    width: 80px;
    height: 80px;
}

.thanks-info {
    margin: 2rem 0;
    text-align: left;
    background-color: hsl(var(--surface-alt));
    padding: 2rem;
    border-radius: 1rem;
}

.thanks-info h3 {
    margin-bottom: 1rem;
}

.thanks-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Legal Pages */
.legal-page {
    padding: 2rem 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.last-updated {
    color: hsl(var(--text-muted));
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--text-primary));
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: hsl(var(--surface));
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .newsletter-form {
        width: 100%;
    }
    
    .article-nav {
        flex-direction: column;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .thanks-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .services,
    .about,
    .blog-preview,
    .testimonials,
    .newsletter,
    .contact {
        padding: 2rem 0;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: var(--font-size-3xl);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .modal,
    .btn,
    .nav-toggle {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
