/* Ken's Auto Repair - Professional Auto Service Theme */

/* ========================================
   CSS VARIABLES - REQUIRED
   ======================================== */

:root {
    /* Color Variables - Based on Ken's Auto Repair Brand */
    --brand-primary: #69ABC3;      /* Soft Blue - Primary Brand Color */
    --brand-dark: #2D2D2D;         /* Dark Gray - Professional Base */
    --brand-light: #F5F8FA;        /* Light Background */
    --brand-accent: #4A90A4;       /* Darker Blue - Accents */
    --brand-neutral: #6B7280;      /* Gray - Text & Borders */
    --brand-secondary: #043d51;    /* Deep Blue - Secondary Brand Color */

    /* Additional Auto Industry Colors */
    --color-success: #10B981;      /* Green for success states */
    --color-warning: #F59E0B;      /* Orange for warnings */
    --color-danger: #EF4444;       /* Red for alerts */
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Typography Scale - REQUIRED */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */

    /* Spacing System */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    --spacing-3xl: 4rem;     /* 64px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;
}

/* ========================================
   REQUIRED CMS UTILITY CLASSES
   ======================================== */

/* Background Colors */
.cms-bg-primary { background-color: var(--brand-primary); }
.cms-bg-dark { background-color: var(--brand-dark); }
.cms-bg-light { background-color: var(--brand-light); }
.cms-bg-accent { background-color: var(--brand-accent); }
.cms-bg-neutral { background-color: var(--brand-neutral); }
.cms-bg-secondary { background-color: var(--brand-secondary); }

/* Text Colors */
.cms-text-primary { color: var(--brand-primary); }
.cms-text-dark { color: var(--brand-dark); }
.cms-text-light { color: var(--brand-light); }
.cms-text-accent { color: var(--brand-accent); }
.cms-text-neutral { color: var(--brand-neutral); }
.cms-text-secondary { color: var(--brand-secondary); }

/* Border Colors */
.cms-border-primary { border-color: var(--brand-primary); }
.cms-border-dark { border-color: var(--brand-dark); }
.cms-border-light { border-color: var(--brand-light); }
.cms-border-accent { border-color: var(--brand-accent); }
.cms-border-neutral { border-color: var(--brand-neutral); }
.cms-border-secondary { border-color: var(--brand-secondary); }

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--brand-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--brand-dark);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--brand-neutral);
    line-height: 1.7;
}

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

a:hover {
    color: var(--brand-accent);
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-full {
    width: 100%;
    padding: 0 var(--spacing-md);
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--text-base);
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
}

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

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

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

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

.btn-dark {
    background-color: var(--brand-dark);
    color: var(--color-white);
    border-color: var(--brand-dark);
}

.btn-dark:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
}

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

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

.section-sm {
    padding: var(--spacing-2xl) 0;
}

.section-lg {
    padding: 5rem 0;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.625rem;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
    }

    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        display: block;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    h2,
    h3,
    p {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
