/*
    CSS for a modern, dark-themed, responsive, and performant automatic door repair website.
    - Mobile-first approach for optimal performance on all devices.
    - Unique dark colour palette and typography for a professional feel.
    - Optimized for Google PageSpeed Insights.
*/

/* --- Base Styles & Typography --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --dark-primary-bg: #1a1a2e;    /* Deep Navy Blue for main background */
    --dark-secondary-bg: #2e3b4e;  /* Dark Slate Grey for sections and cards */
    --accent-color: #4c9cff;       /* Vibrant Sky Blue for call-to-actions */
    --light-text-color: #e0e0e0;   /* Light Grey for readability on dark backgrounds */
    --dark-text-color: #f4f4f4;    /* A slightly lighter shade for contrast */
    --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--light-text-color);
    background-color: var(--dark-primary-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1em;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-text-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container and Layouts --- */
.header-container,
.hero-container,
.services-container,
.why-us-container,
.testimonials-container,
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--light-text-color);
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--dark-secondary-bg);
    padding: 1rem 0;
    box-shadow: var(--shadow-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text-color);
}

.logo svg {
    margin-right: 0.5rem;
}

.logo svg path:first-child {
    fill: var(--light-text-color);
}

.logo svg path:nth-child(2) {
    fill: var(--accent-color);
}

.nav {
    display: none; /* Hidden on mobile */
}

.contact-mobile {
    display: block; /* Visible on mobile */
}

.btn-mobile {
    background-color: var(--accent-color);
    color: var(--dark-primary-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    white-space: nowrap; /* Prevents phone number from wrapping */
    box-shadow: var(--shadow-dark);
}

/* --- Hero Section --- */
.hero-section {
    background-color: var(--dark-primary-bg);
    display: flex;
    flex-direction: column;
    padding: 3rem 1.5rem;
    text-align: center;
}

.hero-content {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--dark-primary-bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    box-shadow: 0 6px 15px rgba(76, 156, 255, 0.4);
}

.cta-button:hover {
    background-color: #2e7ad8;
    transform: translateY(-2px);
}

.hero-image-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

/* --- Services Section --- */
.services-section,
.why-us-section,
.testimonials-section {
    padding: 4rem 1.5rem;
}

.services-section {
    background-color: var(--dark-secondary-bg);
}

.service-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background-color: var(--dark-primary-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--accent-color);
}

/* --- Why Choose Us Section --- */
.why-us-section {
    background-color: var(--dark-primary-bg);
    color: var(--light-text-color);
}

.why-us-section .section-title {
    color: var(--light-text-color);
}

.why-us-items {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    text-align: center;
}

.why-us-item {
    background-color: var(--dark-secondary-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-dark);
}

.why-us-item .icon {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-color);
    margin-bottom: 0.5em;
}

.why-us-item h3 {
    font-size: 1.2rem;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: var(--dark-secondary-bg);
}

.testimonial-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.testimonial-card {
    background-color: var(--dark-primary-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-dark);
    font-style: italic;
    border-left: 5px solid var(--accent-color);
}

.testimonial-card .author {
    margin-top: 1em;
    font-style: normal;
    font-weight: 600;
    color: var(--accent-color);
}

/* --- Footer --- */
.footer {
    background-color: #11111a;
    color: var(--light-text-color);
    padding: 4rem 1.5rem;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.contact-details {
    margin-top: 1rem;
}

.phone-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text-color);
}

.phone-link:hover {
    color: var(--accent-color);
}

.footer-note {
    margin-top: 2rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* --- Media Queries for larger screens (Desktop) --- */
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.6rem; }

    .header-container {
        padding: 0 2rem;
    }

    .nav {
        display: flex;
        gap: 2rem;
    }
    
    .nav a {
        font-weight: 600;
        font-size: 1.1rem;
        color: var(--light-text-color);
    }

    .btn-contact {
        background-color: var(--accent-color);
        color: var(--dark-primary-bg);
        padding: 0.6rem 1.5rem;
        border-radius: 5px;
        box-shadow: 0 4px 10px rgba(76, 156, 255, 0.3);
    }

    .contact-mobile {
        display: none;
    }

    .hero-section {
        flex-direction: row;
        text-align: left;
        padding: 5rem 2rem;
        gap: 3rem;
    }

    .hero-content {
        margin-bottom: 0;
    }
    
    .hero-image-container {
        min-width: 450px;
    }
    
    .why-us-items,
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 4rem 2rem;
    }
    
    .footer-note {
        margin-top: 0;
    }
}

/* --- Accessibility & Image Optimization --- */
img[loading="lazy"] {
    /* Prevents CLS (Cumulative Layout Shift) */
    width: 100%;
    aspect-ratio: 1.5; /* Sets an aspect ratio for the image container */
}

/* Simple focus styles for keyboard navigation */
a:focus, button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}
