:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-border: #e5e5e5;
    --color-primary: #1f6f43;
    --navbar-height: 64px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.navbar-brand a {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 46px;
    width: auto;
}

.navbar-links ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.navbar-links a:hover {
    color: var(--color-primary);
}

.navbar-language {
    position: relative;
}

.lang-dropdown {
    position: relative;
}

.lang-dropdown-trigger {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1.1rem;
    line-height: 1;
}

.lang-dropdown-trigger::-webkit-details-marker {
    display: none;
}

.lang-dropdown-arrow {
    margin-left: 0.4rem;
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}

.lang-dropdown-label {
    display: none;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.lang-dropdown[open] .lang-dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 140px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 10;
}

.lang-dropdown-menu form {
    margin: 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
}

.lang-option:hover {
    background: var(--color-border);
}

.lang-option.is-active {
    font-weight: 600;
}

.navbar-toggle-checkbox {
    display: none;
}

.navbar-toggle-btn {
    display: none;
    position: relative;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.navbar-toggle-btn span {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.navbar-toggle-btn span:nth-child(1) {
    top: 10px;
}

.navbar-toggle-btn span:nth-child(2) {
    top: 15px;
}

.navbar-toggle-btn span:nth-child(3) {
    top: 20px;
}

.navbar-toggle-checkbox:checked ~ .navbar-toggle-btn span:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

.navbar-toggle-checkbox:checked ~ .navbar-toggle-btn span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle-checkbox:checked ~ .navbar-toggle-btn span:nth-child(3) {
    top: 15px;
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .navbar-toggle-btn {
        display: flex;
    }

    .navbar-links {
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.2s ease;
    }

    .navbar-links ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 1.5rem 1rem;
    }

    .navbar-links li {
        width: 100%;
        padding: 0.5rem 0;
    }

    .navbar-language {
        width: 100%;
    }

    .lang-dropdown-trigger {
        justify-content: space-between;
        width: 100%;
    }

    .lang-dropdown-label {
        display: inline;
        flex: 1;
        text-align: left;
    }

    .lang-dropdown-menu {
        position: static;
        margin-top: 0.5rem;
        width: 100%;
        box-shadow: none;
    }

    .navbar-toggle-checkbox:checked ~ .navbar-links {
        max-height: none;
        overflow-y: auto;
        max-height: calc(100vh - var(--navbar-height));
    }
}

main {
    padding: 2rem 1.5rem;
}

.hero {
    max-width: 720px;
    margin: 2rem auto;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--color-text);
    opacity: 0.8;
}

.hero-search {
    position: relative;
    max-width: 560px;
    margin: 2rem auto 0;
    text-align: left;
}

.hero-search input[type="search"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.hero-search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 20;
}

.hero-search-suggestions[hidden] {
    display: none;
}

.hero-search-suggestion {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 1.1rem;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.hero-search-suggestion:last-child {
    border-bottom: none;
}

.hero-search-suggestion:hover,
.hero-search-suggestion:focus {
    background: var(--color-border);
}

.hero-search-suggestion .suggestion-name {
    font-weight: 600;
}

.hero-search-suggestion .suggestion-year {
    font-size: 0.85rem;
    opacity: 0.7;
}

.hero-search-suggestion-empty {
    padding: 0.75rem 1.1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 480px) {
    .hero-search {
        max-width: 100%;
    }
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 2rem auto;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 160px;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.8;
}

.search-results {
    max-width: 800px;
    margin: 0 auto;
}

.machine-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.machine-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.machine-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
}

.machine-card h2 a {
    color: var(--color-text);
    text-decoration: none;
}

.machine-year {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.machine-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.machine-section {
    flex: 1 1 200px;
}

.machine-section h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.machine-section .placeholder {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.6;
    font-style: italic;
}
