/* Motorium39 Premium Design System */
:root {
    /* Colors from design.json */
    --color-blue: #2e89fb;
    --color-green: #a4dd1d;
    --color-dark-green: #4ec21b;
    --color-light-green: #57c630;
    --color-purple: #a58bdd;
    --color-yellow: #fad400;
    --color-orange: #f77913;
    --color-red: #d41c36;

    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-dark: #091b32;
    --color-gray-medium: #1e325b;
    --color-gray-light: #8895a4;
    --color-gray-lighter: #a4aeb9;
    --color-gray-lightest: #e8ebee;

    --bg-light-blue: #f2f9ff;
    --bg-light-gray: #f7f8fa;
    --gradient-blue: linear-gradient(to top, rgb(235, 245, 254), rgb(247, 251, 255));
    --gradient-dark: linear-gradient(to right, #010a16, #091c33);
    --gradient-green-blue: linear-gradient(to right, rgb(78, 194, 27), rgb(154, 212, 14) 40%, rgb(57, 59, 197), rgb(57, 59, 197), rgb(73, 136, 243), rgb(73, 136, 243));

    /* Typography */
    --font-primary: "Inter", sans-serif;
    --font-secondary: "Raleway", sans-serif;
    --font-tertiary: sans-serif;

    --fs-h1: clamp(32px, 3vw, 36px);
    --fs-h2: clamp(26px, 3vw, 30px);
    --fs-h3: clamp(24px, 3vw, 26px);
    --fs-body: 16px;
    --fs-small: 14px;

    /* Spacing */
    --container-max-width: 1300px;
    --section-margin: clamp(60px, 4vw, 100px);
    --gap-md: 20px;
    --radius-md: 10px;
    --radius-lg: 20px;

    /* Effects */
    --transition-fast: 0.3s;
    --transition-slow: 0.6s cubic-bezier(.615, 0, .07, 1);
    --shadow-light: 0 0 16px 0 rgba(96, 121, 169, .08);
    --shadow-medium: 0 0 24px 0 rgba(96, 121, 169, .35);
}

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

body {
    font-family: var(--font-primary);
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

.site-container__wrapper {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    font-family: var(--font-secondary);
    font-weight: 700;
}

/* Header */
.site-header {
    padding: 20px 0;
    background: var(--color-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-blue);
    text-decoration: none;
    font-family: var(--font-secondary);
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav__link {
    text-decoration: none;
    color: var(--color-gray-dark);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav__link:hover {
    color: var(--color-blue);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: var(--gradient-dark);
    color: var(--color-white);
    text-align: center;
}

.hero__title {
    font-size: var(--fs-h1);
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 40px;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-slow);
    cursor: pointer;
    border: none;
}

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

.button--blue:hover {
    background-color: #215684;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: var(--gap-md);
}

.grid--brands {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.brand-card {
    text-align: center;
    padding: 30px 20px;
}

.brand-card__logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.brand-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.2);
    transition: var(--transition-fast);
}

.brand-card:hover .brand-card__logo img {
    filter: grayscale(0);
    transform: scale(1.1);
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-slow);
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    background: var(--color-gray-dark);
    color: var(--color-white);
    padding: 60px 0 20px;
    margin-top: var(--section-margin);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: var(--fs-small);
    opacity: 0.6;
}

/* Mobile Menu */
.burger-toggle {
    display: none;
    cursor: pointer;
    z-index: 1000;
}

.burger-icon {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-gray-medium);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.nav__mobile-bg {
    display: none;
}

@media (max-width: 768px) {
    .burger-toggle {
        display: block;
    }

    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease-in-out;
    }

    .nav.nav--active {
        display: flex;
    }

    .mobile-search {
        display: block !important;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        font-size: 1.5rem;
    }

    .nav__link {
        color: var(--color-gray-dark);
        font-weight: 700;
    }

    /* Burger Animation */
    .burger-toggle.active .burger-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .burger-toggle.active .burger-icon span:nth-child(2) {
        opacity: 0;
    }

    .burger-toggle.active .burger-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Alphabet Index */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
    justify-content: center;
}

.alphabet-nav__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-light-gray);
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.alphabet-nav__item:hover {
    background: var(--color-blue);
    color: var(--color-white);
}

.alphabet-section {
    margin-bottom: 60px;
}

.alphabet-section__title {
    font-size: 2rem;
    color: var(--color-blue);
    border-bottom: 2px solid var(--color-light-blue);
    margin-bottom: 30px;
    padding-bottom: 10px;
}

/* Market Sections */
.market-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.market-nav__item {
    padding: 8px 16px;
    background: var(--color-white);
    border: 1px solid var(--color-light-blue);
    border-radius: var(--radius-sm);
    color: var(--color-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.market-nav__item:hover {
    background: var(--color-blue);
    color: var(--color-white);
}

.market-section {
    margin-bottom: 50px;
}

.market-section__title {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--color-blue);
    background: linear-gradient(90deg, var(--bg-light-gray), transparent);
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Engine Detail Page */
.engine-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.spec-item {
    background: var(--color-white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-fast);
}

.spec-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.spec-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light-blue);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spec-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--color-blue);
}

.spec-content {
    flex-grow: 1;
}

.spec-label {
    font-size: 14px;
    color: var(--color-gray-light);
    margin-bottom: 5px;
    display: block;
}

.spec-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-gray-dark);
}

.engine-hero {
    background: var(--gradient-dark);
    padding: 80px 0 60px;
    color: var(--color-white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 40px;
}

/* Layout Overrides */
.site-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 0 !important;
}

.logo {
    font-family: 'Raleway', sans-serif !important;
    letter-spacing: -0.5px;
    font-weight: 800 !important;
    font-size: 22px !important;
    background: linear-gradient(135deg, var(--color-blue), #1a56a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__link {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    letter-spacing: -0.2px;
}

/* Global Search Styles */
.search-hints {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: none;
    overflow: hidden;
    border: 1px solid #f0f4f8;
    border-top: none;
}

.header-search .search-hints {
    margin-top: 0;
    border-radius: 0 0 10px 10px;
}

.hint-item {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f4f8;
    text-decoration: none;
    transition: 0.2s;
    cursor: pointer;
    text-align: left;
}

.hint-item:last-child {
    border-bottom: none;
}

.hint-item:hover {
    background: var(--bg-light-blue);
}

.hint-title {
    color: var(--color-gray-dark);
    font-weight: 600;
    font-size: 14px;
}

.hint-subtitle {
    color: var(--color-gray-light);
    font-size: 11px;
}

.header-search {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 30px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 10px 20px;
    padding-right: 40px;
    border-radius: 20px;
    border: 1px solid #e0e6ed;
    background: #f8fafc;
    font-size: 14px;
    transition: 0.2s;
    outline: none;
}

.header-search input:focus {
    background: white;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(46, 137, 251, 0.1);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

@media(max-width: 768px) {
    .header-search {
        display: none;
    }
}

/* Page Styles (from Lua) */
.page-section {
    padding: 60px 0;
}

.page-section--large {
    padding: 100px 0;
}

.page-container {
    max-width: 800px;
}

.page-title {
    margin-bottom: 30px;
}

.page-subtitle {
    margin: 30px 0 15px;
}

.page-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

.legal-content {
    line-height: 1.6;
    color: var(--color-gray-dark);
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 40px;
    gap: 30px;
}