* {
    box-sizing: border-box;
}

:root {
    --container: 1200px;
    --page-gutter: 20px;
    --color-black: #000;
    --color-yellow: #ffd118;
    --transition: 180ms ease;
}

@font-face {
  font-family: "Honfleur-Heavy";
  src: url("./fonts/Honfleur-Heavy.otf") format("truetype");
  font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "YS Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #21201f;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    width: 100%;
    background: var(--color-black);
}

.nav-inner {
    position: relative;
    width: min(100%, var(--container));
    min-height: 104px;
    margin-inline: auto;
    padding: 16px var(--page-gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 5vw, 80px);
}

.nav-menu {
    display: contents;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 40px);
}

.nav-left {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.nav-right {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.nav-link {
    color: rgb(255 255 255 / 85%);
    font-size: clamp(16px, 1.5vw, 22px);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--color-yellow);
}

.nav-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    color: var(--color-yellow);
    font-size: clamp(46px, 5vw, 72px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    font-family: honfleur-heavy, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 10px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 10px;
    background: rgb(255 255 255 / 6%);
    color: #fff;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.nav-toggle:hover {
    border-color: rgb(255 209 24 / 65%);
    background: rgb(255 209 24 / 10%);
}

.nav-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 220ms ease, opacity 180ms ease;
}

.nav-toggle-line + .nav-toggle-line {
    margin-top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.btn-outline-nav {
    min-height: 44px;
    padding: 9px 24px;
    border: 2px solid #fff;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: clamp(15px, 1.35vw, 20px);
    font-weight: 700;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.btn-outline-nav:hover {
    background: #fff;
    color: #000;
}

.tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.tool-header img {
    height: 32px;
}

.city-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #e9ecef;
}

.city-selector svg {
    width: 20px;
    height: 20px;
    color: #f5a11a;
    flex: 0 0 auto;
}

.city-selector select,
.selector-group select,
.selector-group input {
    font-family: inherit;
    color: #21201f;
}

.city-selector select,
.selector-group select {
    cursor: pointer;
}

.city-selector select {
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    outline: 0;
    padding: 4px 8px;
}

.city-selector select:hover {
    color: #f5a11a;
}

.main-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.blog-anchor {
    height: 1px;
}

h1 {
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 8px;
    font-weight: 600;
}

h2 {
    font-size: 22px;
    line-height: 1.3;
    margin: 0;
}

.subtitle {
    color: #666;
    margin: 0 0 32px;
    font-size: 16px;
}

.city-note,
.note-box {
    background: #fff;
    border-left: 4px solid #f5a11a;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.city-note {
    padding: 12px 16px;
}

.city-note strong {
    color: #f5a11a;
}

.note-box {
    padding: 16px 20px;
}

.note-box ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.note-box li {
    margin: 4px 0;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.selector-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.selector-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.selector-group select,
.selector-group input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.selector-group select:hover,
.selector-group input:hover {
    border-color: #f5a11a;
}

.selector-group select:focus,
.selector-group input:focus {
    outline: 0;
    border-color: #f5a11a;
    box-shadow: 0 0 0 3px rgba(245, 161, 26, 0.12);
}

.selector-group select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #ddd;
    color: #777;
}

.selector-group input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #ddd;
    color: #777;
}

.autocomplete {
    position: relative;
    width: 100%;
}

.autocomplete-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    padding: 6px;
}

.autocomplete-option,
.autocomplete-empty {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    line-height: 1.25;
}

.autocomplete-option {
    cursor: pointer;
    color: #21201f;
}

.autocomplete-option:hover,
.autocomplete-option.is-active {
    background: #fff4dc;
}

.autocomplete-empty {
    color: #777;
    cursor: default;
}

.results-section {
    margin-top: 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.selected-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-car-info,
.selected-city-info {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.selected-car-info {
    padding: 12px 20px;
    font-size: 16px;
}

.selected-car-info strong {
    color: #f5a11a;
    font-weight: 600;
}

.selected-city-info {
    padding: 8px 16px;
    font-size: 14px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid #4caf50;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #21201f;
}

.category-status {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    background: #4caf50;
    color: #fff;
}

.category-requirements {
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 20px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.no-results p {
    margin: 10px 0;
    color: #666;
}

.no-results .main-message {
    font-size: 18px;
    color: #d93025;
    font-weight: 500;
}

[hidden] {
    display: none !important;
}

.footer-wrap {
    background: #000;
}

.footer {
    width: min(100%, var(--container));
    margin-inline: auto;
    padding: 60px var(--page-gutter) 0;
}

.footer-top {
    padding-bottom: 50px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(36px, 5vw, 64px);
    border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-block;
    color: var(--color-yellow);
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    font-family: honfleur-heavy, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.footer-brand p {
    max-width: 340px;
    margin: 0;
    color: rgb(255 255 255 / 55%);
    font-size: 14px;
    line-height: 1.75;
}

.footer-contact {
    margin-top: 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.footer-contact span {
    margin-bottom: 4px;
    display: block;
    color: rgb(255 255 255 / 40%);
    font-size: 12px;
    font-weight: 400;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
}

.footer-col h2 {
    margin: 0 0 20px;
    color: rgb(255 255 255 / 45%);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-col a {
    margin-bottom: 12px;
    display: block;
    color: rgb(255 255 255 / 75%);
    font-size: 14px;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-col a:hover,
.footer-contact a:hover {
    color: var(--color-yellow);
}

.footer-bottom {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-copy {
    margin: 0;
    color: rgb(255 255 255 / 38%);
    font-size: 13px;
}

.footer-copy a {
    color: inherit;
}

@media (max-width: 640px) {
    :root {
        --page-gutter: 14px;
    }

    .app {
        padding: 14px 12px 28px;
    }

    .nav-inner {
        min-height: 76px;
        grid-template-columns: auto 1fr auto;
        gap: 16px;
    }

    .nav-logo {
        grid-column: 1;
        justify-self: start;
        font-size: 38px;
    }

    .nav-toggle {
        display: block;
        grid-column: 3;
        justify-self: end;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: var(--page-gutter);
        right: var(--page-gutter);
        display: none;
        padding: 18px;
        border: 1px solid rgb(255 255 255 / 12%);
        border-radius: 12px;
        background: #050505;
        box-shadow: 0 18px 40px rgb(0 0 0 / 30%);
    }

    .nav-menu.is-open {
        display: grid;
        gap: 14px;
    }

    .nav-left,
    .nav-right {
        display: grid;
        gap: 12px;
        justify-self: stretch;
    }

    .btn-outline-nav {
        width: 100%;
    }

    .main-card {
        padding: 18px;
        border-radius: 10px;
    }

    h1 {
        font-size: 23px;
        line-height: 1.22;
    }

    h2 {
        font-size: 19px;
    }

    .subtitle {
        margin-bottom: 22px;
    }

    .tool-header {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .tool-header img {
        width: 142px;
        height: auto;
    }

    .city-selector {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 10px 12px;
    }

    .city-selector select {
        width: 100%;
        font-size: 16px;
    }

    .city-note,
    .note-box {
        font-size: 13px;
    }

    .note-box {
        padding: 14px 16px;
    }

    .selector-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .selector-grid {
        gap: 16px;
        margin-bottom: 24px;
    }

    .selector-group select,
    .selector-group input {
        min-height: 48px;
        font-size: 16px;
    }

    .autocomplete-menu {
        max-height: 220px;
    }

    .results-section {
        margin-top: 28px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .selected-summary,
    .selected-car-info,
    .selected-city-info {
        width: 100%;
    }

    .selected-car-info,
    .selected-city-info {
        border-radius: 10px;
    }

    .category-card {
        padding: 18px;
    }

    .no-results {
        padding: 36px 16px;
    }

    .footer {
        padding-top: 44px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding-bottom: 34px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    :root {
        --page-gutter: 10px;
    }

    .nav-inner {
        min-height: 68px;
        padding-block: 10px;
    }

    .nav-logo {
        font-size: 34px;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
    }

    .app {
        padding-inline: 10px;
    }

    .main-card {
        padding: 14px;
    }

    h1 {
        font-size: 21px;
    }

    .footer-brand .logo {
        font-size: 34px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .nav-inner {
        grid-template-columns: auto 1fr auto;
        min-height: 86px;
    }

    .nav-logo {
        grid-column: 1;
        justify-self: start;
        font-size: 46px;
    }

    .nav-toggle {
        display: block;
        grid-column: 3;
        justify-self: end;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: var(--page-gutter);
        right: var(--page-gutter);
        display: none;
        padding: 20px;
        border: 1px solid rgb(255 255 255 / 12%);
        border-radius: 12px;
        background: #050505;
        box-shadow: 0 18px 40px rgb(0 0 0 / 30%);
    }

    .nav-menu.is-open {
        display: grid;
        gap: 16px;
    }

    .nav-left,
    .nav-right {
        justify-self: stretch;
        justify-content: space-between;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}
